diff --git a/.github/ISSUE_TEMPLATE/release.yml b/.github/ISSUE_TEMPLATE/release.yml index e8b733f0f83..ac83a626e3e 100644 --- a/.github/ISSUE_TEMPLATE/release.yml +++ b/.github/ISSUE_TEMPLATE/release.yml @@ -20,13 +20,14 @@ body: - [ ] Slack post advising of upcoming release & linking to issue - [ ] Advance warning in developer/community call - [ ] Final agreement to start branch in team call & identification of outstanding issues - - [ ] Agree required updates/versions for additional repos including egeria-ui, egeria-reactui, connectors etc + - [ ] Agree required updates/versions for additional connector repos etc Branching & Correcting versions - [ ] Create branch (egeria-release-x.y) - [ ] Reassign any issues not being worked on to the next release - [ ] Update version for main (ie x.y-SNAPSHOT > x.y+1-SNAPSHOT) - [ ] Update version for release branch (ie x.y-SNAPSHOT -> x.y) + Final updates to the release - [ ] Ensure any remaining fixes are merged into branch (and vice-versa to main) @@ -35,11 +36,11 @@ body: - [ ] Check security scans (ie owasp dependency check) Generate a release image for testing - - [ ] Start [Release](https://github.com/odpi/egeria/actions/workflows/release.yml) pipeline manually to generate container image and stage artifacts on maven central + - [ ] Start [Release](https://github.com/odpi/egeria/actions/workflows/release-v5.yml) pipeline manually to generate container image and stage artifacts on maven central. Remember to select the release branch rather than `main`. Updating the Helm Charts (egeria-charts repo) - - [ ] checker correct container images are on [docker.io](https://hub.docker.com/u/odpi) & [quay.io](https://quay.io/organization/odpi) (these are built by the 'merge' build of a release) + - [ ] check correct container images are on [docker.io](https://hub.docker.com/u/odpi) & [quay.io](https://quay.io/organization/odpi) (these are built by the 'merge' build of a release) - [ ] update image versions for helm charts [egeria-charts](https://github.com/odpi/egeria-charts/) repo (using -prerelease for chart version) - check/update the [strimzi chart versions](https://github.com/strimzi/strimzi-kafka-operator/releases) - check/update supported kafka version used for the strimzi CR in each chart @@ -53,7 +54,7 @@ body: - [ ] Verify egeria-base chart (pods active/ready) - [ ] Check notebooks (config, start, data catalog at a minimum) - [ ] Check Egeria UI (only possible to check it runs and run UI lab) - - [ ] Check React UI (rex, tex, glossary author). Some of the steps descibed [here](https://egeria-project.org/education/egeria-dojo/running-egeria/user-interfaces/ecosystem-ui/ecosystem-ui-start/) + - [ ] Check React UI (rex, tex, glossary author). Some of the steps described [here](https://egeria-project.org/education/egeria-dojo/running-egeria/user-interfaces/ecosystem-ui/ecosystem-ui-start/) - [ ] Check and validate [CTS results](https://egeria-project.org/guides/operations/kubernetes/charts/cts/) - CTS using in-memory - CTS using graph @@ -63,14 +64,14 @@ body: - [ ] Update release notes in [egeria-docs](https://github.com/odpi/egeria-docs/tree/main/site/docs/release-notes) Final build and publish - - [ ] Check if the Release pipeline rlease artifacts are shown in staging repo in [OSS Repository Manager](https://oss.sonatype.org/#welcome) + - [ ] Check if the Release pipeline release artifacts are shown in staging repo in [OSS Repository Manager](https://oss.sonatype.org/#welcome) - [ ] Close staging repo & validate artifacts ok (number, structure, validations) on oss.sonatype.org - [ ] Check 'release' repo on oss.sonatype.org has artifacts - - [ ] Release the repo (takes time for the operation to complete and for the arifacts to be visible in maven central repository) + - [ ] Release the repo (takes time for the operation to complete and for the artifacts to be visible in maven central repository) - [ ] Create final [github release](https://github.com/odpi/egeria/releases) (add link to egeria docs) - [ ] Update final versions of egeria-charts to release ie x.y - [ ] Publish that release is now shipped via slack #egeria-announce - - [ ] Post on egeria-annouce [mailing list](egeria-announce@lists.lfaidata.foundation) + - [ ] Post on egeria-announce [mailing list](egeria-announce@lists.lfaidata.foundation) - [ ] Additional posts to social media - [ ] Communicate to other repo owners ie for connectors so that they can be rebuilt/shipped as needed (Egeria Dev Projects etc.) diff --git a/.github/workflows/merge-v5.yml b/.github/workflows/merge-v5.yml index 1d492e4e518..c5e977e1328 100644 --- a/.github/workflows/merge-v5.yml +++ b/.github/workflows/merge-v5.yml @@ -95,7 +95,7 @@ jobs: with: push: true tags: odpi/egeria:${{ env.VERSION }}, odpi/egeria:latest, quay.io/odpi/egeria:${{ env.VERSION }}, quay.io/odpi/egeria:latest - context: ./open-metadata-deployment/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz + context: ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz platforms: linux/amd64,linux/arm64 - name: Build and push(egeria) to quay.io and docker.io (no tag latest) if: ${{ github.ref != 'refs/heads/main'}} @@ -103,7 +103,7 @@ jobs: with: push: true tags: odpi/egeria:${{ env.VERSION }}, quay.io/odpi/egeria:${{ env.VERSION }} - context: ./open-metadata-deployment/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz + context: ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz platforms: linux/amd64,linux/arm64 # Publish container images(egeria-configure) to quay.io and docker.io - name: Build and push(egeria-configure) to quay.io and docker.io (tag latest) diff --git a/.github/workflows/release-v5.yml b/.github/workflows/release-v5.yml index 94be5084daf..f010a50da81 100644 --- a/.github/workflows/release-v5.yml +++ b/.github/workflows/release-v5.yml @@ -76,7 +76,7 @@ jobs: with: push: true tags: odpi/egeria:${{ env.VERSION }}, odpi/egeria:stable, quay.io/odpi/egeria:${{ env.VERSION }}, quay.io/odpi/egeria:stable - context: ./open-metadata-deployment/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz + context: ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz platforms: linux/amd64,linux/arm64 # Publish container images(egeria-configure) to quay.io and docker.io - name: Build and push(egeria-configure) to quay.io and docker.io diff --git a/open-metadata-distribution/README.md b/open-metadata-distribution/README.md index e09841c6cba..6513fcde695 100644 --- a/open-metadata-distribution/README.md +++ b/open-metadata-distribution/README.md @@ -3,11 +3,7 @@ # Open Metadata Distribution -This module collects together the Egeria artifacts for different scenarios. This includes: - -* 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 **[Egeria UI Application](egeria-ui-application)** contains the runtime for the Egeria's General User UI backend services. -* 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. +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. diff --git a/open-metadata-distribution/egeria-ui-application/README.md b/open-metadata-distribution/egeria-ui-application/README.md deleted file mode 100644 index 6a32655e1f4..00000000000 --- a/open-metadata-distribution/egeria-ui-application/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Egeria UI Application Distribution TAR file - -The **Egeria UI Application** module creates a distribution **tar** file that can be copied -and used to install Egeria's Web-based User Interface. 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/egeria-ui-application/build.gradle b/open-metadata-distribution/egeria-ui-application/build.gradle deleted file mode 100644 index 55b43758f6a..00000000000 --- a/open-metadata-distribution/egeria-ui-application/build.gradle +++ /dev/null @@ -1,96 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -plugins { - id 'distribution' -} - -apply plugin: 'distribution' - -jar.enabled=false - -description = 'Egeria User Interface Assembly' - -dependencies { - implementation project(':open-metadata-implementation:user-interfaces:ui-chassis:ui-chassis-spring') -} - -distributions { - egeriaui { - //distributionBaseName = "${rootProject.name}-ui-distribution" - contents { - into('') { - from { project(':open-metadata-implementation:user-interfaces:ui-chassis:ui-chassis-spring').bootJar } - fileMode = 0755 - } - into('') { - from { "$rootProject.projectDir/open-metadata-distribution/egeria-ui-application/docs" } - fileMode = 0755 - } - into('') { - from ("$rootProject.projectDir/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources") { - include 'applications.properties' - include 'application.yml' - include 'demo-users.yml' - } - fileMode = 0755 - } - into('') { - from(rootProject.projectDir) { - include 'NOTICE' - include 'LICENSE' - include 'keystore.p12' - include 'truststore.p12' - } - fileMode = 0755 - } - } - } -} -// Override the distribution filenames to match what we use with maven (replaces baseName above) -egeriauiDistTar.compression = Compression.GZIP -//egeriaDistTar.archiveExtension = 'tar.gz' -egeriauiDistTar.archiveFileName = (rootProject.name + '-' + rootProject.version + '-distribution.tar.gz') -egeriauiDistZip.enabled=false // TODO: does not seem to work - -// Ditto for the deploy distribution - - -task unzip(type: Copy) { - String zipFile = "${project.buildDir}/distributions/${rootProject.name}-${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 -} - -egeriauiDistTar.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/egeria-ui-application/docs/README.md b/open-metadata-distribution/egeria-ui-application/docs/README.md deleted file mode 100644 index e1ddfbf138e..00000000000 --- a/open-metadata-distribution/egeria-ui-application/docs/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Egeria's Web-based User Interface - -Egeria's user interface provides the ability to search for assets and related information and display lineage. - -Further information about this user interface can be found on -[Egeria's website](https://egeria-project.org/user-interfaces/general/overview/). - - ----- -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/docker-build/README.md b/open-metadata-distribution/omag-server-platform/docs/docker-build/README.md index c6628a6e312..68d0993e408 100644 --- a/open-metadata-distribution/omag-server-platform/docs/docker-build/README.md +++ b/open-metadata-distribution/omag-server-platform/docs/docker-build/README.md @@ -32,7 +32,7 @@ found under the images managed by that daemon. For example, if you are using [Docker Desktop](https://www.docker.com/products/docker-desktop/), the docker image is located in the **Images** tab. -To run the resulting image from the command line, use `docker run -p 9443:9443 odpi/egeria-platform:{tagName}`, again replacing `{tagName}` with your chosen tag. +To run the resulting image from the command line, use `docker run -p 9443:9443 -p 9092:9092 odpi/egeria-platform:{tagName}`, again replacing `{tagName}` with your chosen tag. diff --git a/open-metadata-distribution/open-metadata-assemblies/README.md b/open-metadata-distribution/open-metadata-assemblies/README.md deleted file mode 100644 index 6896553bd38..00000000000 --- a/open-metadata-distribution/open-metadata-assemblies/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Open Metadata Distribution TAR file - -The **Open Metadata Assemblies** module creates a distribution **tar** file that can be copied -and used to install Egeria. 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/open-metadata-assemblies/build.gradle b/open-metadata-distribution/open-metadata-assemblies/build.gradle deleted file mode 100644 index 328b5184d0b..00000000000 --- a/open-metadata-distribution/open-metadata-assemblies/build.gradle +++ /dev/null @@ -1,294 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -plugins { - id 'distribution' -} - -apply plugin: 'distribution' - -jar.enabled=false - -description = 'Open Metadata Assemblies' - -dependencies { - - // Dependencies for the main server 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:repository-services-connectors:open-metadata-collection-store-connectors:xtdb-repository-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:csv-lineage-import-integration-connector') - implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-audit-integration-connector') - implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-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:file-survey-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:lineage-warehouse-connectors:lineage-warehouse-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-implementation:adapters:open-connectors:system-connectors:apache-atlas-connectors') - implementation project(':open-metadata-implementation:adapters:open-connectors:system-connectors:postgres-server-connectors') - implementation project(':open-metadata-implementation:adapters:open-connectors:secrets-store-connectors:env-variable-secrets-store-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-categories-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:digital-architecture:digital-architecture-client') - implementation project(':open-metadata-implementation:access-services:digital-service:digital-service-client') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-client') - implementation project(':open-metadata-implementation:access-services:governance-server:governance-server-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-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:survey-action:survey-action-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-server-services:engine-host-services:engine-host-services-client') - implementation project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-client') - implementation project(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-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: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('server') { - // Just the chassis - for backward compatibility - from { project(':open-metadata-implementation:server-chassis:server-chassis-spring').bootJar } - rename { String fileName -> - fileName.replace("server-chassis-spring", "omag-server") - } - fileMode = 0755 - } - into('server/lib') { - // All our connectors, plus discovery sample & the security plugin - 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:xtdb-repository-connector').jar } - 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: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:file-survey-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:csv-lineage-import-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:kafka-audit-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: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:lineage-warehouse-connectors:lineage-warehouse-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-implementation:adapters:open-connectors:secrets-store-connectors:env-variable-secrets-store-connector').jar } - from { project(':open-metadata-implementation:adapters:open-connectors:system-connectors:apache-atlas-connectors').jar } - from { project(':open-metadata-resources:open-metadata-samples:governance-services-sample').jar } - fileMode = 0755 - } - 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/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:xtdb-repository-connector').shadowJar } - 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: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:file-survey-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:csv-lineage-import-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:lineage-warehouse-connectors:lineage-warehouse-janus-connector').jar } - from { project(':open-metadata-resources:open-metadata-samples:open-metadata-security-samples').jar } - from { project(':open-metadata-implementation:adapters:open-connectors:system-connectors:apache-atlas-connectors').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('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('samples') { - 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-categories-sample').shadowJar } - from { project(':open-metadata-resources:open-metadata-samples:admin-services-samples:config-metadata-server-sample').shadowJar } - fileMode = 0755 - } - into('user-interface') { - from { project(':open-metadata-implementation:user-interfaces:ui-chassis:ui-chassis-spring').bootJar } - fileMode = 0755 - } - into('conformance-suite') { - from { project(':open-metadata-conformance-suite:open-metadata-conformance-suite-client').shadowJar } - fileMode = 0755 - } - into('') { - from(rootProject.projectDir) { - include 'NOTICE' - include 'LICENSE' - include 'truststore.p12' - include 'keystore.p12' - include 'application.properties' - include 'content-packs/*' - include 'sample-data/*/*' - } - 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 + '-' + 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}-${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/open-metadata-assemblies/docs/conformance-suite/README.md b/open-metadata-distribution/open-metadata-assemblies/docs/conformance-suite/README.md deleted file mode 100644 index 86e846d9172..00000000000 --- a/open-metadata-distribution/open-metadata-assemblies/docs/conformance-suite/README.md +++ /dev/null @@ -1,18 +0,0 @@ - - - -# Open Metadata Conformance Suite - -The open metadata conformance suite contains conformance tests to verify that -a specific technology conforms with the open metadata and governance -standards. - -Details of the test can be found on the -[Egeria website](https://egeria.odpi.org/open-metadata-conformance-suite/) - - - - ----- -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-assemblies/docs/omag-client/README.md b/open-metadata-distribution/open-metadata-assemblies/docs/omag-client/README.md deleted file mode 100644 index f1eb09389e9..00000000000 --- a/open-metadata-distribution/open-metadata-assemblies/docs/omag-client/README.md +++ /dev/null @@ -1,20 +0,0 @@ - - - -# Open Metadata and Governance (OMAG) Clients - -The OMAG Clients contains the jar files for clients to the -Open Metadata Access Services (OMASs) and Administration Services. These services -provide domain-specific services for open metadata and governance. - -Further information about this client library can be found on the Egeria website: - -* [Description of the OMAG Client Libraries](https://egeria-project.org/guides/developer/#using-the-omas-clients). -* [Tutorial describing how to use the OMAG Clients](https://egeria-project.org/education/tutorials/omag-client-tutorial/). -* [Code Samples showing the use of the OMAG Clients](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-assemblies/docs/omag-server/README.md b/open-metadata-distribution/open-metadata-assemblies/docs/omag-server/README.md deleted file mode 100644 index 83e940415fa..00000000000 --- a/open-metadata-distribution/open-metadata-assemblies/docs/omag-server/README.md +++ /dev/null @@ -1,21 +0,0 @@ - - - -# Open Metadata and Governance (OMAG) Server - -The OMAG Server is an Egeria Server that runs the open metadata -and governance services. - -Further information about this server can be found on the ODPi Egeria website: - -* [Description of the OMAG Server](https://egeria-project.org/concepts/omag-server). -* [Tutorial describing how to operate the OMAG Server](https://egeria-project.org/education/tutorials/omag-server-tutorial/overview/). -* [Reference Guide for the OMAG Server Administration Services](https://egeria-project.org/guides/admin) -used to configure which capabilities -that you want to be active in the server. - - - ----- -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-assemblies/docs/ui/README.md b/open-metadata-distribution/open-metadata-assemblies/docs/ui/README.md deleted file mode 100644 index e1ddfbf138e..00000000000 --- a/open-metadata-distribution/open-metadata-assemblies/docs/ui/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Egeria's Web-based User Interface - -Egeria's user interface provides the ability to search for assets and related information and display lineage. - -Further information about this user interface can be found on -[Egeria's website](https://egeria-project.org/user-interfaces/general/overview/). - - ----- -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/README.md b/open-metadata-implementation/access-services/README.md index 276a0bf0c10..0403b741f9c 100644 --- a/open-metadata-implementation/access-services/README.md +++ b/open-metadata-implementation/access-services/README.md @@ -44,12 +44,6 @@ asset(s) and understand how these assets are being used and governed. The Community Profile OMAS supports the administration for a community and related user profiles. These communities are involved in reviewing and crowd-sourcing knowledge about the data assets and their use. -* **[data-engine](data-engine)** - exchange metadata with a data processing engine. - - The Data Engine OMAS provides APIs and events for a data movement/processing -engine to record the changes it is making to the data landscape. -This information forms a key part of asset lineage. - * **[data-manager](data-manager)** - exchange metadata with a data manager. The Data Manager OMAS provides technology-specific APIs to enable technologies that manage collections of data @@ -137,11 +131,6 @@ invalid licensing, job failures, and many more. The Stewardship Action OMAS also enables the review and triage of the exceptions, simple remediation and status reporting. -* **[subject-area](subject-area)** - develop a glossary. - - The Subject Area OMAS is for tools that support subject-matter experts -who are defining glossaries for a specific subject area, such as "customer data". - ## Using the OMASs The OMASs run in either a [Metadata Access Point](https://egeria-project.org/concepts/metadata-access-point) diff --git a/open-metadata-implementation/access-services/asset-catalog/README.md b/open-metadata-implementation/access-services/asset-catalog/README.md deleted file mode 100644 index 1ae20e0debc..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/README.md +++ /dev/null @@ -1,67 +0,0 @@ - - - -![Deprecated](../../../images/egeria-content-status-deprecated.png#pagewidth) - -# Asset Catalog Open Metadata Access Service (OMAS) - -The Asset Catalog OMAS provides services to search for data assets. - -The search locates assets based on the content of the Asset metadata itself and the metadata that links -to it. - -The Asset Catalog REST API supports: -* the retrieval of assets based on unique identifiers -* the retrieval of asset's relationships and classifications -* to query for related assets -* the retrieval of assets based on their type - -* [Documentation](https://egeria-project.org/services/omas/asset-catalog/overview) - -## Design Information - -The module structure for the Asset Catalog OMAS is as follows: - -* [asset-catalog-client](asset-catalog-client) supports the client library. -* [asset-catalog-api](asset-catalog-api) supports the common Java classes that are used both by the client and the server. -* [omas-asset-catalog-server](asset-catalog-server) supports the server side implementation of the access service. - This includes the - * interaction with the [administration services](../../admin-services) for - registration, configuration, initialization and termination of the access service. - * interaction with the [repository services](../../repository-services) to work with open metadata from the - [cohort](https://egeria-project.org/concepts/cohort-member). - * support for the access service's API and its related event management. -* [omas-asset-catalog-spring](asset-catalog-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. -* [asset-catalog-topic-connector](asset-catalog-topic-connector) supports asynchronous messaging through a connector -and connector provider class - -### Search solution -The search will return entities that match the search criteria. -As the asset search is to be performed against on one or more repositories a search engine will be used. -The search will be performed using the existing properties of the entity. -Indexing will be performed by the Asset Catalog OMAS according to supported zones. -The search result will contain: guid, name (name or displayName), description, qualifiedName, classifications, zoneMembership (the basic properties of the element). - -In order to get the full context of the element, a second call is performed. -At this step, the specific relationships are traverse for getting the connection to the asset and to get the schema type that is behind the given asset. -This call is using the asset global identifier and the asset type. - - -![Figure 1: Search](docs/egeria-asset-search.png) -> Figure 1: The integration of the search engine - -### Other Services -Asset Catalog OMAS provides services to fetch the asset's: -* classifications -* relationships -* specific entities that connect two assets -* relationships between two known entities -* related assets - - ----- -Return to the [access-services](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/README.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/README.md deleted file mode 100644 index 061cddabd34..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/README.md +++ /dev/null @@ -1,12 +0,0 @@ - - - -# Asset Catalog Open Metadata Access Service (OMAS) API - -The Asset Catalog OMAS supports a REST API for requests for asset metadata. - -The Asset Catalog OMAS API provides the shared Java classes between the server and client. - ----- -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-catalog/asset-catalog-api/build.gradle b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/build.gradle deleted file mode 100644 index 41c511b466f..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id "io.freefair.lombok" -} - -dependencies { - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'jakarta.validation:jakarta.validation-api' - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') -} - -description = 'Asset Catalog OMAS API' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/README.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/README.md deleted file mode 100644 index 883c2098dfc..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/README.md +++ /dev/null @@ -1,20 +0,0 @@ - - - -# The Asset Catalog OMAS Exceptions - -The Asset Catalog OMAS uses the following checked exceptions -on its APIs: - -* [InvalidParameterException](invalid-parameter-exception.md) -* [PropertyServerException](property-server-exception.md) -* [UserNotAuthorizedException](user-not-authorized-exception.md) - -Internally it uses: - -* [AssetNotFoundException](asset-not-found-exception.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-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/asset-not-found-exception.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/asset-not-found-exception.md deleted file mode 100644 index 0f4a1333269..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/asset-not-found-exception.md +++ /dev/null @@ -1,14 +0,0 @@ - - - - -# AssetNotFoundException - -The AssetNotFoundException is returned on an API that -is working directly with the element's global identifier in order to fetch the details -(instance header, classification, relationships) about an it. -The element type can be: asset, glossary term or schema element. - ----- -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-catalog/asset-catalog-api/docs/exception/invalid-parameter-exception.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/invalid-parameter-exception.md deleted file mode 100644 index 1cff37b5b05..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/invalid-parameter-exception.md +++ /dev/null @@ -1,16 +0,0 @@ - - - - -# InvalidParameterException - -The InvalidParameterException is returned on an API when: - -* A mandatory parameter is null or invalid. -* An optional parameter has an invalid value. - -The exception returns the name of the parameter that was invalid. - ----- -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-catalog/asset-catalog-api/docs/exception/property-server-exception.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/property-server-exception.md deleted file mode 100644 index b702a5b3926..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/property-server-exception.md +++ /dev/null @@ -1,17 +0,0 @@ - - - - -# PropertyServerException - -The PropertyServerException is returned on an API when -there is a typically temporary problem with the -open metadata repositories so it is not possible to -access any data. - -The cause of the problem is documented in the error message -inside of the exception. - ----- -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-catalog/asset-catalog-api/docs/exception/user-not-authorized-exception.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/user-not-authorized-exception.md deleted file mode 100644 index d7402e0311c..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/exception/user-not-authorized-exception.md +++ /dev/null @@ -1,16 +0,0 @@ - - - - -# UserNotAuthorizedException - -The UserNotAuthorizedException is returned on an API when -the requesting user is not authorized to perform the requested -operation. - -The userId of the requesting user is returned in the exception. -The reason for the refusal is documented in the error message. - ----- -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-catalog/asset-catalog-api/docs/model/README.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/model/README.md deleted file mode 100644 index b793256fdf8..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/docs/model/README.md +++ /dev/null @@ -1,18 +0,0 @@ - - - -# The Asset Catalog OMAS Model - -The Asset Catalog OMAS API provides the shared Java classes between the -server and client. It contains the following packages: -* api - interface and listener for interacting with asynchronous events -* exception - specific OMAS exceptions -* model - that describes the Java POJO's shared between modules. -Also, here can be found the beans for the REST endpoints. - - -Details about exceptions used in Asset Catalog can be found [here](../exception/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-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/AssetCatalogEventInterface.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/AssetCatalogEventInterface.java deleted file mode 100644 index b90b3ecce56..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/AssetCatalogEventInterface.java +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.api; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * AssetCatalogEventInterface is the interface that a client implements to - * register a listener to receive the events from the Asset Catalog OMAS's out topic. - */ -public interface AssetCatalogEventInterface { - - /** - * Register a listener object that will be passed each of the events published by - * the Asset Catalog OMAS. - * - * @param userId calling user - * @param listener listener object - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws ConnectionCheckedException there are errors in the configuration of the connection which is preventing - * the creation of a connector. - * @throws ConnectorCheckedException there are errors in the initialization of the connector. - * @throws PropertyServerException there is a problem retrieving information from the property server(s). - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - void registerListener(String userId, - AssetCatalogEventListener listener) throws InvalidParameterException, - ConnectionCheckedException, - ConnectorCheckedException, - PropertyServerException, - UserNotAuthorizedException; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/AssetCatalogEventListener.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/AssetCatalogEventListener.java deleted file mode 100644 index 302f02487f6..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/AssetCatalogEventListener.java +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetcatalog.api; - - -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogEvent; - -/** - * AssetCatalogEventListener is the interface that a client implements to - * process the received events from the Asset Catalog OMAS's out topic. - */ -public interface AssetCatalogEventListener { - /** - * Process an event that was published by the Asset Catalog OMAS. - * - * @param event event object - call getEventType to find out what type of event. - */ - void processEvent(AssetCatalogEvent event); - - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/package-info.java deleted file mode 100644 index 06c46cce40e..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/api/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The api package defines the Java interfaces supported by the Asset Catalog OMAS. - * - * These Java interfaces define the contract for interacting with asynchronous events passing through Asset Catalog - * OMAS' Out Topic. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.api; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogErrorCode.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogErrorCode.java deleted file mode 100644 index a54daaab198..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogErrorCode.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.exception; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - -/** - * The AssetCatalogErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with - * the Asset Catalog OMAS Services. It is used in conjunction with both Checked and Runtime (unchecked) exceptions. - *

- * The 5 fields in the enum are: - *

- */ -public enum AssetCatalogErrorCode implements ExceptionMessageSet { - - /** - * OMAS-ASSET-CATALOG-404-001 The error indicates that the open metadata repository services are not initialized - * for the mentioned server. - */ - OMRS_NOT_INITIALIZED(404, "OMAS-ASSET-CATALOG-404-001 ", - "The open metadata repository services are not initialized for server {0}", - "The system is unable to connect to the open metadata property server.", - "Check that the server initialized correctly. " + - "Correct any errors discovered and retry the request when the open metadata services are available."), - - /** - * OMAS-ASSET-CATALOG-404-011 The error indicates that the system is unable to retrieve the neighbourhood for the - * given asset. - */ - ASSET_NEIGHBORHOOD_NOT_FOUND(404, "OMAS-ASSET-CATALOG-404-011 ", - "There are no assets or relationships available in the neighbourhood of asset {0} in OMAS Server {1}", - "The system is unable to retrieve the neighbourhood for the given asset.", - "Check that the unique identifier for the asset is correct."), - - /** - * OMAS-ASSET-CATALOG-404-012 The error indicates that the system is unable to retrieve the assets neighborhood from - * the specified asset identifier. - */ - NO_ASSET_FROM_NEIGHBORHOOD_NOT_FOUND(404, "OMAS-ASSET-CATALOG-404-012 ", - "There is no assets available in the neighbourhood of asset {0} in OMAS Server {1}", - "The system is unable to retrieve the assets neighborhood from the specified asset identifier.", - "Check that the unique identifier for the asset is correct."), - /** - * OMAS-ASSET-CATALOG-404-017 The error indicates that the system is unable to retrieve assets of an unknown type/s. - */ - TYPE_DEF_NOT_FOUND(404, "OMAS-ASSET-CATALOG-404-017 ", - "The provided entity type {0} is non known to the OMAS Server", - "The system is unable to retrieve assets of an unknown type/s.", - "Check that the entity type/s provided is/are correct."), - - /** - * OMAS-ASSET-CATALOG-503-001 The error indicates that the server has received a call to one of its open metadata - * access services but is unable to process it because the access service is not active for the requested server. - */ - SERVICE_NOT_INITIALIZED(503, "OMAS-ASSET-CATALOG-503-001 ", - "The access service has not been initialized for server {0} and can not support REST API calls", - "The server has received a call to one of its open metadata access services but is unable to " + - "process it because the access service is not active for the requested server.", - "If the server is supposed to have this access service activated, correct the server configuration " + - "and restart the server."); - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - AssetCatalogErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogException.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogException.java deleted file mode 100644 index 353f8e3eb46..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogException.java +++ /dev/null @@ -1,94 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.exception; - -import org.odpi.openmetadata.commonservices.ffdc.exceptions.OMAGCheckedExceptionBase; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -import java.io.Serial; -import java.util.Map; - -/** - * AssetCatalogException provides a checked exception for reporting errors found when using - * the Asset Catalog OMAS services. - * Typically, these errors are either configuration or operational errors that can be fixed by an administrator - * or power AssetConsumerInterface. However, there may be the odd bug that surfaces here. - * The AssetCatalogErrorCode can be used with this exception to populate it with standard messages. - * The aim is to be able to uniquely identify the cause and remedy for the error. - */ -public class AssetCatalogException extends OMAGCheckedExceptionBase { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * This is the typical constructor used for creating an AssetCatalogException. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public AssetCatalogException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) - { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the typical constructor used for creating an AssetCatalogException. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param relatedProperties arbitrary properties that may help with diagnosing the problem. - */ - public AssetCatalogException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Map relatedProperties) - { - super(messageDefinition, className, actionDescription, relatedProperties); - } - - - /** - * This is the constructor used for creating an AssetCatalogException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - */ - public AssetCatalogException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Throwable caughtError) - { - super(messageDefinition, className, actionDescription, caughtError); - } - - - /** - * This is the constructor used for creating an AssetCatalogException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - * @param relatedProperties arbitrary properties that may help with diagnosing the problem. - */ - public AssetCatalogException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Throwable caughtError, - Map relatedProperties) - { - super(messageDefinition, className, actionDescription, caughtError, relatedProperties); - } - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/package-info.java deleted file mode 100644 index f1de6c66958..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The exception package is used to define first failure data capture (FFDC) for errors that occur when working - * with the Asset Catalog OMAS Services. It is used in conjunction with both Checked and Runtime (unchecked) exceptions. - * - * It also provides a checked exception for reporting errors found when using the Asset Catalog OMAS services. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.exception; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogBean.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogBean.java deleted file mode 100644 index e72ed479836..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogBean.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetCatalogBean object holds properties that are used for displaying details of an asset-catalog bean, - * plus the properties and classifications and relationships. - * Also, the connection to asset is available in this object. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class AssetCatalogBean extends Element implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The list of relationships - * -- GETTER -- - * Returns the list of available relationships - * @return the list of relationships - * -- SETTER -- - * Set up the list of relationships - * @param relationships of the element - */ - private List relationships; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogEvent.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogEvent.java deleted file mode 100644 index 8260eacb31c..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogEvent.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetCatalogEvent describes the structure of the events emitted by the Asset Catalog OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class AssetCatalogEvent implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The asset - * -- GETTER -- - * Returns the structure of an asset - * @return the asset - * -- SETTER -- - * Setup the structure of an asset - * @param asset the asset - */ - private Asset asset; - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogItemElement.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogItemElement.java deleted file mode 100644 index 8fa75facb11..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/AssetCatalogItemElement.java +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetElement object is used to describe the elements returned by the search method - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class AssetCatalogItemElement extends Element { - - private static final long serialVersionUID = 1L; - - /** - * The context for an entity - * -- GETTER -- - * Returns the context of the entity. It includes the entities that are connected to the element. - * For example, for a column, this context contains the table, schema and the asset. - * @return the context for the given element - * -- SETTER -- - * Setup the context for an entity - * @param context the describes the elements - */ - private List context; - - /** - * The connection for the asset - * -- GETTER -- - * Returns the connections to the asset - * @return a list of available connections - * -- SETTER -- - * Set up the connection for the asset - * @param connections the connections for the asset - */ - private List connections; - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Classification.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Classification.java deleted file mode 100644 index 6a15eebb58a..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Classification.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; -import java.util.Date; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Classification object holds properties that are used for displaying details about the classification. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class Classification implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The name of the classification - * -- GETTER -- - * Return the classification's name - * @return the classification's name - * -- SETTER -- - * Set up the name of the classification - * @param name the classification's name - */ - private String name; - - /** - * The origin of the classification - * -- GETTER -- - * Return the classification's origin - * @return the classification's origin - * -- SETTER -- - * Set up the origin of the classification - * @param origin the classification's origin - */ - private String origin; - - /** - * The origin unique identifier - * -- GETTER -- - * Return the origin unique identifier - * @return the origin unique identifier - * -- SETTER -- - * Set up the origin unique identifier - * @param originGUID the origin unique identifier - */ - private String originGUID; - - /** - * The author of the classification - * -- GETTER -- - * Return the author of the classification - * @return the author of the classification - * -- SETTER -- - * Set up the author of the classification - * @param createdBy the author of the classification - */ - private String createdBy; - - /** - * The creation date of the classification - * -- GETTER -- - * Return the creation date of the classification - * @return the creation date of the classification - * -- SETTER -- - * Set up the creation date of the classification - * @param createTime the creation date of the classification - */ - private Date createTime; - - /** - * The author of the last update of the classification - * -- GETTER -- - * Return the author of the last update of the classification - * @return the author of the last update of the classification - * -- SETTER -- - * Set up the author of the last update of the classification - * @param updatedBy the author of the last update of the classification - */ - private String updatedBy; - - /** - * The update date of the classification - * -- GETTER -- - * Return the update date of the classification - * @return the update date of the classification - * -- SETTER -- - * Set up the update date of the classification - * @param updateTime the update date of the classification - */ - private Date updateTime; - - /** - * The version of the classification - * -- GETTER -- - * Return the classification's version - * @return the classification's version - * -- SETTER -- - * Set up the version of the classification - * @param version the classification's version - */ - private Long version; - - /** - * The status of the classification - * -- GETTER -- - * Return the classification's status - * @return the classification's status - * -- SETTER -- - * Set up the status of the classification - * @param status the classification's status - */ - private String status; - - /** - * The type of the classification - * -- GETTER -- - * Return the classification's type - * @return the classification's type - * -- SETTER -- - * Set up the type of the classification - * @param type the classification's type - */ - private Type type; - - /** - * The properties of the classification - * -- GETTER -- - * Return the classification's properties - * @return the classification's properties - * -- SETTER -- - * Set up the properties of the classification - * @param properties the classification's properties - */ - private Map properties; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Connection.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Connection.java deleted file mode 100644 index 7bd91aaa9ce..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Connection.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The Connection object contains the properties needed to access a specific data assets. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -@NoArgsConstructor -public class Connection implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The secured properties of the connection - * -- GETTER -- - * Return the connection's secured properties - * @return the connection's secured properties - * -- SETTER -- - * Set up the secured properties of the connection - * @param securedProperties the connection's secured properties - */ - private Map securedProperties = null; - - /** - * The unique identifier of the connection - * -- GETTER -- - * Return the connection unique identifier - * @return String - unique identifier of the connection - * -- SETTER -- - * Set up the unique identifier of the connection - * @param guid of the connection - */ - private String guid; - - /** - * The display name of the connection - * -- GETTER -- - * Return the display name - * @return the display name of the connection - * -- SETTER -- - * Set up the display name of the connection - * @param displayName the display name of the connection - */ - private String displayName; - - /** - * The description of the connection - * -- GETTER -- - * Return the description - * @return the description of the connection - * -- SETTER -- - * Set up the description of the connection - * @param description the description of the connection - */ - private String description; - - /** - * The qualified name of the connection - * -- GETTER -- - * Return the qualified name - * @return the qualified name of the connection - * -- SETTER -- - * Set up the qualified name of the connection - * @param qualifiedName the qualified name of the connection - */ - private String qualifiedName; - - /** - * Instantiates a new Connection. - * - * @param guid the unique identifier of the connection - * @param qualifiedName the qualified name of the connection - */ - public Connection(String guid, String qualifiedName) { - this.guid = guid; - this.qualifiedName = qualifiedName; - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Element.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Element.java deleted file mode 100644 index ad29af1958a..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Element.java +++ /dev/null @@ -1,199 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Element object holds properties that are used for displaying details of an entity. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class Element implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The unique identifier of the asset - * -- GETTER -- - * Return the asset unique identifier - * @return String - unique identifier of the asset - * -- SETTER -- - * Set up the unique identifier of the asset - * @param guid of the asset - */ - private String guid; - - /** - * The type definition of the asset - * -- GETTER -- - * Returns the type definition of the asset - * @return the type definition of the asset - * -- SETTER -- - * Set up the type definition of the asset - * @param type the type definition of the asset - */ - private Type type; - - /** - * The name of the asset - * -- GETTER -- - * Returns the name of the asset - * @return the name of the asset - * -- SETTER -- - * Set up the name of the asset - * @param name - the name of the asset - */ - private String name; - - /** - * The name of the users that created the asset - * -- GETTER -- - * Return the name of the user that created the asset. - * @return the name of the users that created the asset - * -- SETTER -- - * Set up the name of the user that created the asset - * @param createdBy - the name of the user that created the asset - */ - private String createdBy; - - /** - * The date when the asset has been created - * -- GETTER -- - * Returns the date when the asset has been created - * @return date when for the asset creation - * -- SETTER -- - * Set up the date when the asset has been created - * @param createTime - creation date of the asset - */ - private Date createTime; - - /** - * The name of the user that updated the asset last time - * -- GETTER -- - * Return the name of the user that updated the asset last time - * @return string - the name of the user that updated the asset last time - * -- SETTER -- - * Set up the name of the user that updated the asset last time - * @param updatedBy the name of the user that updated the asset last time - */ - private String updatedBy; - - /** - * The date when the asset has been created - * -- GETTER -- - * Returns the date when the asset has been created - * @return date - the date when the asset has been created - * -- SETTER -- - * Set up the date when the asset has been created - * @param updateTime - the date when the asset has been created - */ - private Date updateTime; - - /** - * The version of the asset - * -- GETTER -- - * Returns the version of the asset - * @return long - the version of the asset - * -- SETTER -- - * Set up the version of the asset - * @param version - the version of the asset - */ - private Long version; - - /** - * The status of the asset - * -- GETTER -- - * Returns the status of the asset - * @return status - * -- SETTER -- - * Set up the status of the asset - * @param status - enum that describes the asset's status - */ - private String status; - - /** - * The URL - * -- GETTER -- - * Returns the URL - * @return the URL - * -- SETTER -- - * Setup the URL - * @param url the URL - */ - private String url; - - /** - * The properties of the element - * -- GETTER -- - * Returns the properties of the element - * @return the properties of the element - * -- SETTER -- - * Setup the properties of the element - * @param properties the properties of the element - */ - private Map properties; - - /** - * The additional properties of the element - * -- GETTER -- - * Returns the additional properties of the element - * @return the additional properties of the element - * -- SETTER -- - * Setup the additional properties of the element - * @param additionalProperties the additional properties of the element - */ - private Map additionalProperties; - - /** - * The classifications of the element - * -- GETTER -- - * Returns the classifications of the element - * @return the classifications of the element - * -- SETTER -- - * Setup the classifications of the element - * @param classifications the classifications of the element - */ - private List classifications; - - /** - * The parent of the element - * -- GETTER -- - * Returns the parent of the element - * @return the parent of the element - * -- SETTER -- - * Setup the parent of the element - * @param parentElement the parent of the element - */ - private Element parentElement; - - /** - * The origin of the element - * -- GETTER -- - * Returns the origin of the element - * @return the origin of the element - * -- SETTER -- - * Setup the origin of the element - * @param origin the origin of the element - */ - private ElementOrigin origin; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/ElementOrigin.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/ElementOrigin.java deleted file mode 100644 index 4833c951f49..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/ElementOrigin.java +++ /dev/null @@ -1,88 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOriginCategory; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ElementOrigin object holds information about the origin of the retrieved element. This means information about - * the metadata server, the metadata collection ID and name, etc. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class ElementOrigin implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The name of the server where the element was retrieved from. - * -- GETTER -- - * Returns the name of the server - * @return String - the name of the server - * -- SETTER -- - * Set up the name of the server - * @param sourceServer - name of the server - */ - private String sourceServer; - - /** - * The id of the metadata collection. - * -- GETTER -- - * Returns the id of the metadata collection. - * @return String - the id of the metadata collection. - * -- SETTER -- - * Set up the id of the metadata collection. - * @param metadataCollectionId - id of the metadata collection. - */ - private String metadataCollectionId; - - /** - * The name of the metadata collection. - * -- GETTER -- - * Returns the name of the metadata collection. - * @return String - the name of the metadata collection. - * -- SETTER -- - * Set up the name of the metadata collection. - * @param metadataCollectionName - name of the metadata collection. - */ - private String metadataCollectionName; - - /** - * The license string for this instance - * -- GETTER -- - * Returns the license for this instance. - * @return String - the license string. - * -- SETTER -- - * Set up the license string for this instance. - * @param instanceLicense - the license string. - */ - private String instanceLicense; - - /** - * The origin category of the element - * -- GETTER -- - * Returns the origin category - * @return the value from the enum representing the origin category - * -- SETTER -- - * Set up the origin category of the element - * @param originCategory - the origin category value - */ - private ElementOriginCategory originCategory; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Elements.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Elements.java deleted file mode 100644 index d7ce47387bd..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Elements.java +++ /dev/null @@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Elements object is used to describe the elements returned by the search method - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Elements extends Element { - - /** - * The list of item elements returned by the search method - * -- GETTER -- - * Returns the list of item elements returned by the search method - * @return the list of item elements - * -- SETTER -- - * Setup the list of item elements returned by the search method - * @param assetCatalogItemElements the list of item elements - */ - private List assetCatalogItemElements; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Relationship.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Relationship.java deleted file mode 100644 index 588fd2b0149..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Relationship.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The Relationship object holds properties that are used for displaying a relationship between two assets - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Relationship extends Element implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The start element for the relationship - * -- GETTER -- - * Returns the start element for the relationship - * @return the start element for the relationship - * -- SETTER -- - * Setup the start element for the relationship - * @param fromEntity the start element for the relationship - */ - private Element fromEntity; - - /** - * The destination element for the relationship - * -- GETTER -- - * Returns the destination element for the relationship - * @return the destination element for the relationship - * -- SETTER -- - * Setup the destination element for the relationship - * @param toEntity the destination element for the relationship - */ - private Element toEntity; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Type.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Type.java deleted file mode 100644 index 2f3a7e6a0ea..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/Type.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The Type object holds properties that are used for displaying the Open Metadata Types - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class Type implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The type name - * -- GETTER -- - * Returns the type name - * @return the type name - * -- SETTER -- - * Set up the type name - * @param name the type name - */ - private String name; - - /** - * The description of the type - * -- GETTER -- - * Returns the description of the type - * @return the description of the type - * -- SETTER -- - * Set up the description of the type - * @param description the description of the type - */ - private String description; - - /** - * The version of the type - * -- GETTER -- - * Returns the version of the type - * @return the version of the type - * -- SETTER -- - * Set up the version of the type - * @param version the version of the type - */ - private Long version; - - /** - * The super type of the current type - * -- GETTER -- - * Returns the super type of the current type - * @return the super type of the current type - * -- SETTER -- - * Set up the super type of the current type - * @param superType the super type of the current type - */ - private String superType; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/package-info.java deleted file mode 100644 index b46f762865a..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package contains beans describing entities, relationships, classifications retrieved by Asset Catalog OMAS. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.model; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/SearchParameters.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/SearchParameters.java deleted file mode 100644 index d3bcf369900..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/SearchParameters.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import jakarta.validation.constraints.PositiveOrZero; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.io.Serializable; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SearchParameters provides a structure to make the assets' search results more precise. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class SearchParameters implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The maximum number of elements that can be returned on a request - * -- SETTER -- - * Set up the pageSize the result set to only include the specified number of entries - * @param pageSize max number of elements that can be returned on a request. - * -- GETTER -- - * Return the maximum page pageSize supported by this server. - * @return max number of elements that can be returned on a request. - */ - @PositiveOrZero - private Integer pageSize = 0; - - /** - * The start from of the result - * -- SETTER -- - * Set up the start from of the result set for pagination - * @param from start from of the result set - * -- GETTER -- - * Return the start from of the result set - * @return the start from of result - */ - @PositiveOrZero - private Integer from = 0; - - /** - * The number of the relationships out from the starting entity - * -- GETTER -- - * Return the number of the relationships out from the starting entity that the query will traverse to gather results. - * @return number of the relationship - * -- SETTER -- - * Set up the number of the relationships out from the starting entity that the query will traverse to gather results. - * @param level the number of the relationships out from the starting entity - */ - @PositiveOrZero - private Integer level = 1; - - /** - * The name of the property that is to be used to sequence the results - * -- SETTER -- - * Set up the name of the property that is to be used to sequence the results - * @param sequencingProperty the name of the property that is to be used to sequence the results - * -- GETTER -- - * Return the name of the property that is to be used to sequence the results - * @return the name of the property that is to be used to sequence the results - */ - private String sequencingProperty; - - /** - * The enum defining how the results should be ordered - * -- GETTER -- - * Return the enum defining how the results should be ordered - * @return the enum defining how the results should be ordered - * -- SETTER -- - * Set up the enum defining how the results should be ordered - * @param sequencingOrder the enum defining how the results should be ordered - */ - private SequencingOrder sequencingOrder; - - /** - * The list of classifications that must be present on all returned entities - * -- GETTER -- - * Returns the list of classifications that must be present on all returned entities. - * @return list of classifications that must be present on all returned entities. - * -- SETTER -- - * Set up the list of classifications that must be present on all returned entities. - * @param limitResultsByClassification list of classifications that must be present on all returned entities. - */ - private List limitResultsByClassification; - - /** - * The list of entity types to search for - * -- SETTER -- - * Set up the list of entity types name to search for. Null means any types. - * @param entityTypes the list of entity types to search for - * -- GETTER -- - * Return the list of entity types name to search for. Null means any types. - * @return the list of entity types to search for - */ - private List entityTypes; - - /** - * The list of relationship types to include in the query results - * -- GETTER -- - * Return the list of relationship types to include in the query results. - * Null means include all relationships found, irrespective of their type. - * @return list of relationship types to include in the query results - * -- SETTER -- - * Set up the list of relationship types to include in the query results. - * Null means include all relationships found, irrespective of their type. - * @param relationshipTypeGUIDs List of relationship types to include in the query results - */ - private List relationshipTypeGUIDs; - - /** - * The case sensitivity for the search criteria - * -- GETTER -- - * Returns whether the search should be performed as a case-insensitive regular expression (true) - * or as a case-sensitive regular expression (false) - * @return false if it is performed a case-insensitive search and true otherwise - * -- SETTER -- - * Indicates whether the search should be performed as a case-insensitive regular expression (true) - * or as a case-sensitive regular expression (false) - * @param caseInsensitive boolean to set the case sensitivity for the search criteria - */ - private boolean caseInsensitive = Boolean.TRUE; - - /** - * The exact match for the search criteria - * -- GETTER -- - * Returns whether the search should be performed taking into account and exact match criteria (true). - * @return false if it is performed an inexact match search and true otherwise - * -- SETTER -- - * Indicates whether the search should be performed taking into account and exact match criteria (true) - * @param exactMatch boolean to set the exact match parameter for the search criteria - */ - private boolean exactMatch = Boolean.FALSE; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/package-info.java deleted file mode 100644 index b97c35d0857..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides a structure to make the assets' search results more precise. This is used in REST request to - * Asset Catalog OMAS. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/package-info.java deleted file mode 100644 index fa7d637b1c7..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package contains REST related models for Asset Catalog OMAS: responses and search parameters for the search request body. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogListResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogListResponse.java deleted file mode 100644 index e2fa62853a4..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogListResponse.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; - -import java.io.Serializable; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetCatalogResponse is the response structure used on the Asset Catalog OMAS REST API calls that returns a - * list of asset catalog beans object as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class AssetCatalogListResponse extends AssetCatalogOMASAPIResponse implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The list of assets - * -- GETTER -- - * Returns the list of assets - * @return the list of assets - * -- SETTER -- - * Setup the list of assets - * @param assetCatalogBeanList the list of assets - */ - private List assetCatalogBeanList; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogOMASAPIResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogOMASAPIResponse.java deleted file mode 100644 index 99237aa2d39..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogOMASAPIResponse.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetCatalogOMASAPIResponse provides a common header for Asset Catalog OMAS managed responses to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AssetCatalogOMASAPIResponse extends FFDCResponseBase { - - private static final long serialVersionUID = 1L; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogResponse.java deleted file mode 100644 index 230bed2cead..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetCatalogResponse is the response structure used on the Asset Catalog OMAS REST API calls that returns an - * asset description object as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class AssetCatalogResponse extends AssetCatalogOMASAPIResponse { - - private static final long serialVersionUID = 1L; - - /** - * The asset - * -- GETTER -- - * Returns the description of an asset - * @return the asset - * -- SETTER -- - * Setup the description of an asset - * @param assetCatalogBean the asset - */ - private AssetCatalogBean assetCatalogBean; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogSupportedTypes.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogSupportedTypes.java deleted file mode 100644 index 19ba5e163c8..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetCatalogSupportedTypes.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * AssetCatalogSupportedTypes is the response structure used on the Asset Catalog OMAS REST API calls that returns - * the Open Metadata Types supported for search as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class AssetCatalogSupportedTypes extends AssetCatalogOMASAPIResponse { - - private static final long serialVersionUID = 1L; - - /** - * The list of supported types - * -- GETTER -- - * Returns the list of supported types - * @return the list of supported types - * -- SETTER -- - * Setup the list of supported types - * @param types the list of supported types - */ - private List types; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetListResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetListResponse.java deleted file mode 100644 index 6380cacefa8..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetListResponse.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; - -import java.util.ArrayList; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetListResponse is the response structure used on the Asset Catalog OMAS REST API calls that returns an - * assets object as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class AssetListResponse extends AssetCatalogOMASAPIResponse { - - private static final long serialVersionUID = 1L; - - /** - * The list of assets - * -- GETTER -- - * Returns the list of assets - * @return the list of assets - * -- SETTER -- - * Setup the list of assets - * @param elementsList the list of assets - */ - private List elementsList = new ArrayList<>(); -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetResponse.java deleted file mode 100644 index 4a6fcc29a20..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/AssetResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetListResponse is the response structure used on the Asset Catalog OMAS REST API calls that returns a list of - * assets object as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class AssetResponse extends AssetCatalogOMASAPIResponse { - - private static final long serialVersionUID = 1L; - - /** - * The asset - * -- GETTER -- - * Returns the structure of an asset - * @return the asset - * -- SETTER -- - * Setup the structure of an asset - * @param asset the asset - */ - private Elements asset; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/ClassificationListResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/ClassificationListResponse.java deleted file mode 100644 index b0655c38983..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/ClassificationListResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Classification; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationsResponse is the response structure used on the Asset Catalog OMAS REST API calls that - * returns a classification object as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class ClassificationListResponse extends AssetCatalogOMASAPIResponse { - - private static final long serialVersionUID = 1L; - - /** - * The list of classifications - * -- GETTER -- - * Returns the list of classifications - * @return the list of classifications - * -- SETTER -- - * Set up the list of classifications - * @param classifications the list of classifications - */ - private List classifications; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/RelationshipListResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/RelationshipListResponse.java deleted file mode 100644 index e6f76d8317e..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/RelationshipListResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipsResponse is the response structure used on the Asset Catalog OMAS REST API calls that - * returns a relationships object as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class RelationshipListResponse extends AssetCatalogOMASAPIResponse { - - private static final long serialVersionUID = 1L; - - /** - * The list of relationships - * -- GETTER -- - * Returns the list of relationships - * @return the list of relationships - * -- SETTER -- - * Set up the list of relationships - * @param relationships the list of relationships - */ - private List relationships; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/RelationshipResponse.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/RelationshipResponse.java deleted file mode 100644 index 949e73f8cb4..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/RelationshipResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipsResponse is the response structure used on the Asset Catalog OMAS REST API calls that - * returns a relationships object as a response. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class RelationshipResponse extends AssetCatalogOMASAPIResponse implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The relationship - * -- GETTER -- - * Returns the relationship - * @return the relationship - * -- SETTER -- - * Set up the relationship - * @param relationship the relationship - */ - private Relationship relationship; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/package-info.java deleted file mode 100644 index ed7caa7ff97..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/responses/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines the beans used to build the REST response payloads. - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/README.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/README.md deleted file mode 100644 index 6d6bfb4ceff..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Asset Catalog Open Metadata Access Service (OMAS) client - -The Asset Catalog OMAS clients provides language-specific client packages to make it easier -for applications to call the interface. - -The clients are: -* The [**AssetCatalog**](docs/user/asset-catalog-omas-client.md) provides an interface to search for assets by type and -get information about them including their details, context, universe, relationships, classifications. -* The **AssetCatalogEventClient** registers a listener object that will process each of the events published by -the Asset Catalog OMAS. ----- -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-catalog/asset-catalog-client/build.gradle b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/build.gradle deleted file mode 100644 index 3b896a49b4f..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/build.gradle +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - - -dependencies { - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-topic-connector') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:open-integration-framework') - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-connectors-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-api') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-client') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation 'org.springframework:spring-core' - testImplementation 'org.mockito:mockito-core' - testImplementation 'junit:junit' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Asset Catalog OMAS Client' - -java { - withJavadocJar() -} - -test { - //TODO: Maven build is currently not running these failing tests - //ignoreFailures = true -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/docs/user/asset-catalog-omas-client.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/docs/user/asset-catalog-omas-client.md deleted file mode 100644 index 96283d989a2..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/docs/user/asset-catalog-omas-client.md +++ /dev/null @@ -1,65 +0,0 @@ - - - - -The Asset Catalog OMAS client interface supports a REST API for requests and an event-based -interface for asynchronous integration. - - -There is a single client called `AssetCatalog`. It has two constructors: - -* No authentication embedded in the HTTP request - for test systems. -* Basic authentication using a userId and password embedded in the HTTP request. - -Both constructors take the [URL root for the server platform](https://egeria-project.org/concepts/platform-url-root/) -where Asset Catalog is running and its [server name](https://egeria-project.org/concepts/server-name/). - -Here is a code example with the user ID and password specified: - -``` - -AssetCatalogInterface client = new AssetCatalog( - "cocoMDS1", - "https://localhost:9444", - "cocoUI", - "cocoUIPassword"); - -``` - -This client is set up to call the `cocoMDS1` server running on the `https://localhost:9444` -OMAG Server Platform. The userID and password is for the application -where the client is running. The userID of the real end user is passed -on each request. - -## Client operations - -Once you have an instance of the client, you can use it to: -* Fetch asset's header, classifications and properties - `getAssetDetails()` - -* Fetch asset's header, classifications, properties and relationships - `getAssetUniverse()` - -* Fetch the relationships for a specific asset - `getAssetRelationships()` - -* Fetch the classifications for a specific asset - `getClassificationsForAsset()` - -* Returns the configured list of Asset Catalog's supported asset types - `getSupportedTypes()` - -* Return a list of assets matching the search criteria without the full context `searchByType()`. Entity types are case - in-sensitive, so proper values should be given in the request, otherwise an EntityNotKnownException will be thrown. If - no type will be provided the operation will be made using the default search types. In order to determine de supported types - call `getSupportedTypes()` before. - -* Return the full context of an asset/glossary term based on its identifier. The response contains the list of the -connections assigned to the asset - `getAssetContext()` - -* Fetch relationship between entities details based on its unique identifier of the ends. Filtering based on the -relationship type is supported - `getRelationshipBetweenEntities()` - -> Note: The equivalent REST interfaces are documented in the -[asset-catalog-server](../../../asset-catalog-server/README.md) -module. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalog.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalog.java deleted file mode 100644 index b9f0e352795..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalog.java +++ /dev/null @@ -1,323 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog; - -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogOMASAPIResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogSupportedTypes; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.ClassificationListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipResponse; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; - -/** - * The Asset Catalog Open Metadata Access Service (OMAS) provides an interface to search for assets including - * data stores, event feeds, APIs and data sets, related assets and relationships. - * Also, it can return the connection details for the asset metadata. - * The Asset Catalog OMAS includes: - *
    - *
  • Client-side provides language-specific client packages to make it easier for data tools and applications to call - * the interface.
  • - *
  • OMAS Server calls to retrieve assets and information related to the assets.
  • - *
- */ -public class AssetCatalog extends OCFRESTClient implements AssetCatalogInterface { - - private static final String BASE_PATH = "/servers/{0}/open-metadata/access-services/asset-catalog/users/{1}"; - - private static final String ASSET_DETAILS = "/asset-details/{2}?assetType={3}"; - private static final String ASSET_UNIVERSE = "/asset-universe/{2}?assetType={3}"; - private static final String ASSET_RELATIONSHIPS = "/asset-relationships/{2}?assetType={3}&relationshipType={4}&from={5}&pageSize={6}"; - private static final String ASSET_CLASSIFICATIONS = "/asset-classifications/{2}?assetType={3}&classificationName={4}"; - private static final String SEARCH = "/search?searchCriteria={2}"; - private static final String ASSET_CONTEXT = "/asset-context/{2}?assetType={3}"; - private static final String RELATIONSHIP_BETWEEN_ENTITIES = "/relationship-between-entities/{2}/{3}?relationshipType={4}"; - private static final String SUPPORTED_TYPES = "/supportedTypes?type={2}"; - private static final String ASSETS_BY_TYPE_GUID = "/assets-by-type-guid/{2}"; - private static final String ASSETS_BY_TYPE_NAME = "/assets-by-type-name/{2}"; - - private static final String GUID_PARAMETER = "assetGUID"; - private static final String START_ASSET_GUID = "startAssetGUID"; - private static final String END_ASSET_GUID = "endAssetGUID"; - private static final String SEARCH_PARAMETERS = "searchParameters"; - - - private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - private final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - - /** - * Create a new AssetCatalog client. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @throws InvalidParameterException if parameter validation fails - */ - public AssetCatalog(String serverName, String serverPlatformURLRoot) throws InvalidParameterException { - super(serverName, serverPlatformURLRoot); - } - - /** - * Instantiates a new Asset Catalog client. - * - * @param serverName the server name - * @param serverPlatformURLRoot the server platform url root - * @param userId the user id - * @param password the password - * @throws InvalidParameterException the invalid parameter exception - */ - public AssetCatalog(String serverName, String serverPlatformURLRoot, String userId, String password) - throws InvalidParameterException { - super(serverName, serverPlatformURLRoot, userId, password); - } - - /** - * {@inheritDoc} - */ - @Override - public AssetCatalogResponse getAssetDetails(String userId, - String assetGUID, - String assetType) - throws InvalidParameterException, PropertyServerException { - String methodName = "getAssetDetails"; - - validateUserAndAssetGUID(userId, assetGUID, methodName, GUID_PARAMETER); - - AssetCatalogResponse response = callGetRESTCall(methodName, AssetCatalogResponse.class, - serverPlatformURLRoot + BASE_PATH + ASSET_DETAILS, serverName, userId, assetGUID, assetType); - - detectExceptions(response); - return response; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetCatalogResponse getAssetUniverse(String userId, - String assetGUID, - String assetType) - throws InvalidParameterException, PropertyServerException { - String methodName = "getAssetUniverse"; - - validateUserAndAssetGUID(userId, assetGUID, methodName, GUID_PARAMETER); - - AssetCatalogResponse response = callGetRESTCall(methodName, AssetCatalogResponse.class, - serverPlatformURLRoot + BASE_PATH + ASSET_UNIVERSE, serverName, userId, assetGUID, assetType); - - detectExceptions(response); - - return response; - } - - /** - * {@inheritDoc} - */ - @Override - public RelationshipListResponse getAssetRelationships(String userId, - String assetGUID, - String assetType, - String relationshipType, - Integer from, - Integer pageSize) - throws InvalidParameterException, PropertyServerException { - String methodName = "getAssetRelationships"; - - validateUserAndAssetGUID(userId, assetGUID, methodName, GUID_PARAMETER); - invalidParameterHandler.validatePaging(from, pageSize, methodName); - - RelationshipListResponse relationshipListResponse = callGetRESTCall(methodName, RelationshipListResponse.class, - serverPlatformURLRoot + BASE_PATH + ASSET_RELATIONSHIPS, serverName, - userId, assetGUID, assetType, relationshipType, from, pageSize); - - detectExceptions(relationshipListResponse); - return relationshipListResponse; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationListResponse getClassificationsForAsset(String userId, - String assetGUID, - String assetType, - String classificationName) - throws InvalidParameterException, PropertyServerException { - String methodName = "getClassificationsForAsset"; - - validateUserAndAssetGUID(userId, assetGUID, methodName, GUID_PARAMETER); - - ClassificationListResponse classificationListResponse = callGetRESTCall(methodName, ClassificationListResponse.class, - serverPlatformURLRoot + BASE_PATH + ASSET_CLASSIFICATIONS, - serverName, userId, assetGUID, assetType, classificationName); - - detectExceptions(classificationListResponse); - return classificationListResponse; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetListResponse searchByType(String userId, - String searchCriteria, - SearchParameters searchParameters) - throws InvalidParameterException, PropertyServerException { - String methodName = "searchByType"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateSearchString(searchCriteria, "searchCriteria", methodName); - invalidParameterHandler.validateObject(searchParameters, SEARCH_PARAMETERS, methodName); - - AssetListResponse assetResponse = callPostRESTCall(methodName, AssetListResponse.class, - serverPlatformURLRoot + BASE_PATH + SEARCH, searchParameters, serverName, userId, searchCriteria); - - detectExceptions(assetResponse); - - return assetResponse; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetListResponse searchByTypeName(String userId, - String typeName) - throws InvalidParameterException, PropertyServerException { - String methodName = "searchByTypeName"; - - invalidParameterHandler.validateUserId(userId, methodName); - AssetListResponse assetResponse = null; - - if (typeName != null) { - invalidParameterHandler.validateSearchString(typeName, "typeName", methodName); - assetResponse = callGetRESTCall(methodName, AssetListResponse.class, - serverPlatformURLRoot + BASE_PATH + ASSETS_BY_TYPE_NAME, serverName, userId, typeName); - } - - detectExceptions(assetResponse); - - return assetResponse; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetListResponse searchByTypeGUID(String userId, - String typeGUID) - throws InvalidParameterException, PropertyServerException { - String methodName = "searchByTypeGUID"; - - invalidParameterHandler.validateUserId(userId, methodName); - AssetListResponse assetResponse = null; - - if (typeGUID != null) { - invalidParameterHandler.validateSearchString(typeGUID, "typeGUID", methodName); - assetResponse = callGetRESTCall(methodName, AssetListResponse.class, - serverPlatformURLRoot + BASE_PATH + ASSETS_BY_TYPE_GUID, serverName, userId, typeGUID); - } - - detectExceptions(assetResponse); - - return assetResponse; - } - - - /** - * {@inheritDoc} - */ - @Override - public AssetResponse getAssetContext(String userId, - String assetGUID, - String assetType) - throws InvalidParameterException, PropertyServerException { - String methodName = "getAssetContext"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateSearchString(assetGUID, GUID_PARAMETER, methodName); - - AssetResponse assetResponse = callGetRESTCall(methodName, AssetResponse.class, - serverPlatformURLRoot + BASE_PATH + ASSET_CONTEXT, serverName, userId, assetGUID, assetType); - - detectExceptions(assetResponse); - - return assetResponse; - } - - /** - * {@inheritDoc} - */ - @Override - public RelationshipResponse getRelationshipBetweenEntities(String userId, - String entity1GUID, - String entity2GUID, - String relationshipType) - throws InvalidParameterException, PropertyServerException { - String methodName = "getRelationshipBetweenEntities"; - - validateStartAndEndAssetsGUIDs(userId, entity1GUID, entity2GUID, methodName); - - RelationshipResponse relationshipResponse = callGetRESTCall(methodName, RelationshipResponse.class, - serverPlatformURLRoot + BASE_PATH + RELATIONSHIP_BETWEEN_ENTITIES, - serverName, userId, entity1GUID, entity2GUID, relationshipType); - - detectExceptions(relationshipResponse); - - return relationshipResponse; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetCatalogSupportedTypes getSupportedTypes(String userId, String type) - throws PropertyServerException, InvalidParameterException { - String methodName = "getSupportedTypes"; - - AssetCatalogSupportedTypes assetCatalogSupportedTypes = callGetRESTCall(methodName, AssetCatalogSupportedTypes.class, - serverPlatformURLRoot + BASE_PATH + SUPPORTED_TYPES, - serverName, userId, type); - - detectExceptions(assetCatalogSupportedTypes); - - return assetCatalogSupportedTypes; - } - - private void validateUserAndAssetGUID(String userId, - String assetGUID, - String methodName, - String guidParameter) throws InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(assetGUID, guidParameter, methodName); - } - - private void validateStartAndEndAssetsGUIDs(String userId, - String startAssetGUID, - String endAssetGUID, - String methodName) throws InvalidParameterException { - validateUserAndAssetGUID(userId, startAssetGUID, methodName, START_ASSET_GUID); - invalidParameterHandler.validateGUID(endAssetGUID, END_ASSET_GUID, methodName); - } - - private void validateSearchParams(String userId, - String assetGUID, - SearchParameters searchParameters, - String methodName) throws InvalidParameterException { - validateUserAndAssetGUID(userId, assetGUID, methodName, GUID_PARAMETER); - invalidParameterHandler.validateObject(searchParameters, SEARCH_PARAMETERS, methodName); - } - - private void detectExceptions(AssetCatalogOMASAPIResponse response) - throws InvalidParameterException, PropertyServerException { - restExceptionHandler.detectAndThrowInvalidParameterException(response); - restExceptionHandler.detectAndThrowPropertyServerException(response); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalogInterface.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalogInterface.java deleted file mode 100644 index 72568d0c413..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalogInterface.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog; - -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogSupportedTypes; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.ClassificationListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; - -/** - * The Asset Catalog Open Metadata Access Service (OMAS) provides services to search for data assets including - * data stores, event feeds, APIs and data sets. The search will locate assets based on the content of the Asset - * metadata itself and the metadata that links to it. This includes: - *
    - *
  • Glossary terms
  • - *
  • Schema elements
  • - *
  • Classifications
  • - *
- */ -public interface AssetCatalogInterface { - - /** - * Fetch asset's header, classification and properties - * - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the type of the asset - * @return the asset with its header and the list of associated classifications and specific properties - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - AssetCatalogResponse getAssetDetails(String userId, String assetGUID, String assetType) throws InvalidParameterException, PropertyServerException; - - /** - * Fetch asset's header, classification, properties and relationships - * - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the asset type - * @return the asset with its header and the list of associated classifications and relationship - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - AssetCatalogResponse getAssetUniverse(String userId, String assetGUID, String assetType) throws InvalidParameterException, PropertyServerException; - - /** - * Fetch the relationships for a specific asset - * - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the type of the asset - * @param relationshipType the type of the relationship - * @param from offset - * @param pageSize limit the number of the assets returned - * @return list of relationships for the given asset - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - RelationshipListResponse getAssetRelationships(String userId, String assetGUID, String assetType, String relationshipType, Integer from, Integer pageSize) throws InvalidParameterException, PropertyServerException; - - /** - * Fetch the classification for a specific asset - * - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the type of the asset - * @param classificationName the name of the classification - * @return ClassificationsResponse the classification for the asset - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - ClassificationListResponse getClassificationsForAsset(String userId, String assetGUID, String assetType, String classificationName) throws InvalidParameterException, PropertyServerException; - - /** - * Return a list of assets matching the search criteria without the full context - * - * @param userId the unique identifier for the user - * @param searchCriteria a string expression of the characteristics of the required assets - * @param searchParameters constrains to make the assets's search results more precise - * @return list of properties used to narrow the search - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - AssetListResponse searchByType(String userId, String searchCriteria, SearchParameters searchParameters) throws InvalidParameterException, PropertyServerException; - - /** - * Return a list of assets matching the type name without the full context - * The list includes also subtypes - * - * @param userId the unique identifier for the user - * @param typeName the assets type name to search for - * @return list of assets by type name or GUID - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - AssetListResponse searchByTypeName(String userId, String typeName) throws InvalidParameterException, PropertyServerException; - - /** - * Return a list of assets matching the type GUID without the full context - * The list includes also subtypes - * - * @param userId the unique identifier for the user - * @param typeGUID the assets type GUID to search for - * @return list of assets by type name or GUID - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - AssetListResponse searchByTypeGUID(String userId, String typeGUID) throws InvalidParameterException, PropertyServerException; - - /** - * Return the full context of an asset/glossary term based on its identifier. - * The response contains the list of the connections assigned to the asset. - * - * @param userId the unique identifier for the user - * @param assetGUID the global unique identifier of the asset - * @param assetType the type of the asset - * @return list of properties used to narrow the search - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - AssetResponse getAssetContext(String userId, String assetGUID, String assetType) throws InvalidParameterException, PropertyServerException; - - - /** - * Fetch relationship between entities details based on its unique identifier of the ends - * Filtering based on the relationship type is supported - * - * @param userId the unique identifier for the user - * @param entity1GUID Entity guid of the first end of the relationship - * @param entity2GUID Entity guid of the second end of the relationship - * @param relationshipType Type of the relationship - * @return relationships between entities - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - */ - RelationshipResponse getRelationshipBetweenEntities(String userId, String entity1GUID, String entity2GUID, String relationshipType) throws InvalidParameterException, PropertyServerException; - - /** - * Returns the list with supported types for search, including the sub-types supported - * - * @param userId the unique identifier for the user - * @param type the type - * @return list of types and sub-types supported for search - * @throws InvalidParameterException if parameter validation fails - * @throws PropertyServerException if a problem occurs while serving the request - */ - AssetCatalogSupportedTypes getSupportedTypes(String userId, String type) throws InvalidParameterException, PropertyServerException; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/ConnectedAssetClient.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/ConnectedAssetClient.java deleted file mode 100644 index 8e8bb1d5072..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/ConnectedAssetClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase; - -/** - * ConnectedAssetClient manages the retrieval of connections, and the creation of resource connectors used to access the - * content of data sources and services. - */ -public class ConnectedAssetClient extends ConnectedAssetClientBase -{ - private final static String serviceURLMarker = "asset-catalog"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's userId embedded in all HTTP requests - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker, serverUserId, serverPassword); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/OpenIntegrationServiceClient.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/OpenIntegrationServiceClient.java deleted file mode 100644 index 4707b9af149..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/OpenIntegrationServiceClient.java +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.oif.client.OpenIntegrationServiceBase; - -/** - * OpenIntegrationServiceClient provides an interface to the open integration service. This is part of the Open Integration Framework (OIF) - * and provides an interface for understanding the work of the integration connectors that are synchronizing metadata. - */ -public class OpenIntegrationServiceClient extends OpenIntegrationServiceBase -{ - private final static String serviceURLMarker = "asset-catalog"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenIntegrationServiceClient(String serverName, - String serverPlatformURLRoot, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, maxPageSize); - } - - - /** - * Create a new client that passes userID and password in each HTTP request. This is the - * userID/password of the calling server. The end user's userID is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userID embedded in all HTTP requests - * @param serverPassword caller's password embedded in all HTTP requests - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenIntegrationServiceClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, serverUserId, serverPassword, maxPageSize); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/OpenMetadataStoreClient.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/OpenMetadataStoreClient.java deleted file mode 100644 index 4dde181af1c..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/OpenMetadataStoreClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.gaf.client.OpenMetadataClientBase; - -/** - * OpenMetadataStoreClient provides an interface to the open metadata store. This is part of the Governance Action Framework (GAF) - * and provides a comprehensive interface for working with all types of metadata, subject to the user's (and this OMAS's) security permissions. - * The interface supports search, maintenance of metadata elements, classifications and relationships plus the ability to raise incident reports - * and todos along with the ability to work with metadata valid values and translations. - */ -public class OpenMetadataStoreClient extends OpenMetadataClientBase -{ - private final static String serviceURLMarker = "asset-catalog"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, maxPageSize); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's password embedded in all HTTP requests - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, serverUserId, serverPassword, maxPageSize); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/eventclient/AssetCatalogEventClient.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/eventclient/AssetCatalogEventClient.java deleted file mode 100644 index d5a128cadae..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/eventclient/AssetCatalogEventClient.java +++ /dev/null @@ -1,190 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.eventclient; - -import org.odpi.openmetadata.accessservices.assetcatalog.api.AssetCatalogEventListener; -import org.odpi.openmetadata.accessservices.assetcatalog.connectors.outtopic.AssetCatalogOutTopicClientConnector; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.ffdc.OMAGOCFErrorCode; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.ConnectionResponse; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.Connector; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; - - -/** - * AssetCatalogEventClient provides the implementation to manage the interaction with the server to - * set up a listener to support the receipt of inbound events from the Asset Catalog OMAS Out Topic. - */ -public class AssetCatalogEventClient { - private static final String SERVICE_NAME = "Asset Catalog OMAS"; - - private final String serverName; - private final String serverPlatformURLRoot; - private final String callerId; - private final OCFRESTClient restClient; - - private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - - private AssetCatalogOutTopicClientConnector configurationEventTopicConnector = null; - private AuditLog auditLog = null; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param callerId unique identifier of the caller - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public AssetCatalogEventClient(String serverName, - String serverPlatformURLRoot, - String callerId) throws InvalidParameterException { - final String methodName = "Constructor (no security)"; - - invalidParameterHandler.validateOMAGServerPlatformURL(serverPlatformURLRoot, serverName, methodName); - - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformURLRoot; - this.restClient = new OCFRESTClient(serverName, serverPlatformURLRoot); - this.callerId = callerId; - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param userId caller's userId embedded in all HTTP requests - * @param password caller's userId embedded in all HTTP requests - * @param callerId unique identifier of the caller - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public AssetCatalogEventClient(String serverName, - String serverPlatformURLRoot, - String userId, - String password, - String callerId) throws InvalidParameterException { - final String methodName = "Constructor (with security)"; - - invalidParameterHandler.validateOMAGServerPlatformURL(serverPlatformURLRoot, serverName, methodName); - - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformURLRoot; - this.restClient = new OCFRESTClient(serverName, serverPlatformURLRoot, userId, password); - this.callerId = callerId; - } - - - /** - * Create a new client that is to be used within an OMAG Server. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param restClient pre-initialized REST client - * @param maxPageSize pre-initialized parameter limit - * @param auditLog logging destination - * @param callerId unique identifier of the caller - * @throws InvalidParameterException there is a problem with the information about the remote OMAS - */ - public AssetCatalogEventClient(String serverName, - String serverPlatformURLRoot, - OCFRESTClient restClient, - int maxPageSize, - AuditLog auditLog, - String callerId) throws InvalidParameterException { - final String methodName = "Constructor (with REST Client)"; - - invalidParameterHandler.setMaxPagingSize(maxPageSize); - invalidParameterHandler.validateOMAGServerPlatformURL(serverPlatformURLRoot, serverName, methodName); - - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformURLRoot; - this.restClient = restClient; - this.auditLog = auditLog; - this.callerId = callerId; - } - - - /** - * Return the name of the server where configuration is supposed to be stored. - * - * @return server name - */ - public String getConfigurationServerName() { - return serverName; - } - - - /** - * Register a listener object that will be passed each of the events published by - * the Asset Catalog OMAS. - * - * @param userId calling user - * @param listener listener object - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws ConnectionCheckedException there are errors in the configuration of the connection which is preventing - * the creation of a connector. - * @throws ConnectorCheckedException there are errors in the initialization of the connector. - * @throws PropertyServerException there is a problem retrieving information from the property server(s). - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public void registerListener(String userId, - AssetCatalogEventListener listener) throws InvalidParameterException, - ConnectionCheckedException, - ConnectorCheckedException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "registerListener"; - final String nameParameter = "listener"; - - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/asset-catalog/users/{1}/topics/out-topic-connection/{2}"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateObject(listener, nameParameter, methodName); - - ConnectionResponse restResult = restClient.callOCFConnectionGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - callerId); - - Connection topicConnection = restResult.getConnection(); - ConnectorBroker connectorBroker = new ConnectorBroker(auditLog); - Connector connector = connectorBroker.getConnector(topicConnection); - - if (connector == null) { - throw new ConnectorCheckedException(OMAGOCFErrorCode.NULL_CONNECTOR_RETURNED.getMessageDefinition(topicConnection.getQualifiedName(), - SERVICE_NAME, - serverName, - serverPlatformURLRoot), - this.getClass().getName(), - methodName); - } - if (connector instanceof AssetCatalogOutTopicClientConnector) { - configurationEventTopicConnector = (AssetCatalogOutTopicClientConnector) connector; - configurationEventTopicConnector.setAuditLog(auditLog); - configurationEventTopicConnector.start(); - } else { - throw new ConnectorCheckedException(OMAGOCFErrorCode.WRONG_TYPE_OF_CONNECTOR.getMessageDefinition(topicConnection.getQualifiedName(), - SERVICE_NAME, - serverName, - serverPlatformURLRoot, - AssetCatalogOutTopicClientConnector.class.getName()), - this.getClass().getName(), - methodName); - } - configurationEventTopicConnector.registerListener(userId, listener); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/eventclient/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/eventclient/package-info.java deleted file mode 100644 index aa7311ad3ee..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/eventclient/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the implementation to manage the interaction with the server to set up a listener to support - * the receipt of inbound events from the Asset Catalog OMAS Out Topic. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.eventclient; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/package-info.java deleted file mode 100644 index 3bd7658c3d6..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package contains the Java clients for the Asset Catalog OMAS that can be used by integration services in order - * to gain access to all functionalities exposed by the catalog. - */ -package org.odpi.openmetadata.accessservices.assetcatalog; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalogClientTest.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalogClientTest.java deleted file mode 100644 index 7506c886e22..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-client/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/AssetCatalogClientTest.java +++ /dev/null @@ -1,335 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -package org.odpi.openmetadata.accessservices.assetcatalog; -/* Copyright Contributors to the ODPi Egeria project. */ - - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Classification; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Element; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.ClassificationListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipResponse; -import org.odpi.openmetadata.adapters.connectors.restclients.RESTClientConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.springframework.util.ReflectionUtils; - -import java.lang.reflect.Field; -import java.util.Collections; -import java.util.List; - -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; - -public class AssetCatalogClientTest { - - private static final String SERVER_URL = "https://localhost:9444"; - private static final String SERVER_NAME = "TestServer"; - private static final String USER_ID = "zebra91"; - private static final String ASSET_ID = "66d7f872-19bd-439c-98ae-c3fe49d8f420"; - private static final String ASSET_TYPE = "GlossaryTerm"; - private static final String SEARCH_CRITERIA = "employee"; - private static final String SECOND_ASSET_ID = "66d7f872-19bd-439c-98ae-3232430022"; - private static final String SECOND_ASSET_TYPE = "RelationalColumn"; - private static final String RELATIONSHIP_TYPE = "SemanticAssignment"; - private static final String CLASSIFICATION_NAME = "Confidentiality"; - private static final Integer FROM = 0; - private static final Integer PAGE_SIZE = 10; - - private AssetCatalog assetCatalog; - - @Mock - private RESTClientConnector connector; - - @Before - public void before() throws Exception { - MockitoAnnotations.openMocks(this); - - assetCatalog = new AssetCatalog(SERVER_NAME, SERVER_URL); - Field connectorField = ReflectionUtils.findField(AssetCatalog.class, "clientConnector"); - if (connectorField != null) { - connectorField.setAccessible(true); - ReflectionUtils.setField(connectorField, assetCatalog, connector); - connectorField.setAccessible(false); - } - } - - @Test - public void testGetAssetDetails() throws Exception { - AssetCatalogResponse response = mockAssetDescriptionResponse(); - - when(connector.callGetRESTCall(eq("getAssetDetails"), eq(AssetCatalogResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID), eq(response.getAssetCatalogBean().getGuid()), eq(ASSET_TYPE))).thenReturn(response); - - AssetCatalogResponse assetDetails = assetCatalog.getAssetDetails(USER_ID, - response.getAssetCatalogBean().getGuid(), - ASSET_TYPE); - - Assert.assertEquals(response.getAssetCatalogBean().getGuid(), assetDetails.getAssetCatalogBean().getGuid()); - } - - @Test - public void testGetAssetUniverse() throws Exception { - AssetCatalogResponse response = mockAssetDescriptionResponse(); - - when(connector.callGetRESTCall(eq("getAssetUniverse"), eq(AssetCatalogResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID), eq(response.getAssetCatalogBean().getGuid()), eq(ASSET_TYPE))).thenReturn(response); - - AssetCatalogResponse assetDetails = assetCatalog.getAssetUniverse(USER_ID, - response.getAssetCatalogBean().getGuid(), - ASSET_TYPE); - - Assert.assertEquals(response.getAssetCatalogBean().getGuid(), assetDetails.getAssetCatalogBean().getGuid()); - } - - @Test - public void testGetAssetRelationships() throws Exception { - RelationshipListResponse response = mockRelationshipsResponse(); - - when(connector.callGetRESTCall(eq("getAssetRelationships"), eq(RelationshipListResponse.class), - anyString(), - eq(SERVER_NAME), - eq(USER_ID), - eq(ASSET_ID), - eq(ASSET_TYPE), - eq(RELATIONSHIP_TYPE), - eq(FROM), - eq(PAGE_SIZE))).thenReturn(response); - - RelationshipListResponse relationshipListResponse = assetCatalog.getAssetRelationships( - USER_ID, - ASSET_ID, - ASSET_TYPE, - RELATIONSHIP_TYPE, - FROM, - PAGE_SIZE); - - Assert.assertEquals(RELATIONSHIP_TYPE, relationshipListResponse.getRelationships().get(0).getType().getName()); - } - - @Test - public void testGetClassificationsForAsset() throws Exception { - ClassificationListResponse response = mockClassificationsResponse(); - - when(connector.callGetRESTCall(eq("getClassificationsForAsset"), - eq(ClassificationListResponse.class), - anyString(), - eq(SERVER_NAME), - eq(USER_ID), - eq(ASSET_ID), - eq(ASSET_TYPE), - eq(CLASSIFICATION_NAME))).thenReturn(response); - - ClassificationListResponse classificationListResponse = assetCatalog.getClassificationsForAsset( - USER_ID, - ASSET_ID, - ASSET_TYPE, - CLASSIFICATION_NAME); - - Assert.assertEquals(CLASSIFICATION_NAME, classificationListResponse.getClassifications().get(0).getName()); - } - - @Test - public void testSearchByType() throws Exception { - AssetListResponse response = mockAssetListResponse(); - SearchParameters searchParameters = mockSearchParameters(); - - when(connector.callPostRESTCall(eq("searchByType"), - eq(AssetListResponse.class), - anyString(), - eq(searchParameters), - eq(SERVER_NAME), - eq(USER_ID), - eq(SEARCH_CRITERIA))).thenReturn(response); - - AssetListResponse assetResponse = assetCatalog.searchByType(USER_ID, SEARCH_CRITERIA, searchParameters); - - Assert.assertEquals(ASSET_ID, assetResponse.getElementsList().get(0).getGuid()); - } - - @Test - public void testGetAssetContext() throws Exception { - AssetResponse response = mockAssetResponse(); - - when(connector.callGetRESTCall(eq("getAssetContext"), - eq(AssetResponse.class), - anyString(), - eq(SERVER_NAME), - eq(USER_ID), - eq(ASSET_ID), - eq(ASSET_TYPE))).thenReturn(response); - - AssetResponse assetResponse = assetCatalog.getAssetContext(USER_ID, - ASSET_ID, - ASSET_TYPE); - - Assert.assertEquals(ASSET_ID, assetResponse.getAsset().getGuid()); - } - - @Test - public void testGetRelationshipBetweenEntities() throws Exception { - RelationshipResponse response = mockRelationshipResponse(); - - when(connector.callGetRESTCall(eq("getRelationshipBetweenEntities"), - eq(RelationshipResponse.class), - anyString(), - eq(SERVER_NAME), - eq(USER_ID), - eq(ASSET_ID), - eq(SECOND_ASSET_ID), - eq(RELATIONSHIP_TYPE))).thenReturn(response); - - RelationshipResponse relationshipBetweenEntities = assetCatalog.getRelationshipBetweenEntities( - USER_ID, - ASSET_ID, - SECOND_ASSET_ID, - RELATIONSHIP_TYPE); - - Assert.assertEquals(RELATIONSHIP_TYPE, relationshipBetweenEntities.getRelationship().getType().getName()); - Assert.assertEquals(ASSET_ID, relationshipBetweenEntities.getRelationship().getFromEntity().getGuid()); - Assert.assertEquals(SECOND_ASSET_ID, relationshipBetweenEntities.getRelationship().getToEntity().getGuid()); - } - - - private AssetListResponse mockAssetListResponse() { - AssetListResponse assetResponse = new AssetListResponse(); - assetResponse.setElementsList(Collections.singletonList(mockTerm())); - return assetResponse; - } - - private AssetResponse mockAssetResponse() { - AssetResponse assetResponse = new AssetResponse(); - assetResponse.setAsset(mockTerm()); - return assetResponse; - } - - private Elements mockTerm() { - Elements elements = new Elements(); - elements.setGuid(ASSET_ID); - Type type = new Type(); - type.setName(ASSET_TYPE); - elements.setType(type); - return elements; - } - - private RelationshipResponse mockRelationshipResponse() { - RelationshipResponse relationshipsResponse = new RelationshipResponse(); - relationshipsResponse.setRelationship(mockRelationship()); - return relationshipsResponse; - } - - private SearchParameters mockSearchParameters() { - SearchParameters searchParameters = new SearchParameters(); - - searchParameters.setLevel(2); - searchParameters.setFrom(0); - searchParameters.setPageSize(10); - - return searchParameters; - } - - private ClassificationListResponse mockClassificationsResponse() { - ClassificationListResponse classificationListResponse = new ClassificationListResponse(); - classificationListResponse.setClassifications(mockClassifications()); - return classificationListResponse; - } - - - private RelationshipListResponse mockRelationshipsResponse() { - RelationshipListResponse relationshipListResponse = new RelationshipListResponse(); - relationshipListResponse.setRelationships(mockRelationships()); - return relationshipListResponse; - } - - - private AssetCatalogListResponse mockAssetDescriptionListResponse() { - AssetCatalogListResponse expectedResponse = new AssetCatalogListResponse(); - expectedResponse.setRelatedHTTPCode(200); - - AssetCatalogBean assetCatalogBean = mockAssetDescription(); - expectedResponse.setAssetCatalogBeanList(Collections.singletonList(assetCatalogBean)); - - return expectedResponse; - } - - private AssetCatalogResponse mockAssetDescriptionResponse() { - AssetCatalogResponse expectedResponse = new AssetCatalogResponse(); - expectedResponse.setRelatedHTTPCode(200); - - AssetCatalogBean assetCatalogBean = mockAssetDescription(); - expectedResponse.setAssetCatalogBean(assetCatalogBean); - - return expectedResponse; - } - - private AssetCatalogBean mockAssetDescription() { - AssetCatalogBean assetCatalogBean = new AssetCatalogBean(); - - assetCatalogBean.setGuid(ASSET_ID); - Type type = new Type(); - type.setName(ASSET_TYPE); - assetCatalogBean.setType(type); - - assetCatalogBean.setClassifications(mockClassifications()); - assetCatalogBean.setRelationships(mockRelationships()); - - return assetCatalogBean; - } - - private List mockRelationships() { - return Collections.singletonList(mockRelationship()); - } - - private Relationship mockRelationship() { - Relationship relationship = new Relationship(); - - relationship.setFromEntity(mockAsset(ASSET_ID, ASSET_TYPE)); - relationship.setToEntity(mockAsset(SECOND_ASSET_ID, SECOND_ASSET_TYPE)); - - Type type = new Type(); - type.setName(RELATIONSHIP_TYPE); - relationship.setType(type); - - return relationship; - } - - private Element mockAsset(String defaultAssetId, String typeName) { - Element asset = new Element(); - - asset.setGuid(defaultAssetId); - asset.setCreatedBy("admin"); - - Type type = new Type(); - type.setName(typeName); - asset.setType(type); - - return asset; - } - - private List mockClassifications() { - return Collections.singletonList(mockClassification(CLASSIFICATION_NAME)); - } - - private Classification mockClassification(String classificationName) { - Classification classification = new Classification(); - - classification.setName(classificationName); - classification.setCreatedBy("admin"); - classification.setStatus(InstanceStatus.ACTIVE.getName()); - - return classification; - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/README.md b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/README.md deleted file mode 100644 index 14ee24cb85e..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Asset Catalog Open Metadata Access Service (OMAS) Out Topic Connector - - -Asset Catalog OMAS provides means to receive and process asynchronous events that are produced by it -on its out topic. This can be done using the connector and the connector provider classes. - - ----- -Return to the [asset-catalog](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/build.gradle b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/build.gradle deleted file mode 100644 index 1ec87275d89..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - 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') - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'org.slf4j:slf4j-api' -} - -description = 'Asset Catalog OMAS Topic Connectors' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogErrorCode.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogErrorCode.java deleted file mode 100644 index 632cfe33175..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogErrorCode.java +++ /dev/null @@ -1,116 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.connectors.outtopic; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - -/** - * The AssetCatalogErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with - * the Asset Catalog OMAS 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:
  • - *
    • - *
    • 500 - internal error
    • - *
    • 400 - invalid parameters
    • - *
    • 404 - not found
    • - *
    • 409 - data conflict errors - eg item already defined
    • - *
  • - *
  • Error Message Id - 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 AssetCatalogErrorCode implements ExceptionMessageSet { - - /** - * OMAS-ASSET-CATALOG-500-001 A null topic listener has been passed by the user. - */ - NULL_LISTENER(500, "OMAS-ASSET-CATALOG-500-001", - "A null topic listener has been passed by user {0} on method {1}", - "There is a coding error in the caller to the Asset Catalog OMAS.", - "Correct the caller logic and retry the request."); - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - AssetCatalogErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogOutTopicClientConnector.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogOutTopicClientConnector.java deleted file mode 100644 index 727dfb3e066..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogOutTopicClientConnector.java +++ /dev/null @@ -1,80 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetcatalog.connectors.outtopic; - -import org.odpi.openmetadata.accessservices.assetcatalog.api.AssetCatalogEventInterface; -import org.odpi.openmetadata.accessservices.assetcatalog.api.AssetCatalogEventListener; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogEvent; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListenerConnectorBase; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; - -/** - * AssetCatalogOutTopicClientConnector is the java base class implementation of - * the client side connector that receives events from the Asset Catalog OMAS's OutTopic. - */ -public class AssetCatalogOutTopicClientConnector extends OpenMetadataTopicListenerConnectorBase implements AssetCatalogEventInterface, AssetCatalogEventListener { - private static final Logger log = LoggerFactory.getLogger(AssetCatalogOutTopicClientConnector.class); - - private final List internalEventListeners = new ArrayList<>(); - - - /** - * Register a listener object that will be passed each of the events published by - * the Asset Catalog OMAS. - * - * @param userId calling user - * @param listener listener object - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - @Override - public synchronized void registerListener(String userId, - AssetCatalogEventListener listener) throws InvalidParameterException { - final String methodName = "registerListener"; - final String parameterName = "listener"; - - if (listener == null) { - throw new InvalidParameterException(AssetCatalogErrorCode.NULL_LISTENER.getMessageDefinition(userId, methodName), - this.getClass().getName(), - methodName, - parameterName); - } - - internalEventListeners.add(listener); - } - - - /** - * Method to pass an event received on topic. - * - * @param event inbound event - */ - @Override - public synchronized void processEvent(String event) { - if (event != null) { - try { - AssetCatalogEvent eventObject = super.getEventBean(event, AssetCatalogEvent.class); - for (AssetCatalogEventListener listener : internalEventListeners) { - try { - listener.processEvent(eventObject); - } catch (Exception error) { - log.error("Listener: {} is unable to process event: {}", listener.getClass().getName(), event, error); - } - } - } catch (Exception error) { - log.error("Unable to read event: {}", event, error); - } - } - } - - - @Override - public void processEvent(AssetCatalogEvent event) { - log.debug("process event {}", this.getClass().getName()); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogOutTopicClientProvider.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogOutTopicClientProvider.java deleted file mode 100644 index 6631db4cb29..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/AssetCatalogOutTopicClientProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.connectors.outtopic; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; - -/** - * The AssetCatalogOutTopicClientProvider provides a base class for the connector provider supporting - * AssetCatalogOutTopicClientConnector Connectors. - *

- * It extends ConnectorProviderBase which does the creation of connector instances. The subclasses of - * AssetCatalogOutTopicClientProvider must initialize ConnectorProviderBase with the Java class - * name of their Connector implementation (by calling super.setConnectorClassName(className)). - * Then the connector provider will work. - */ -public class AssetCatalogOutTopicClientProvider extends ConnectorProviderBase { - static final String CONNECTOR_TYPE_GUID = "785fdb3d-34b7-47e0-bc73-5969610331d4"; - static final String CONNECTOR_TYPE_NAME = "Asset Catalog Out Topic Client Connector"; - static final String CONNECTOR_TYPE_DESCRIPTION = "Connector supports the receipt of events on the Asset Catalog OMAS Out Topic."; - - /** - * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific - * discovery service implementation. - */ - public AssetCatalogOutTopicClientProvider() { - Class connectorClass = AssetCatalogOutTopicClientConnector.class; - - super.setConnectorClassName(connectorClass.getName()); - - 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.setConnectorProviderClassName(this.getClass().getName()); - - super.connectorTypeBean = connectorType; - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/package-info.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/package-info.java deleted file mode 100644 index 6d0ab4947de..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-topic-connector/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/connectors/outtopic/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The Asset Catalog connector is the interfaces of the connectors supported by the Asset Catalog OMAS. - * Specifically the client interface is a listener interface to allow the client to receive events from the server. - * The server interface is an event sending interface. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.connectors.outtopic; diff --git a/open-metadata-implementation/access-services/asset-catalog/docs/egeria-asset-search.png b/open-metadata-implementation/access-services/asset-catalog/docs/egeria-asset-search.png deleted file mode 100644 index 02eaf4dc726..00000000000 Binary files a/open-metadata-implementation/access-services/asset-catalog/docs/egeria-asset-search.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/asset-catalog/docs/egeria-asset-search.xml b/open-metadata-implementation/access-services/asset-catalog/docs/egeria-asset-search.xml deleted file mode 100644 index beb9d28451a..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/docs/egeria-asset-search.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - 7X1Xl5tI1+6vmcvxIodLshBRIJJuZgFCgEDkqF9/oIOn09htj3vc33nVXu4WRVFU7bx3PaA/YOYyCY1fJUp5jPI/IOA4/QGzf0AQgsHL77Vhvm+AEOK+IW7S430T+HeDmV6jh0bgobVPj1H7rGNXlnmXVs8bw7IoorB71uY3TTk+73Yq8+d3rfw4etVghn7+utVJj13y0AoCwN8nNlEaJw+3JtCHE4EfZnFT9sXD/f6A4NPdz/3pi/841kP/NvGP5fikCeb+gJmmLLv7T5eJifKVtI9ku7+O/4ezX+fdREX3ngu6cyFSydHKEP1wNnZ/5vsS/BN94N7g5330uI672XbzI4Xu1hito4B/w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P3qjL6hiY/tjVR7nfpED2b7ltS8HAHvUyL7om7fBSwx5j2cdzHIe5X/nDV37L03YFA7MVc7inzaqA7ofy67H8hp59gkwkjPluCgL2jeH1ztK9k6BNnCBjxLUeL+ZfVcxVBW90t+4Xj/V/wtz+83fTpMoZ3ZPWfxuNiJPbU434BAPhjvO7b3yT/XqeLfyqni4HP8zEY/0mni4HPHQ4Mvxjoo53uzbt8S37fb4NQ+JNl6K/jhn+uQ/1/ms79BBOfuxLy9bs5Qfgtq/JRngR/XU1cOCa8DhP+PZsemn4lh54Zh1/AHgiHnrEHAl/zB8FeswcCPoo9r/eoLPF/hRnoi/fYYm/EXW9ZvI/jBvSKGzJL6UuLyRn2+oqP/wnGkC9eMEyArytQ/y1fXlcWv3z58j/CDQJCvjwP8UCA/M38eEdB8L7Q8pYjh8LwrVDviAUYiv0QzX64OkNg2Ata/v4o6xZA/0B55qvkfeJ9EPx14KznffxnWrwVHj+Pw351NP1Ur/5JEz9BxeYH2Popd0jw1xW5V6z6NPWa37dDQjyo4XeLNY9G8ZMUa0AAgF/4jZ/eJHljrP96nwR/R3Xxo/dJCAx9SdHfvlNCvM6Vb674+1L0iXdKiNfp9ZI4/M9shPwAiz7pRgjxOiP/vI71QzdCvuszH63XJ/GZJIx+IXEAJQgIRiESAZ8HbBjwBQFBHEPuuyAvHjx9rzfFyZdu5AP3P/Q52l2JkPoryXjT2fR/Fsf+z98ioAAJPxPRRdSI74npevS2tL2QmJ+L7cA30C//vGH3u6Tya0H+QVpQ7CfDuFcDvSy2/LTYLYdNWXZPuy8uIVHKY7T2+H8= - - \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/docs/samples/collections/Asset-Catalog-endpoints.postman_collection.json b/open-metadata-implementation/access-services/asset-catalog/docs/samples/collections/Asset-Catalog-endpoints.postman_collection.json deleted file mode 100644 index 8d5e458bddc..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/docs/samples/collections/Asset-Catalog-endpoints.postman_collection.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "info": { - "_postman_id": "bc085e19-5492-4446-b323-6ce7c7a0642f", - "name": "Asset Catalog endpoints", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "1. Get supported types", - "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/asset-catalog/users/{{user-id}}/supportedTypes?type={{asset-type}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "asset-catalog", - "users", - "{{user-id}}", - "supportedTypes" - ], - "query": [ - { - "key": "type", - "value": "{{asset-type}}" - } - ] - } - }, - "response": [] - }, - { - "name": "2. Search", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n\t\"class\": \"SearchParameters\",\n\t\"status\": \"ACTIVE\",\n\t\"from\": 0,\n\t\"pageSize\":100,\n\t\"isCaseInsensitive\": false\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/asset-catalog/users/{{user-id}}/search?searchCriteria={{search-criteria}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "asset-catalog", - "users", - "{{user-id}}", - "search" - ], - "query": [ - { - "key": "searchCriteria", - "value": "{{search-criteria}}" - } - ] - } - }, - "response": [] - }, - { - "name": "3. Get asset details", - "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/asset-catalog/users/{{user-id}}/asset-details/{{asset-guid}}/?assetType={{asset-type}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "asset-catalog", - "users", - "{{user-id}}", - "asset-details", - "{{asset-guid}}", - "" - ], - "query": [ - { - "key": "assetType", - "value": "{{asset-type}}" - } - ] - } - }, - "response": [] - }, - { - "name": "4. Get asset classifications", - "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/asset-catalog/users/{{user-id}}/asset-classifications/{{asset-guid}}?classificationName={{classification-name}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "asset-catalog", - "users", - "{{user-id}}", - "asset-classifications", - "{{asset-guid}}" - ], - "query": [ - { - "key": "from", - "value": "0", - "disabled": true - }, - { - "key": "pageSize", - "value": "10", - "disabled": true - }, - { - "key": "assetType", - "value": "{{asset-type-1}}", - "disabled": true - }, - { - "key": "classificationName", - "value": "{{classification-name}}" - } - ] - } - }, - "response": [] - }, - { - "name": "5. Get asset relationships", - "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/asset-catalog/users/{{user-id}}/asset-relationships/{{asset-guid}}?assetType={{asset-type}}&relationshipType={{relationship-type}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "asset-catalog", - "users", - "{{user-id}}", - "asset-relationships", - "{{asset-guid}}" - ], - "query": [ - { - "key": "assetType", - "value": "{{asset-type}}" - }, - { - "key": "relationshipType", - "value": "{{relationship-type}}" - } - ] - } - }, - "response": [] - }, - { - "name": "6. Get asset context", - "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/asset-catalog/users/{{user-id}}/asset-context/{{asset-guid}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "asset-catalog", - "users", - "{{user-id}}", - "asset-context", - "{{asset-guid}}" - ] - } - }, - "response": [] - }, - { - "name": "7. Get asset universe", - "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/asset-catalog/users/{{user-id}}/asset-universe/{{asset-guid}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "asset-catalog", - "users", - "{{user-id}}", - "asset-universe", - "{{asset-guid}}" - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/README.md b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/README.md deleted file mode 100644 index 28c9e7ffe51..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/README.md +++ /dev/null @@ -1,20 +0,0 @@ - - - -# Asset Catalog Open Metadata Access Service (OMAS) server-side implementation - -The Asset Catalog OMAS server supports the server side implementation of the access service. This includes: - -* the interaction with the [administration services](../../../admin-services) for - registration, configuration, initialization and termination of the access service. -* the interaction with the [repository services](../../../repository-services) to work with open metadata from the - [cohort](../../../repository-services/docs/open-metadata-repository-cohort.md). -* the OMRS Topic listener designed for receiving events from the cohorts that the local server is connected to. -* the audit log used to define the message content for the OMRS Audit Log. -* the service package that provides the server-side implementation of the Asset Catalog Open Metadata Assess Service (OMAS). -These services provide the functionality to fetch asset's header, classification, properties and relationships. - - ----- -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-catalog/omas-asset-catalog-server/build.gradle b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/build.gradle deleted file mode 100644 index d2e24889f08..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/build.gradle +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id "io.freefair.lombok" -} - -dependencies { - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-topic-connector') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation project(':open-metadata-implementation:common-services:generic-handlers') - implementation 'org.apache.commons:commons-collections4' - implementation project(':open-metadata-implementation:common-services:repository-handler') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-handlers') - implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-server') - implementation 'org.slf4j:slf4j-api' - implementation 'org.springframework:spring-core' - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'com.fasterxml.jackson.core:jackson-core' - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - testImplementation 'org.mockito:mockito-core' - testImplementation 'junit:junit' - testImplementation 'org.junit.jupiter:junit-jupiter-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -description = 'Asset Catalog OMAS Server-side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogAdmin.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogAdmin.java deleted file mode 100644 index 21a93ff5052..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogAdmin.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.admin; - -import org.odpi.openmetadata.accessservices.assetcatalog.auditlog.AssetCatalogAuditCode; -import org.odpi.openmetadata.accessservices.assetcatalog.listeners.AssetCatalogOMRSTopicListener; -import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; -import org.odpi.openmetadata.adminservices.registration.AccessServiceAdmin; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - -import java.util.Collections; -import java.util.List; - -/** - * AssetCatalogAdmin is the class that is called by the OMAG Server to initialize and terminate - * the Asset Catalog OMAS. The initialization call provides this OMAS with resources from the - * Open Metadata Repository Services. - */ -public class AssetCatalogAdmin extends AccessServiceAdmin { - - private static final String SUPPORTED_TYPES_FOR_SEARCH = "SupportedTypesForSearch"; - private static final String ENABLE_INDEX_EVENTS = "EnableIndexingEvents"; - private AuditLog auditLog; - private String serverName; - private AssetCatalogServicesInstance instance; - - - /** - * Initialize the access service. - * - * @param accessServiceConfigurationProperties specific configuration properties for this access service. - * @param enterpriseOMRSTopicConnector connector for receiving OMRS Events from the cohorts - * @param repositoryConnector connector for querying the cohort repositories - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use on OMRS calls where there is no end user. - */ - @Override - public void initialize(AccessServiceConfig accessServiceConfigurationProperties, - OMRSTopicConnector enterpriseOMRSTopicConnector, - OMRSRepositoryConnector repositoryConnector, - AuditLog auditLog, - String serverUserName) throws OMAGConfigurationErrorException { - final String actionDescription = "initialize"; - - auditLog.logMessage(actionDescription, AssetCatalogAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - try { - this.auditLog = auditLog; - - List supportedZones = this.extractSupportedZones(accessServiceConfigurationProperties.getAccessServiceOptions(), - accessServiceConfigurationProperties.getAccessServiceName(), - auditLog); - - List supportedTypesForSearch = getSupportedTypesForSearchOption(accessServiceConfigurationProperties); - - instance = new AssetCatalogServicesInstance(repositoryConnector, supportedZones, auditLog, serverUserName, - accessServiceConfigurationProperties.getAccessServiceName(), supportedTypesForSearch, - accessServiceConfigurationProperties.getAccessServiceInTopic(), - accessServiceConfigurationProperties.getAccessServiceOutTopic()); - - - boolean indexingEnabled = this.isIndexingEnabled(accessServiceConfigurationProperties); - - if(indexingEnabled) { - registerListener(accessServiceConfigurationProperties, - enterpriseOMRSTopicConnector, - repositoryConnector, - auditLog); - } - - this.serverName = instance.getServerName(); - - auditLog.logMessage(actionDescription, AssetCatalogAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName)); - - } catch (Exception error) { - auditLog.logException(actionDescription, AssetCatalogAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage(), serverName), error); - - super.throwUnexpectedInitializationException(actionDescription, AccessServiceDescription.ASSET_CATALOG_OMAS.getAccessServiceFullName(), error); - } - } - - private void registerListener(AccessServiceConfig accessServiceConfigurationProperties, - OMRSTopicConnector enterpriseOMRSTopicConnector, - OMRSRepositoryConnector repositoryConnector, - AuditLog auditLog) throws OMAGConfigurationErrorException { - - Connection outTopicConnection = accessServiceConfigurationProperties.getAccessServiceOutTopic(); - - String serviceName = accessServiceConfigurationProperties.getAccessServiceName(); - - OpenMetadataTopicConnector outTopicConnector = super.getOutTopicEventBusConnector( - outTopicConnection, - accessServiceConfigurationProperties.getAccessServiceName(), - auditLog); - - List supportedZones = this.extractSupportedZones( - accessServiceConfigurationProperties.getAccessServiceOptions(), - serviceName, - auditLog); - - List supportedTypesForSearch = getSupportedTypesForSearchOption(accessServiceConfigurationProperties); - - AssetCatalogOMRSTopicListener omrsTopicListener = new AssetCatalogOMRSTopicListener( - serviceName, - auditLog, - outTopicConnector, - repositoryConnector.getRepositoryHelper(), - repositoryConnector.getRepositoryValidator(), - serverName, - supportedZones, - supportedTypesForSearch - ); - - super.registerWithEnterpriseTopic( - serviceName, - serverName, - enterpriseOMRSTopicConnector, - omrsTopicListener, - auditLog); - } - - /** - * Shutdown the access service. - */ - public void shutdown() { - if (instance != null) { - instance.shutdown(); - } - - if (auditLog != null) { - final String actionDescription = "shutdown"; - - auditLog.logMessage(actionDescription, AssetCatalogAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(serverName)); - } - } - - private boolean isIndexingEnabled(AccessServiceConfig accessServiceConfigurationProperties) { - if (accessServiceConfigurationProperties.getAccessServiceOptions() != null) { - return (Boolean) accessServiceConfigurationProperties.getAccessServiceOptions().getOrDefault(ENABLE_INDEX_EVENTS, Boolean.FALSE); - } - return false; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogInstanceHandler.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogInstanceHandler.java deleted file mode 100644 index 376ee1944b8..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogInstanceHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.admin; - -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.AssetCatalogHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.RelationshipHandler; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * AssetCatalogInstanceHandler retrieves information from the instance map for the access service instances. - * The instance map is thread-safe. Instances are added and removed by the AssetCatalogAdmin class. - */ -public class AssetCatalogInstanceHandler extends OMASServiceInstanceHandler { - - /** - * Default constructor registers the access service - */ - public AssetCatalogInstanceHandler() { - super(AccessServiceDescription.ASSET_CATALOG_OMAS.getAccessServiceFullName()); - - AssetCatalogRegistration.registerAccessService(); - } - - /** - * Retrieve the process handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public AssetCatalogHandler getAssetCatalogHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - AssetCatalogServicesInstance instance = (AssetCatalogServicesInstance) super.getServerServiceInstance(userId, - serverName, serviceOperationName); - - return instance.getAssetCatalogHandler(); - } - - /** - * Retrieve the registration handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public RelationshipHandler getRelationshipHandler(String userId, String serverName, - String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - AssetCatalogServicesInstance instance = (AssetCatalogServicesInstance) super.getServerServiceInstance(userId, - serverName, serviceOperationName); - - return instance.getRelationshipHandler(); - } -} - - diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogRegistration.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogRegistration.java deleted file mode 100644 index 21182481c03..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogRegistration.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.admin; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceRegistrationEntry; -import org.odpi.openmetadata.adminservices.registration.OMAGAccessServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; - -/** - * AssetCatalogRegistration registers the access service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * access service in the server and that it can be configured and used. - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -class AssetCatalogRegistration { - - /** - * Pass information about this access service to the OMAG Server administration services. - */ - static void registerAccessService() { - AccessServiceDescription myDescription = AccessServiceDescription.ASSET_CATALOG_OMAS; - - AccessServiceRegistrationEntry myRegistration = new AccessServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - AssetCatalogAdmin.class.getName()); - OMAGAccessServiceRegistration.registerAccessService(myRegistration); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogServicesInstance.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogServicesInstance.java deleted file mode 100644 index 946d9b1dea6..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/AssetCatalogServicesInstance.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.admin; - -import lombok.Getter; -import org.odpi.openmetadata.accessservices.assetcatalog.connectors.outtopic.AssetCatalogOutTopicClientProvider; -import org.odpi.openmetadata.accessservices.assetcatalog.converters.AssetCatalogConverter; -import org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogErrorCode; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.AssetCatalogHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.RelationshipHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.service.ClockService; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; -import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - -import java.time.Clock; -import java.util.List; - -/** - * AssetCatalogServicesInstance caches references to OMRS objects for a specific server. - * It is also responsible for registering itself in the instance map. - */ -class AssetCatalogServicesInstance extends OMASServiceInstance { - - private static final AccessServiceDescription description = AccessServiceDescription.ASSET_CATALOG_OMAS; - - /** - * Return the handler for assets requests - * @return handler object - */ - @Getter - private final AssetCatalogHandler assetCatalogHandler; - - /** - * Return the handler for relationships requests - * @return handler object - */ - @Getter - private final RelationshipHandler relationshipHandler; - - /** - * Instantiates an AssetCatalogServicesInstance object - * @param repositoryConnector link to the repository responsible for servicing the REST calls. - * @param supportedZones configurable list of zones that Asset Catalog is allowed to serve Assets from - * @param auditLog logging destination - * @param serverUserName userId used for server initiated actions - * @param supportedTypesForSearch default list of supported types for search method - * @throws NewInstanceException a problem occurred during initialization - */ - AssetCatalogServicesInstance(OMRSRepositoryConnector repositoryConnector, List supportedZones, - AuditLog auditLog, String serverUserName, String sourceName, - List supportedTypesForSearch, - Connection inTopicEventBusConnection, - Connection outTopicEventBusConnection) throws NewInstanceException { - - super(description.getAccessServiceName() + " OMAS", - repositoryConnector, - supportedZones, - null, - null, - auditLog, - serverUserName, - repositoryConnector.getMaxPageSize(), - null, - null, - AssetCatalogOutTopicClientProvider.class.getName(), - outTopicEventBusConnection); - - super.supportedZones = supportedZones; - - if (repositoryHandler != null) { - AssetCatalogConverter assetCatalogConverter = - new AssetCatalogConverter<>(repositoryHelper, serviceName, serverName); - - OpenMetadataAPIGenericHandler assetHandler = - new OpenMetadataAPIGenericHandler<>(new AssetCatalogConverter<>(repositoryHelper, serviceName, serverName), - AssetCatalogBean.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, - repositoryHelper, localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, - auditLog); - ClockService clockService = new ClockService(Clock.systemUTC()); - - assetCatalogHandler = new AssetCatalogHandler(serverName, sourceName, invalidParameterHandler, - repositoryHandler, repositoryHelper, assetHandler, assetCatalogConverter, errorHandler, - supportedZones, supportedTypesForSearch, clockService); - - relationshipHandler = new RelationshipHandler(sourceName, invalidParameterHandler, repositoryHandler, - repositoryHelper, assetHandler, errorHandler, clockService); - } else { - final String methodName = "new ServiceInstance"; - throw new NewInstanceException(AssetCatalogErrorCode.OMRS_NOT_INITIALIZED.getMessageDefinition(serverName), - this.getClass().getName(), - methodName); - } - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/package-info.java deleted file mode 100644 index aaa6d8f8a37..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/admin/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the implementation of the admin classes that are called during server start up and shut down. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.admin; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/auditlog/AssetCatalogAuditCode.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/auditlog/AssetCatalogAuditCode.java deleted file mode 100644 index ae9d495c5a0..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/auditlog/AssetCatalogAuditCode.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.auditlog; - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - -/** - * The AssetCatalogAuditCode is used to define the message content for the OMRS Audit Log. - *

- * The 5 fields in the enum are: - *

    - *
  • Log Message Id - 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 AssetCatalogAuditCode implements AuditLogMessageSet -{ - /** - * OMAS-ASSET-CATALOG-0001 The Asset Catalog OMAS has completed initialization of a new instance. - */ - SERVICE_INITIALIZED("OMAS-ASSET-CATALOG-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The Asset Catalog Open Metadata Access Service (OMAS) has initialized a new instance for server {0}", - "The Asset Catalog OMAS has completed initialization of a new instance.", - "No action is required. This is part of the normal operation of the service."), - /** - * OMAS-ASSET-CATALOG-0002 The local server has started up a new instance of the Asset Catalog OMAS. - */ - SERVICE_INITIALIZING("OMAS-ASSET-CATALOG-0002", - AuditLogRecordSeverityLevel.STARTUP, - "The Asset Catalog Open Metadata Access Service (OMAS) is initializing a new server instance", - "The local server has started up a new instance of the Asset Catalog OMAS.", - "No action is required. This is part of the normal operation of the service."), - - /** - * OMAS-ASSET-CATALOG-0003 The access service detected an error during the start-up of a specific server instance. - * Its services are not available for the specified server. - */ - SERVICE_INSTANCE_FAILURE("OMAS-ASSET-CATALOG-0003", - AuditLogRecordSeverityLevel.ERROR, - "The Asset Catalog Open Metadata Access Service (OMAS) is unable to initialize a new instance; error message is {0}", - "The access service detected an error during the start up of a specific server instance. Its services are not available for server {1}.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - - /** - * OMAS-ASSET-CATALOG-0004 The local server has requested shut down of an Asset Catalog OMAS instance. - */ - SERVICE_SHUTDOWN("OMAS-ASSET-CATALOG-0004", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Asset Catalog Open Metadata Access Service (OMAS) is shutting down its instance for server {0}", - "The local server has requested shut down of an Asset Catalog OMAS instance.", - "No action is required. This is part of the normal operation of the service."), - - /** - * OMAS-ASSET-CATALOG-0005 The event could not be processed. - */ - EVENT_PROCESSING_EXCEPTION("OMAS-ASSET-CATALOG-0005", - AuditLogRecordSeverityLevel.EXCEPTION, - "An exception with message {0} occurred while processing incoming event {1}", - "The event could not be processed.", - "Review the exception to determine the source of the error and correct it."), - - /** - * OMAS-ASSET-CATALOG-0006 The event will not be processed. - */ - EVENT_NOT_PROCESSING("OMAS-ASSET-CATALOG-0006", - AuditLogRecordSeverityLevel.TRACE, - "An event is ignored {0}", - "The event will not be processed.", - "No action is required. This is part of the normal operation of the service."),; - - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor for AssetCatalogAuditCode expects to be passed one of the enumeration rows defined in - * AssetCatalogAuditCode above. For example: - *

- * AssetCatalogAuditCode auditCode = AssetCatalogAuditCode.SERVER_NOT_AVAILABLE; - *

- * This will expand out to the 5 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 - */ - AssetCatalogAuditCode(String messageId, - AuditLogRecordSeverityLevel 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 "AssetCatalogAuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/auditlog/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/auditlog/package-info.java deleted file mode 100644 index 3ef65eff3fd..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/auditlog/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package is used to define the message content for the OMRS Audit Log. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.auditlog; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/converters/AssetCatalogConverter.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/converters/AssetCatalogConverter.java deleted file mode 100644 index 216a4e9fe8c..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/converters/AssetCatalogConverter.java +++ /dev/null @@ -1,366 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.converters; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.MapUtils; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogItemElement; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Classification; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Element; -import org.odpi.openmetadata.accessservices.assetcatalog.model.ElementOrigin; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.util.Constants; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ArrayPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -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.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ADDITIONAL_PROPERTIES_PROPERTY_NAME; - -/** - * AssetConverter is a helper class that maps the OMRS objects to Asset Catalog model. - */ -public class AssetCatalogConverter extends OpenMetadataAPIGenericConverter { - - /** - * Instantiates a new Asset Catalog converter. - * - * @param repositoryHelper the repository helper - * @param serviceName the service name - * @param serverName the server name - */ - public AssetCatalogConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - - /** - * Method used to convert the Entity Details to Asset Catalog OMAS Model - Asset Description object - * - * @param entityDetail entityDetails object - * @return Asset Description object - */ - public AssetCatalogBean getAssetCatalogBean(EntityDetail entityDetail) { - AssetCatalogBean assetCatalogBean = new AssetCatalogBean(); - assetCatalogBean.setGuid(entityDetail.getGUID()); - - assetCatalogBean.setCreatedBy(entityDetail.getCreatedBy()); - assetCatalogBean.setCreateTime(entityDetail.getCreateTime()); - assetCatalogBean.setUpdatedBy(entityDetail.getUpdatedBy()); - assetCatalogBean.setUpdateTime(entityDetail.getUpdateTime()); - assetCatalogBean.setVersion(entityDetail.getVersion()); - - if (entityDetail.getType() != null && entityDetail.getType().getTypeDefName() != null) { - assetCatalogBean.setType(convertInstanceType(entityDetail.getType())); - } - - assetCatalogBean.setUrl(entityDetail.getInstanceURL()); - if (entityDetail.getStatus() != null && entityDetail.getStatus().getName() != null) { - assetCatalogBean.setStatus(entityDetail.getStatus().getName()); - } - - assetCatalogBean.setProperties(extractProperties(entityDetail.getProperties())); - assetCatalogBean.setAdditionalProperties(extractAdditionalProperties(entityDetail.getProperties())); - - if (CollectionUtils.isNotEmpty(entityDetail.getClassifications())) { - assetCatalogBean.setClassifications(convertClassifications(entityDetail.getClassifications())); - } - ElementOrigin elementOrigin = new ElementOrigin(); - elementOrigin.setSourceServer(serviceName); - elementOrigin.setMetadataCollectionId(entityDetail.getMetadataCollectionId()); - elementOrigin.setMetadataCollectionName(entityDetail.getMetadataCollectionName()); - elementOrigin.setInstanceLicense(entityDetail.getInstanceLicense()); - elementOrigin.setOriginCategory(this.getElementOriginCategory(entityDetail.getInstanceProvenanceType())); - assetCatalogBean.setOrigin(elementOrigin); - - return assetCatalogBean; - } - - /** - * Method used to covert a list of relationships from OMRS model to AC OMAS model - * - * @param relationships list of relationships - OMRS model - * @return a list of AC OMAS relationships objects - */ - public List convertRelationships(List relationships) { - if (relationships == null) { - return Collections.emptyList(); - } - - return relationships.stream().map(this::convertRelationship).collect(Collectors.toList()); - } - - /** - * Method used to convert the relationship from the OMRS model to AC OMAS model - * - * @param rel relationship in the OMRS model - * @return a relationship in AC OMAS model - */ - public Relationship convertRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship rel) { - Relationship relationship = new Relationship(); - - relationship.setGuid(rel.getGUID()); - relationship.setCreatedBy(rel.getCreatedBy()); - relationship.setCreateTime(rel.getCreateTime()); - - relationship.setUpdatedBy(rel.getUpdatedBy()); - relationship.setUpdateTime(rel.getUpdateTime()); - - relationship.setVersion(rel.getVersion()); - if (rel.getStatus() != null && rel.getStatus().getName() != null) { - relationship.setStatus(rel.getStatus().getName()); - } - - if (rel.getType() != null && rel.getType().getTypeDefName() != null) { - relationship.setType(convertInstanceType(rel.getType())); - } - - if (rel.getEntityOneProxy() != null) { - relationship.setFromEntity(getElement(rel.getEntityOneProxy())); - } - if (rel.getEntityTwoProxy() != null) { - relationship.setToEntity(getElement(rel.getEntityTwoProxy())); - } - - return relationship; - } - - /** - * Convert a list of Classifications from the OMRS model to Asset Catalog OMAS model - * - * @param classificationsFromEntity - list of classification in the repository services model - * @return list of classifications in the AC OMAS model - */ - public List convertClassifications - (List classificationsFromEntity) { - - if (classificationsFromEntity == null || classificationsFromEntity.isEmpty()) { - return new ArrayList<>(); - } - - List classifications = new ArrayList<>(classificationsFromEntity.size()); - for (org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification classificationEntity : classificationsFromEntity) { - Classification classification = new Classification(); - classification.setName(classificationEntity.getName()); - if (classificationEntity.getClassificationOrigin() != null && classificationEntity.getClassificationOrigin().getDescription() != null) { - classification.setOrigin(classificationEntity.getClassificationOrigin().getDescription()); - } - classification.setOriginGUID(classificationEntity.getClassificationOriginGUID()); - - classification.setCreatedBy(classificationEntity.getCreatedBy()); - classification.setCreateTime(classificationEntity.getCreateTime()); - - classification.setUpdatedBy(classificationEntity.getUpdatedBy()); - classification.setUpdateTime(classificationEntity.getUpdateTime()); - - classification.setVersion(classificationEntity.getVersion()); - if (classificationEntity.getStatus() != null) { - classification.setStatus(classificationEntity.getStatus().getName()); - } - if (classificationEntity.getType() != null) { - classification.setType(convertInstanceType(classificationEntity.getType())); - } - - classification.setProperties(extractProperties(classificationEntity.getProperties())); - - classifications.add(classification); - } - - return classifications; - } - - /** - * Add an element in the context. If the context is null, the current element becomes the root of the context - * - * @param assetCatalogItemElement the context - * @param entityDetail entity details of the new element - */ - public void addElement(AssetCatalogItemElement assetCatalogItemElement, EntityDetail entityDetail) { - List context = assetCatalogItemElement.getContext(); - Elements element = buildAssetElements(entityDetail); - - if (context != null) { - Element leaf = lastElementAdded(context.get(context.size() - 1)); - leaf.setParentElement(element); - } else { - List elements = new ArrayList<>(); - elements.add(element); - assetCatalogItemElement.setContext(elements); - } - } - - /** - * Returns the last node added in the context - * - * @param assetCatalogItemElement given context - * @return the last element - */ - public Element getLastNode(AssetCatalogItemElement assetCatalogItemElement) { - List context = assetCatalogItemElement.getContext(); - - return CollectionUtils.isNotEmpty(context) ? lastElementAdded(context.get(context.size() - 1)) : null; - } - - /** - * Method use to add the parent element to the current element in the built context tree - * - * @param parentElement parent element from the context - * @param element a child element - */ - public void addChildElement(Element parentElement, Element element) { - if (parentElement != null) { - parentElement.setParentElement(element); - } - } - - /** - * Method use to add to the context of the given entity - * - * @param assetCatalogItemElement asset element that contains the current context - * @param entityDetail entity details - */ - public void addContextElement(AssetCatalogItemElement assetCatalogItemElement, EntityDetail entityDetail) { - List context = assetCatalogItemElement.getContext(); - if (context == null) { - context = new ArrayList<>(); - } - context.add(buildAssetElements(entityDetail)); - assetCatalogItemElement.setContext(context); - } - - /** - * Method used to convert TypeDef to Type object from the Asset Catalog OMAS - * - * @param openType type definition - * @return the Type object - */ - public Type convertType(TypeDef openType) { - Type type = new Type(); - type.setName(openType.getName()); - type.setDescription(openType.getDescription()); - type.setVersion(openType.getVersion()); - type.setSuperType(openType.getSuperType().getName()); - return type; - } - - /** - * Create an Asset Element from the Entity Details - * - * @param entityDetail entityDetails - * @return an AssetElement object - */ - public Elements buildAssetElements(EntityDetail entityDetail) { - if (entityDetail == null) { - return null; - } - - Elements element = new Elements(); - element.setGuid(entityDetail.getGUID()); - element.setType(convertInstanceType(entityDetail.getType())); - element.setProperties(extractProperties(entityDetail.getProperties())); - element.setAdditionalProperties(extractAdditionalProperties(entityDetail.getProperties())); - ElementOrigin elementOrigin = new ElementOrigin(); - elementOrigin.setSourceServer(serviceName); - elementOrigin.setMetadataCollectionId(entityDetail.getMetadataCollectionId()); - elementOrigin.setMetadataCollectionName(entityDetail.getMetadataCollectionName()); - elementOrigin.setInstanceLicense(entityDetail.getInstanceLicense()); - elementOrigin.setOriginCategory(this.getElementOriginCategory(entityDetail.getInstanceProvenanceType())); - element.setOrigin(elementOrigin); - if (CollectionUtils.isNotEmpty(entityDetail.getClassifications())) { - element.setClassifications(convertClassifications(entityDetail.getClassifications())); - } - - return element; - } - - private Type convertInstanceType(InstanceType instanceType) { - Type type = new Type(); - type.setName(instanceType.getTypeDefName()); - type.setVersion(instanceType.getTypeDefVersion()); - return type; - } - - private Element getElement(EntityProxy entityProxy) { - String method = "getAsset"; - Element asset = new Element(); - - asset.setGuid(entityProxy.getGUID()); - if (entityProxy.getUniqueProperties() != null) { - asset.setName(repositoryHelper.getStringProperty(serviceName, Constants.NAME, entityProxy.getUniqueProperties(), method)); - } - asset.setCreatedBy(entityProxy.getCreatedBy()); - asset.setCreateTime(entityProxy.getCreateTime()); - asset.setUpdatedBy(entityProxy.getUpdatedBy()); - asset.setUpdateTime(entityProxy.getUpdateTime()); - asset.setStatus(entityProxy.getStatus().getName()); - asset.setVersion(entityProxy.getVersion()); - asset.setType(convertInstanceType(entityProxy.getType())); - if (CollectionUtils.isNotEmpty(entityProxy.getClassifications())) { - asset.setClassifications(convertClassifications(entityProxy.getClassifications())); - } - return asset; - } - - private Element lastElementAdded(Element tree) { - Element innerElement = tree.getParentElement(); - if (innerElement == null) { - return tree; - } - return lastElementAdded(innerElement); - } - - private Map extractProperties(InstanceProperties instanceProperties) { - Map instancePropertiesAsMap = repositoryHelper.getInstancePropertiesAsMap(instanceProperties); - Map properties = new HashMap<>(); - String methodName = "extractProperties"; - - if (MapUtils.isNotEmpty(instancePropertiesAsMap)) { - instancePropertiesAsMap.forEach((key, value) -> { - if (!key.equals(ADDITIONAL_PROPERTIES_PROPERTY_NAME)) { - if (value instanceof ArrayPropertyValue) { - List stringArrayProperty = repositoryHelper.getStringArrayProperty(serviceName, key, instanceProperties, methodName); - properties.put(key, listToString(stringArrayProperty)); - } else if (value instanceof MapPropertyValue) { - Map mapProperty = repositoryHelper.getMapFromProperty(serviceName, key, instanceProperties, methodName); - properties.put(key, mapToString(mapProperty)); - } else { - properties.put(key, String.valueOf(value)); - } - } - }); - } - - return properties; - } - - private Map extractAdditionalProperties(InstanceProperties instanceProperties) { - String methodName = "extractAdditionalProperties"; - - return MapUtils.emptyIfNull(repositoryHelper.removeStringMapFromProperty(serviceName, - ADDITIONAL_PROPERTIES_PROPERTY_NAME, - instanceProperties, methodName)); - } - - private String listToString(List list) { - return String.join(",", list); - } - - private String mapToString(Map map) { - return map.keySet().stream().map(key -> key + ": " + map.get(key)) - .collect(Collectors.joining(", ")); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/converters/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/converters/package-info.java deleted file mode 100644 index a77ee30dd7a..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/converters/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package offers the mapping of the OMRS objects to Asset Catalog model. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.converters; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/AssetCatalogHandler.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/AssetCatalogHandler.java deleted file mode 100644 index 0bbece9fb42..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/AssetCatalogHandler.java +++ /dev/null @@ -1,1500 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.assetcatalog.converters.AssetCatalogConverter; -import org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogErrorCode; -import org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogException; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogItemElement; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Connection; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Element; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.service.ClockService; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.API_ENDPOINT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.API_ENDPOINT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ASSET; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ASSET_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ASSET_LOCATION; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ASSET_LOCATION_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ASSET_SCHEMA_TYPE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ASSET_SCHEMA_TYPE_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ATTRIBUTE_FOR_SCHEMA; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ATTRIBUTE_FOR_SCHEMA_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.COMPLEX_SCHEMA_TYPE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.CONNECTION; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.CONNECTION_CONNECTOR_TYPE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.CONNECTION_CONNECTOR_TYPE_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.CONNECTION_ENDPOINT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.CONNECTION_ENDPOINT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.CONNECTION_TO_ASSET; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.CONNECTION_TO_ASSET_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DATABASE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DATA_CONTENT_FOR_DATA_SET; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DATA_CONTENT_FOR_DATA_SET_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DATA_FILE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DATA_SET; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DATA_STORE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DEPLOYED_API; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DEPLOYED_VIRTUAL_CONTAINER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DEPLOYED_VIRTUAL_CONTAINER_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DISPLAY_NAME; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ENDPOINT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.FILE_FOLDER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.FOLDER_HIERARCHY; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.FOLDER_HIERARCHY_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.GLOSSARY_TERM; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.GLOSSARY_TERM_TYPE_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.GUID_PARAMETER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_CLUSTER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_CLUSTER_MEMBER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_CLUSTER_MEMBER_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_LOCATION; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_LOCATION_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_NETWORK; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_NETWORK_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_OPERATING_PLATFORM; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.HOST_OPERATING_PLATFORM_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.IT_INFRASTRUCTURE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.LOCATION; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NAME; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NESTED_FILE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NESTED_FILE_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NESTED_SCHEMA_ATTRIBUTE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NESTED_SCHEMA_ATTRIBUTE_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NETWORK; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NETWORK_GATEWAY_LINK; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NETWORK_GATEWAY_LINK_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.PORT_IMPLEMENTATION; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.PORT_SCHEMA; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.PORT_SCHEMA_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.PROCESS; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.PROCESS_PORT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.PROCESS_PORT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.QUALIFIED_NAME; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SCHEMA_ATTRIBUTE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SCHEMA_ATTRIBUTE_TYPE; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SCHEMA_ATTRIBUTE_TYPE_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SCHEMA_ELEMENT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SCHEMA_ELEMENT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SEARCH_PARAMETER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SEARCH_STRING_PARAMETER_NAME; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SEMANTIC_ASSIGNMENT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SEMANTIC_ASSIGNMENT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SERVER_ENDPOINT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SERVER_ENDPOINT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SOFTWARE_SERVER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SOFTWARE_SERVER_DEPLOYMENT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SOFTWARE_SERVER_DEPLOYMENT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SOFTWARE_SERVER_PLATFORM; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SOFTWARE_SERVER_PLATFORM_DEPLOYMENT; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SOFTWARE_SERVER_PLATFORM_DEPLOYMENT_GUID; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.TYPE_SEQUENCING; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.VIRTUAL_CONTAINER; - -/** - * Asset Catalog Handler supports the lookup of the assets from the repositories. - * It runs on the server-side of the Asset Catalog OMAS, fetches the entities using the RepositoryHandler. - */ -public class AssetCatalogHandler { - - private static final Logger log = LoggerFactory.getLogger(AssetCatalogHandler.class); - private static final String THIS_ASSET_IF_A_DIFFERENT_ZONE = "This asset if a different zone: {}"; - - private final String serverUserName; - private final String sourceName; - private final RepositoryHandler repositoryHandler; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final RepositoryErrorHandler errorHandler; - private final CommonHandler commonHandler; - private final AssetCatalogConverter assetCatalogConverter; - private final OpenMetadataAPIGenericHandler assetHandler; - private final Map defaultSearchTypes = new HashMap<>(); - private final ClockService clockService; - private List supportedTypesForSearch = new ArrayList<>(Arrays.asList(GLOSSARY_TERM, ASSET, SCHEMA_ELEMENT)); - - private final List supportedZones; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serverUserName name of the local server - * @param sourceName name of the component - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHandler manages calls to the repository services - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param assetHandler provides utilities for manipulating asset catalog objects using a generic handler - * @param assetCatalogConverter asset catalog bean converter - * @param errorHandler provides common validation routines for the other handler classes - * @param supportedZones configurable list of zones that Asset Catalog is allowed to serve Assets from - * @param supportedTypesForSearch configurable list of supported types used for search - * @param clockService clock service - */ - public AssetCatalogHandler(String serverUserName, String sourceName, InvalidParameterHandler invalidParameterHandler, - RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, - OpenMetadataAPIGenericHandler assetHandler, - AssetCatalogConverter assetCatalogConverter, - RepositoryErrorHandler errorHandler, List supportedZones, List supportedTypesForSearch, - ClockService clockService) { - this.serverUserName = serverUserName; - this.sourceName = sourceName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.repositoryHandler = repositoryHandler; - this.assetHandler = assetHandler; - this.assetCatalogConverter = assetCatalogConverter; - this.errorHandler = errorHandler; - this.supportedZones = supportedZones; - this.commonHandler = new CommonHandler(sourceName, repositoryHandler, repositoryHelper, assetHandler, errorHandler, - clockService); - if (CollectionUtils.isNotEmpty(supportedTypesForSearch)) { - this.supportedTypesForSearch = supportedTypesForSearch; - Collections.sort(supportedTypesForSearch); - } - this.clockService = clockService; - defaultSearchTypes.put(GLOSSARY_TERM, GLOSSARY_TERM_TYPE_GUID); - defaultSearchTypes.put(ASSET, ASSET_GUID); - defaultSearchTypes.put(SCHEMA_ELEMENT, SCHEMA_ELEMENT_GUID); - } - - /** - * Return the requested entity and converting to Asset Catalog OMAS model - * - * @param userId user identifier that issues the call - * @param assetGUID the asset identifier - * @param assetTypeName the asset type name - * @return AssetCatalogBean that contains the core properties of the entity and additional properties - * @throws InvalidParameterException is thrown by the OMAS when a parameter is null or an invalid value. - * @throws PropertyServerException reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector - * @throws UserNotAuthorizedException is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action. - */ - public AssetCatalogBean getEntityDetails(String userId, String assetGUID, String assetTypeName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - String methodName = "getEntityDetails"; - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(assetGUID, GUID_PARAMETER, methodName); - - EntityDetail entityByGUID = commonHandler.getEntityByGUID(userId, assetGUID, assetTypeName); - return assetCatalogConverter.getAssetCatalogBean(entityByGUID); - } - - /** - * Returns a list of the relationships for the given entity identifier. - * Relationship type name can be used for filtering. - * - * @param userId user identifier that issues the call - * @param assetGUID the asset identifier - * @param assetTypeName the asset type name - * @return a list of Relationships - * @throws UserNotAuthorizedException is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action. - * @throws PropertyServerException reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector - * @throws InvalidParameterException is thrown by the OMAG Service when a parameter is null or an invalid value. - */ - public List getRelationshipsByEntityGUID(String userId, - String assetGUID, - String assetTypeName) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "getRelationshipsByEntityGUID"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(assetGUID, GUID_PARAMETER, methodName); - - List relationshipsByType = assetHandler.getAttachmentLinks(userId, assetGUID, GUID_PARAMETER, - assetTypeName, null, null, null, - null, 0, false, false, 0, - invalidParameterHandler.getMaxPagingSize(), clockService.getNow(), methodName); - - if (CollectionUtils.isNotEmpty(relationshipsByType)) { - return assetCatalogConverter.convertRelationships(relationshipsByType); - } - - return Collections.emptyList(); - } - - /** - * Returns a list of the classification assigned to the given asset. - * The filtering based on the classification name is possible. - * - * @param userId user identifier that issues the call - * @param assetGUID the asset identifier - * @param assetTypeName the asset type name - * @param classificationName the classification type name - * @return a list of Classifications assigned to the given asset - * @throws InvalidParameterException is thrown by the OMAG Service when a parameter is null or an invalid value. - * @throws PropertyServerException reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector - * @throws UserNotAuthorizedException is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action. - */ - public List getEntityClassificationByName(String userId, - String assetGUID, - String assetTypeName, - String classificationName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntityClassificationByName"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(assetGUID, GUID_PARAMETER, methodName); - - List entityClassifications = getEntityClassifications(userId, assetGUID, assetTypeName); - - if (CollectionUtils.isEmpty(entityClassifications)) { - return Collections.emptyList(); - } - - if (classificationName != null) { - entityClassifications = filterClassificationByName(entityClassifications, classificationName); - } - - return assetCatalogConverter.convertClassifications(entityClassifications); - } - - /** - * Returns a certain kind of relationships for a specified asset. - * - * @param userId user identifier that issues the call - * @param assetGUID the asset identifier - * @param assetTypeName the asset type name - * @param relationshipTypeName the relationship type name - * @param from offset - * @param pageSize limit the number of the assets returned - * @return the list of relationships for the given asset - * @throws UserNotAuthorizedException is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action. - * @throws PropertyServerException reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector - * @throws InvalidParameterException is thrown by the OMAG Service when a parameter is null or an invalid value. - */ - public List getRelationships(String userId, - String assetGUID, - String assetTypeName, - String relationshipTypeName, - Integer from, - Integer pageSize) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - String methodName = "getRelationships"; - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(assetGUID, GUID_PARAMETER, methodName); - invalidParameterHandler.validatePaging(from, pageSize, methodName); - - String relationshipTypeGUID = commonHandler.getTypeDefGUID(userId, relationshipTypeName); - - List pagedRelationshipsByType = assetHandler.getAttachmentLinks(userId, assetGUID, GUID_PARAMETER, - assetTypeName, relationshipTypeGUID, relationshipTypeName, null, null,0, - false, false, from, pageSize, clockService.getNow(), methodName); - - if (CollectionUtils.isNotEmpty(pagedRelationshipsByType)) { - return assetCatalogConverter.convertRelationships(pagedRelationshipsByType); - } - - return Collections.emptyList(); - } - - /** - * @param userId user identifier that issues the call - * @param assetGUID the asset identifier - * @param searchParameters additional parameters for searching and filtering - * @param serverName the name of the server - * @return a list of entities from the neighborhood of the given entity - * @throws AssetCatalogException is thrown by the Asset Catalog OMAS when the asset passed on a request is not found in the repository - * @throws InvalidParameterException is thrown by the OMAG Service when a parameter is null or an invalid value. - * @throws PropertyServerException reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector - * @throws UserNotAuthorizedException is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action. - */ - public List getEntitiesFromNeighborhood(String userId, String assetGUID, SearchParameters searchParameters, String serverName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, AssetCatalogException { - - String methodName = "getEntitiesFromNeighborhood"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(assetGUID, GUID_PARAMETER, methodName); - invalidParameterHandler.validateObject(searchParameters, SEARCH_PARAMETER, methodName); - invalidParameterHandler.validatePaging(searchParameters.getFrom(), searchParameters.getPageSize(), methodName); - - InstanceGraph entityNeighborhood = getAssetNeighborhood(userId, assetGUID, searchParameters, serverName); - - List entities = entityNeighborhood.getEntities(); - if (CollectionUtils.isEmpty(entities)) { - throw new AssetCatalogException(AssetCatalogErrorCode.NO_ASSET_FROM_NEIGHBORHOOD_NOT_FOUND.getMessageDefinition(assetGUID, serverName), - this.getClass().getName(), - methodName); - } - - return getAssetCatalogBeansAfterValidation(methodName, entities); - } - - /** - * @param userId user identifier that issues the call - * @param searchCriteria search criteria string used for finding the entities - * @param searchParameters additional parameters for searching and filtering - * @return a list of matching criteria entities - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - is thrown by an OMRS Connector when the supplied UserId - * is not permitted to perform a specific operation on the metadata collection. - * @throws FunctionNotSupportedException - provides a checked exception for reporting that an - * OMRS repository connector does not support the method called - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - is thrown by an OMRS Connector when the parameters passed to a repository connector are not valid - * @throws PropertyErrorException - is thrown by an OMRS Connector when the properties defined for a specific entity - * or relationship instance do not match the TypeDefs for the metadata collection. - * @throws TypeErrorException - is thrown by an OMRS Connector when the requested type for an instance is not represented by a known TypeDef. - * @throws PagingErrorException - is thrown by an OMRS Connector when the caller has passed invalid paging attributes on a search call. - * @throws InvalidParameterException - is thrown by the OMAG Service when a parameter is null or an invalid value. - * @throws RepositoryErrorException - there is a problem communicating with the metadata repository. - * @throws EntityNotKnownException - is thrown when the entity is not found in the repositories - * @throws PropertyServerException - is thrown when there is a server configuration error - * @throws UserNotAuthorizedException - is thrown when the user is not authorized to do the search - */ - public List searchByType(String userId, String searchCriteria, SearchParameters searchParameters) - throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - PropertyErrorException, TypeErrorException, PagingErrorException, - InvalidParameterException, RepositoryErrorException, EntityNotKnownException, PropertyServerException, UserNotAuthorizedException { - - String methodName = "searchByType"; - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateSearchString(userId, searchCriteria, methodName); - invalidParameterHandler.validateObject(searchParameters, SEARCH_PARAMETER, methodName); - invalidParameterHandler.validatePaging(searchParameters.getFrom(), searchParameters.getPageSize(), methodName); - - List result; - Map typesAndGUIDsFilter; - if (CollectionUtils.isNotEmpty(searchParameters.getEntityTypes())) { - typesAndGUIDsFilter = commonHandler.getTypesAndGUIDs(userId, searchParameters.getEntityTypes()); - for( Map.Entry typeAndGUID : typesAndGUIDsFilter.entrySet()) { - if (typeAndGUID.getValue() == null) { - ExceptionMessageDefinition messageDefinition = AssetCatalogErrorCode.TYPE_DEF_NOT_FOUND.getMessageDefinition(typeAndGUID.getKey()); - throw new EntityNotKnownException(messageDefinition, this.getClass().getName(), messageDefinition.getUserAction()); - } - } - result = collectSearchedEntitiesByType(userId, searchCriteria, searchParameters, typesAndGUIDsFilter, methodName); - } else { - result = collectSearchedEntitiesByType(userId, searchCriteria, searchParameters, defaultSearchTypes, methodName); - } - - SequencingOrder sequencingOrder = searchParameters.getSequencingOrder(); - String sequencingProperty = searchParameters.getSequencingProperty(); - List results = createSearchResultList(result, methodName); - results.sort((firstAsset, secondAsset) -> - orderElements(firstAsset, secondAsset, sequencingProperty, sequencingOrder)); - return results; - } - - /** - * - * @param userId user identifier that issues the call - * @param typeName the assets type name to search for - * @return list of assets by type name - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - is thrown by an OMRS Connector when the supplied UserId - * is not permitted to perform a specific operation on the metadata collection. - * @throws FunctionNotSupportedException - provides a checked exception for reporting that an - * OMRS repository connector does not support the method called - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - is thrown by an OMRS Connector when the parameters passed to a repository connector are not valid - * @throws PropertyErrorException - is thrown by an OMRS Connector when the properties defined for a specific entity - * @throws TypeErrorException - is thrown by an OMRS Connector when the requested type for an instance is not represented by a known TypeDef. - * @throws PagingErrorException - is thrown by an OMRS Connector when the caller has passed invalid paging attributes on a search call. - * @throws InvalidParameterException - is thrown by the OMAG Service when a parameter is null or an invalid value. - * @throws RepositoryErrorException - there is a problem communicating with the metadata repository. - * @throws EntityNotKnownException - is thrown when the entity is not found in the repositories - * @throws PropertyServerException - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector - * @throws UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action. - */ - public List searchByTypeName(String userId, String typeName) - throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - PropertyErrorException, TypeErrorException, PagingErrorException, - InvalidParameterException, RepositoryErrorException, EntityNotKnownException, PropertyServerException, UserNotAuthorizedException { - - String methodName = "searchByTypeName"; - invalidParameterHandler.validateUserId(userId, methodName); - - List result; - if (typeName != null) { - String typeGUID = commonHandler.getTypeDefGUID(userId, typeName); - if (typeGUID == null) { - ExceptionMessageDefinition messageDefinition = AssetCatalogErrorCode.TYPE_DEF_NOT_FOUND.getMessageDefinition(typeName); - throw new EntityNotKnownException(messageDefinition, this.getClass().getName(), messageDefinition.getUserAction()); - } - result = collectSearchedEntitiesByTypeIdentifiers(userId, typeName, typeGUID, methodName); - } else { - return Collections.emptyList(); - } - - return createSearchResultList(result, methodName); - } - - /** - * - * @param userId user identifier that issues the call - * @param typeGUID the assets type GUID to search for - * @return list of assets by type GUID - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - is thrown by an OMRS Connector when the supplied UserId - * is not permitted to perform a specific operation on the metadata collection. - * @throws FunctionNotSupportedException - provides a checked exception for reporting that an - * OMRS repository connector does not support the method called - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - is thrown by an OMRS Connector when the parameters passed to a repository connector are not valid - * @throws PropertyErrorException - is thrown by an OMRS Connector when the properties defined for a specific entity - * @throws TypeErrorException - is thrown by an OMRS Connector when the requested type for an instance is not represented by a known TypeDef. - * @throws PagingErrorException - is thrown by an OMRS Connector when the caller has passed invalid paging attributes on a search call. - * @throws InvalidParameterException - is thrown by the OMAG Service when a parameter is null or an invalid value. - * @throws RepositoryErrorException - there is a problem communicating with the metadata repository. - * @throws EntityNotKnownException - is thrown when the entity is not found in the repositories - * @throws PropertyServerException - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector - * @throws UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action. - */ - public List searchByTypeGUID(String userId, String typeGUID) - throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - PropertyErrorException, TypeErrorException, PagingErrorException, - InvalidParameterException, RepositoryErrorException, EntityNotKnownException, PropertyServerException, UserNotAuthorizedException { - - String methodName = "searchByTypeGUID"; - invalidParameterHandler.validateUserId(userId, methodName); - - List result; - if (typeGUID != null) { - String typeName = repositoryHelper.getTypeDef(userId, "typeName", typeGUID, methodName).getName(); - if (typeName == null) { - ExceptionMessageDefinition messageDefinition = AssetCatalogErrorCode.TYPE_DEF_NOT_FOUND.getMessageDefinition(typeName); - throw new EntityNotKnownException(messageDefinition, this.getClass().getName(), messageDefinition.getUserAction()); - } - result = collectSearchedEntitiesByTypeIdentifiers(userId, typeName, typeGUID, methodName); - } else { - return Collections.emptyList(); - } - - return createSearchResultList(result, methodName); - } - - /** - * Returns a list of elements that define the context based on the type of the given asset. - * @param userId user identifier that issues the call - * @param entityGUID the identifier of the entity - * @param entityTypeDefName the type name of the entity - * @return the context of the given entity - * @throws UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not - * authorized to perform the requested action. - * @throws PropertyServerException - provides a checked exception for reporting errors when connecting to a - * metadata repository to retrieve properties about the connection and/or connector. - * @throws InvalidParameterException - is thrown by the OMAS when a parameter is null or an invalid value. - */ - public Elements buildContextByType(String userId, - String entityGUID, - String entityTypeDefName) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - String methodName = "buildContextByType"; - invalidParameterHandler.validateUserId(userId, methodName); - - EntityDetail entityDetail = getEntity(userId, entityGUID, entityTypeDefName); - - if (entityDetail == null || entityDetail.getType() == null || entityDetail.getType().getTypeDefName() == null) { - return null; - } - - String typeDefName = entityDetail.getType().getTypeDefName(); - Set superTypes = commonHandler.collectSuperTypes(userId, entityDetail.getType().getTypeDefName()); - - AssetCatalogItemElement assetCatalogItemElement = new AssetCatalogItemElement(); - - if (typeDefName.equals(GLOSSARY_TERM)) { - return getContextForGlossaryTerm(userId, entityDetail); - } else { - invalidParameterHandler.validateAssetInSupportedZone(entityDetail.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(entityDetail.getClassifications()), - supportedZones, - serverUserName, - methodName); - - Elements elements = assetCatalogConverter.buildAssetElements(entityDetail); - if (superTypes.contains(SCHEMA_ELEMENT)) { - getContextForSchemaElement(userId, entityDetail, assetCatalogItemElement); - } else if (superTypes.contains(DEPLOYED_API)) { - getContextForDeployedAPI(userId, entityDetail, assetCatalogItemElement); - } else if (superTypes.contains(IT_INFRASTRUCTURE)) { - getContextForInfrastructure(userId, entityDetail, assetCatalogItemElement); - } else if (superTypes.contains(PROCESS)) { - getContextForProcess(userId, entityDetail, assetCatalogItemElement); - } else if (superTypes.contains(DATA_STORE)) { - getContextForDataStore(userId, entityDetail, assetCatalogItemElement); - } else if (superTypes.contains(DATA_SET)) { - getContextForDataSet(userId, entityDetail, assetCatalogItemElement); - } - - elements.setAssetCatalogItemElements(Collections.singletonList(assetCatalogItemElement)); - return elements; - } - } - - /** - * Returns supported types for search with all sub-types. - * If type name is provided, it returns the type itself and the list of sub-types for it - * - * @param userId user identifier that issues the call - * @param typeName optional type name - * @return a list of types - */ - public List getSupportedTypes(String userId, String typeName) { - if (typeName != null && !typeName.isEmpty()) { - return getSupportedTypesWithDescendants(userId, typeName); - } - - return getSupportedTypes(userId, supportedTypesForSearch.toArray(new String[0])); - } - - private ArrayList createSearchResultList(List result, String methodName) { - Set searchResults = new HashSet<>(); - - for (EntityDetail entityDetail : result) { - try { - invalidParameterHandler.validateAssetInSupportedZone(entityDetail.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(entityDetail.getClassifications()), - supportedZones, - serverUserName, - methodName); - Elements elements = assetCatalogConverter.buildAssetElements(entityDetail); - searchResults.add(elements); - } catch (InvalidParameterException e) { - log.debug(THIS_ASSET_IF_A_DIFFERENT_ZONE, entityDetail.getGUID()); - } - } - return new ArrayList<>(searchResults); - } - - private List getAssetCatalogBeansAfterValidation(String methodName, - List entities) throws InvalidParameterException { - List result = new ArrayList<>(); - - for (EntityDetail asset : entities) { - - invalidParameterHandler.validateAssetInSupportedZone(asset.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(asset.getClassifications()), - supportedZones, - serverUserName, - methodName); - - result.add(assetCatalogConverter.getAssetCatalogBean(asset)); - } - return result; - } - - private EntityDetail getEntity(String userId, - String assetGUID, - String assetTypeName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntity"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(assetGUID, GUID_PARAMETER, methodName); - - EntityDetail entityByGUID = commonHandler.getEntityByGUID(userId, assetGUID, assetTypeName); - if (entityByGUID != null) { - invalidParameterHandler.validateAssetInSupportedZone(entityByGUID.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(entityByGUID.getClassifications()), - supportedZones, - serverUserName, - methodName); - } - - return entityByGUID; - } - - private List collectSearchedEntitiesByType(String userId, - String searchCriteria, - SearchParameters searchParameters, - Map typesAndGUIDs, - String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - List result = new ArrayList<>(); - - if(!searchParameters.getExactMatch()) { - searchCriteria = repositoryHelper.getContainsRegex(searchCriteria, searchParameters.getCaseInsensitive()); - } - - for (Map.Entry typeAndGUID : typesAndGUIDs.entrySet()) { - result.addAll(searchEntityByCriteria(userId, searchCriteria, typeAndGUID.getValue(), typeAndGUID.getKey(), - searchParameters, methodName)); - } - return result; - } - - private List collectSearchedEntitiesByTypeIdentifiers(String userId, - String typeName, - String typeGUID, - String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - List result = new ArrayList<>(); - - result.addAll(searchEntityByType(userId, typeGUID, typeName, methodName)); - return result; - } - - private void getContextForSchemaElement(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - findAsset(userId, assetCatalogItemElement, entityDetail); - } - - private Elements getContextForGlossaryTerm(String userId, - EntityDetail glossaryTerm) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForGlossaryTerm"; - - if (glossaryTerm == null) { - return null; - } - Elements elements = assetCatalogConverter.buildAssetElements(glossaryTerm); - - List schemas = assetHandler.getAttachedFilteredEntities(userId, glossaryTerm.getGUID(), - GUID_PARAMETER, GLOSSARY_TERM, SEMANTIC_ASSIGNMENT, SEMANTIC_ASSIGNMENT_GUID, - 0, null, null, 0, false, - false, 0, method); - - if (CollectionUtils.isEmpty(schemas)) { - return elements; - } - - List assets = new ArrayList<>(schemas.size()); - - for (EntityDetail schema : schemas) { - AssetCatalogItemElement assetCatalogItemElement = addSchemaForGlossaryTerm(userId, schema); - assets.add(assetCatalogItemElement); - } - elements.setAssetCatalogItemElements(assets); - return elements; - } - - private AssetCatalogItemElement addSchemaForGlossaryTerm(String userId, EntityDetail schema) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - AssetCatalogItemElement assetCatalogItemElement = new AssetCatalogItemElement(); - List elements = new ArrayList<>(); - elements.add(assetCatalogConverter.buildAssetElements(schema)); - assetCatalogItemElement.setContext(elements); - - findAsset(userId, assetCatalogItemElement, schema); - - return assetCatalogItemElement; - } - - private void getContextForDeployedAPI(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForDeployedAPI"; - - List endpoints = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, DEPLOYED_API, API_ENDPOINT, API_ENDPOINT_GUID, - 0, null, null, 0, false, - false, 0, method); - if (CollectionUtils.isEmpty(endpoints)) { - return; - } - - for (EntityDetail endpoint : endpoints) { - assetCatalogConverter.addContextElement(assetCatalogItemElement, endpoint); - getConnectionContext(userId, endpoint, assetCatalogItemElement); - } - - } - - private void getContextForInfrastructure(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - switch (entityDetail.getType().getTypeDefName()) { - case HOST: - getContextForHost(userId, entityDetail, assetCatalogItemElement); - break; - case NETWORK: - getContextForNetwork(userId, entityDetail, assetCatalogItemElement); - break; - case SOFTWARE_SERVER_PLATFORM: - getContextForSoftwareServerPlatform(userId, entityDetail, assetCatalogItemElement); - break; - case SOFTWARE_SERVER: - getContextForSoftwareServer(userId, entityDetail, assetCatalogItemElement); - break; - default: - break; - } - - } - - private void getContextForProcess(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForProcess"; - - List ports = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, PROCESS, PROCESS_PORT, PROCESS_PORT_GUID, - 0, null, null, 0, false, - false, 0, method); - - if (CollectionUtils.isNotEmpty(ports)) { - for (EntityDetail port : ports) { - assetCatalogConverter.addContextElement(assetCatalogItemElement, port); - if (port.getType().getTypeDefName().equals(PORT_IMPLEMENTATION)) { - EntityDetail schemaType = assetHandler.getAttachedEntity(userId, port.getGUID(), GUID_PARAMETER, - DATABASE, PORT_SCHEMA_GUID, PORT_SCHEMA, null, false, - false, clockService.getNow(), method); - - if (schemaType != null) { - assetCatalogConverter.addElement(assetCatalogItemElement, schemaType); - getContextForSchemaType(userId, assetCatalogItemElement, schemaType); - } - } - } - } - - } - - private void getContextForDataStore(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - if (entityDetail.getType().getTypeDefName().equals(DATABASE)) { - getContextForDatabase(userId, entityDetail, assetCatalogItemElement); - } else { - if (entityDetail.getType().getTypeDefName().equals(DATA_FILE)) { - getContextForDataFile(userId, entityDetail, assetCatalogItemElement); - } else if (entityDetail.getType().getTypeDefName().equals(FILE_FOLDER)) { - getContextForFileFolder(userId, entityDetail, assetCatalogItemElement); - } - } - } - - private void getContextForDatabase(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForDatabase"; - - List dataSets = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, DATABASE, DATA_CONTENT_FOR_DATA_SET, DATA_CONTENT_FOR_DATA_SET_GUID, - 0, null, null, 0, false, - false, 0, method); - - if (dataSets != null && !dataSets.isEmpty()) { - for (EntityDetail dataSet : dataSets) { - getContextForDataSet(userId, dataSet, assetCatalogItemElement); - } - } - } - - private void getContextForDataSet(String userId, - EntityDetail dataSet, - AssetCatalogItemElement assetCatalogItemElement) throws - UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForDataSet"; - - EntityDetail schemaType = assetHandler.getAttachedEntity(userId, dataSet.getGUID(), GUID_PARAMETER, - DATA_SET, ASSET_SCHEMA_TYPE_GUID, ASSET_SCHEMA_TYPE, null, false, - false, clockService.getNow(), method); - - if (schemaType == null) { - return; - } - assetCatalogConverter.addElement(assetCatalogItemElement, schemaType); - - if (isComplexSchemaType(schemaType.getType().getTypeDefName()).isPresent()) { - getContextForSchemaType(userId, assetCatalogItemElement, schemaType); - } else { - getAsset(userId, assetCatalogItemElement, schemaType); - } - } - - private void getContextForFileFolder(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForFileFolder"; - - List connections = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, FILE_FOLDER, CONNECTION_TO_ASSET, CONNECTION_TO_ASSET_GUID, - 0, null, null, 0, false, - false, 0, method); - - - if (CollectionUtils.isNotEmpty(connections)) { - setConnections(userId, assetCatalogItemElement, entityDetail); - return; - } - - - List parentFolderRelationships = assetHandler.getAttachmentLinks(userId, entityDetail.getGUID(), - GUID_PARAMETER, entityDetail.getType().getTypeDefName(), FOLDER_HIERARCHY_GUID, - FOLDER_HIERARCHY, null, null,0, false, false, - 0, invalidParameterHandler.getMaxPagingSize(), clockService.getNow(), method); - - if (CollectionUtils.isEmpty(parentFolderRelationships)) { - return; - } - - parentFolderRelationships = parentFolderRelationships.stream() - .filter(s -> s.getEntityTwoProxy().getGUID().equals(entityDetail.getGUID())) - .collect(Collectors.toList()); - if (parentFolderRelationships.size() != 1) { - return; - } - - EntityProxy parentFolderProxy = repositoryHandler.getOtherEnd(entityDetail.getGUID(), parentFolderRelationships.get(0)); - - EntityDetail parentFolder = commonHandler.getEntityByGUID(userId, - parentFolderProxy.getGUID(), - parentFolderProxy.getType().getTypeDefName()); - - assetCatalogConverter.addElement(assetCatalogItemElement, parentFolder); - getContextForFileFolder(userId, parentFolder, assetCatalogItemElement); - } - - private void getContextForEachParentFolder(String userId, - AssetCatalogItemElement assetCatalogItemElement, - List parentFolders) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - for (EntityDetail folder : parentFolders) { - assetCatalogConverter.addElement(assetCatalogItemElement, folder); - getContextForFileFolder(userId, folder, assetCatalogItemElement); - } - } - - private void getContextForDataFile(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForDataFile"; - - List fileFolders = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, DATA_FILE, NESTED_FILE, NESTED_FILE_GUID, - 0, null, null, 0, false, - false, 0, method); - - if (CollectionUtils.isEmpty(fileFolders)) { - return; - } - - getContextForEachParentFolder(userId, assetCatalogItemElement, fileFolders); - } - - private void getContextForSoftwareServerPlatform(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForSoftwareServerPlatform"; - - EntityDetail host = assetHandler.getAttachedEntity(userId, entityDetail.getGUID(), GUID_PARAMETER, - entityDetail.getType().getTypeDefName(), SOFTWARE_SERVER_PLATFORM_DEPLOYMENT_GUID, - SOFTWARE_SERVER_PLATFORM_DEPLOYMENT, null, false, false, - clockService.getNow(), method); - if (host != null) { - assetCatalogConverter.addElement(assetCatalogItemElement, host); - getContextForHost(userId, host, assetCatalogItemElement); - } - } - - private void getContextForNetwork(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForNetwork"; - - List networkGateways = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, NETWORK, NETWORK_GATEWAY_LINK, NETWORK_GATEWAY_LINK_GUID, - 0, null, null, 0, false, - false, 0, method); - - networkGateways.forEach(networkGateway -> assetCatalogConverter.addElement(assetCatalogItemElement, networkGateway)); - - List hosts = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, NETWORK, HOST_NETWORK, HOST_NETWORK_GUID, - 0, null, null, 0, false, - false, 0, method); - - if (CollectionUtils.isNotEmpty(hosts)) { - for (EntityDetail host : hosts) { - assetCatalogConverter.addElement(assetCatalogItemElement, host); - getContextForHost(userId, host, assetCatalogItemElement); - } - } - } - - private void getContextForHost(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForHost"; - List hosts = null; - if (entityDetail.getType().getTypeDefName().equals(VIRTUAL_CONTAINER)) { - hosts = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, HOST, DEPLOYED_VIRTUAL_CONTAINER, DEPLOYED_VIRTUAL_CONTAINER_GUID, - 0, null, null, 0, false, - false, 0, method); - - } else if (entityDetail.getType().getTypeDefName().equals(HOST_CLUSTER)) { - hosts = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, HOST, HOST_CLUSTER_MEMBER, HOST_CLUSTER_MEMBER_GUID, - 0, null, null, 0, false, - false, 0, method); - - } - if (hosts != null) { - hosts.forEach(host -> assetCatalogConverter.addElement(assetCatalogItemElement, host)); - } - - EntityDetail operatingPlatform = assetHandler.getAttachedEntity(userId, entityDetail.getGUID(), GUID_PARAMETER, - entityDetail.getType().getTypeDefName(), HOST_OPERATING_PLATFORM_GUID, HOST_OPERATING_PLATFORM, - null, false, false, clockService.getNow(), method); - assetCatalogConverter.addElement(assetCatalogItemElement, operatingPlatform); - - processLocations(userId, entityDetail, assetCatalogItemElement, method); - } - - private void processLocations(String userId, EntityDetail entityDetail, AssetCatalogItemElement assetCatalogItemElement, - String method) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - List locations = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, HOST, HOST_LOCATION, HOST_LOCATION_GUID, 0, - null, null, 0, false, false, - 0, method); - if (CollectionUtils.isNotEmpty(locations)) { - for (EntityDetail location : locations) { - assetCatalogConverter.addElement(assetCatalogItemElement, location); - getContextForLocation(userId, assetCatalogItemElement, location); - } - } - } - - private void getContextForLocation(String userId, - AssetCatalogItemElement assetCatalogItemElement, - EntityDetail location) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForLocation"; - - List assetLocations = assetHandler.getAttachedFilteredEntities(userId, location.getGUID(), - GUID_PARAMETER, LOCATION, ASSET_LOCATION, ASSET_LOCATION_GUID, - 0, null, null, 0, false, - false, 0, method); - - if (CollectionUtils.isNotEmpty(assetLocations)) { - for (EntityDetail assetLocation : assetLocations) { - assetCatalogConverter.addElement(assetCatalogItemElement, assetLocation); - getAsset(userId, assetCatalogItemElement, assetLocation); - } - } - - processLocations(userId, location, assetCatalogItemElement, method); - } - - private void getContextForSoftwareServer(String userId, - EntityDetail entityDetail, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String method = "getContextForSoftwareServer"; - Element parentElement = null; - - EntityDetail softwareServerPlatform = assetHandler.getAttachedEntity(userId, entityDetail.getGUID(), - GUID_PARAMETER, SOFTWARE_SERVER, SOFTWARE_SERVER_DEPLOYMENT_GUID, SOFTWARE_SERVER_DEPLOYMENT, - null, false, false, clockService.getNow(), method); - if (softwareServerPlatform != null) { - parentElement = assetCatalogConverter.getLastNode(assetCatalogItemElement); - assetCatalogConverter.addElement(assetCatalogItemElement, softwareServerPlatform); - getContextForSoftwareServerPlatform(userId, softwareServerPlatform, assetCatalogItemElement); - } - - EntityDetail endpoint = assetHandler.getAttachedEntity(userId, entityDetail.getGUID(), - GUID_PARAMETER, SOFTWARE_SERVER, SERVER_ENDPOINT_GUID, SERVER_ENDPOINT, - null, false, false, clockService.getNow(), method); - if (endpoint != null) { - if (parentElement != null) { - assetCatalogConverter.addChildElement(parentElement, assetCatalogConverter.buildAssetElements(endpoint)); - } else { - assetCatalogConverter.addContextElement(assetCatalogItemElement, endpoint); - } - getConnectionContext(userId, endpoint, assetCatalogItemElement); - } - - } - - private void getConnectionContext(String userId, - EntityDetail endpoint, - AssetCatalogItemElement assetCatalogItemElement) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "getConnectionContext"; - - List connections = assetHandler.getAttachedFilteredEntities(userId, endpoint.getGUID(), - GUID_PARAMETER, ENDPOINT, CONNECTION_ENDPOINT, CONNECTION_ENDPOINT_GUID, - 0, null, null, 0, false, - false, 0, methodName); - if (CollectionUtils.isEmpty(connections)) { - return; - } - - for (EntityDetail connection : connections) { - assetCatalogConverter.addElement(assetCatalogItemElement, connection); - - List elements = new ArrayList<>(); - EntityDetail connectorType = assetHandler.getAttachedEntity(userId, connection.getGUID(), - GUID_PARAMETER, CONNECTION, CONNECTION_CONNECTOR_TYPE_GUID, CONNECTION_CONNECTOR_TYPE, - null, false, false, clockService.getNow(), methodName); - if (connectorType != null) { - elements.add(connectorType); - } - - EntityDetail asset = assetHandler.getAttachedEntity(userId, connection.getGUID(), - GUID_PARAMETER, CONNECTION, CONNECTION_TO_ASSET_GUID, CONNECTION_TO_ASSET, - null, false, false, clockService.getNow(), methodName); - invalidParameterHandler.validateAssetInSupportedZone(asset.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(asset.getClassifications()), - supportedZones, - serverUserName, - methodName); - elements.add(asset); - elements.forEach(element -> assetCatalogConverter.addElement(assetCatalogItemElement, element)); - } - } - - private void findAsset(String userId, - AssetCatalogItemElement assetCatalogItemElement, EntityDetail... entitiesByType) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - String method = "findAsset"; - for (EntityDetail entityDetail : entitiesByType) { - List schemaAttributes = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, SCHEMA_ATTRIBUTE, ATTRIBUTE_FOR_SCHEMA, ATTRIBUTE_FOR_SCHEMA_GUID, - 0, null, null, 0, false, - false, 0, method); - - if (CollectionUtils.isEmpty(schemaAttributes)) { - schemaAttributes = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, SCHEMA_ATTRIBUTE, NESTED_SCHEMA_ATTRIBUTE, NESTED_SCHEMA_ATTRIBUTE_GUID, - 0, null, null, 0, false, - false, 0, method); - if (CollectionUtils.isEmpty(schemaAttributes)) { - continue; - } - } - - addSchemaAttributes(assetCatalogItemElement, schemaAttributes); - - for (EntityDetail schemaAttribute : schemaAttributes) { - if (processSchemaAttribute(userId, assetCatalogItemElement, method, schemaAttribute)) return; - } - } - } - - private boolean processSchemaAttribute(String userId, AssetCatalogItemElement assetCatalogItemElement, String method, EntityDetail schemaAttribute) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (isComplexSchemaType(schemaAttribute.getType().getTypeDefName()).isPresent()) { - setAssetDetails(userId, assetCatalogItemElement, schemaAttribute); - return true; - } else { - processPrimitiveSchema(userId, assetCatalogItemElement, method, schemaAttribute); - } - return false; - } - - private void processPrimitiveSchema(String userId, AssetCatalogItemElement assetCatalogItemElement, String method, EntityDetail schemaAttribute) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - List schemaAttributeTypeEntities = assetHandler.getAttachedFilteredEntities(userId, schemaAttribute.getGUID(), - GUID_PARAMETER, schemaAttribute.getType().getTypeDefName(), SCHEMA_ATTRIBUTE_TYPE, - SCHEMA_ATTRIBUTE_TYPE_GUID, 0, null, null, 0, - false, false, 0, method); - - if (CollectionUtils.isNotEmpty(schemaAttributeTypeEntities)) { - schemaAttributeTypeEntities.forEach(schemaAttributeTypeEntity -> assetCatalogConverter.addElement(assetCatalogItemElement, schemaAttributeTypeEntity)); - findAsset(userId, assetCatalogItemElement, schemaAttributeTypeEntities.toArray(new EntityDetail[0])); - } else { - findAsset(userId, assetCatalogItemElement, schemaAttribute); - } - } - - private void addSchemaAttributes(AssetCatalogItemElement assetCatalogItemElement, List schemaAttributes) { - Element lastNode = assetCatalogConverter.getLastNode(assetCatalogItemElement); - schemaAttributes.forEach(schemaAttribute -> addNode(assetCatalogItemElement, lastNode, schemaAttribute)); - } - - private void addNode(AssetCatalogItemElement assetCatalogItemElement, Element lastNode, EntityDetail schemaAttribute) { - if (lastNode == null) { - assetCatalogConverter.addContextElement(assetCatalogItemElement, schemaAttribute); - } - assetCatalogConverter.addElement(assetCatalogItemElement, schemaAttribute); - } - - private void getContextForSchemaType(String userId, - AssetCatalogItemElement assetCatalogItemElement, - EntityDetail entityDetail) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - Optional isComplexSchemaType = isComplexSchemaType(entityDetail.getType().getTypeDefName()); - String method = "getContextForSchemaType"; - - if (isComplexSchemaType.isPresent()) { - setAssetDetails(userId, assetCatalogItemElement, entityDetail); - } else { - List attributeForSchemas = assetHandler.getAttachedFilteredEntities(userId, entityDetail.getGUID(), - GUID_PARAMETER, entityDetail.getType().getTypeDefName(), ATTRIBUTE_FOR_SCHEMA, - ATTRIBUTE_FOR_SCHEMA_GUID, 0, null, null, 0, - false, false, 0, method); - if (CollectionUtils.isEmpty(attributeForSchemas)) { - return; - } - - for (EntityDetail attributeForSchema : attributeForSchemas) { - assetCatalogConverter.addElement(assetCatalogItemElement, attributeForSchema); - - if (isComplexSchemaType(attributeForSchema.getType().getTypeDefName()).isPresent()) { - setAssetDetails(userId, assetCatalogItemElement, attributeForSchema); - return; - } else { - List schemaAttributeTypeEntities = assetHandler.getAttachedFilteredEntities(userId, - attributeForSchema.getGUID(), GUID_PARAMETER, attributeForSchema.getType().getTypeDefName(), - SCHEMA_ATTRIBUTE_TYPE, SCHEMA_ATTRIBUTE_TYPE_GUID, 0, null, - null, 0, false, false, 0, method); - - for (EntityDetail schema : schemaAttributeTypeEntities) { - assetCatalogConverter.addElement(assetCatalogItemElement, schema); - getContextForSchemaType(userId, assetCatalogItemElement, schema); - } - } - } - } - } - - private void setAssetDetails(String userId, - AssetCatalogItemElement assetCatalogItemElement, - EntityDetail entity) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "setAssetDetails"; - - EntityDetail dataSet = assetHandler.getAttachedEntity(userId, entity.getGUID(), - GUID_PARAMETER, entity.getType().getTypeDefName(), ASSET_SCHEMA_TYPE_GUID, ASSET_SCHEMA_TYPE, - null, false, false, clockService.getNow(), methodName); - if (dataSet == null) { - return; - } - - try { - invalidParameterHandler.validateAssetInSupportedZone(dataSet.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(dataSet.getClassifications()), - supportedZones, - serverUserName, - methodName); - - if (assetCatalogItemElement.getContext() != null) { - assetCatalogConverter.addElement(assetCatalogItemElement, dataSet); - } else { - assetCatalogItemElement.setContext(Collections.singletonList(assetCatalogConverter.buildAssetElements(dataSet))); - } - - getAsset(userId, assetCatalogItemElement, dataSet); - } catch (InvalidParameterException e) { - if (CollectionUtils.isNotEmpty(assetCatalogItemElement.getContext())) { - assetCatalogItemElement.getContext().remove(assetCatalogItemElement.getContext().size() - 1); - } - log.debug("Asset is not in the supported zones {}", dataSet.getGUID()); - } - } - - private void getAsset(String userId, - AssetCatalogItemElement assetCatalogItemElement, - EntityDetail dataSet) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (dataSet == null) return; - - String methodName = "getAsset"; - List assetToDataSetRelationships = assetHandler.getAttachmentLinks(userId, dataSet.getGUID(), - GUID_PARAMETER, dataSet.getType().getTypeDefName(), DATA_CONTENT_FOR_DATA_SET_GUID, - DATA_CONTENT_FOR_DATA_SET, null, null, 1, false, - false,0, invalidParameterHandler.getMaxPagingSize(), clockService.getNow(), methodName); - - if (CollectionUtils.isEmpty(assetToDataSetRelationships)) { - return; - } - - for (Relationship assetToDataSetRelationship : assetToDataSetRelationships) { - EntityProxy entityOneProxy = assetToDataSetRelationship.getEntityOneProxy(); - - - if (entityOneProxy.getGUID().equals(dataSet.getGUID())) { - setConnections(userId, assetCatalogItemElement, dataSet); - } else { - EntityDetail asset = commonHandler.getEntityByGUID(userId, - entityOneProxy.getGUID(), - entityOneProxy.getType().getTypeDefName()); - - if (asset != null) { - invalidParameterHandler.validateAssetInSupportedZone(asset.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(asset.getClassifications()), - supportedZones, - serverUserName, - methodName); - assetCatalogConverter.addElement(assetCatalogItemElement, asset); - setConnections(userId, assetCatalogItemElement, asset); - } - } - } - } - - private void setConnections(String userId, - AssetCatalogItemElement assetCatalogItemElement, - EntityDetail asset) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - List connections = getConnections(userId, asset.getGUID()); - assetCatalogItemElement.setConnections(connections); - } - - private Optional isComplexSchemaType(String typeDefName) { - if (repositoryHelper.getKnownTypeDefGallery() == null - || CollectionUtils.isEmpty(repositoryHelper.getKnownTypeDefGallery().getTypeDefs())) { - return Optional.empty(); - } - - List allTypes = repositoryHelper.getKnownTypeDefGallery().getTypeDefs(); - return allTypes.stream().filter(t -> t.getName().equals(typeDefName) && t.getSuperType().getName().equals(COMPLEX_SCHEMA_TYPE)).findAny(); - } - - private List getConnections(String userId, String dataSetGuid) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "getConnections"; - List connections = assetHandler.getAttachedFilteredEntities(userId, - dataSetGuid, GUID_PARAMETER, CONNECTION, - CONNECTION_TO_ASSET, CONNECTION_TO_ASSET_GUID, 0, null, - null, 0, false, false, 0, methodName); - if (CollectionUtils.isNotEmpty(connections)) { - List connectionList = new ArrayList<>(); - - for (EntityDetail entityDetail : connections) { - Connection connection = new Connection( - entityDetail.getGUID(), - repositoryHelper.getStringProperty(sourceName, QUALIFIED_NAME, entityDetail.getProperties(), methodName)); - - connectionList.add(connection); - } - return connectionList; - } - - return Collections.emptyList(); - } - - private List getEntityClassifications(String userId, String assetId, String assetTypeName) throws - InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntityClassifications"; - - EntityDetail entityDetails = commonHandler.getEntityByGUID(userId, assetId, assetTypeName); - - invalidParameterHandler.validateAssetInSupportedZone(entityDetails.getGUID(), - GUID_PARAMETER, - commonHandler.getAssetZoneMembership(entityDetails.getClassifications()), - supportedZones, - userId, - methodName); - - return entityDetails.getClassifications(); - } - - private List searchEntityByCriteria(String userId, - String searchCriteria, - String entityTypeGUID, - String entityTypeName, - SearchParameters searchParameters, - String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - String propertyName = NAME; - if (commonHandler.hasDisplayName(userId, entityTypeGUID)) { - propertyName = DISPLAY_NAME; - } - - SequencingOrder sequencingOrder = searchParameters.getSequencingOrder() == null ? SequencingOrder.ANY : searchParameters.getSequencingOrder(); - List entitiesByPropertyValue = assetHandler.getEntitiesByValue(userId, searchCriteria, - SEARCH_STRING_PARAMETER_NAME, entityTypeGUID, entityTypeName, Collections.singletonList(propertyName), - searchParameters.getExactMatch(), searchParameters.getCaseInsensitive(),null, null, false, - false, supportedZones, sequencingOrder.getName(),searchParameters.getFrom(), - searchParameters.getPageSize(), clockService.getNow(), methodName); - - if (CollectionUtils.isNotEmpty(entitiesByPropertyValue)) { - return entitiesByPropertyValue; - } - return new ArrayList<>(); - } - - private List searchEntityByType(String userId, - String entityTypeGUID, - String entityTypeName, - String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - List entitiesByPropertyValue = assetHandler.getEntitiesByType(userId, entityTypeGUID, - entityTypeName, null,false,false, 0, - 20, clockService.getNow(), methodName); - - if (CollectionUtils.isNotEmpty(entitiesByPropertyValue)) { - return entitiesByPropertyValue; - } - return new ArrayList<>(); - } - - private List filterClassificationByName(List classifications, String classificationName) { - return classifications.stream().filter(classification -> classification.getName().equals(classificationName)).collect(Collectors.toList()); - } - - private InstanceGraph getAssetNeighborhood(String userId, String entityGUID, SearchParameters searchParameters, String serverName) - throws AssetCatalogException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - OMRSMetadataCollection metadataCollection = commonHandler.getOMRSMetadataCollection(); - - InstanceGraph entityNeighborhood = null; - String methodName = "getAssetNeighborhood"; - try { - entityNeighborhood = metadataCollection.getEntityNeighborhood( - userId, - entityGUID, - commonHandler.getTypesGUID(userId, searchParameters.getEntityTypes()), - searchParameters.getRelationshipTypeGUIDs(), - Collections.singletonList(InstanceStatus.ACTIVE), - searchParameters.getLimitResultsByClassification(), - null, - searchParameters.getLevel()); - } catch (org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - | TypeErrorException - | FunctionNotSupportedException - | PropertyErrorException | RepositoryErrorException e) { - errorHandler.handleRepositoryError(e, methodName); - } catch (EntityNotKnownException e) { - errorHandler.handleUnknownEntity(e, entityGUID, searchParameters.getEntityTypes().get(0), methodName, GUID_PARAMETER); - } catch (org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException e) { - errorHandler.handleUnauthorizedUser(userId, methodName); - } - - if (entityNeighborhood == null) { - throw new AssetCatalogException(AssetCatalogErrorCode.ASSET_NEIGHBORHOOD_NOT_FOUND.getMessageDefinition(entityGUID, serverName), - this.getClass().getName(), - methodName); - } - - return entityNeighborhood; - } - - /** - * - * @param userId user identifier that issues the call - * @param supportedTypesForSearch the list of types - * @return a list of types and all of sub-types recursive - */ - private List getSupportedTypesWithDescendants(String userId, String... supportedTypesForSearch) { - List response = new ArrayList<>(); - for (String type : supportedTypesForSearch) { - List typeContext = commonHandler.getTypeContext(userId, type); - response.addAll(typeContext); - } - return response; - } - - /** - * - * @param userId user identifier that issues the call - * @param supportedTypesForSearch the list of types - * @return the list of types by names - */ - private List getSupportedTypes(String userId, String... supportedTypesForSearch) { - List response = new ArrayList<>(); - for (String typeName : supportedTypesForSearch) { - Type type = commonHandler.getTypeByTypeDefName(userId, typeName); - if(type != null) { - response.add(type); - } - } - return response; - } - - private int orderElements(Elements firstAsset, Elements secondAsset, String sequencingProperty, SequencingOrder sequencingOrder) { - String firstField; - String secondField; - if (TYPE_SEQUENCING.equals(sequencingProperty)) { - if (firstAsset.getType() == null || secondAsset.getType() == null) { - return 0; - } - firstField = firstAsset.getType().getName(); - secondField = secondAsset.getType().getName(); - } else { - if (firstAsset.getProperties() == null || secondAsset.getProperties() == null) { - return 0; - } - firstField = firstAsset.getProperties().get(sequencingProperty); - secondField = secondAsset.getProperties().get(sequencingProperty); - if (DISPLAY_NAME.equals(sequencingProperty)) { - if (firstField == null) { - firstField = firstAsset.getProperties().get(NAME); - } - if (secondField == null) { - secondField = secondAsset.getProperties().get(NAME); - } - } - } - - return compareFields(firstField, secondField, sequencingOrder); - - - } - - private int compareFields(String firstComparedProperty, String secondComparedProperty, SequencingOrder sequencingOrder) { - if (firstComparedProperty != null && secondComparedProperty != null) { - if (sequencingOrder == SequencingOrder.PROPERTY_ASCENDING) { - return firstComparedProperty.toLowerCase().compareTo(secondComparedProperty.toLowerCase()); - } else if (sequencingOrder == SequencingOrder.PROPERTY_DESCENDING) { - return secondComparedProperty.toLowerCase().compareTo(firstComparedProperty.toLowerCase()); - } - } - if (firstComparedProperty == null && secondComparedProperty != null) { - return 1; - } - if (firstComparedProperty != null && secondComparedProperty == null) { - return -1; - } - return 0; - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/CommonHandler.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/CommonHandler.java deleted file mode 100644 index 486701674c3..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/CommonHandler.java +++ /dev/null @@ -1,316 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.assetcatalog.converters.AssetCatalogConverter; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.service.ClockService; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttributeStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.ASSET_ZONE_MEMBERSHIP; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.DISPLAY_NAME; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.GUID_PARAMETER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.REFERENCEABLE; - -/** - * Common Handler supports the lookup types and metadata collection. - * These methods are used in the multiple handlers. - * It runs on the server-side of the Asset Catalog OMAS, fetches the types, metadata collection using the RepositoryHandler. - */ -public class CommonHandler { - - private static final String ZONE_MEMBERSHIP = "zoneMembership"; - private static final String NONE = "none"; - private final String sourceName; - private final RepositoryHandler repositoryHandler; - private final OMRSRepositoryHelper repositoryHelper; - private final OpenMetadataAPIGenericHandler assetHandler; - private final RepositoryErrorHandler errorHandler; - private final ClockService clockService; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param sourceName the name of the component - * @param repositoryHandler manages calls to the repository services - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param assetHandler provides utilities for manipulating asset catalog objects using a generic handler - * @param errorHandler provides common validation routines for the other handler classes - */ - CommonHandler(String sourceName, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, - OpenMetadataAPIGenericHandler assetHandler, RepositoryErrorHandler errorHandler, - ClockService clockService) { - this.sourceName = sourceName; - this.repositoryHandler = repositoryHandler; - this.repositoryHelper = repositoryHelper; - this.assetHandler = assetHandler; - this.errorHandler = errorHandler; - this.clockService = clockService; - } - - OMRSMetadataCollection getOMRSMetadataCollection() { - return repositoryHandler.getMetadataCollection(); - } - - /** - * Returns a list containing the type and all the sub-types of the provided type - * - * @param userId user identifier that issues the call - * @param typeDefName the type definition name - * @return a list of sub-types recursive - */ - List getTypeContext(String userId, String typeDefName) { - List response = new ArrayList<>(); - TypeDef typeDefByName = repositoryHelper.getTypeDefByName(userId, typeDefName); - AssetCatalogConverter converter = new AssetCatalogConverter<>(repositoryHelper, sourceName, assetHandler.getServerName()); - - if (typeDefByName != null) { - if (repositoryHelper.getKnownTypeDefGallery() == null - || CollectionUtils.isEmpty(repositoryHelper.getKnownTypeDefGallery().getTypeDefs())) { - return response; - } - List typeDefs = repositoryHelper.getKnownTypeDefGallery().getTypeDefs(); - - Type type = converter.convertType(typeDefByName); - List subTypes = getSubTypes(typeDefs, type); - response.add(type); - response.addAll(subTypes); - - collectSubTypes(subTypes, typeDefs, response); - response.sort(Comparator.comparing(Type::getName)); - } - - return response; - } - - /** - * Returns the type by using the type definition name - * - * @param userId user identifier that issues the call - * @param typeDefName the type definition name - * @return the Type if exists, otherwise null - */ - Type getTypeByTypeDefName(String userId, String typeDefName) { - - TypeDef typeDefByName = repositoryHelper.getTypeDefByName(userId, typeDefName); - AssetCatalogConverter converter = new AssetCatalogConverter<>(repositoryHelper, sourceName, assetHandler.getServerName()); - - if (typeDefByName != null) { - return converter.convertType(typeDefByName); - } - return null; - } - - /** - * Returns the global identifier of the type using the type def name - * - * @param userId user identifier that issues the call - * @param typeDefName the type definition name - * @return the global identifier of the type - */ - public String getTypeDefGUID(String userId, String typeDefName) { - if (typeDefName == null) { - return null; - } - - TypeDef typeDefByName = repositoryHelper.getTypeDefByName(userId, typeDefName); - return Optional.ofNullable(typeDefByName).map(TypeDefLink::getGUID).orElse(null); - } - - /** - * Checks against the type's list of properties if it has a display name property - * - * @param userId the user id - * @param typeDefGUID the type definition unique identifier - * @return if the given type has a display name property - * @throws InvalidParameterException the invalid parameter exception - */ - public boolean hasDisplayName(String userId, String typeDefGUID) throws InvalidParameterException { - String methodName = "hasDisplayName"; - TypeDef typeDefByName = null; - try { - typeDefByName = repositoryHelper.getTypeDef(userId, GUID_PARAMETER, typeDefGUID, methodName); - } catch (TypeErrorException typeErrorException) { - errorHandler.handleUnsupportedType(typeErrorException, methodName, GUID_PARAMETER); - } - List allPropertiesForTypeDef = repositoryHelper.getAllPropertiesForTypeDef(sourceName, typeDefByName, methodName); - if (allPropertiesForTypeDef == null) { - return false; - } else { - return allPropertiesForTypeDef.stream().anyMatch(property -> property.getAttributeName().equals(DISPLAY_NAME) - && property.getAttributeStatus().equals(TypeDefAttributeStatus.ACTIVE_ATTRIBUTE)); - } - - } - - /** - * Fetch the zone membership property - * - * @param classifications asset properties - * @return the list that contains the zone membership - */ - List getAssetZoneMembership(List classifications) { - String methodName = "getAssetZoneMembership"; - if (CollectionUtils.isEmpty(classifications)) { - return Collections.emptyList(); - } - - Optional assetZoneMembership = getAssetZoneMembershipClassification(classifications); - - if (assetZoneMembership.isPresent()) { - List zoneMembership = repositoryHelper.getStringArrayProperty(sourceName, - ZONE_MEMBERSHIP, assetZoneMembership.get().getProperties(), methodName); - - if (CollectionUtils.isNotEmpty(zoneMembership)) { - return zoneMembership; - } - } - - return Collections.emptyList(); - } - - /** - * Return the requested entity, converting any errors from the repository services into the local - * OMAS exceptions. - * - * @param userId calling user - * @param guid unique identifier for the entity - * @param type entity type name - * @return entity detail object - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws UserNotAuthorizedException user not authorized to issue this request. - * @throws PropertyServerException problem retrieving the entity. - */ - EntityDetail getEntityByGUID(String userId, - String guid, - String type) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - - String entityTypeName = type; - if(NONE.equals(type)) { - entityTypeName = null; - } - String methodName = "getEntityByGUID"; - return assetHandler.getEntityFromRepository(userId, guid, GUID_PARAMETER, entityTypeName, - null, null, false, false, - clockService.getNow(), methodName); - } - - /** - * Return a list of the types def GUIDs - * - * @param userId calling user - * @param types list of the type def names - * @return a list of type def GUIDs - */ - List getTypesGUID(String userId, List types) { - if (CollectionUtils.isEmpty(types)) { - return Collections.emptyList(); - } - return types.stream(). - map(type -> repositoryHelper.getTypeDefByName(userId, type)). - filter(Objects::nonNull). - map(TypeDef::getGUID). - collect(Collectors.toList()); - } - - /** - * Return a map of the types def GUIDs and their associated type names - * - * @param userId calling user - * @param types list of the type def names - * @return a list of type def GUIDs - */ - Map getTypesAndGUIDs(String userId, List types) { - if (CollectionUtils.isEmpty(types)) { - return Collections.emptyMap(); - } - Map typesAndGUIDs = new HashMap<>(); - for (String type : types) { - TypeDef typeDef = repositoryHelper.getTypeDefByName(userId, type); - String typeDefGUID = null; - if(typeDef != null) { - typeDefGUID = typeDef.getGUID(); - } - typesAndGUIDs.put(type, typeDefGUID); - } - return typesAndGUIDs; - } - - private void collectSubTypes(List types, List activeTypeDefs, List collector) { - for (Type currentSubType : types) { - List subTypes = getSubTypes(activeTypeDefs, currentSubType); - collector.addAll(subTypes); - collectSubTypes(subTypes, activeTypeDefs, collector); - } - } - - private List getSubTypes(List activeTypeDefs, Type type) { - String typeName = type.getName(); - AssetCatalogConverter converter = new AssetCatalogConverter<>(repositoryHelper, sourceName, assetHandler.getServerName()); - - List subTypes = new ArrayList<>(); - for (TypeDef typeDef : activeTypeDefs) { - if (typeDef.getSuperType() != null && typeDef.getSuperType().getName().equals(typeName)) { - - subTypes.add(converter.convertType(typeDef)); - } - } - return subTypes; - } - - private Optional getAssetZoneMembershipClassification(List classifications) { - return classifications.stream() - .filter(classification -> classification.getName().equals(ASSET_ZONE_MEMBERSHIP)) - .findFirst(); - } - - Set collectSuperTypes(String userId, String typeDefName) { - Set superTypes = new HashSet<>(); - - TypeDef typeDefByName = repositoryHelper.getTypeDefByName(userId, typeDefName); - if (typeDefByName != null) { - collectSuperTypes(userId, typeDefByName, superTypes); - } - - return superTypes; - } - - private void collectSuperTypes(String userId, TypeDef type, Set superTypes) { - if (type.getName().equals(REFERENCEABLE)) { - return; - } - superTypes.add(type.getName()); - TypeDef typeDefByName = repositoryHelper.getTypeDefByName(userId, type.getSuperType().getName()); - if (typeDefByName != null) { - collectSuperTypes(userId, typeDefByName, superTypes); - } - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/RelationshipHandler.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/RelationshipHandler.java deleted file mode 100644 index f96993e4b0e..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/RelationshipHandler.java +++ /dev/null @@ -1,101 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.handlers; - -import org.odpi.openmetadata.accessservices.assetcatalog.converters.AssetCatalogConverter; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.service.ClockService; -import org.odpi.openmetadata.accessservices.assetcatalog.util.Constants; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * Relationship Handler supports the lookup of the asset's relationship from the repositories. - * It runs on the server-side of the Asset Catalog OMAS, fetches the relationships using the RepositoryHandler. - */ -public class RelationshipHandler { - - private static final String ENTITY_1_GUID_PARAMETER = "entity1GUID"; - private static final String ENTITY_2_GUID_PARAMETER = "entity2GUID"; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final OpenMetadataAPIGenericHandler assetHandler; - private final CommonHandler commonHandler; - private final ClockService clockService; - - private final String sourceName; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param sourceName name of the component - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHandler manages calls to the repository services - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param assetHandler provides utilities for manipulating asset catalog objects using a generic handler - * @param errorHandler provides common validation routines for the other handler classes - * @param clockService clock service - */ - public RelationshipHandler(String sourceName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, - OMRSRepositoryHelper repositoryHelper, OpenMetadataAPIGenericHandler assetHandler, - RepositoryErrorHandler errorHandler, ClockService clockService) { - this.sourceName = sourceName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.assetHandler = assetHandler; - this.commonHandler = new CommonHandler(sourceName, repositoryHandler, repositoryHelper, assetHandler, errorHandler, - clockService); - this.clockService = clockService; - } - - /** - * Fetch relationship between entities details based on its unique identifier of the ends - * - * @param userId String unique identifier for the user - * @param serverName server name - * @param entity1GUID Entity guid of the first end of the relationship - * @param entity2GUID Entity guid of the second end of the relationship - * @param relationshipType Type of the relationship - * @return the relationship between entities - * @throws InvalidParameterException full path or userId is null - * @throws PropertyServerException problem accessing property server - * @throws UserNotAuthorizedException security access problem - */ - public org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship getRelationshipBetweenEntities(String userId, - String serverName, - String entity1GUID, - String entity2GUID, - String relationshipType) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - final String methodName = "getRelationshipBetweenEntities"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(entity1GUID, ENTITY_1_GUID_PARAMETER, methodName); - invalidParameterHandler.validateGUID(entity2GUID, ENTITY_2_GUID_PARAMETER, methodName); - - String relationshipTypeGUID = null; - if (relationshipType != null) { - relationshipTypeGUID = commonHandler.getTypeDefGUID(userId, relationshipType); - } - - Relationship relationshipBetweenEntities = assetHandler.getUniqueAttachmentLink(userId, entity1GUID, - Constants.GUID_PARAMETER, "", relationshipTypeGUID, relationshipType, entity2GUID, - "", 0, false, false, clockService.getNow(), - methodName); - - if (relationshipBetweenEntities != null) { - AssetCatalogConverter converter = new AssetCatalogConverter<>(repositoryHelper, serverName, - assetHandler.getServerName()); - return converter.convertRelationship(relationshipBetweenEntities); - } - - return null; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/package-info.java deleted file mode 100644 index f4931d0aef7..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provide handlers that do the lookup of assets and relationships from the repositories. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.handlers; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/listeners/AssetCatalogOMRSTopicListener.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/listeners/AssetCatalogOMRSTopicListener.java deleted file mode 100644 index a86256d56fc..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/listeners/AssetCatalogOMRSTopicListener.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.listeners; - -import org.odpi.openmetadata.accessservices.assetcatalog.auditlog.AssetCatalogAuditCode; -import org.odpi.openmetadata.accessservices.assetcatalog.converters.AssetCatalogConverter; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogEvent; -import org.odpi.openmetadata.accessservices.assetcatalog.publishers.AssetCatalogSearchPublisher; -import org.odpi.openmetadata.commonservices.ocf.metadatamanagement.converters.AssetConverter; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; -import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -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.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryValidator; -import org.odpi.openmetadata.repositoryservices.events.OMRSEventOriginator; -import org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEvent; -import org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEventType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - -/** - * AssetCatalogOMRSTopicListener receives details of each OMRS event from the cohorts that the local server - * is connected to. It passes indexing events to the publisher. - */ -public class AssetCatalogOMRSTopicListener extends OMRSTopicListenerBase -{ - private static final Logger log = LoggerFactory.getLogger( AssetCatalogOMRSTopicListener.class ); - private static final String ASSET_TYPE = "Asset"; - - private final OMRSRepositoryHelper repositoryHelper; - private final OMRSRepositoryValidator repositoryValidator; - private final String serverName; - private final List supportedZones; - private final List supportedTypesForSearch; - private final AssetCatalogSearchPublisher publisher; - private final AssetCatalogConverter converter; - - /** - * Instantiates a new Asset catalog OMRS topic listener. - * - * @param serviceName the service name - * @param auditLog the audit log - * @param outTopicConnector the out topic connector - * @param repositoryHelper the repository helper - * @param repositoryValidator the repository validator - * @param serverName the server name - * @param supportedZones the supported zones - * @param supportedTypesForSearch the supported types for search - */ - public AssetCatalogOMRSTopicListener(String serviceName, - AuditLog auditLog, - OpenMetadataTopicConnector outTopicConnector, - OMRSRepositoryHelper repositoryHelper, - OMRSRepositoryValidator repositoryValidator, - String serverName, - List supportedZones, - List supportedTypesForSearch - ) { - super(serviceName, auditLog); - this.publisher = new AssetCatalogSearchPublisher(outTopicConnector); - this.serverName = serverName; - this.supportedZones = supportedZones; - this.repositoryHelper = repositoryHelper; - this.repositoryValidator = repositoryValidator; - this.converter = new AssetCatalogConverter<>(repositoryHelper, serviceName, serverName); - this.supportedTypesForSearch = supportedTypesForSearch; - } - - /** - * Unpack and deliver an instance event to the InstanceEventProcessor - * - * @param instanceEvent event to unpack - */ - @Override - public void processInstanceEvent(OMRSInstanceEvent instanceEvent) - { - log.debug("Processing instance event: {}", instanceEvent); - - if (instanceEvent == null) { - log.debug("Ignored instance event - null OMRSInstanceEvent"); - return; - } - - OMRSEventOriginator instanceEventOriginator = instanceEvent.getEventOriginator(); - - if (instanceEventOriginator == null) { - log.debug("Ignored instance event - null OMRSEventOriginator"); - auditLog.logMessage( - "No instance origin. Event IGNORED!", - AssetCatalogAuditCode.EVENT_NOT_PROCESSING.getMessageDefinition("no instance origin")); - return; - } - - OMRSInstanceEventType instanceEventType = instanceEvent.getInstanceEventType(); - EntityDetail entityDetail = instanceEvent.getEntity(); - Relationship relationship = instanceEvent.getRelationship(); - - try{ - - switch (instanceEventType) { - case UPDATED_ENTITY_EVENT: - case NEW_ENTITY_EVENT: - case DELETED_ENTITY_EVENT: - case CLASSIFIED_ENTITY_EVENT: - case RECLASSIFIED_ENTITY_EVENT: - case DECLASSIFIED_ENTITY_EVENT: - if (entityDetail != null) { - processEntityDetail(entityDetail); - } - break; - case NEW_RELATIONSHIP_EVENT : - case UPDATED_RELATIONSHIP_EVENT: - case DELETED_RELATIONSHIP_EVENT: -// processRelationshipEvent(relationship); - break; - default: break; - } - - } catch (Exception e) { - log.error("An exception occurred while processing OMRSTopic event: \n " + instanceEvent, e); - logExceptionToAudit(instanceEvent, e); - } - - } - - /** - * Publishes the relationship event. - * @param relationship the relationship to be processed - */ - private void processRelationshipEvent(Relationship relationship){ - publisher.publishEvent(relationship); - } - - /** - * Publishes the entity event. - * @param entityDetail the entityDetail to be processed - */ - private void processEntityDetail(EntityDetail entityDetail){ - String assetType = getAssetType(entityDetail); - - if ( assetType != null ) { - AssetConverter assetConverter - = new AssetConverter(entityDetail, null, repositoryHelper, serviceName, serverName); - Asset assetBean = assetConverter.getAssetBean(); - AssetCatalogEvent assetCatalogEvent = new AssetCatalogEvent(); - assetCatalogEvent.setAsset(assetBean); - publisher.publishEvent(assetCatalogEvent); - }else if ( supportedTypesForSearch!=null - && supportedTypesForSearch.contains(entityDetail.getType().getTypeDefName())) - { - AssetCatalogBean assetDescription = converter.getAssetCatalogBean(entityDetail); - publisher.publishEvent(assetDescription); - } - - } - - /** - * Return the name of the Asset type if this entity has a type that inherits from Asset. - * - * @param entity entity to test - * @return String containing Asset type name, or null if not an Asset. - */ - private String getAssetType(EntityDetail entity) - { - final String methodName = "getAssetType"; - - if (repositoryValidator.isATypeOf(serviceName, entity, ASSET_TYPE, methodName)) - { - InstanceType entityType = entity.getType(); - - if (entityType != null) - { - return entityType.getTypeDefName(); - } - } - - return null; - } - - /** - * Determines whether an Asset is in the supported zones. - * - * @param assetZones list of zones for the asset. - * @return boolean true if at least one of the assetZones is in the supportedZones, otherwise false - */ - private boolean inTheZone(List assetZones) - { - if (supportedZones == null || assetZones == null) - { - /* - * If supported zones is null then all zones are supported - * or there are no zones set up in the asset then it is a member of all zones. - */ - return true; - } - - return supportedZones.stream().anyMatch(assetZones::contains); - - } - - /** - * Log exceptions using Audit log - * - * @param instanceEvent the event that has been received - * @param e the exception object - */ - private void logExceptionToAudit(OMRSInstanceEvent instanceEvent, Exception e) { - String actionDescription = "Asset Lineage OMAS is unable to process an OMRSTopic event."; - - auditLog.logException(actionDescription, - AssetCatalogAuditCode.EVENT_PROCESSING_EXCEPTION.getMessageDefinition(e.getMessage(), instanceEvent.toString()), - instanceEvent.toString(), e); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/listeners/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/listeners/package-info.java deleted file mode 100644 index ad027895b6c..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/listeners/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines an OMRS Topic listener designed for receiving events from the cohorts that the local server - * is connected to. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.listeners; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/publishers/AssetCatalogSearchPublisher.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/publishers/AssetCatalogSearchPublisher.java deleted file mode 100644 index 8e6895660fa..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/publishers/AssetCatalogSearchPublisher.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.publishers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.Serializable; - -/** - * AssetCatalogSearchPublisher is publishing asset indexing events. - */ -public class AssetCatalogSearchPublisher { - - private static final Logger LOG = LoggerFactory.getLogger(AssetCatalogSearchPublisher.class); - private static final ObjectWriter OBJECT_WRITER = new ObjectMapper().writer(); - - private final OpenMetadataTopicConnector topicConnector; - - /** - * Instantiates a new AssetCatalogSearchPublisher object. - * - * @param outTopicConnector the out topic connector - */ - public AssetCatalogSearchPublisher(OpenMetadataTopicConnector outTopicConnector) - { - this.topicConnector = outTopicConnector; - } - - /** - * Publish an asset indexing event. - * - * @param event event to send - */ - public void publishEvent(Serializable event) - { - try - { - if (topicConnector != null) - { - topicConnector.sendEvent(OBJECT_WRITER.writeValueAsString(event)); - } - else - { - LOG.error("Cannot publish event: topic connector is null!"); - } - } - catch (JsonProcessingException e) - { - LOG.error("Unable to create json for publishing: " + event.toString(), e); - } - catch (Exception e) - { - LOG.error("Unable to publish new asset event", e); - } - } -} - - diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/publishers/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/publishers/package-info.java deleted file mode 100644 index 46a42885495..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/publishers/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines a topic publisher for asset indexing events. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.publishers; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRESTService.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRESTService.java deleted file mode 100644 index 89cf0b8183b..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRESTService.java +++ /dev/null @@ -1,441 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.service; - -import org.odpi.openmetadata.accessservices.assetcatalog.admin.AssetCatalogInstanceHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.AssetCatalogHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogSupportedTypes; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.ClassificationListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.util.ExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The AssetCatalogService provides the server-side implementation of the Asset Catalog Open Metadata - * Assess Service (OMAS). - * This service provide the functionality to fetch asset's header, classification and properties. - */ -public class AssetCatalogRESTService { - - private static final Logger log = LoggerFactory.getLogger(AssetCatalogRESTService.class); - private static final String CALLING_METHOD = "Calling method: {}"; - private static final String METHOD_WITH_RESPONSE = "Returning from method: {} with response: {}"; - - private final AssetCatalogInstanceHandler instanceHandler = new AssetCatalogInstanceHandler(); - private final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - private final ExceptionHandler exceptionHandler = new ExceptionHandler(); - - /** - * Fetch asset's header, classification and properties - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetTypeName the type of the asset - * @return the asset with its header and the list of associated classifications and specific properties - */ - public AssetCatalogResponse getAssetDetailsByGUID(String serverName, - String userId, - String assetGUID, - String assetTypeName) { - String methodName = "getAssetDetailsByGUID"; - log.debug(CALLING_METHOD, methodName); - - AssetCatalogResponse response = new AssetCatalogResponse(); - - try { - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - AssetCatalogBean assetCatalogBean = assetCatalogHandler.getEntityDetails(userId, assetGUID, assetTypeName); - response.setAssetCatalogBean(assetCatalogBean); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Fetch asset's header, classification, properties and relationships - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetTypeName the asset type - * @return the asset with its header and the list of associated classifications and relationship - */ - public AssetCatalogResponse getAssetUniverseByGUID(String serverName, - String userId, - String assetGUID, - String assetTypeName) { - String methodName = "getAssetUniverseByGUID"; - - log.debug(CALLING_METHOD, methodName); - - AssetCatalogResponse response = new AssetCatalogResponse(); - try { - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - AssetCatalogBean assetCatalogBean = assetCatalogHandler.getEntityDetails(userId, assetGUID, assetTypeName); - assetCatalogBean.setRelationships(assetCatalogHandler.getRelationshipsByEntityGUID(userId, assetGUID, assetCatalogBean.getType().getName())); - - response.setAssetCatalogBean(assetCatalogBean); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Fetch the classification for a specific asset - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetTypeName the type of the asset - * @param classificationName the name of the classification - * @return ClassificationsResponse the classification for the asset - */ - public ClassificationListResponse getClassificationByAssetGUID(String serverName, - String userId, - String assetGUID, - String assetTypeName, - String classificationName) { - String methodName = "getClassificationByAssetGUID"; - log.debug(CALLING_METHOD, methodName); - - ClassificationListResponse response = new ClassificationListResponse(); - try { - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - response.setClassifications(assetCatalogHandler.getEntityClassificationByName(userId, - assetGUID, assetTypeName, classificationName)); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Returns the asset relationships. - * - * @param serverName unique identifier for requested server - * @param userId the unique identifier for the user - * @param assetGUID the asset GUID - * @param assetTypeName the asset type name - * @param relationshipTypeName the relationship type name - * @param startFrom the offset - * @param limit page size to limit the number of the assets returned - * @return the asset relationships - */ - public RelationshipListResponse getAssetRelationships(String serverName, - String userId, - String assetGUID, - String assetTypeName, - String relationshipTypeName, - Integer startFrom, - Integer limit) { - String methodName = "getAssetRelationships"; - log.debug(CALLING_METHOD, methodName); - - RelationshipListResponse response = new RelationshipListResponse(); - try { - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - response.setRelationships(assetCatalogHandler.getRelationships(userId, assetGUID, - assetTypeName, relationshipTypeName, startFrom, limit)); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Return a list of assets/glossary terms/schema elements matching the search criteria without the full context. - * If the searchParameters have an empty list of entity types, the response contains Glossary Terms, Schema Elements, Assets - * - * @param serverName unique identifier for requested server - * @param userId the unique identifier for the user - * @param searchCriteria a string expression of the characteristics of the required assets - * @param searchParameters constraints to make the assets' search results more precise - * @return list of properties used to narrow the search - */ - public AssetListResponse searchByType(String serverName, - String userId, - String searchCriteria, - SearchParameters searchParameters) { - String methodName = "searchByType"; - log.debug(CALLING_METHOD, methodName); - - AssetListResponse response = new AssetListResponse(); - - try { - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - response.setElementsList(assetCatalogHandler.searchByType(userId, searchCriteria, searchParameters)); - } catch (UserNotAuthorizedException - | PagingErrorException - | TypeErrorException - | PropertyErrorException - | RepositoryErrorException - | InvalidParameterException - | FunctionNotSupportedException - | EntityNotKnownException e) { - exceptionHandler.captureOMRSCheckedExceptionBase(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Return a list of assets/glossary terms/schema elements matching the type name without the full context. - * If the typeName is null or doesn't exist, the response contains an empty list. - * The list includes also subtypes. - * - * @param serverName unique identifier for requested server - * @param userId the unique identifier for the user - * @param typeName the assets type name to search for - * @return list of assets by type name or GUID - */ - public AssetListResponse searchByTypeName(String serverName, - String userId, - String typeName) { - String methodName = "searchByTypeName"; - log.debug(CALLING_METHOD, methodName); - - AssetListResponse response = new AssetListResponse(); - - try { - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - response.setElementsList(assetCatalogHandler.searchByTypeName(userId, typeName)); - } catch (UserNotAuthorizedException - | PagingErrorException - | TypeErrorException - | PropertyErrorException - | RepositoryErrorException - | InvalidParameterException - | FunctionNotSupportedException - | EntityNotKnownException e) { - exceptionHandler.captureOMRSCheckedExceptionBase(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Return a list of assets/glossary terms/schema elements matching the type GUID without the full context. - * If the typeGUID is null or doesn't exist, the response contains an empty list. - * The list includes also subtypes. - * - * @param serverName unique identifier for requested server - * @param userId the unique identifier for the user - * @param typeGUID the assets type GUID to search for - * @return list of assets by type name or GUID - */ - public AssetListResponse searchByTypeGUID(String serverName, - String userId, - String typeGUID) { - String methodName = "searchByTypeGUID"; - log.debug(CALLING_METHOD, methodName); - - AssetListResponse response = new AssetListResponse(); - - try { - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - response.setElementsList(assetCatalogHandler.searchByTypeGUID(userId, typeGUID)); - } catch (UserNotAuthorizedException - | PagingErrorException - | TypeErrorException - | PropertyErrorException - | RepositoryErrorException - | InvalidParameterException - | FunctionNotSupportedException - | EntityNotKnownException e) { - exceptionHandler.captureOMRSCheckedExceptionBase(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Return the full context of an asset/glossary term based on its identifier. - * The response contains the list of the connections assigned to the asset. - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param assetGUID the global unique identifier of the asset - * @param assetType the type of the asset - * @return the context of the given asset/glossary term/schema element - */ - public AssetResponse buildContext(String serverName, - String userId, - String assetGUID, - String assetType) { - String methodName = "buildContext"; - log.debug(CALLING_METHOD, methodName); - - AssetResponse response = new AssetResponse(); - try { - - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - Elements elements = assetCatalogHandler.buildContextByType(userId, assetGUID, assetType); - if (elements != null) { - response.setAsset(elements); - } - - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Returns supported types for search with all sub-types. - * If type name is provided, it returns the type itself and the list of sub-types for it - * - * @param serverName unique identifier for requested server. - * @param userId user identifier that issues the call - * @param type optional type name - * @return supported types - */ - public AssetCatalogSupportedTypes getSupportedTypes(String serverName, - String userId, - String type) { - String methodName = "getTypes"; - log.debug(CALLING_METHOD, methodName); - - AssetCatalogSupportedTypes response = new AssetCatalogSupportedTypes(); - try { - - AssetCatalogHandler assetCatalogHandler = instanceHandler.getAssetCatalogHandler(userId, serverName, methodName); - response.setTypes(assetCatalogHandler.getSupportedTypes(userId, type)); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } catch (Exception e) { - restExceptionHandler.captureExceptions(response, e, methodName); - } - - log.debug(METHOD_WITH_RESPONSE, methodName, response); - - return response; - } - - /** - * Return the connection object for the Asset Catalog OMAS's out topic. - * - * @param serverName name of the service to route the request to. - * @param userId identifier of calling user. - * @param callerId unique identifier of the caller - * - * @return connection object for the out topic or - * InvalidParameterException one of the parameters is null or invalid or - * UserNotAuthorizedException user not authorized to issue this request or - * PropertyServerException problem retrieving the discovery engine definition. - */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) { - final String methodName = "getOutTopicConnection"; - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; - - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setConnection(instanceHandler.getOutTopicConnection(userId, serverName, methodName, callerId)); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - return response; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRelationshipRESTService.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRelationshipRESTService.java deleted file mode 100644 index 3a7d2729833..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRelationshipRESTService.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.service; - - -import org.odpi.openmetadata.accessservices.assetcatalog.admin.AssetCatalogInstanceHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.RelationshipHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The AssetCatalogRelationshipService provides the server-side implementation of the Asset Catalog Open Metadata - * Assess Service (OMAS). - * This service provide the functionality to fetch asset relationships and details about specific relationships. - */ -public class AssetCatalogRelationshipRESTService { - - private static final Logger log = LoggerFactory.getLogger(AssetCatalogRelationshipRESTService.class); - private final AssetCatalogInstanceHandler instanceHandler = new AssetCatalogInstanceHandler(); - private final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - - /** - * Fetch relationship between entities details based on its unique identifier of the ends - * - * @param serverName unique identifier for requested server - * @param userId String unique identifier for the user - * @param entity1GUID Entity guid of the first end of the relationship - * @param entity2GUID Entity guid of the second end of the relationship - * @param relationshipType Type of the relationship - * @return the relationship between entities - */ - public RelationshipResponse getRelationshipBetweenEntities(String serverName, String userId, - String entity1GUID, - String entity2GUID, - String relationshipType) { - final String methodName = "getRelationshipBetweenEntities"; - - log.debug("Calling method: {}", methodName); - - RelationshipResponse response = new RelationshipResponse(); - - try { - RelationshipHandler relationshipHandler = instanceHandler.getRelationshipHandler(userId, serverName, methodName); - Relationship relationshipBetweenEntities = relationshipHandler.getRelationshipBetweenEntities(userId, serverName, - entity1GUID, entity2GUID, relationshipType); - response.setRelationship(relationshipBetweenEntities); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - restExceptionHandler.captureInvalidParameterException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { - restExceptionHandler.captureUserNotAuthorizedException(response, e); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { - restExceptionHandler.capturePropertyServerException(response, e); - } - - log.debug("Returning from method: {} with response: {}", methodName, response); - - return response; - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/ClockService.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/ClockService.java deleted file mode 100644 index e1d796bd6fe..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/ClockService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.service; - -import java.time.Clock; -import java.time.Instant; -import java.util.Date; - - -/** - * A Clock service to get current time as date based on a java.time.Clock object. - */ -public class ClockService { - - private final Clock clock; - - /** - * Instantiates a new Clock Service. - * - * @param clock a java clock providing access to the current instant, date and time using a time-zone - */ - public ClockService(Clock clock) { - this.clock = clock; - } - - /** - * Gets the current time as Date. - * - * @return the current time as Date. - */ - public Date getNow() { - return Date.from(Instant.now(clock)); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/package-info.java deleted file mode 100644 index 36e03dfd625..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/service/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides services that: fetch asset's header, classification and properties, asset relationships and - * details about specific relationships. Also, it offers a clock service to get the current time. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.service; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/Constants.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/Constants.java deleted file mode 100644 index 2355eb2c61c..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/Constants.java +++ /dev/null @@ -1,436 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.util; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -/** - * Constants for Open Metadata Types (names and guid) - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public final class Constants { - - /** - * The Referenceable Open Metadata Type name - */ - public static final String REFERENCEABLE = "Referenceable"; - - /** - * The AssetZoneMembership Open Metadata Type name - */ - public static final String ASSET_ZONE_MEMBERSHIP = "AssetZoneMembership"; - - /** - * The Asset Open Metadata Type unique identifier - */ - public static final String ASSET_GUID = "896d14c2-7522-4f6c-8519-757711943fe6"; - - /** - * The SchemaElement Open Metadata Type unique identifier - */ - public static final String SCHEMA_ELEMENT_GUID = "718d4244-8559-49ed-ad5a-10e5c305a656"; - - /** - * The SchemaElement Open Metadata Type name - */ - public static final String SCHEMA_ELEMENT = "SchemaElement"; - - /** - * The GlossaryTerm Open Metadata Type name - */ - public static final String GLOSSARY_TERM = "GlossaryTerm"; - - /** - * The GlossaryTerm Open Metadata Type unique identifier - */ - public static final String GLOSSARY_TERM_TYPE_GUID = "0db3e6ec-f5ef-4d75-ae38-b7ee6fd6ec0a"; - - /** - * The ComplexSchemaType Open Metadata Type name - */ - public static final String COMPLEX_SCHEMA_TYPE = "ComplexSchemaType"; - - /** - * The Asset Open Metadata Type name - */ - public static final String ASSET = "Asset"; - - /** - * The SchemaAttribute Open Metadata Type name - */ - public static final String SCHEMA_ATTRIBUTE = "SchemaAttribute"; - - /** - * The NestedSchemaAttribute Open Metadata Type name - */ - public static final String NESTED_SCHEMA_ATTRIBUTE = "NestedSchemaAttribute"; - - /** - * The NestedSchemaAttribute Open Metadata Type unique identifier - */ - public static final String NESTED_SCHEMA_ATTRIBUTE_GUID = "0ffb9d87-7074-45da-a9b0-ae0859611133"; - - /** - * The DeployedAPI Open Metadata Type name - */ - public static final String DEPLOYED_API = "DeployedAPI"; - - /** - * The ITInfrastructure Open Metadata Type name - */ - public static final String IT_INFRASTRUCTURE = "ITInfrastructure"; - - /** - * The Process Open Metadata Type name - */ - public static final String PROCESS = "Process"; - - /** - * The DataStore Open Metadata Type name - */ - public static final String DATA_STORE = "DataStore"; - - /** - * The DataSet Open Metadata Type name - */ - public static final String DATA_SET = "DataSet"; - - /** - * The Database Open Metadata Type name - */ - public static final String DATABASE = "Database"; - - /** - * The DataFile Open Metadata Type name - */ - public static final String DATA_FILE = "DataFile"; - - /** - * The FileFolder Open Metadata Type name - */ - public static final String FILE_FOLDER = "FileFolder"; - - /** - * The PortImplementation Open Metadata Type name - */ - public static final String PORT_IMPLEMENTATION = "PortImplementation"; - - /** - * The Host Open Metadata Type name - */ - public static final String HOST = "Host"; - - /** - * The Network Open Metadata Type name - */ - public static final String NETWORK = "Network"; - - /** - * The Location Open Metadata Type name - */ - public static final String LOCATION = "Location"; - - /** - * The Endpoint Open Metadata Type name - */ - public static final String ENDPOINT = "Endpoint"; - - /** - * The Connection Open Metadata Type name - */ - public static final String CONNECTION = "Connection"; - - /** - * The SoftwareServerPlatform Open Metadata Type name - */ - public static final String SOFTWARE_SERVER_PLATFORM = "SoftwareServerPlatform"; - - /** - * The SoftwareServer Open Metadata Type name - */ - public static final String SOFTWARE_SERVER = "SoftwareServer"; - - /** - * The HostCluster Open Metadata Type name - */ - public static final String HOST_CLUSTER = "HostCluster"; - - /** - * The VirtualContainer Open Metadata Type name - */ - public static final String VIRTUAL_CONTAINER = "VirtualContainer"; - - - //Relationships Type - /** - * The AssetSchemaType Open Metadata Type unique identifier - */ - public static final String ASSET_SCHEMA_TYPE_GUID = "815b004d-73c6-4728-9dd9-536f4fe803cd"; - - /** - * The AssetSchemaType Open Metadata Type name - */ - public static final String ASSET_SCHEMA_TYPE = "AssetSchemaType"; - - /** - * The PortSchema Open Metadata Type unique identifier - */ - public static final String PORT_SCHEMA_GUID = "B216fA00-8281-F9CC-9911-Ae6377f2b457"; - - /** - * The PortSchema Open Metadata Type name - */ - public static final String PORT_SCHEMA = "PortSchema"; - - /** - * The SoftwareServerPlatformDeployment Open Metadata Type unique identifier - */ - public static final String SOFTWARE_SERVER_PLATFORM_DEPLOYMENT_GUID = "b909eb3b-5205-4180-9f63-122a65b30738"; - - /** - * The SoftwareServerPlatformDeployment Open Metadata Type name - */ - public static final String SOFTWARE_SERVER_PLATFORM_DEPLOYMENT = "SoftwareServerPlatformDeployment"; - - /** - * The HostOperatingPlatform Open Metadata Type unique identifier - */ - public static final String HOST_OPERATING_PLATFORM_GUID = "b9179df5-6e23-4581-a8b0-2919e6322b12"; - - /** - * The HostOperatingPlatform Open Metadata Type name - */ - public static final String HOST_OPERATING_PLATFORM = "HostOperatingPlatform"; - - /** - * The ServerEndpoint Open Metadata Type unique identifier - */ - public static final String SERVER_ENDPOINT_GUID = "2b8bfab4-8023-4611-9833-82a0dc95f187"; - - /** - * The ServerEndpoint Open Metadata Type name - */ - public static final String SERVER_ENDPOINT = "ServerEndpoint"; - - /** - * The SoftwareServerDeployment Open Metadata Type unique identifier - */ - public static final String SOFTWARE_SERVER_DEPLOYMENT_GUID = "d909eb3b-5205-4180-9f63-122a65b30738"; - - /** - * The SoftwareServerDeployment Open Metadata Type name - */ - public static final String SOFTWARE_SERVER_DEPLOYMENT = "SoftwareServerDeployment"; - - /** - * The ConnectionToAsset Open Metadata Type unique identifier - */ - public static final String CONNECTION_TO_ASSET_GUID = "e777d660-8dbe-453e-8b83-903771f054c0"; - - /** - * The ConnectionToAsset Open Metadata Type name - */ - public static final String CONNECTION_TO_ASSET = "ConnectionToAsset"; - - /** - * The ConnectionConnectorType Open Metadata Type unique identifier - */ - public static final String CONNECTION_CONNECTOR_TYPE_GUID = "e542cfc1-0b4b-42b9-9921-f0a5a88aaf96"; - - /** - * The ConnectionConnectorType Open Metadata Type unique identifier - */ - public static final String CONNECTION_CONNECTOR_TYPE = "ConnectionConnectorType"; - - /** - * The DataContentForDataSet Open Metadata Type unique identifier - */ - public static final String DATA_CONTENT_FOR_DATA_SET_GUID = "b827683c-2924-4df3-a92d-7be1888e23c0"; - - /** - * The DataContentForDataSet Open Metadata Type name - */ - public static final String DATA_CONTENT_FOR_DATA_SET = "DataContentForDataSet"; - - /** - * The FolderHierarchy Open Metadata Type unique identifier - */ - public static final String FOLDER_HIERARCHY_GUID = "48ac9028-45dd-495d-b3e1-622685b54a01"; - - /** - * The FolderHierarchy Open Metadata Type name - */ - public static final String FOLDER_HIERARCHY = "FolderHierarchy"; - - /** - * The NestedFile Open Metadata Type unique identifier - */ - public static final String NESTED_FILE_GUID = "4cb88900-1446-4eb6-acea-29cd9da45e63"; - - /** - * The NestedFile Open Metadata Type name - */ - public static final String NESTED_FILE = "NestedFile"; - - /** - * The ProcessPort Open Metadata Type unique identifier - */ - public static final String PROCESS_PORT_GUID = "fB4E00CF-37e4-88CE-4a94-233BAdB84DA2"; - - /** - * The ProcessPort Open Metadata Type name - */ - public static final String PROCESS_PORT = "ProcessPort"; - - /** - * The NetworkGatewayLink Open Metadata Type unique identifier - */ - public static final String NETWORK_GATEWAY_LINK_GUID = "5bece460-1fa6-41fb-a29f-fdaf65ec8ce3"; - - /** - * The NetworkGatewayLink Open Metadata Type name - */ - public static final String NETWORK_GATEWAY_LINK = "NetworkGatewayLink"; - - /** - * The HostNetwork Open Metadata Type unique identifier - */ - public static final String HOST_NETWORK_GUID = "f2bd7401-c064-41ac-862c-e5bcdc98fa1e"; - - /** - * The HostNetwork Open Metadata Type name - */ - public static final String HOST_NETWORK = "HostNetwork"; - - /** - * The DeployedVirtualContainer Open Metadata Type unique identifier - */ - public static final String DEPLOYED_VIRTUAL_CONTAINER_GUID = "4b981d89-e356-4d9b-8f17-b3a8d5a86676"; - - /** - * The DeployedVirtualContainer Open Metadata Type name - */ - public static final String DEPLOYED_VIRTUAL_CONTAINER = "DeployedVirtualContainer"; - - /** - * The HostClusterMember Open Metadata Type unique identifier - */ - public static final String HOST_CLUSTER_MEMBER_GUID = "1a1c3933-a583-4b0c-9e42-c3691296a8e0"; - - /** - * The HostClusterMember Open Metadata Type name - */ - public static final String HOST_CLUSTER_MEMBER = "HostClusterMember"; - - /** - * The HostLocation Open Metadata Type unique identifier - */ - public static final String HOST_LOCATION_GUID = "f3066075-9611-4886-9244-32cc6eb07ea9"; - - /** - * The HostLocation Open Metadata Type name - */ - public static final String HOST_LOCATION = "HostLocation"; - - /** - * The AssetLocation Open Metadata Type unique identifier - */ - public static final String ASSET_LOCATION_GUID = "bc236b62-d0e6-4c5c-93a1-3a35c3dba7b1"; - - /** - * The AssetLocation Open Metadata Type name - */ - public static final String ASSET_LOCATION = "AssetLocation"; - - /** - * The APIEndpoint Open Metadata Type unique identifier - */ - public static final String API_ENDPOINT_GUID = "de5b9501-3ad4-4803-a8b2-e311c72a4336"; - - /** - * The APIEndpoint Open Metadata Type name - */ - public static final String API_ENDPOINT = "APIEndpoint"; - - /** - * The ConnectionEndpoint Open Metadata Type unique identifier - */ - public static final String CONNECTION_ENDPOINT_GUID = "887a7132-d6bc-4b92-a483-e80b60c86fb2"; - - /** - * The ConnectionEndpoint Open Metadata Type name - */ - public static final String CONNECTION_ENDPOINT = "ConnectionEndpoint"; - - /** - * The SemanticAssignment Open Metadata Type unique identifier - */ - public static final String SEMANTIC_ASSIGNMENT_GUID = "e6670973-645f-441a-bec7-6f5570345b92"; - - /** - * The SemanticAssignment Open Metadata Type name - */ - public static final String SEMANTIC_ASSIGNMENT = "SemanticAssignment"; - - /** - * The SchemaAttributeType Open Metadata Type unique identifier - */ - public static final String SCHEMA_ATTRIBUTE_TYPE_GUID = "2d955049-e59b-45dd-8e62-cde1add59f9e"; - - /** - * The SchemaAttributeType Open Metadata Type name - */ - public static final String SCHEMA_ATTRIBUTE_TYPE = "SchemaAttributeType"; - - /** - * The AttributeForSchema Open Metadata Type unique identifier - */ - public static final String ATTRIBUTE_FOR_SCHEMA_GUID = "86b176a2-015c-44a6-8106-54d5d69ba661"; - - /** - * The AttributeForSchema Open Metadata Type name - */ - public static final String ATTRIBUTE_FOR_SCHEMA = "AttributeForSchema"; - //Instance Properties fields - - /** - * The qualified name property - */ - public static final String QUALIFIED_NAME = "qualifiedName"; - - /** - * The name property - */ - public static final String NAME = "name"; - - /** - * The display name property - */ - public static final String DISPLAY_NAME = "displayName"; - - /** - * The type property - */ - public static final String TYPE_SEQUENCING = "type"; - - /** - * The GUID property - */ - public static final String GUID_PARAMETER = "GUID"; - - /** - * The search parameter property - */ - public static final String SEARCH_PARAMETER = "searchParameter"; - - /** - * The additional properties property - */ - public static final String ADDITIONAL_PROPERTIES_PROPERTY_NAME = "additionalProperties"; - - /** - * The search criteria property - */ - public static final String SEARCH_STRING_PARAMETER_NAME = "searchCriteria"; -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/ExceptionHandler.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/ExceptionHandler.java deleted file mode 100644 index 440ff24ab83..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/ExceptionHandler.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.assetcatalog.util; - -import org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogException; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogOMASAPIResponse; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSCheckedExceptionBase; - -/** - * Exception handler used to capture OMRSCheckedExceptionBase and AssetCatalogException - */ -public class ExceptionHandler { - - /** - * Capture the OMRSCheckedExceptionBase exception and set on the AssetCatalogOMASAPIResponse corresponding HTTP code - * - * @param response - AssetCatalogOMASAPIResponse response - * @param e - OMRSCheckedExceptionBase exception - */ - public void captureOMRSCheckedExceptionBase(AssetCatalogOMASAPIResponse response, OMRSCheckedExceptionBase e) { - response.setRelatedHTTPCode(e.getReportedHTTPCode()); - response.setExceptionClassName(e.getClass().getName()); - response.setExceptionErrorMessage(e.getReportedErrorMessage()); - response.setExceptionSystemAction(e.getReportedSystemAction()); - response.setExceptionUserAction(e.getReportedUserAction()); - } - - /** - * Capture the AssetCatalogException and set on the AssetCatalogOMASAPIResponse corresponding HTTP code - * - * @param response AssetCatalogOMASAPIResponse - * @param e AssetCatalogException exception - */ - public void captureAssetCatalogException(AssetCatalogOMASAPIResponse response, AssetCatalogException e) { - response.setRelatedHTTPCode(e.getReportedHTTPCode()); - response.setExceptionClassName(e.getClass().getName()); - response.setExceptionErrorMessage(e.getReportedErrorMessage()); - response.setExceptionSystemAction(e.getReportedSystemAction()); - response.setExceptionUserAction(e.getReportedUserAction()); - } - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/package-info.java deleted file mode 100644 index 9dcdfdd4672..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/util/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package offers utility classes like an exception handler used to capture OMRSCheckedExceptionBase and - * AssetCatalogException and a Constants class. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.util; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/AssetCatalogHandlerTest.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/AssetCatalogHandlerTest.java deleted file mode 100644 index 14b7cd65d57..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/AssetCatalogHandlerTest.java +++ /dev/null @@ -1,655 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.handlers; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.assetcatalog.converters.AssetCatalogConverter; -import org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogErrorCode; -import org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogException; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Classification; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.service.ClockService; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -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.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.GUID_PARAMETER; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.NAME; -import static org.odpi.openmetadata.accessservices.assetcatalog.util.Constants.SEARCH_STRING_PARAMETER_NAME; - -public class AssetCatalogHandlerTest { - - private static final String RELATIONSHIP_GUID = "212123-abc"; - private static final String ASSET_TYPE = "Asset"; - private static final String CLASSIFICATION_NAME = "Confidentiality"; - private static final Integer FROM = 0; - private static final Integer PAGE_SIZE = 10; - private static final String ASSET_TYPE_GUID = "ababa-12232-abc"; - private static final String SEARCH_CRITERIA = "employee"; - private static final String FIRST_GUID = "ababa-123-acbd"; - private static final String RELATIONSHIP_TYPE_GUID = "adadad-bcba-123"; - public static final String SERVER_NAME = "server"; - private final String USER = "test-user"; - private final String RELATIONSHIP_TYPE = "SemanticAssigment"; - private static final String PROCESS_TYPE = "Process"; - private static final String PROCESS_TYPE_GUID = "ProcessGUID"; - @Mock - private RepositoryHandler repositoryHandler; - - @Mock - private AssetHandler assetHandler; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private RepositoryErrorHandler errorHandler; - - @Mock - private AssetCatalogConverter assetCatalogConverter; - - @Mock - private ClockService clockService; - - @InjectMocks - private AssetCatalogHandler assetCatalogHandler; - - @InjectMocks - private CommonHandler commonHandler; - - @Before - public void before() { - MockitoAnnotations.openMocks(this); - } - - @Test - public void getEntityDetails() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntityDetails"; - - EntityDetail mockEntityDetail = mockEntityDetails(FIRST_GUID); - AssetCatalogBean assetCatalogBean = convertEntityToAssetCatalogBean(mockEntityDetail); - when(assetCatalogConverter.getAssetCatalogBean(mockEntityDetail)).thenReturn(assetCatalogBean); - AssetCatalogBean result = assetCatalogHandler.getEntityDetails(USER, FIRST_GUID, ASSET_TYPE); - - assertEquals(FIRST_GUID, result.getGuid()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(FIRST_GUID, GUID_PARAMETER, methodName); - } - - @Test - public void getEntityDetails_throwsInvalidParameterException() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntityDetails"; - mockEntityDetails(FIRST_GUID); - - doThrow(new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), this.getClass().getName(), "", "")) - .when(invalidParameterHandler).validateUserId(USER, methodName); - - assertThrows(InvalidParameterException.class, () -> assetCatalogHandler.getEntityDetails(USER, FIRST_GUID, ASSET_TYPE)); - } - - @Test - public void getRelationshipsByEntityGUID() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getRelationshipsByEntityGUID"; - - List relationshipsByType = Collections.singletonList(mockRelationship()); - - when(invalidParameterHandler.getMaxPagingSize()).thenReturn(500); - when(assetHandler.getAttachmentLinks(USER, FIRST_GUID, GUID_PARAMETER, - ASSET_TYPE, null, null, null, null, 0, - false, false, 0, 500, null, methodName)) - .thenReturn(relationshipsByType); - when(assetCatalogConverter.convertRelationships(relationshipsByType)). - thenReturn(convertRelationships(relationshipsByType)); - - List - result = assetCatalogHandler.getRelationshipsByEntityGUID(USER, FIRST_GUID, ASSET_TYPE); - - - assertEquals(relationshipsByType.get(0).getGUID(), result.get(0).getGuid()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(FIRST_GUID, GUID_PARAMETER, methodName); - } - - @Test - public void getRelationshipsByEntityGUID_throwsInvalidParameterException() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - - String methodName = "getRelationshipsByEntityGUID"; - - List relationshipsByType = Collections.singletonList(mockRelationship()); - - when(repositoryHandler.getRelationshipsByType(USER, - FIRST_GUID, - ASSET_TYPE, - null, - RELATIONSHIP_TYPE, - methodName)).thenReturn(relationshipsByType); - - doThrow(new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), "", "")) - .when(invalidParameterHandler).validateUserId(USER, methodName); - - assertThrows(InvalidParameterException.class, - () -> assetCatalogHandler.getRelationshipsByEntityGUID(USER, FIRST_GUID, ASSET_TYPE)); - - } - - @Test - public void getEntityClassificationByName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntityClassificationByName"; - - EntityDetail entityDetail = new EntityDetail(); - when(commonHandler - .getEntityByGUID(USER, FIRST_GUID, ASSET_TYPE)) - .thenReturn(entityDetail); - - entityDetail.setGUID(FIRST_GUID); - entityDetail.setType(mockType(ASSET_TYPE, ASSET_TYPE_GUID)); - List - classifications = mockClassifications(); - entityDetail.setClassifications(classifications); - entityDetail.setProperties(mockProperties()); - Classification classification = new Classification(); - classification.setName(CLASSIFICATION_NAME); - when(assetCatalogConverter.convertClassifications(classifications)).thenReturn(Collections.singletonList(classification)); - - List result = assetCatalogHandler - .getEntityClassificationByName(USER, FIRST_GUID, ASSET_TYPE, CLASSIFICATION_NAME); - - - assertEquals(CLASSIFICATION_NAME, result.get(0).getName()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(FIRST_GUID, GUID_PARAMETER, methodName); - } - - @Test - public void getEntityClassificationByName_throwsInvalidParameterException() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntityClassificationByName"; - - mockEntityDetails(FIRST_GUID); - - doThrow(new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), "", "")) - .when(invalidParameterHandler).validateUserId(USER, methodName); - - assertThrows(InvalidParameterException.class, - () -> assetCatalogHandler.getEntityClassificationByName(USER, FIRST_GUID, ASSET_TYPE, CLASSIFICATION_NAME)); - - } - - @Test - public void getRelationships() - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getRelationships"; - - mockPagedRelationships(methodName); - mockTypeDef(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - - List result = - assetCatalogHandler.getRelationships(USER, FIRST_GUID, ASSET_TYPE, RELATIONSHIP_TYPE, FROM, PAGE_SIZE); - - assertEquals(RELATIONSHIP_GUID, result.get(0).getGuid()); - assertEquals(RELATIONSHIP_TYPE, result.get(0).getType().getName()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(FIRST_GUID, GUID_PARAMETER, methodName); - } - - @Test - public void getRelationships_throwsInvalidParameterException() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "getRelationships"; - - mockPagedRelationships(methodName); - - doThrow(new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), "", "")) - .when(invalidParameterHandler).validateUserId(USER, methodName); - - assertThrows(InvalidParameterException.class, - () -> assetCatalogHandler.getRelationships(USER, FIRST_GUID, ASSET_TYPE, RELATIONSHIP_TYPE, FROM, PAGE_SIZE)); - - } - - @Test - public void getRelationships_throwsPropertyServerException() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "getRelationships"; - mockTypeDef(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - - doThrow(new PropertyServerException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(), - this.getClass().getName(), "")).when(assetHandler).getAttachmentLinks(USER, FIRST_GUID, GUID_PARAMETER, - ASSET_TYPE, RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE, null, null, 0, - false, false, FROM, PAGE_SIZE, null, methodName); - - assertThrows(PropertyServerException.class, - () -> assetCatalogHandler.getRelationships(USER, FIRST_GUID, ASSET_TYPE, RELATIONSHIP_TYPE, FROM, PAGE_SIZE)); - } - - @Test - public void getRelationships_throwsUserNotAuthorizedException() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "getRelationships"; - mockTypeDef(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - - doThrow(new UserNotAuthorizedException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(), - this.getClass().getName(), "", "")).when(assetHandler).getAttachmentLinks(USER, FIRST_GUID, GUID_PARAMETER, - ASSET_TYPE, RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE, null, null, 0, - false, false, FROM, PAGE_SIZE, null, methodName); - - assertThrows(UserNotAuthorizedException.class, - () -> assetCatalogHandler.getRelationships(USER, FIRST_GUID, ASSET_TYPE, RELATIONSHIP_TYPE, FROM, PAGE_SIZE)); - } - - @Test - public void getEntitiesFromNeighborhood() - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - EntityNotKnownException, FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, PropertyErrorException, AssetCatalogException, TypeErrorException { - - OMRSMetadataCollection metadataCollection = mockMetadataCollection(); - InstanceGraph instanceGraph = mockInstanceGraph(); - when(metadataCollection.getEntityNeighborhood(USER, - FIRST_GUID, - Collections.singletonList(ASSET_TYPE_GUID), - Collections.singletonList(RELATIONSHIP_TYPE_GUID), - Collections.singletonList(InstanceStatus.ACTIVE), - null, - null, - 1)) - .thenReturn(instanceGraph); - for(EntityDetail entityDetail : instanceGraph.getEntities()) { - AssetCatalogBean assetCatalogBean = convertEntityToAssetCatalogBean(entityDetail); - when(assetCatalogConverter.getAssetCatalogBean(entityDetail)).thenReturn(assetCatalogBean); - } - SearchParameters searchParams = mockSearchParams(); - mockTypeDef(ASSET_TYPE, ASSET_TYPE_GUID); - List result = assetCatalogHandler.getEntitiesFromNeighborhood(USER, FIRST_GUID, searchParams, SERVER_NAME); - - assertEquals(FIRST_GUID, result.get(0).getGuid()); - String methodName = "getEntitiesFromNeighborhood"; - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(FIRST_GUID, GUID_PARAMETER, methodName); - verify(invalidParameterHandler, times(1)).validateObject(searchParams, "searchParameter", methodName); - } - - private AssetCatalogBean convertEntityToAssetCatalogBean(EntityDetail entityDetail) { - AssetCatalogBean assetCatalogBean = new AssetCatalogBean(); - assetCatalogBean.setGuid(entityDetail.getGUID()); - assetCatalogBean.setType(convertInstanceType(entityDetail.getType())); - return assetCatalogBean; - } - - @Test - public void getEntitiesFromNeighborhood_throwsInvalidParameterException() throws InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException { - String methodName = "getEntitiesFromNeighborhood"; - - OMRSMetadataCollection metadataCollection = mockMetadataCollection(); - when(metadataCollection.getEntityNeighborhood(USER, - FIRST_GUID, - Collections.singletonList(ASSET_TYPE_GUID), - Collections.singletonList(RELATIONSHIP_TYPE_GUID), - Collections.singletonList(InstanceStatus.ACTIVE), - null, - null, - 1)) - .thenReturn(mockInstanceGraph()); - - SearchParameters searchParams = mockSearchParams(); - - doThrow(new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), "", "")) - .when(invalidParameterHandler).validateUserId(USER, methodName); - - assertThrows(InvalidParameterException.class, - () -> assetCatalogHandler.getEntitiesFromNeighborhood(USER, FIRST_GUID, searchParams, SERVER_NAME)); - } - - @Test - public void getEntitiesFromNeighborhood_throwsPropertyServerException() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, PropertyServerException { - - OMRSMetadataCollection metadataCollection = mockMetadataCollection(); - SearchParameters searchParams = mockSearchParams(); - mockTypeDef(ASSET_TYPE, ASSET_TYPE_GUID); - - String methodName = "getAssetNeighborhood"; - FunctionNotSupportedException mockedException = new FunctionNotSupportedException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), ""); - doThrow(mockedException).when(metadataCollection).getEntityNeighborhood(USER, - FIRST_GUID, - Collections.singletonList(ASSET_TYPE_GUID), - Collections.singletonList(RELATIONSHIP_TYPE_GUID), - Collections.singletonList(InstanceStatus.ACTIVE), - null, - null, - 1); - doThrow(PropertyServerException.class).when(errorHandler).handleRepositoryError(mockedException, methodName); - assertThrows(PropertyServerException.class, - () -> assetCatalogHandler.getEntitiesFromNeighborhood(USER, FIRST_GUID, searchParams, SERVER_NAME)); - - } - - @Test - public void getEntitiesFromNeighborhood_throwsUserNotAuthorizedException() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, UserNotAuthorizedException { - OMRSMetadataCollection metadataCollection = mockMetadataCollection(); - SearchParameters searchParams = mockSearchParams(); - String methodName = "getAssetNeighborhood"; - mockTypeDef(ASSET_TYPE, ASSET_TYPE_GUID); - - doThrow(new org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), "", "")).when(metadataCollection).getEntityNeighborhood(USER, - FIRST_GUID, - Collections.singletonList(ASSET_TYPE_GUID), - Collections.singletonList(RELATIONSHIP_TYPE_GUID), - Collections.singletonList(InstanceStatus.ACTIVE), - null, - null, - 1); - doThrow(new UserNotAuthorizedException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), "", "")).when(errorHandler).handleUnauthorizedUser(USER, methodName); - assertThrows(UserNotAuthorizedException.class, - () -> assetCatalogHandler.getEntitiesFromNeighborhood(USER, FIRST_GUID, searchParams, SERVER_NAME)); - } - - @Test - public void getEntitiesFromNeighborhood_throwsAssetNotFoundException() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException { - OMRSMetadataCollection metadataCollection = mockMetadataCollection(); - - mockTypeDef(ASSET_TYPE, ASSET_TYPE_GUID); - when(metadataCollection.getEntityNeighborhood(USER, - FIRST_GUID, - Collections.singletonList(ASSET_TYPE_GUID), - Collections.singletonList(RELATIONSHIP_TYPE_GUID), - Collections.singletonList(InstanceStatus.ACTIVE), - null, - null, - 1)) - .thenReturn(null); - - SearchParameters searchParams = mockSearchParams(); - - assertThrows(AssetCatalogException.class, - () -> assetCatalogHandler.getEntitiesFromNeighborhood(USER, FIRST_GUID, searchParams, SERVER_NAME)); - - } - - @Test - public void getTypeDefGUID() { - mockTypeDef(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - - String typeDefGUID = commonHandler.getTypeDefGUID(USER, RELATIONSHIP_TYPE); - assertEquals(RELATIONSHIP_TYPE_GUID, typeDefGUID); - } - - @Test - public void searchByType() throws InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException, PropertyServerException, UserNotAuthorizedException { - String methodName = "searchByType"; - SearchParameters searchParams = mockSearchParams(); - mockTypeDef(ASSET_TYPE, ASSET_TYPE_GUID); - mockSearchString(SEARCH_CRITERIA, searchParams.getCaseInsensitive()); - - List mockedEntities = mockEntities(); - when(assetHandler.getEntitiesByValue(USER, SEARCH_CRITERIA, - SEARCH_STRING_PARAMETER_NAME, ASSET_TYPE_GUID, ASSET_TYPE, Collections.singletonList(NAME), - searchParams.getExactMatch(), false, null, null, - false, false, null, - SequencingOrder.ANY.getName(), FROM, PAGE_SIZE, null, methodName)).thenReturn(mockedEntities); - - for(EntityDetail mockedEntity : mockedEntities) { - Elements mockedElements = getElementsFromEntity(mockedEntity); - when(assetCatalogConverter.buildAssetElements(mockedEntity)).thenReturn(mockedElements); - } - List elements = assetCatalogHandler.searchByType(USER, SEARCH_CRITERIA, searchParams); - assertEquals(2, elements.size()); - if (FIRST_GUID.equals(elements.get(0).getGuid())) - { - assertEquals(FIRST_GUID, elements.get(0).getGuid()); - assertEquals(ASSET_TYPE, elements.get(0).getType().getName()); - } - else - { - assertEquals(FIRST_GUID, elements.get(1).getGuid()); - assertEquals(ASSET_TYPE, elements.get(1).getType().getName()); - } - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validatePaging(searchParams.getFrom(), searchParams.getPageSize(), methodName); - verify(invalidParameterHandler, times(1)).validateObject(searchParams, "searchParameter", methodName); - } - - private Elements getElementsFromEntity(EntityDetail mockedEntity) { - if (mockedEntity == null) { - return null; - } - - Elements element = new Elements(); - element.setGuid(mockedEntity.getGUID()); - element.setType(convertInstanceType(mockedEntity.getType())); - - return element; - } - - private Type convertInstanceType(InstanceType instanceType) { - Type type = new Type(); - type.setName(instanceType.getTypeDefName()); - type.setVersion(instanceType.getTypeDefVersion()); - return type; - } - - @Test - public void searchByType_throwsInvalidParameterException() throws InvalidParameterException { - String methodName = "searchByType"; - SearchParameters searchParams = mockSearchParams(); - - doThrow(new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(), - this.getClass().getName(), "", "")) - .when(invalidParameterHandler).validateUserId(USER, methodName); - - assertThrows(InvalidParameterException.class, - () -> assetCatalogHandler.searchByType(USER, SEARCH_CRITERIA, searchParams)); - - } - - @Test - public void buildContextByType() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "buildContextByType"; - - EntityDetail mockedEntity = mockEntityDetails(FIRST_GUID); - mockTypeDef(ASSET_TYPE, ASSET_TYPE_GUID); - Elements mockedElements = getElementsFromEntity(mockedEntity); - when(assetCatalogConverter.buildAssetElements(mockedEntity)).thenReturn(mockedElements); - Elements elements = assetCatalogHandler.buildContextByType(USER, FIRST_GUID, ASSET_TYPE); - - assertEquals(FIRST_GUID, elements.getGuid()); - assertEquals(ASSET_TYPE, elements.getType().getName()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - } - - @Test - public void buildContextByType_throwsInvalidParameterException() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "buildContextByType"; - mockEntityDetails(FIRST_GUID); - mockTypeDef(ASSET_TYPE, ASSET_TYPE_GUID); - - doThrow(new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(SERVER_NAME), - this.getClass().getName(), "", "")) - .when(invalidParameterHandler).validateUserId(USER, methodName); - - assertThrows(InvalidParameterException.class, - () -> assetCatalogHandler.buildContextByType(USER, FIRST_GUID, ASSET_TYPE)); - } - - private SearchParameters mockSearchParams() { - SearchParameters searchParameters = new SearchParameters(); - searchParameters.setLevel(1); - searchParameters.setFrom(FROM); - searchParameters.setPageSize(PAGE_SIZE); - searchParameters.setRelationshipTypeGUIDs(Collections.singletonList(RELATIONSHIP_TYPE_GUID)); - searchParameters.setEntityTypes(Collections.singletonList(ASSET_TYPE)); - searchParameters.setCaseInsensitive(Boolean.FALSE); - return searchParameters; - } - - - private void mockPagedRelationships(String methodName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - List mockedRelationships = mockRelationships(); - when(assetHandler.getAttachmentLinks(USER, FIRST_GUID, GUID_PARAMETER, - ASSET_TYPE, RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE, null, null, 0, - false, false, FROM, PAGE_SIZE, null, methodName)).thenReturn(mockedRelationships); - - when(assetCatalogConverter.convertRelationships(mockedRelationships)). - thenReturn(convertRelationships(mockedRelationships)); - } - - private OMRSMetadataCollection mockMetadataCollection() throws RepositoryErrorException { - OMRSMetadataCollection metadataCollection = mock(OMRSMetadataCollection.class); - - when(repositoryHandler.getMetadataCollection()).thenReturn(metadataCollection); - - when(metadataCollection.getMetadataCollectionId(USER)).thenReturn("metadataCollectionID"); - when(repositoryHelper.getMetadataCollectionName("metadataCollectionID")).thenReturn("metadataCollectionName"); - return metadataCollection; - } - - private InstanceGraph mockInstanceGraph() { - InstanceGraph instanceGraph = new InstanceGraph(); - instanceGraph.setEntities(mockEntities()); - instanceGraph.setRelationships(mockRelationships()); - return instanceGraph; - } - - private List mockRelationships() { - return Collections.singletonList(mockRelationship()); - } - - private List mockEntities() { - List entityDetails = new ArrayList<>(); - - EntityDetail entityDetail = new EntityDetail(); - entityDetail.setGUID(FIRST_GUID); - entityDetail.setType(mockInstanceType(ASSET_TYPE, ASSET_TYPE_GUID)); - entityDetails.add(entityDetail); - - EntityDetail processEntityDetail = new EntityDetail(); - processEntityDetail.setType(mockInstanceType(PROCESS_TYPE, PROCESS_TYPE_GUID)); - entityDetails.add(processEntityDetail); - - return entityDetails; - } - - private EntityDetail mockEntityDetails(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - EntityDetail entityDetail = mock(EntityDetail.class); - when(commonHandler - .getEntityByGUID(USER, guid, ASSET_TYPE)) - .thenReturn(entityDetail); - - when(entityDetail.getGUID()).thenReturn(guid); - when(entityDetail.getType()).thenReturn(mockType(ASSET_TYPE, ASSET_TYPE_GUID)); - when(entityDetail.getClassifications()).thenReturn(mockClassifications()); - when(entityDetail.getProperties()).thenReturn(mockProperties()); - return entityDetail; - } - - private InstanceProperties mockProperties() { - return mock(InstanceProperties.class); - } - - private List mockClassifications() { - return Collections.singletonList(mockClassification()); - } - - private org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification mockClassification() { - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification classification = - new org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification(); - classification.setName(CLASSIFICATION_NAME); - return classification; - } - - private Relationship mockRelationship() { - Relationship relationship = new Relationship(); - relationship.setGUID(RELATIONSHIP_GUID); - InstanceType instanceType = mockInstanceType(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - relationship.setType(instanceType); - return relationship; - } - - private List convertRelationships( - List relationships) { - List result = new ArrayList<>(); - for (Relationship relationship : relationships) { - org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship convertedRelationship = - new org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship(); - convertedRelationship.setGuid(relationship.getGUID()); - convertedRelationship.setType(convertInstanceType(relationship.getType())); - result.add(convertedRelationship); - } - return result; - } - - private InstanceType mockInstanceType(String typeName, String typeGUID) { - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(typeName); - instanceType.setTypeDefGUID(typeGUID); - return instanceType; - } - - private InstanceType mockType(String typeName, String guid) { - InstanceType entityTypeDef = new InstanceType(); - entityTypeDef.setTypeDefGUID(guid); - entityTypeDef.setTypeDefName(typeName); - return entityTypeDef; - } - - private void mockTypeDef(String typeName, String typeGUID) { - TypeDef entityTypeDef = mock(TypeDef.class); - when(repositoryHelper.getTypeDefByName(USER, typeName)).thenReturn(entityTypeDef); - - when(entityTypeDef.getName()).thenReturn(typeName); - when(entityTypeDef.getGUID()).thenReturn(typeGUID); - TypeDefLink typeDefLink = mock(TypeDefLink.class); - when(typeDefLink.getName()).thenReturn("Referenceable"); - when(entityTypeDef.getSuperType()).thenReturn(typeDefLink); - } - - private void mockSearchString(String searchCriteria, boolean isCaseSensitive) { - when(repositoryHelper.getContainsRegex(searchCriteria, isCaseSensitive)).thenReturn(searchCriteria); - } - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/RelationshipHandlerTest.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/RelationshipHandlerTest.java deleted file mode 100644 index 68be2c3ada6..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/handlers/RelationshipHandlerTest.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.handlers; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogErrorCode; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.service.ClockService; -import org.odpi.openmetadata.accessservices.assetcatalog.util.Constants; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - - -public class RelationshipHandlerTest { - - private static final String RELATIONSHIP_GUID = "212123-abc"; - private static final String FIRST_GUID = "ababa-123-acbd"; - private static final String SECOND_GUID = "ababc-2134-2341f"; - private static final String RELATIONSHIP_TYPE_GUID = "adadad-bcba-123"; - public static final String SERVER_NAME = "server-name"; - private final String USER = "test-user"; - private final String RELATIONSHIP_TYPE = "SemanticAssigment"; - @Mock - private RepositoryHandler repositoryHandler; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private AssetHandler assetHandler; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - ClockService clockService; - - @InjectMocks - private RelationshipHandler relationshipHandler; - - @Before - public void before() { - MockitoAnnotations.openMocks(this); - } - - @Test - public void getRelationshipBetweenEntities() - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, RepositoryErrorException { - String methodName = "getRelationshipBetweenEntities"; - - Relationship mock = mockRelationship(); - mockTypeDef(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - mockMetadataCollection(); - - when(assetHandler.getUniqueAttachmentLink(USER, FIRST_GUID, - Constants.GUID_PARAMETER, "", RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE, SECOND_GUID, - "", 0, false, false, null, methodName)).thenReturn(mock); - - org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship - result = relationshipHandler.getRelationshipBetweenEntities(USER, SERVER_NAME, FIRST_GUID, SECOND_GUID, - RELATIONSHIP_TYPE); - - assertNotNull(result); - assertEquals(mock.getGUID(), result.getGuid()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(FIRST_GUID, "entity1GUID", methodName); - verify(invalidParameterHandler, times(1)).validateGUID(SECOND_GUID, "entity2GUID", methodName); - } - - @Test - public void getRelationshipBetweenEntities_throwsUserNotAuthorizedException() - throws PropertyServerException, UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException{ - String methodName = "getRelationshipBetweenEntities"; - mockTypeDef(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - mockMetadataCollection(); - - UserNotAuthorizedException mockedException = new UserNotAuthorizedException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(), this.getClass().getName(), "", ""); - doThrow(mockedException).when(assetHandler).getUniqueAttachmentLink(USER, FIRST_GUID, - Constants.GUID_PARAMETER, "", RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE, SECOND_GUID, - "", 0, false, false, null, methodName); - - assertThrows(UserNotAuthorizedException.class, () -> - relationshipHandler.getRelationshipBetweenEntities(USER, SERVER_NAME, FIRST_GUID, SECOND_GUID, RELATIONSHIP_TYPE)); - - } - - @Test - public void getRelationshipBetweenEntities_throwsInvalidParameterException() throws InvalidParameterException { - - String methodName = "getRelationshipBetweenEntities"; - mockTypeDef(RELATIONSHIP_TYPE, RELATIONSHIP_TYPE_GUID); - - InvalidParameterException mockedException = new InvalidParameterException(AssetCatalogErrorCode.SERVICE_NOT_INITIALIZED.getMessageDefinition(), this.getClass().getName(), "", ""); - - doThrow(mockedException).when(invalidParameterHandler).validateGUID(FIRST_GUID, "entity1GUID", methodName); - - assertThrows(InvalidParameterException.class, () -> - relationshipHandler.getRelationshipBetweenEntities(USER, SERVER_NAME, FIRST_GUID, SECOND_GUID, RELATIONSHIP_TYPE)); - - } - - private void mockTypeDef(String typeName, String typeGUID) { - TypeDef entityTypeDef = mock(TypeDef.class); - when(repositoryHelper.getTypeDefByName(USER, typeName)).thenReturn(entityTypeDef); - - when(entityTypeDef.getName()).thenReturn(typeName); - when(entityTypeDef.getGUID()).thenReturn(typeGUID); - } - - private Relationship mockRelationship() { - Relationship relationship = mock(Relationship.class); - when(relationship.getGUID()).thenReturn(RELATIONSHIP_GUID); - return relationship; - } - - private void mockMetadataCollection() throws RepositoryErrorException { - OMRSMetadataCollection metadataCollection = mock(OMRSMetadataCollection.class); - - when(repositoryHandler.getMetadataCollection()).thenReturn(metadataCollection); - - when(metadataCollection.getMetadataCollectionId(USER)).thenReturn("metadataCollectionID"); - when(repositoryHelper.getMetadataCollectionName("metadataCollectionID")).thenReturn("metadataCollectionName"); - } - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRelationshipServiceTest.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRelationshipServiceTest.java deleted file mode 100644 index 77e7b82c09b..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRelationshipServiceTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.service; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.assetcatalog.admin.AssetCatalogInstanceHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.RelationshipHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Element; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.springframework.util.ReflectionUtils; - -import java.lang.reflect.Field; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.when; - -public class AssetCatalogRelationshipServiceTest { - - private static final String FIRST_GUID = "ababa-123-acbd"; - private static final String SECOND_GUID = "ababc-2134-2341f"; - private final String USER = "test-user"; - private final String SERVER_NAME = "omas"; - private final String RELATIONSHIP_TYPE = "SemanticAssigment"; - @Mock - RESTExceptionHandler restExceptionHandler; - private Relationship response; - @Mock - private AssetCatalogInstanceHandler instanceHandler; - - @InjectMocks - private AssetCatalogRelationshipRESTService assetCatalogRelationshipService; - - @Mock - private RelationshipHandler relationshipHandler; - - - @Before - public void before() { - MockitoAnnotations.openMocks(this); - - Field instanceHandlerField = ReflectionUtils.findField(AssetCatalogRelationshipRESTService.class, "instanceHandler"); - instanceHandlerField.setAccessible(true); - ReflectionUtils.setField(instanceHandlerField, assetCatalogRelationshipService, instanceHandler); - instanceHandlerField.setAccessible(false); - - Field restExceptionHandlerField = ReflectionUtils.findField(AssetCatalogRelationshipRESTService.class, "restExceptionHandler"); - restExceptionHandlerField.setAccessible(true); - ReflectionUtils.setField(restExceptionHandlerField, assetCatalogRelationshipService, restExceptionHandler); - restExceptionHandlerField.setAccessible(false); - - response = mockRelationshipResponse(); - } - - - @Test - public void testGetRelationshipBetweenEntities() - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, RepositoryErrorException { - when(instanceHandler.getRelationshipHandler(USER, - SERVER_NAME, - "getRelationshipBetweenEntities")) - .thenReturn(relationshipHandler); - - - when(relationshipHandler - .getRelationshipBetweenEntities(USER, SERVER_NAME, FIRST_GUID, SECOND_GUID, RELATIONSHIP_TYPE)) - .thenReturn(response); - - RelationshipResponse relationshipBetweenEntities = assetCatalogRelationshipService.getRelationshipBetweenEntities(SERVER_NAME, - USER, - FIRST_GUID, - SECOND_GUID, - RELATIONSHIP_TYPE); - assertEquals(RELATIONSHIP_TYPE, relationshipBetweenEntities.getRelationship().getType().getName()); - assertEquals(response.getGuid(), relationshipBetweenEntities.getRelationship().getGuid()); - assertEquals(response.getFromEntity().getGuid(), relationshipBetweenEntities.getRelationship().getFromEntity().getGuid()); - assertEquals(response.getToEntity().getGuid(), relationshipBetweenEntities.getRelationship().getToEntity().getGuid()); - } - - private Relationship mockRelationshipResponse() { - Relationship relationshipsResponse = new Relationship(); - Type type = new Type(); - type.setName(RELATIONSHIP_TYPE); - relationshipsResponse.setType(type); - relationshipsResponse.setGuid("d1213-dabcf-dafc"); - relationshipsResponse.setFromEntity(mockElement(FIRST_GUID)); - relationshipsResponse.setToEntity(mockElement(SECOND_GUID)); - return relationshipsResponse; - } - - private Element mockElement(String guid) { - Element asset = new Element(); - asset.setGuid(guid); - return asset; - } - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogServiceTest.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogServiceTest.java deleted file mode 100644 index decc800a694..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-server/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogServiceTest.java +++ /dev/null @@ -1,279 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.service; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.assetcatalog.admin.AssetCatalogInstanceHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.AssetCatalogHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.handlers.CommonHandler; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Classification; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Element; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.ClassificationListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipListResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.util.ReflectionUtils; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.mockito.Mockito.when; - -public class AssetCatalogServiceTest { - - private static final String USER = "test-user"; - private static final String SERVER_NAME = "omas"; - private static final String FIRST_GUID = "ababa-123-acbd"; - private static final String ASSET_TYPE = "Process"; - private static final String SECOND_GUID = "ababc-2134-2341f"; - private static final String RELATIONSHIP_TYPE = "SemanticAssigment"; - private static final String RELATIONSHIP_TYPE_GUID = "adadad-bcba-123"; - private static final String CLASSIFICATION_NAME = "Confidentiality"; - private static final String SEARCH_CRITERIA = "employee"; - - @Mock - RESTExceptionHandler restExceptionHandler; - - @Mock - private AssetCatalogInstanceHandler instanceHandler; - - @InjectMocks - private AssetCatalogRESTService assetCatalogRESTService; - - @Mock - private AssetCatalogHandler assetCatalogHandler; - - @Mock - private CommonHandler commonHandler; - - @Before - public void before() { - MockitoAnnotations.openMocks(this); - - Field instanceHandlerField = ReflectionUtils.findField(AssetCatalogRESTService.class, "instanceHandler"); - if(instanceHandlerField != null) { - instanceHandlerField.setAccessible(true); - ReflectionUtils.setField(instanceHandlerField, assetCatalogRESTService, instanceHandler); - instanceHandlerField.setAccessible(false); - } - - Field restExceptionHandlerField = ReflectionUtils.findField(AssetCatalogRESTService.class, "restExceptionHandler"); - if(restExceptionHandlerField != null) { - restExceptionHandlerField.setAccessible(true); - ReflectionUtils.setField(restExceptionHandlerField, assetCatalogRESTService, restExceptionHandler); - restExceptionHandlerField.setAccessible(false); - } - } - - @Test - public void testGetAssetDetailsByGUID() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - AssetCatalogBean response = mockAssetDescription(FIRST_GUID); - - when(instanceHandler.getAssetCatalogHandler(USER, - SERVER_NAME, - "getAssetDetailsByGUID")) - .thenReturn(assetCatalogHandler); - - when(assetCatalogHandler - .getEntityDetails(USER, FIRST_GUID, ASSET_TYPE)) - .thenReturn(response); - - AssetCatalogResponse assetDetailsByGUID = assetCatalogRESTService.getAssetDetailsByGUID(SERVER_NAME, - USER, - FIRST_GUID, - ASSET_TYPE); - assertEquals(FIRST_GUID, assetDetailsByGUID.getAssetCatalogBean().getGuid()); - assertEquals(response.getGuid(), assetDetailsByGUID.getAssetCatalogBean().getGuid()); - assertEquals(response.getType().getName(), assetDetailsByGUID.getAssetCatalogBean().getType().getName()); - } - - @Test - public void testGetAssetUniverseByGUID() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - AssetCatalogBean response = mockAssetDescription(FIRST_GUID); - - when(instanceHandler.getAssetCatalogHandler(USER, - SERVER_NAME, - "getAssetUniverseByGUID")) - .thenReturn(assetCatalogHandler); - - when(assetCatalogHandler - .getEntityDetails(USER, FIRST_GUID, ASSET_TYPE)) - .thenReturn(response); - - AssetCatalogResponse assetDetailsByGUID = assetCatalogRESTService.getAssetUniverseByGUID(SERVER_NAME, - USER, - FIRST_GUID, - ASSET_TYPE); - assertEquals(FIRST_GUID, assetDetailsByGUID.getAssetCatalogBean().getGuid()); - assertEquals(response.getGuid(), assetDetailsByGUID.getAssetCatalogBean().getGuid()); - assertEquals(response.getType().getName(), assetDetailsByGUID.getAssetCatalogBean().getType().getName()); - assertNotNull(assetDetailsByGUID.getAssetCatalogBean().getRelationships()); - } - - - @Test - public void testGetAssetRelationships() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - List response = new ArrayList<>(); - response.add(mockRelationshipResponse()); - - when(instanceHandler.getAssetCatalogHandler(USER, - SERVER_NAME, - "getAssetRelationships")) - .thenReturn(assetCatalogHandler); - when(commonHandler - .getTypeDefGUID(USER, RELATIONSHIP_TYPE)) - .thenReturn(RELATIONSHIP_TYPE_GUID); - - when(assetCatalogHandler - .getRelationships(USER, FIRST_GUID, ASSET_TYPE, RELATIONSHIP_TYPE, 0, 10)) - .thenReturn(response); - - RelationshipListResponse assetRelationships = assetCatalogRESTService.getAssetRelationships(SERVER_NAME, - USER, - FIRST_GUID, - ASSET_TYPE, - RELATIONSHIP_TYPE, - 0, - 10); - - assertEquals(RELATIONSHIP_TYPE_GUID, assetRelationships.getRelationships().get(0).getGuid()); - assertEquals(response.get(0).getGuid(), assetRelationships.getRelationships().get(0).getGuid()); - assertEquals(response.get(0).getType().getName(), assetRelationships.getRelationships().get(0).getType().getName()); - } - - @Test - public void testGetClassificationByAssetGUID() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - List response = new ArrayList<>(); - response.add(mockClassification(CLASSIFICATION_NAME)); - - when(instanceHandler.getAssetCatalogHandler(USER, - SERVER_NAME, - "getClassificationByAssetGUID")) - .thenReturn(assetCatalogHandler); - - when(assetCatalogHandler - .getEntityClassificationByName(USER, FIRST_GUID, ASSET_TYPE, CLASSIFICATION_NAME)) - .thenReturn(response); - - ClassificationListResponse classificationByAssetGUID = assetCatalogRESTService.getClassificationByAssetGUID(SERVER_NAME, - USER, - FIRST_GUID, - ASSET_TYPE, - CLASSIFICATION_NAME); - - assertEquals(CLASSIFICATION_NAME, classificationByAssetGUID.getClassifications().get(0).getName()); - assertEquals(response.get(0).getName(), classificationByAssetGUID.getClassifications().get(0).getName()); - } - - @Test - public void testSearchByType() - throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase { - SearchParameters searchParameters = mockSearchParams(); - List response = new ArrayList<>(); - response.add(mockTerm(FIRST_GUID)); - - when(instanceHandler.getAssetCatalogHandler(USER, - SERVER_NAME, - "searchByType")) - .thenReturn(assetCatalogHandler); - - when(assetCatalogHandler - .searchByType(USER, SEARCH_CRITERIA, searchParameters)) - .thenReturn(response); - - AssetListResponse assetResponse = assetCatalogRESTService.searchByType(SERVER_NAME, - USER, - SEARCH_CRITERIA, - searchParameters); - - assertEquals(response.get(0).getGuid(), assetResponse.getElementsList().get(0).getGuid()); - } - - @Test - public void testBuildContext() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Elements response = mockTerm(FIRST_GUID); - - when(instanceHandler.getAssetCatalogHandler(USER, - SERVER_NAME, - "buildContext")) - .thenReturn(assetCatalogHandler); - - when(assetCatalogHandler - .buildContextByType(USER, FIRST_GUID, ASSET_TYPE)) - .thenReturn(response); - - AssetResponse assetResponse = assetCatalogRESTService.buildContext(SERVER_NAME, - USER, - FIRST_GUID, - ASSET_TYPE); - - assertEquals(response.getGuid(), assetResponse.getAsset().getGuid()); - } - - private Elements mockTerm(String guid) { - Elements elements = new Elements(); - elements.setGuid(guid); - return elements; - } - - private SearchParameters mockSearchParams() { - SearchParameters searchParameters = new SearchParameters(); - searchParameters.setPageSize(10); - searchParameters.setFrom(0); - return searchParameters; - } - - private Classification mockClassification(String classificationName) { - Classification classification = new Classification(); - classification.setName(classificationName); - return classification; - } - - private AssetCatalogBean mockAssetDescription(String guid) { - AssetCatalogBean assetCatalogBean = new AssetCatalogBean(); - assetCatalogBean.setGuid(guid); - Type type = new Type(); - type.setName(ASSET_TYPE); - assetCatalogBean.setType(type); - assetCatalogBean.setRelationships(Collections.singletonList(mockRelationshipResponse())); - return assetCatalogBean; - } - - private Relationship mockRelationshipResponse() { - Relationship relationshipsResponse = new Relationship(); - - Type type = new Type(); - type.setName(RELATIONSHIP_TYPE); - relationshipsResponse.setType(type); - relationshipsResponse.setGuid(RELATIONSHIP_TYPE_GUID); - relationshipsResponse.setFromEntity(mockElement(FIRST_GUID)); - relationshipsResponse.setToEntity(mockElement(SECOND_GUID)); - return relationshipsResponse; - } - - private Element mockElement(String guid) { - Element asset = new Element(); - asset.setGuid(guid); - return asset; - } - -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/README.md b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/README.md deleted file mode 100644 index 6daf99cbcf3..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/README.md +++ /dev/null @@ -1,17 +0,0 @@ - - - - -# Asset Catalog Open Metadata Access Service (OMAS) with Spring - -The Asset Catalog OMAS spring module uses Spring Framework to create the -server-side support for the REST services. -There are the following Spring resources defined: - -* AssetCatalogEntityResource - facilitates the searching for assets, provides details about specific assets, build the context for schema element/glossary term/assets based on its identifier - -* AssetCatalogRelationshipResource - supports the services that retrieve the details about a specific relationship. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/build.gradle b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/build.gradle deleted file mode 100644 index 75937798dd9..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - implementation project(':open-metadata-implementation:access-services:asset-catalog:omas-asset-catalog-server') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation 'org.springframework:spring-web' - implementation 'org.springframework:spring-core' - implementation 'jakarta.validation:jakarta.validation-api:' - implementation 'io.swagger.core.v3:swagger-annotations' - testImplementation 'org.mockito:mockito-core' - testImplementation 'org.mockito:mockito-junit-jupiter' - testImplementation 'org.junit.jupiter:junit-jupiter-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'com.google.code.findbugs:jsr305' - - -} - -description = 'Asset Catalog OMAS with Spring' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResource.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResource.java deleted file mode 100644 index 19e9fa27eb0..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResource.java +++ /dev/null @@ -1,251 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.PositiveOrZero; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.*; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.service.AssetCatalogRESTService; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - - -/** - * The AssetCatalogEntityResource provides the server-side implementation of the - * Asset Catalog Open Metadata Assess Service (OMAS). - * This interface facilitates the searching for assets, provides details about specific assets. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/asset-catalog/users/{userId}") - -@Tag(name="Metadata Access Server: Asset Catalog OMAS", description="The Asset Catalog OMAS provides services to search for data assets including data stores, event feeds, APIs, data sets.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omas/asset-catalog/overview/")) -@Deprecated -public class AssetCatalogEntityResource { - - private final AssetCatalogRESTService assetService = new AssetCatalogRESTService(); - - /** - * Fetch asset's header, classification and properties - * - * @param serverName unique identifier for requested server - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the type of the asset - * @return the asset with its header and the list of associated classifications and specific properties - */ - @GetMapping(path = "/asset-details/{assetGUID}", produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getAssetDetail", description = "Returns the asset", - externalDocs = @ExternalDocumentation(description = "Asset", url = "https://egeria-project.org/concepts/asset")) - public AssetCatalogResponse getAssetDetail(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("assetGUID") @NotBlank String assetGUID, - @RequestParam(name = "assetType", required = false) @NotNull String assetType) { - return assetService.getAssetDetailsByGUID(serverName, userId, assetGUID, assetType); - } - - /** - * Fetch asset's header, classification, properties and relationships - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the asset type - * @return the asset with its header and the list of associated classifications and relationship - */ - @GetMapping(path = "/asset-universe/{assetGUID}", produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getAssetUniverse", description = "Returns the asset universe, which means the asset details and the relationships it has", - externalDocs = @ExternalDocumentation(description = "Metadata Relationships", - url = "https://egeria-project.org/patterns/metadata-manager/categories-of-metadata/?h=relationships#metadata-relationships-and-classifications")) - public AssetCatalogResponse getAssetUniverse(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("assetGUID") @NotBlank String assetGUID, - @RequestParam(name = "assetType", required = false) @NotNull String assetType) { - return assetService.getAssetUniverseByGUID(serverName, userId, assetGUID, assetType); - } - - /** - * Fetch the relationships for a specific asset - * - * @param serverName unique identifier for requested server - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the type of the asset - * @param relationshipType the type of the relationship - * @param from offset - * @param pageSize limit the number of the assets returned - * @return list of relationships for the given asset - */ - @GetMapping(path = "/asset-relationships/{assetGUID}", produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getAssetRelationships", description = "Returns the asset relationships", - externalDocs = @ExternalDocumentation(description = "Metadata Relationships", - url = "https://egeria-project.org/patterns/metadata-manager/categories-of-metadata/?h=relationships#metadata-relationships-and-classifications")) - public RelationshipListResponse getAssetRelationships(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("assetGUID") @NotBlank String assetGUID, - @RequestParam(name = "assetType", required = false) String assetType, - @RequestParam(name = "relationshipType", required = false) String relationshipType, - @RequestParam(name = "from", required = false, defaultValue = "0") @PositiveOrZero Integer from, - @RequestParam(name = "pageSize", required = false, defaultValue = "100") @PositiveOrZero Integer pageSize) { - return assetService.getAssetRelationships(serverName, userId, assetGUID, assetType, relationshipType, from, pageSize); - } - - /** - * Fetch the classification for a specific asset - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param assetGUID the unique identifier for the asset - * @param assetType the type of the asset - * @param classificationName the name of the classification - * @return ClassificationsResponse the classification for the asset - */ - @GetMapping(path = "/asset-classifications/{assetGUID}", - produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getClassificationsForAsset", description = "Returns the classifications that exists on the asset", - externalDocs = @ExternalDocumentation(description = "Metadata Classifications", - url = "https://egeria-project.org/patterns/metadata-manager/categories-of-metadata/?h=relationships#metadata-relationships-and-classifications")) - public ClassificationListResponse getClassificationsForAsset(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("assetGUID") @NotBlank String assetGUID, - @RequestParam(name = "assetType", required = false) String assetType, - @RequestParam(name = "classificationName", required = false) String classificationName) { - return assetService.getClassificationByAssetGUID(serverName, userId, assetGUID, assetType, classificationName); - } - - /** - * Return a list of assets matching the search criteria without the full context - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param searchCriteria a string expression of the characteristics of the required assets - * @param searchParameters constrains to make the assets' search results more precise - * @return list of found assets - */ - - @PostMapping(path = "/search", produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "searchByType", description = "Returns a list of assets based on the given search criteria", - externalDocs = @ExternalDocumentation(description = "Search by type Javadoc", - url = "https://odpi.github.io/egeria/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRESTService.html#searchByType(java.lang.String,java.lang.String,java.lang.String,org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters)")) - public AssetListResponse searchByType(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestParam("searchCriteria") @NotBlank String searchCriteria, - @RequestBody SearchParameters searchParameters) { - return assetService.searchByType(serverName, userId, searchCriteria, searchParameters); - } - - /** - * Return a list of assets by asset type name without any additional search criteria - * The list includes also subtypes - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param typeName the assets type name to search for - * @return list of assets by type name - */ - @GetMapping(path = "/assets-by-type-name/{typeName}", - produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getAssetsByTypeName", description = "Returns a list of assets based on the given search criteria, using the type name", - externalDocs = @ExternalDocumentation(description = "Search by type name Javadoc", - url = "https://odpi.github.io/egeria/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRESTService.html#searchByTypeName(java.lang.String,java.lang.String,java.lang.String)")) - public AssetListResponse getAssetsByTypeName(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("typeName") @NotBlank String typeName) { - return assetService.searchByTypeName(serverName, userId, typeName); - } - - /** - * Return a list of assets by asset type GUID without any additional search criteria - * The list includes also subtypes - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param typeGUID the assets type GUID to search for - * @return list of assets by type GUID - */ - @GetMapping(path = "/assets-by-type-guid/{typeGUID}", - produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getAssetsByTypeGUID", description = "Returns a list of assets based on the given search criteria, using the type GUID", - externalDocs = @ExternalDocumentation(description = "Search by type GUID Javadoc", - url = "https://odpi.github.io/egeria/org/odpi/openmetadata/accessservices/assetcatalog/service/AssetCatalogRESTService.html#searchByTypeGUID(java.lang.String,java.lang.String,java.lang.String)")) - - public AssetListResponse getAssetsByTypeGUID(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("typeGUID") @NotBlank String typeGUID) { - return assetService.searchByTypeGUID(serverName, userId, typeGUID); - } - - /** - * Return the full context of an asset/glossary term based on its identifier. - * The response contains the list of the connections assigned to the asset. - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param assetGUID the global unique identifier of the asset - * @param assetType the type of the asset - * @return list of properties used to narrow the search - */ - @GetMapping(path = "/asset-context/{assetGUID}", - produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getAssetContext", description = "Returns the entities that are attached to the given one", - externalDocs = @ExternalDocumentation(description = "Get attached entities Javadoc", - url = "https://odpi.github.io/egeria/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.html#getAttachedFilteredEntities(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,java.lang.String,boolean,java.util.Set,java.lang.String,int,boolean,boolean,int,boolean,boolean,java.util.Date,java.lang.String)")) - public AssetResponse getAssetContext(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("assetGUID") @NotBlank String assetGUID, - @RequestParam(name = "assetType", required = false) String assetType) { - return assetService.buildContext(serverName, userId, assetGUID, assetType); - } - - /** - * Returns the list with supported types for search, including the sub-types supported - * - * @param serverName unique identifier for requested server - * @param userId the unique identifier for the user - * @param type the type - * @return list of types and sub-types supported for search - */ - @GetMapping(path = "/supportedTypes", - produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getSupportedTypes", description = "Returns the Open Metadata Types that are supported by the Asset Catalog OMAS", - externalDocs = @ExternalDocumentation(description = "The open metadata type system", - url = "https://egeria-project.org/types/")) - public AssetCatalogSupportedTypes getSupportedTypes(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestParam(name = "type", required = false) @Nullable String type) { - return assetService.getSupportedTypes(serverName, userId, type); - } - - /** - * Returns the out topic connection. - * - * @param serverName the server name - * @param userId the user id - * @param callerId the caller id - * @return the out topic connection - */ - @GetMapping(path = "/topics/out-topic-connection/{callerId}", - produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getOutTopicConnection", description = "Returns the OutTopic connection", - externalDocs = @ExternalDocumentation(description = "OMAS OutTopic", - url = "https://egeria-project.org/concepts/out-topic/")) - public ConnectionResponse getOutTopicConnection(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("callerId") String callerId) { - return assetService.getOutTopicConnection(serverName, userId, callerId); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogRelationshipResource.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogRelationshipResource.java deleted file mode 100644 index d23373bd3e1..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogRelationshipResource.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.service.AssetCatalogRelationshipRESTService; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -/** - * The AssetCatalogRelationshipResource provides the server-side implementation of the Asset Catalog Open Metadata - * Assess Service (OMAS). This interface facilitates the searching for asset's relationships, fetch the details about a specific relationship. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/asset-catalog/users/{userId}") - -@Tag(name="Metadata Access Server: Asset Catalog OMAS", description="The Asset Catalog OMAS provides services to search for data assets including data stores, event feeds, APIs, data sets.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omas/asset-catalog/overview/")) -@Deprecated -public class AssetCatalogRelationshipResource { - - private final AssetCatalogRelationshipRESTService relationshipService = new AssetCatalogRelationshipRESTService(); - - /** - * Fetch relationship between entities details based on its unique identifier of the ends - * - * @param serverName unique identifier for requested server. - * @param userId String unique identifier for the user - * @param entity1GUID Entity guid of the first end of the relationship - * @param entity2GUID Entity guid of the second end of the relationship - * @param relationshipType Type of the relationship - * @return relationships between entities - */ - @GetMapping(path = "/relationship-between-entities/{entity1GUID}/{entity2GUID}", - produces = org.springframework.http.MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "getRelationshipBetweenEntities", description = "Returns the relationships between the 2 given entities", - externalDocs = @ExternalDocumentation(description = "Metadata Relationships", - url = "https://egeria-project.org/patterns/metadata-manager/categories-of-metadata/?h=relationships#metadata-relationships-and-classifications")) - public RelationshipResponse getRelationshipBetweenEntities(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("entity1GUID") String entity1GUID, - @PathVariable("entity2GUID") String entity2GUID, - @RequestParam(name = "relationshipType", required = false) String relationshipType) { - return relationshipService.getRelationshipBetweenEntities(serverName, userId, entity1GUID, entity2GUID, relationshipType); - } -} diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/package-info.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/package-info.java deleted file mode 100644 index 3802ed54fc7..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the controllers for getting details about assets and relationships through Asset Catalog OMAS. - */ -package org.odpi.openmetadata.accessservices.assetcatalog.server.spring; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResourceTest.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResourceTest.java deleted file mode 100644 index bb7e1156339..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResourceTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.server.spring; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.accessservices.assetcatalog.service.AssetCatalogRESTService; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class AssetCatalogEntityResourceTest { - - private static final String USER = "user"; - private static final String SERVER_NAME = "serverName"; - private static final String ASSET_GUID = "b1c497ce.60641b50.0v9mgsb1m.9vbkmkr"; - private static final String ASSET_TYPE = "GlossaryTerm"; - private static final String SEMANTIC_ASSIGMENT = "SemanticAssigment"; - private static final Integer FROM = 0; - private static final Integer PAGE_SIZE = 10; - private static final String CONFIDENTIALITY = "Confidentiality"; - - @Mock - private AssetCatalogRESTService assetCatalogService; - - @InjectMocks - private AssetCatalogEntityResource assetCatalogEntityResource; - - @Test - void testGetAssetDetails() { - assetCatalogEntityResource.getAssetDetail(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE); - - verify(assetCatalogService, times(1)).getAssetDetailsByGUID(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE); - } - - @Test - void testGetAssetRelationships() { - assetCatalogEntityResource.getAssetRelationships(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE, SEMANTIC_ASSIGMENT, FROM, PAGE_SIZE); - - verify(assetCatalogService, times(1)).getAssetRelationships(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE, SEMANTIC_ASSIGMENT, FROM, PAGE_SIZE); - } - - @Test - void testGetAssetContext() { - assetCatalogEntityResource.getAssetContext(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE); - - verify(assetCatalogService, times(1)).buildContext(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE); - } - - @Test - void testGetClassificationsForAsset() { - assetCatalogEntityResource.getClassificationsForAsset(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE, CONFIDENTIALITY); - - verify(assetCatalogService, times(1)).getClassificationByAssetGUID(SERVER_NAME, USER, ASSET_GUID, ASSET_TYPE, CONFIDENTIALITY); - } - - @Test - void testSearchAssetsAndGlossaryTerms() { - SearchParameters searchParameters = mockSearchParameters(); - assetCatalogEntityResource.searchByType(SERVER_NAME, USER, "employee", searchParameters); - - verify(assetCatalogService, times(1)).searchByType(SERVER_NAME, USER, "employee", searchParameters); - } - - private SearchParameters mockSearchParameters() { - SearchParameters searchParameters = new SearchParameters(); - searchParameters.setFrom(FROM); - searchParameters.setPageSize(PAGE_SIZE); - searchParameters.setSequencingOrder(SequencingOrder.LAST_UPDATE_RECENT); - searchParameters.setLevel(1); - return searchParameters; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogRelationshipResourceTest.java b/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogRelationshipResourceTest.java deleted file mode 100644 index 5a5a0525769..00000000000 --- a/open-metadata-implementation/access-services/asset-catalog/omas-asset-catalog-spring/src/test/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogRelationshipResourceTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetcatalog.server.spring; - - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.assetcatalog.service.AssetCatalogRelationshipRESTService; - -import static org.mockito.Mockito.atLeastOnce; -import static org.mockito.Mockito.verify; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class AssetCatalogRelationshipResourceTest { - - private static final String USER = "user"; - private static final String SERVER_NAME = "serverName"; - private static final String FIST_END_GUID = "b1c497ce.60641b50.0v9mgsb1m.9vbkmkr"; - private static final String SECOND_END_GUID = "6662c0f2.e1b1ec6c.00263shmd.6u8o50l.dhhet6.5a7eo9o6q9j8vikjs6ds4"; - private static final String RELATIONSHIP_TYPE_NAME = "SemanticAssignment"; - - @Mock - private AssetCatalogRelationshipRESTService assetCatalogRelationshipService; - - @InjectMocks - private AssetCatalogRelationshipResource assetCatalogRelationshipResource; - - @Test - void testGetRelationshipBetweenEntities() { - assetCatalogRelationshipResource.getRelationshipBetweenEntities(SERVER_NAME, USER, - FIST_END_GUID, - SECOND_END_GUID, - RELATIONSHIP_TYPE_NAME); - - verify(assetCatalogRelationshipService, atLeastOnce()).getRelationshipBetweenEntities(SERVER_NAME, - USER, - FIST_END_GUID, - SECOND_END_GUID, - RELATIONSHIP_TYPE_NAME); - - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/README.md b/open-metadata-implementation/access-services/data-engine/README.md deleted file mode 100644 index 79bb05f0ca7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/README.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -![InDev](../../../images/egeria-content-status-in-development.png#pagewidth) - -# Data Engine Open Metadata Access Service (OMAS) - -The Data Engine OMAS provides APIs and events for data movement/processing engines to record the changes made to the data landscape. - -It provides the ability to register the data engine itself along with the lineage details of the ETL transformations. -Data Engine OMAS APIs offer support for creating the corresponding open metadata types for assets and jobs. - -* [Documentation](https://egeria-project.org/services/omas/data-engine/overview) - -## Design Information - -The module structure for the Data Engine OMAS is as follows: - -* [data-engine-api](data-engine-api) supports the common Java classes that are used both by the client and the server. -This includes the Java API, beans and REST API structures. -* [data-engine-client](data-engine-client) supports the Java client library that allows applications and tools to call the remote REST APIs. -* [data-engine-server](data-engine-server) supports the server side implementation of the access service. - This includes the - * interaction with the [administration services](../../admin-services) for - registration, configuration, initialization and termination of the access service. - * interaction with the [repository services](../../repository-services) to work with open metadata from the - [cohort](https://egeria-project.org/concepts/cohort-member). - * support for the access service's API and its related event management. -* [data-engine-spring](data-engine-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - -## Digging Deeper - -* [User Documentation](docs/user) -* [Design Documentation](docs/design) - - ----- -Return to the [access-services](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/README.md b/open-metadata-implementation/access-services/data-engine/data-engine-api/README.md deleted file mode 100644 index f830993ffb2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Data Engine Open Metadata Access Service (OMAS) API - - - -The Data Engine OMAS supports a REST API for requests for creating ETL jobs metadata. -The Data Engine OMAS API provides the shared Java classes between the -server and client. - - - ----- -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/data-engine/data-engine-api/build.gradle b/open-metadata-implementation/access-services/data-engine/data-engine-api/build.gradle deleted file mode 100644 index 1d0415664b3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id "io.freefair.lombok" -} - -dependencies { - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') -} - -description = 'Data Engine OMAS API' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineEventHeader.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineEventHeader.java deleted file mode 100644 index b5e2bb7736b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineEventHeader.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataEngineEventHeader provides a common base for all events from the Data Engine access service. - * It implements Serializable and a version Id. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = DataEngineRegistrationEvent.class, name = "DataEngineRegistrationEvent"), - @JsonSubTypes.Type(value = DataFlowsEvent.class, name = "DataFlowsEvent"), - @JsonSubTypes.Type(value = PortImplementationEvent.class, name = "PortImplementationEvent"), - @JsonSubTypes.Type(value = ProcessEvent.class, name = "ProcessEvent"), - @JsonSubTypes.Type(value = ProcessListEvent.class, name = "ProcessListEvent"), - @JsonSubTypes.Type(value = SchemaTypeEvent.class, name = "SchemaTypeEvent"), - @JsonSubTypes.Type(value = ProcessHierarchyEvent.class, name = "ProcessHierarchyEvent"), - @JsonSubTypes.Type(value = DeleteEvent.class, name = "DeleteEvent"), - @JsonSubTypes.Type(value = DatabaseEvent.class, name = "DatabaseEvent"), - @JsonSubTypes.Type(value = DatabaseSchemaEvent.class, name = "DatabaseSchemaEvent"), - @JsonSubTypes.Type(value = RelationalTableEvent.class, name = "RelationalTableEvent"), - @JsonSubTypes.Type(value = DataFileEvent.class, name = "DataFileEvent"), - @JsonSubTypes.Type(value = TopicEvent.class, name = "TopicEvent"), - @JsonSubTypes.Type(value = EventTypeEvent.class, name = "EventTypeEvent"), - @JsonSubTypes.Type(value = ProcessingStateEvent.class, name = "ProcessingStateEvent") -}) -@Getter -@Setter -@EqualsAndHashCode -@ToString -@NoArgsConstructor -public abstract class DataEngineEventHeader implements Serializable { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /* different data engine event types */ - /** - * The Data Engine event type - * -- GETTER -- - * Gets the Data Engine event type - * @return the Data Engine event type - * -- SETTER -- - * Sets the Data Engine event type - * @param dataEngineEventType the Data Engine event type - */ - private DataEngineEventType dataEngineEventType; - - /** - * The external source type unique name - * -- GETTER -- - * Gets the external source type unique name - * @return the external source type unique name - * -- SETTER -- - * Sets the external source type unique name - * @param externalSourceName the external source type unique name - */ - private String externalSourceName; - - /** - * Producer user ID - * -- GETTER -- - * Gets user ID - * @return the user ID - * -- SETTER -- - * Sets the user ID - * @param userId the user ID - */ - private String userId; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineEventType.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineEventType.java deleted file mode 100644 index 24ecc34d0e6..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineEventType.java +++ /dev/null @@ -1,105 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataEngineEventType describes the different types of events can be consumed by the Data Engine OMAS. - * Events are limited to assets that are in the zones listed in the supportedZones property - * passed to the Data Engine OMAS at start up (a null value here means all zones). - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -@Getter -public enum DataEngineEventType implements Serializable { - - UNKNOWN_DATA_ENGINE_EVENT(0, "Unknown Data Engine Job Event", "An event that is not recognized by the local server."), - DATA_ENGINE_REGISTRATION_EVENT(1, "DataEngineRegistrationEvent", "An event that register a data engine as external source."), - DATA_FLOWS_EVENT(2, "DataFlowsEvent", "An event that adds or update data flows."), - PORT_IMPLEMENTATION_EVENT(4, "PortImplementationEvent", "An event that creates or updates port implementations."), - SCHEMA_TYPE_EVENT(5, "SchemaTypeEvent", "An event that creates or updates schema types."), - PROCESS_HIERARCHY_EVENT(6, "ProcessHierarchyEvent", "An event to setup a process hierarchy."), - DELETE_DATA_ENGINE_EVENT(7, "DeleteDataEngineEvent", "An event that deletes an external data engine."), - DELETE_SCHEMA_TYPE_EVENT(8, "DeleteSchemaTypeEvent", "An event that deletes a schema type."), - DELETE_PORT_IMPLEMENTATION_EVENT(9, "DeletePortImplementationEvent", "An event that deletes a port implementation."), - DATABASE_EVENT(11, "DatabaseEvent", "An event that creates or updates databases."), - DATABASE_SCHEMA_EVENT(12, "DatabaseSchemaEvent", "An event that creates or updates database schemas."), - RELATIONAL_TABLE_EVENT(13, "RelationalTableEvent", "An event that creates or updates relational tables."), - DATA_FILE_EVENT(14, "DataFileEvent", "An event that creates or updates data files."), - DELETE_DATABASE_EVENT(15, "DeleteDatabaseEvent", "An event that deletes a database."), - DELETE_DATABASE_SCHEMA_EVENT(16, "DeleteDatabaseSchemaEvent", "An event that deletes a database schema."), - DELETE_RELATIONAL_TABLE_EVENT(17, "DeleteRelationalTableEvent", "An event that deletes a relational table."), - DELETE_DATA_FILE_EVENT(18, "DeleteDataFileEvent", "An event that deletes a data file."), - DELETE_FOLDER_EVENT(19, "DeleteFolderEvent", "An event that deletes a folder."), - DELETE_CONNECTION_EVENT(20, "DeleteConnectionEvent", "An event that deletes a connection."), - DELETE_ENDPOINT_EVENT(21, "DeleteEndpointEvent", "An event that deletes an endpoint."), - PROCESS_EVENT(22, "ProcessEvent", "An event that creates or updates a process."), - DELETE_PROCESS_EVENT(23, "DeleteProcessEvent", "An event that deletes a process."), - TOPIC_EVENT(24, "TopicEvent", "An event that creates or updates topics."), - EVENT_TYPE_EVENT(25, "EventTypeEvent", "An event that creates or updates event types."), - DELETE_TOPIC_EVENT(26, "DeleteTopicEvent", "An event that deletes a topic."), - DELETE_EVENT_TYPE_EVENT(27, "DeleteEventTypeEvent", "An event that deletes an event type."), - PROCESSING_STATE_TYPE_EVENT(28, "ProcessingStateEvent", "An event that creates or updates the processing state classification of an engine."); - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The int identifier used for indexing based on the enum - * -- GETTER -- - * Return the int identifier used for indexing based on the enum. - * - * @return eventTypeCode identifier code - */ - private final int eventTypeCode; - - /** - * The string name used for messages that include the enum - * -- GETTER -- - * Return the string name used for messages that include the enum. - * - * @return event type name - */ - private final String eventTypeName; - - /** - * The default description for the enum value - used when natural resource - * -- GETTER -- - * Return the default description for the enum value - used when natural resource - * bundle is not available. - * - * @return default description - */ - private final String eventTypeDescription; - - /** - * Sets up the specific values for this instance of the enum. - * - * @param eventTypeCode int identifier used for indexing based on the enum. - * @param eventTypeName string name used for messages that include the enum. - * @param eventTypeDescription default description for the enum value - used when natural resource - * bundle is not available. - */ - DataEngineEventType(int eventTypeCode, String eventTypeName, String eventTypeDescription) { - this.eventTypeCode = eventTypeCode; - this.eventTypeName = eventTypeName; - this.eventTypeDescription = eventTypeDescription; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineRegistrationEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineRegistrationEvent.java deleted file mode 100644 index 57be0d3dc69..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataEngineRegistrationEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The Data engine registration event for registering external source as engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class DataEngineRegistrationEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * Engine - * -- GETTER -- - * Gets the engine - * @return the engine - * -- SETTER -- - * Sets the engine - * @param engine the engine - */ - private Engine engine; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataFileEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataFileEvent.java deleted file mode 100644 index 27cfa40320d..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataFileEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The data file event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DataFileEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The data file to be created - * -- GETTER -- - * Return the data file bean - * - * @return the data file - * -- SETTER -- - * Set up the data file bean - * @param dataFile the data file - */ - @JsonProperty("file") - private DataFile dataFile; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataFlowsEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataFlowsEvent.java deleted file mode 100644 index fb5913881be..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DataFlowsEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The Data Flows event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class DataFlowsEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The data flows - * -- GETTER -- - * Return the data flows - * @return the data flows - * -- SETTER -- - * Set up the data flows - * @param dataFlows the data flows - */ - private List dataFlows; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DatabaseEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DatabaseEvent.java deleted file mode 100644 index 730e5e271d3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DatabaseEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The database schema event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DatabaseEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - - /** - * The database to be created - * -- GETTER -- - * Return the database bean - * - * @return the database - * -- SETTER -- - * Set up the database bean - * @param database the database - */ - private Database database; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DatabaseSchemaEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DatabaseSchemaEvent.java deleted file mode 100644 index bf1d0887b32..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DatabaseSchemaEvent.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The database schema event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DatabaseSchemaEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The database schema to be created - * -- GETTER -- - * Return the database schema bean - * - * @return the database schema - * -- SETTER -- - * Set up the database schema bean - * @param databaseSchema the database schema - */ - private DatabaseSchema databaseSchema; - - /** - * The database qualified name to which the database schema will be linked, if it exists - * -- GETTER -- - * Return the database qualified name to which the database schema will be linked, if it exists - * - * @return the database qualified name - * -- SETTER -- - * Set up the database qualified name to which the database schema will be linked, if it exists - * @param databaseQualifiedName the database qualified name - */ - private String databaseQualifiedName; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DeleteEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DeleteEvent.java deleted file mode 100644 index c0e8d3394a9..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/DeleteEvent.java +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The delete event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DeleteEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The qualified name of the entity - * -- GETTER -- - * Return the entity qualified name - * @return String - qualified name of the entity - * -- SETTER -- - * Set up the qualified name of the entity - * @param qualifiedName of the entity - */ - private String qualifiedName; - - /** - * The unique identifier of the entity - * -- GETTER -- - * Return the entity unique identifier - * @return String - unique identifier of the entity - * -- SETTER -- - * Set up the unique identifier of the entity - * @param guid of the entity - */ - private String guid; - - /** - * The delete semantic - * -- GETTER -- - * Return the delete semantic - * @return String - unique identifier of the entity - * -- SETTER -- - * Set up the delete semantic - * @param deleteSemantic of the entity - */ - private DeleteSemantic deleteSemantic = DeleteSemantic.SOFT; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/EventTypeEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/EventTypeEvent.java deleted file mode 100644 index 8027d7f6860..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/EventTypeEvent.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The event type event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class EventTypeEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The event type to be created - * -- GETTER -- - * Return the event type bean - * - * @return the event type - * -- SETTER -- - * Set up the event type bean - * @param eventType the event type - */ - private EventType eventType; - - /** - * The topic qualified name to which the event type will be linked - * -- GETTER -- - * Return the topic qualified name to which the event type will be linked - * - * @return the topic qualified name - * -- SETTER -- - * Set up the topic qualified name to which the event type will be linked - * @param topicQualifiedName the topic qualified name - */ - private String topicQualifiedName; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/FindEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/FindEvent.java deleted file mode 100644 index a558d0d88bf..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/FindEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The data file event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class FindEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The find request body - * -- GETTER -- - * Return the find request body - * - * @return the find request body - * -- SETTER -- - * Set up the find request body - * @param findRequestBody the find request body - */ - @JsonProperty("findRequestBody") - private FindRequestBody findRequestBody; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/PortImplementationEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/PortImplementationEvent.java deleted file mode 100644 index 8668f1c2fec..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/PortImplementationEvent.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The port implementation event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class PortImplementationEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The process qualified name - * -- GETTER -- - * Returns the process qualified name - * @return the process qualified name - * -- SETTER -- - * Sets up the process qualified name - * @param processQualifiedName the process qualified name - */ - private String processQualifiedName; - - /** - * The port implementation - * -- GETTER -- - * Returns the port implementation - * @return the port implementation - * -- SETTER -- - * Sets up the port implementation - * @param portImplementation the port implementation - */ - private PortImplementation portImplementation; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessEvent.java deleted file mode 100644 index ac4be65a58e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The processes event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class ProcessEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The process - * -- GETTER -- - * Returns the process - * - * @return the process - * -- SETTER -- - * Sets up the process - * @param process the process - */ - private Process process; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessHierarchyEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessHierarchyEvent.java deleted file mode 100644 index 8cc152c5547..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessHierarchyEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The process hierarchy event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class ProcessHierarchyEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The process hierarchy - * -- GETTER -- - * Returns the process hierarchy - * @return the process hierarchy - * -- SETTER -- - * Sets up the process hierarchy - * @param processHierarchy the process hierarchy - */ - private ProcessHierarchy processHierarchy; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessListEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessListEvent.java deleted file mode 100644 index 84d04b564c8..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessListEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The process list event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class ProcessListEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The failed GUIDs - * -- GETTER -- - * Returns the failed GUIDs - * @return the failed GUIDs - * -- SETTER -- - * Sets up the failed GUIDs - * @param failedGUIDs the failed GUIDs - */ - private List failedGUIDs; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessingStateEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessingStateEvent.java deleted file mode 100644 index e37c1e63793..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/ProcessingStateEvent.java +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * The processing state event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class ProcessingStateEvent extends DataEngineEventHeader { - - /** - * Serial version ID - * -- GETTER -- - * Gets the serial version ID - * @return the serial version ID - * -- SETTER -- - * Sets the serial version ID - * @param serialVersionUID the serial version ID - */ - private static final long serialVersionUID = 1L; - - /** - * The processing state. - * -- GETTER -- - * Return the processing state - * - * @return processing state - * -- SETTER -- - * Set up the processing state - * @param processingState processing state - */ - private ProcessingState processingState; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/RelationalTableEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/RelationalTableEvent.java deleted file mode 100644 index ce3f9a95faa..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/RelationalTableEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The relational table event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class RelationalTableEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The relational table to be created - * -- GETTER -- - * Return the relational table bean - * - * @return the relational table - * -- SETTER -- - * Set up the relational table bean - * @param relationalTable the relational table - */ - @JsonProperty("table") - private RelationalTable relationalTable; - - /** - * The qualified name of the database schema - * -- GETTER -- - * Return the database schema qualified name - * - * @return String - qualified name of the database schema - * -- SETTER -- - * Set up the qualified name of the database schema - * @param databaseSchemaQualifiedName of the database schema - */ - private String databaseSchemaQualifiedName; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/SchemaTypeEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/SchemaTypeEvent.java deleted file mode 100644 index 8967a8d19c6..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/SchemaTypeEvent.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The Schema type event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class SchemaTypeEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The port qualified name - * -- GETTER -- - * Returns the port qualified name - * @return the port qualified name - * -- SETTER -- - * Sets up the port qualified name - * @param portQualifiedName the port qualified name - */ - private String portQualifiedName; - - /** - * The schema type - * -- GETTER -- - * Returns the schema type - * @return the schema type - * -- SETTER -- - * Sets up the schema type - * @param schemaType the schema type - */ - @JsonProperty("schema") - private SchemaType schemaType; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/TopicEvent.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/TopicEvent.java deleted file mode 100644 index a470c47fa23..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/TopicEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.event; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The topic event of Data Engine OMAS. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class TopicEvent extends DataEngineEventHeader { - - /** - * Serial version UID - * -- GETTER -- - * Gets the serial version UID - * @return the serial version UID - * -- SETTER -- - * Sets the serial version UID - * @param serialVersionUID the serial version UID - */ - private static final long serialVersionUID = 1L; - - /** - * The topic to be created - * -- GETTER -- - * Return the topic bean - * - * @return the topic - * -- SETTER -- - * Set up the topic bean - * @param topic the topic - */ - private Topic topic; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/package-info.java deleted file mode 100644 index 7a86164fac3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/event/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * Definitions of the different types of events that the Data Engine OMAS can consume. - */ -package org.odpi.openmetadata.accessservices.dataengine.event; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/DataEngineAuditCode.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/DataEngineAuditCode.java deleted file mode 100644 index 4dd9c542d13..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/DataEngineAuditCode.java +++ /dev/null @@ -1,142 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.ffdc; - -import lombok.Getter; -import lombok.ToString; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - -/** - * The DataEngineAuditCode 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
  • - *
- */ -@ToString -public enum DataEngineAuditCode { - /** - * OMAS-DATA-ENGINE-0001 The Data Engine Open Metadata Access Service (OMAS) is initializing a new server instance - */ - SERVICE_INITIALIZING("OMAS-DATA-ENGINE-0001", - OMRSAuditLogRecordSeverity.STARTUP, - "The Data Engine Open Metadata Access Service (OMAS) is initializing a new server instance", - "The local server has started up a new instance of the Data Engine OMAS.", - Constants.NO_ACTION_IS_REQUIRED), - - /** - * OMAS-DATA-ENGINE-0002 The Data Engine Open Metadata Access Service (OMAS) has initialized a new instance for server - */ - SERVICE_INITIALIZED("OMAS-DATA-ENGINE-0002", - OMRSAuditLogRecordSeverity.STARTUP, - "The Data Engine Open Metadata Access Service (OMAS) has initialized a new instance for server {0}", - "The Data Engine OMAS has completed initialization of a new instance.", - Constants.NO_ACTION_IS_REQUIRED), - - /** - * OMAS-DATA-ENGINE-0003 The Data Engine Open Metadata Access Service (OMAS) is shutting down its instance for server - */ - SERVICE_SHUTDOWN("OMAS-DATA-ENGINE-0003", - OMRSAuditLogRecordSeverity.SHUTDOWN, - "The Data Engine Open Metadata Access Service (OMAS) is shutting down its instance for server {0}", - "The local server has requested shut down of an Data Engine OMAS instance.", - Constants.NO_ACTION_IS_REQUIRED), - /** - * OMAS-DATA-ENGINE-0004 The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance - */ - SERVICE_INSTANCE_FAILURE("OMAS-DATA-ENGINE-0004", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance; error " + - "message is {0}", - "The access service detected an error during the start up of a specific server instance. " + - "Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. " + - " Once this is resolved, restart the server."), - /** - * OMAS-DATA-ENGINE-0005 The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance - */ - ERROR_INITIALIZING_TOPIC_CONNECTION("OMAS-DATA-ENGINE-0005", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance; error " + - "message is {0}", - "The access service detected an error during the start up of a specific server instance. " + - "Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. " + - " Once this is resolved, restart the server."), - /** - * OMAS-DATA-ENGINE-0006 The Data Engine Open Metadata Access Service (OMAS) is unable to process an event on its in topic - */ - PROCESS_EVENT_EXCEPTION("OMAS- DATA-ENGINE-0006", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The Data Engine Open Metadata Access Service (OMAS) is unable to process an event on its in topic {0}; exception {1} returned " + - "error message: {2}", - "The access service detected an error during the start up of the out topic. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Check the status of the event " + - "bus. Once this is resolved, restart the server."), - /** - * OMAS-DATA-ENGINE-0007 The Data Engine Open Metadata Access Service (OMAS) is unable to parse an event - */ - PARSE_EVENT_EXCEPTION("OMAS- DATA-ENGINE-0007", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The data engine event {0} could not be parsed. Error: {1}", - "The system is unable to process the event.", - "Verify the topic configuration or the event schema."), - /** - * OMAS-DATA-ENGINE-0008 The Data Engine Open Metadata Access Service (OMAS) client has sent an event - */ - IN_TOPIC_EVENT_SENT("OMAS-DATA-ENGINE-0008", - OMRSAuditLogRecordSeverity.EVENT, - "The Data Engine Open Metadata Access Service (OMAS) client has sent event of type: {0}", - "The access service client sends out event notification produced by external source like data engine system.", - "This event contains external metadata changes that need to be processed by the access service."); - - /** - * A message definition object for logging - * -- GETTER -- - * Retrieves a message definition object for logging. This method is used when there are no message inserts. - * - * @return message definition object - */ - private final AuditLogMessageDefinition messageDefinition; - - /** - * The constructor for DataEngineAuditCode expects to be passed one of the enumeration rows defined in - * DataEngineAuditCode above. For example: - *

- * DataEngineAuditCode auditCode = DataEngineAuditCode.SERVICE_INITIALIZING; - *

- * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique identifier 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 - */ - DataEngineAuditCode(String messageId, OMRSAuditLogRecordSeverity severity, String message, String systemAction, - String userAction) { - messageDefinition = new AuditLogMessageDefinition(messageId, severity, message, 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. - */ - public AuditLogMessageDefinition getMessageDefinition(String... params) { - messageDefinition.setMessageParameters(params); - return messageDefinition; - } - - private static class Constants { - public static final String NO_ACTION_IS_REQUIRED = "No action is required. This is part of the normal operation of the service."; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/DataEngineErrorCode.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/DataEngineErrorCode.java deleted file mode 100644 index 9d1a8521417..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/DataEngineErrorCode.java +++ /dev/null @@ -1,188 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.ffdc; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - -/** - * The DataEngineErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with - * the Data Engine OMAS 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:
  • - *
    • - *
    • 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 DataEngineErrorCode implements ExceptionMessageSet -{ - /** - * OMAS-DATA-ENGINE-404-001 The open metadata repository services are not initialized for server {0} - */ - OMRS_NOT_INITIALIZED(404, "OMAS-DATA-ENGINE-404-001 ", - "The open metadata repository services are not initialized for server {0}", - "The system is unable to connect to the open metadata property server.", - "Check that the server initialized correctly. " + - "Correct any errors discovered and retry the request when the open metadata services are available."), - /** - * OMAS-DATA-ENGINE-400-001 Referenceable with qualifiedName {0} was not found - */ - REFERENCEABLE_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-001", - "Referenceable with qualifiedName {0} was not found", - "The system is unable to create a new DataFlow relation.", - "Correct the code in the caller to provide the correct referenceable qualified name."), - /** - * OMAS-DATA-ENGINE-400-002 Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize - */ - NULL_TOPIC_CONNECTOR(400, "OMAS-DATA-ENGINE-400-002", - "Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize", - "The local server will not connect to the cohort.", - "The connection to the connector is configured in the server configuration. " + - "Review previous error messages to determine the precise error in the " + - "start up configuration. " + - "Correct the configuration and reconnect the server to the cohort. "), - /** - * OMAS-DATA-ENGINE-400-003 Process with qualifiedName {0} was not found - */ - PROCESS_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-003", - "Process with qualifiedName {0} was not found", - "The system is unable to create a new ProcessHierarchy relation.", - "Correct the code in the caller to provide the correct port qualified name."), - /** - * OMAS-DATA-ENGINE-400-004 Database Schema with qualifiedName {0} was not found - */ - DATABASE_SCHEMA_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-004", - "Database Schema with qualifiedName {0} was not found", - "The system is unable to create a new table attached to a database schema", - "Correct the code in the caller to provide the correct database schema qualified name."), - /** - * OMAS-DATA-ENGINE-500-001 An unexpected exception occurred when sending an event through connector {0} to the Data Engine OMAS out topic - */ - UNABLE_TO_SEND_EVENT(500, "OMAS-DATA-ENGINE-500-001", - "An unexpected exception occurred when sending an event through connector {0} to the Data Engine OMAS out topic. The failing " + - "event was {1}, the exception was {2} with message {2}", - "The system has issued a call to an open metadata access service input topic using event message broker", - "Look for errors in the remote server's audit log and console to understand and correct the source of the error."), - /** - * OMAS-DATA-ENGINE-400-005 Entity with qualifiedName {0} was not deleted - */ - ENTITY_NOT_DELETED(400, "OMAS-DATA-ENGINE-400-005", - "Entity with qualifiedName {0} was not deleted", - "The system is unable to delete the entity with the provided qualifiedName or guid.", - "Correct the code in the caller to provide the correct database qualified name."), - - /** - * OMAS-DATA-ENGINE-500-002 Method {0} is not implemented - */ - METHOD_NOT_IMPLEMENTED(501, "OMAS-DATA-ENGINE-500-002", - "Method {0} is not implemented", - "The system performs no action as the method is not implemented.", - "No action suggested."), - /** - * OMAS-DATA-ENGINE-400-006 Topic with qualifiedName {0} was not found - */ - TOPIC_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-006", - "Topic with qualifiedName {0} was not found", - "The system is unable to create a new event type attached to a topic", - "Correct the code in the caller to provide the correct topic qualified name."), - /** - * OMAS-DATA-ENGINE-400-007 Engine with qualifiedName {0} was not found - */ - ENGINE_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-007", - "Engine with qualifiedName {0} was not found", - "The system is unable to find the searched Engine", - "Correct the code in the caller to provide the correct Engine qualified name."); - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - DataEngineErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/package-info.java deleted file mode 100644 index 42dfc7d7b1f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/ffdc/package-info.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * This package provides the first failure data capture support for the Data Engine OMAS module. - * This includes an error code enum and an audit code enum. - */ -package org.odpi.openmetadata.accessservices.dataengine.ffdc; - -/* - This package provides the first failure data capture support for the Data Engine OMAS module. - This includes an error code enum and an audit code enum. - - The error code enum (DataEngineErrorCode) has an entry for each unique situation - where an exception is returned. Each entry defines: - -
    -
  • A unique id for the error
  • -
  • An HTTP error code for rest calls
  • -
  • A unique message Id
  • -
  • Message text with place holders for specific values
  • -
  • A description of the cause of the error and system action as a result.
  • -
  • A description of how to correct the error (if known)
  • -
- - Each exception (whether a checked or runtime exception) has two constructors. - The first constructor is used when a new error has been detected. - The second constructor is used when another exception has been caught. - This caught exception is passed on the constructor so it is effectively - embedded in the OMAS exception. - - Both constructors take the values from the error code enum to define the cause and resolution. - */ \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Asset.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Asset.java deleted file mode 100644 index 561531945a7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Asset.java +++ /dev/null @@ -1,125 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Asset is a java bean used to create assets associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Asset extends Referenceable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The stored display name property for the asset - * -- SETTER -- - * Sets up the stored display name property for the asset. - * @param displayName name - * -- GETTER -- - * Returns the stored display name property for the asset. - * If no display name is available then null is returned. - * @return name - */ - private String displayName; - - /** - * The stored description property associated with the asset - * -- SETTER -- - * Set up the stored description property associated with the asset. - * @param description String text - * -- GETTER -- - * Returns the stored description property for the asset. - * If no description is provided then null is returned. - * @return description - */ - private String description; - /** - * The name of the owner for this asset - * -- SETTER -- - * Set up the name of the owner for this asset. - * @param owner String name - * -- GETTER -- - * Returns the name of the owner for this asset. - * @return owner - */ - private String owner; - - /** - * The owner type for this asset - * -- SETTER -- - * Set up the owner type for this asset. - * @param ownerType AssetOwnerType enum - * -- GETTER -- - * Return the type of owner stored in the owner property. - * @return owner type - */ - private OwnerType ownerType; - - /** - * The names of the zones that this asset is a member of - * -- SETTER-- - * Set up the names of the zones that this asset is a member of. - * @param zoneMembership list of zone names - * -- GETTER -- - * Return the names of the zones that this asset is a member of. - * @return list of zone names - */ - private List zoneMembership; - - /** - * The unique identifier for the organization that originated this asset - * -- SETTER -- - * Set up the unique identifier for the organization that originated this asset. - * @param originOrganizationGUID string guid - * -- GETTER -- - * Return the unique identifier for the organization that originated this asset. - * @return string guid - */ - private String originOrganizationGUID; - - /** - * The unique identifier of the business capability that originated this asset - * -- SETTER -- - * Set up the unique identifier of the business capability that originated this asset. - * @param originBusinessCapabilityGUID string guid - * -- GETTER -- - * Return the unique identifier of the business capability that originated this asset. - * @return string guid - */ - private String originBusinessCapabilityGUID; - - /** - * The properties that characterize where this asset is from - * -- SETTER -- - * Set up the properties that characterize where this asset is from. - * @param otherOriginValues map of name value pairs, all strings - * -- GETTER -- - * Return the properties that characterize where this asset is from. - * @return map of name value pairs, all strings - */ - private Map otherOriginValues; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Attribute.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Attribute.java deleted file mode 100644 index 93b709ddd2b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Attribute.java +++ /dev/null @@ -1,286 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Attribute is a java bean used to create schema attributes associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Attribute extends Referenceable { - - /** - * The simple name of the schema element - * -- GETTER -- - * Return the simple name of the schema element. - * @return displayName string name - * -- SETTER -- - * Set up the simple name of the schema element. - * @param displayName String display name - */ - private String displayName; - - /** - * The stored description property for the schema element - * -- GETTER -- - * Returns the stored description property for the schema element. - * @return description string description - * -- SETTER -- - * Set up the stored description property for the schema element. - * @param description string description - */ - private String description; - - /** - * Indicates if the schema element is deprecated - * -- GETTER -- - * Returns true if the schema element deprecated - * @return isDeprecated boolean flag - * -- SETTER -- - * Set whether the schema element deprecated or not. Default is false. - * @param isDeprecated boolean flag - */ - private boolean isDeprecated; - - /** - * The position of this schema attribute in its parent schema - * -- GETTER -- - * Return the position of this schema attribute in its parent schema. - * @return position int position in schema - 0 means first - * -- SETTER -- - * Set up the position of this schema attribute in its parent schema. - * @param position int position in schema - 0 means first - */ - private int position; - - /** - * This minimum number of instances allowed for this attribute - * -- GETTER -- - * Return this minimum number of instances allowed for this attribute. - * @return minCardinality int - * -- SETTER -- - * Set up the minimum number of instances allowed for this attribute. - * @param minCardinality int - */ - private int minCardinality; - - /** - * The maximum number of instances allowed for this attribute - * -- GETTER -- - * Return the maximum number of instances allowed for this attribute. - * @return maxCardinality int (-1 means infinite) - * -- SETTER -- - * Set up the maximum number of instances allowed for this attribute. - * @param maxCardinality int (-1 means infinite) - */ - private int maxCardinality; - - /** - * Indicates whether the same value can be used by more than one instance of this attribute - * -- GETTER -- - * Return whether the same value can be used by more than one instance of this attribute. - * @return allowsDuplicateValues boolean flag - * -- SETTER -- - * Set up whether the same value can be used by more than one instance of this attribute. - * @param allowsDuplicateValues boolean flag - */ - private boolean allowsDuplicateValues; - - /** - * Indicates whether the attribute instances are arranged in an order - * -- GETTER -- - * Return whether the attribute instances are arranged in an order. - * @return orderedValues boolean flag - * -- SETTER -- - * Set up whether the attribute instances are arranged in an order. - * @param orderedValues boolean flag - */ - private boolean orderedValues; - - /** - * Default value override - * -- GETTER -- - * Return any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * @return String default value override - * -- SETTER -- - * Set up any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * @param defaultValueOverride String default value override - */ - private String defaultValueOverride; - - /** - * The order that the attribute instances are arranged in - * -- GETTER -- - * Return the order that the attribute instances are arranged in - if any. - * @return DataItemSortOrder enum - * -- SETTER -- - * Set up the order that the attribute instances are arranged in - if any. - * @param sortOrder DataItemSortOrder enum - */ - private DataItemSortOrder sortOrder; - - /** - * The minimum length of the data - * -- GETTER -- - * Return the minimum length of the data. - * @return int - * -- SETTER -- - * Set up the minimum length of the data. - * @param minimumLength int - */ - private int minimumLength; - - /** - * The length of the data field - * -- GETTER -- - * Return the length of the data field. - * @return int - * -- SETTER -- - * Set up the length of the data field. - * @param length int - */ - private int length; - - /** - * The number of significant digits to the right of decimal point - * -- GETTER -- - * Return the number of significant digits to the right of decimal point. - * @return int - * -- SETTER -- - * Set up the number of significant digits to the right of decimal point. - * @param precision int - */ - private int precision; - - /** - * Indicates whether the field is nullable or not - * -- GETTER -- - * Return whether the field is nullable or not. - * @return boolean - * -- SETTER -- - * Set up whether the field is nullable or not. - * @param isNullable boolean - */ - private boolean isNullable; - - /** - * The name of the Java class to use to represent this type - * -- GETTER -- - * Return the name of the Java class to use to represent this type. - * @return fully qualified Java class name - * -- SETTER -- - * Set up the name of the Java class to use to represent this type. - * @param nativeClass fully qualified Java class name - */ - private String nativeClass; - - /** - * A list of alternative names for the attribute - * -- GETTER -- - * Return a list of alternative names for the attribute. - * @return list of names - * -- SETTER -- - * Set up a list of alternative names for the attribute. - * @param aliases list of names - */ - private List aliases; - - /** - * The data type for this element - * -- GETTER -- - * Return the data type for this element. Null means unknown data type. - * @return string data type name - * -- SETTER -- - * Set up the data type for this element. Null means unknown data type. - * @param dataType data type name - */ - private String dataType; - - /** - * The default value for the element - * -- GETTER -- - * Return the default value for the element. Null means no default value set up. - * @return string containing default value - * -- SETTER -- - * Set up the default value for the element. Null means no default value set up. - * @param defaultValue String containing default value - */ - private String defaultValue; - - /** - * A fixed literal value - an alternative to default value - * -- GETTER -- - * Return a fixed literal value - an alternative to default value. - * @return string value - * -- SETTER -- - * If the column contains a fixed literal value, set this value here - an alternative to default value. - * @param fixedValue string - */ - private String fixedValue; - - /** - * The unique identifier of this column's type - * -- GETTER -- - * Return the unique identifier of this column's type. - * @return unique identifier (guid) of the external schema type - * -- SETTER -- - * If the type of this column is represented by an external (standard type) put its value here. No need to set - * dataType, FixedType or defaultType - * @param externalTypeGUID unique identifier (guid) of the external schema type - */ - private String externalTypeGUID; - - /** - * The set of valid values for this column - * -- GETTER -- - * Return the set of valid values for this column. - * @return unique identifier (guid) of the valid values set - * -- SETTER -- - * If the type is controlled by a fixed set of values, set up the unique identifier of the valid values set - * that lists the valid values. - * @param validValuesSetGUID unique identifier (guid) of the valid values set - */ - private String validValuesSetGUID; - - /** - * The name of the type for this schema element - * -- GETTER -- - * Return name of the type of this schema element - * @return name of the type - * -- SETTER -- - * Set the name of the type for this schema element - * @param typeName the name of the type of data - */ - private String typeName; - - /** - * Unique identifier of the type for this schema element - * -- GETTER -- - * Return identifier of the type of this schema element - * @return identifier of the type for this schema element - * -- SETTER -- - * Set the value for the type identifier - * @param typeGuid unique identifier (guid) of the schema element - */ - private String typeGuid; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/CSVFile.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/CSVFile.java deleted file mode 100644 index de0b96b1ab4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/CSVFile.java +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CSVFile is a java bean used to create CSVFiles associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class CSVFile extends DataFile { - - /** - * The delimited character - * -- GETTER -- - * Get delimited character - * @return delimiter character - * -- SETTER -- - * Set delimited character - * @param delimiterCharacter delimiter character - */ - protected String delimiterCharacter; - - /** - * The quote character - * -- GETTER -- - * Get quote character - * @return quote character - * -- SETTER -- - * Set quote character - * @param quoteCharacter quote character - */ - protected String quoteCharacter; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Collection.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Collection.java deleted file mode 100644 index 75329a80eb0..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Collection.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Collection is a java bean used to create collections associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NONE) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Collection extends Referenceable { - - /** - * The name of the collection - * -- GETTER -- - * Return the name of the collection. - * - * @return name string name - * -- SETTER -- - * Set up the name of the collection. - * @param name String name - */ - private String name; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Connection.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Connection.java deleted file mode 100644 index 27839fe008a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Connection.java +++ /dev/null @@ -1,139 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * Connection is a java bean used to create connections associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Connection extends Referenceable { - - /** - * The clear password - * -- GETTER -- - * Get clear password - * @return clear password - * -- SETTER -- - * Set clear password - * @param clearPassword clear password - */ - private String clearPassword; - - /** - * The configuration properties - * -- GETTER -- - * Get configuration properties - * @return configuration properties - * -- SETTER -- - * Set configuration properties - * @param configurationProperties configuration properties - */ - private Map configurationProperties; - - /** - * The description - * -- GETTER -- - * Get description - * @return description - * -- SETTER -- - * Set description - * @param description description - */ - private String description; - - /** - * The display name - * -- GETTER -- - * Get display name - * @return display name - * -- SETTER -- - * Set display name - * @param displayName display name - */ - private String displayName; - - /** - * The encrypted password - * -- GETTER -- - * Get encrypted password - * @return encrypted password - * -- SETTER -- - * Set encrypted password - * @param encryptedPassword encrypted password - */ - private String encryptedPassword; - - /** - * The secured properties - * -- GETTER -- - * Get secured properties - * @return secured properties - * -- SETTER -- - * Set secured properties - * @param securedProperties secured properties - */ - private Map securedProperties; - - /** - * The user id - * -- GETTER -- - * Get user id - * @return user id - * -- SETTER -- - * Set user id - * @param userId user ID - */ - private String userId; - - /** - * The connector type - * -- GETTER -- - * Get connector type - * @return connector type - * -- SETTER -- - * Set connector type - * @param connectorType connector type - */ - private ConnectorType connectorType; - - /** - * The endpoint - * -- GETTER -- - * Get endpoint - * @return endpoint - * -- SETTER -- - * Set endpoint - * @param endpoint the endpoint - */ - private Endpoint endpoint; - - /** - * The asset summary - * -- GETTER -- - * Get asset summary - * @return asset summary - * -- SETTER -- - * Set asset summary - * @param assetSummary the asset summary - */ - private String assetSummary; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ConnectorType.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ConnectorType.java deleted file mode 100644 index a10f86e0a98..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ConnectorType.java +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * ConnectorType is a java bean used to create connector types associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class ConnectorType extends Referenceable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * --SETTER-- - * Set up the display name for UIs and reports. - * @param displayName String name - * --GETTER-- - * Returns the stored display name property for the connector type. - * If no display name is available then null is returned. - * @return displayName - */ - private String displayName; - - /** - * --SETTER-- - * Set up description of the element. - * @param description String - * --GETTER-- - * Returns the stored description property for the connector type. - * If no description is available then null is returned. - * @return description - */ - private String description; - - /** - * --SETTER-- - * Set up the type of asset that the connector implementation supports. - * @param supportedAssetTypeName string name - * --GETTER-- - * Return the type of asset that the connector implementation supports. - * @return string name - */ - private String supportedAssetTypeName; - - /** - * --SETTER-- - * Set up the format of the data that the connector supports - null for "any". - * @param expectedDataFormat string name - * --GETTER-- - * Return the format of the data that the connector supports - null for "any". - * @return string name - */ - private String expectedDataFormat; - - /** - * --SETTER-- - * The name of the connector provider class name. - * @param connectorProviderClassName String class name - * --GETTER-- - * Returns the stored connectorProviderClassName property for the connector type. - * If no connectorProviderClassName is available then null is returned. - * @return connectorProviderClassName class name (including package name) - */ - private String connectorProviderClassName; - - /** - * --SETTER-- - * Set up name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * @param connectorFrameworkName string name - * --GETTER-- - * Return name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * @return string name - */ - private String connectorFrameworkName; - - /** - * --SETTER-- - * Set up the language that the connector is implemented in - default Java. - * @param connectorInterfaceLanguage string name - * --GETTER-- - * Return the language that the connector is implemented in - default Java. - * @return string name - */ - private String connectorInterfaceLanguage; - - /** - * --SETTER-- - * Set up list of interfaces that the connector supports. - * @param connectorInterfaces list of names - * --GETTER-- - * Return list of interfaces that the connector supports. - * @return list of names - */ - private List connectorInterfaces; - - /** - * --SETTER-- - * Set up the name of the organization that supplies the target technology that the connector implementation connects to. - * @param targetTechnologySource list of names - * --GETTER-- - * Return the name of the organization that supplies the target technology that the connector implementation connects to. - * @return string name - */ - private String targetTechnologySource; - - /** - * --SETTER-- - * Set up the name of the target technology that the connector implementation connects to. - * @param targetTechnologyName string name - * --GETTER-- - * Return the name of the target technology that the connector implementation connects to. - * @return string name - */ - private String targetTechnologyName; - - /** - * --SETTER-- - * Set up the names of the interfaces in the target technology that the connector calls. - * @param targetTechnologyInterfaces list of interface names - * --GETTER-- - * Return the names of the interfaces in the target technology that the connector calls. - * @return list of interface names - */ - private List targetTechnologyInterfaces; - - /** - * --SETTER-- - * Set up the versions of the target technology that the connector supports. - * @param targetTechnologyVersions list of version identifiers - * --GETTER-- - * Return the versions of the target technology that the connector supports. - * @return list of version identifiers - */ - private List targetTechnologyVersions; - - - /** - * --SETTER-- - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * @param recognizedAdditionalProperties list of property names - * --GETTER-- - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * @return list of property names - */ - private List recognizedAdditionalProperties; - - /** - * --SETTER-- - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * @param recognizedConfigurationProperties list of property names - * --GETTER-- - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * @return list of property names - */ - private List recognizedConfigurationProperties; - - /** - * --SETTER-- - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * @param recognizedSecuredProperties list of property names - * --GETTER-- - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * @return list of property names - */ - private List recognizedSecuredProperties; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataFile.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataFile.java deleted file mode 100644 index 80a9b1a6dab..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataFile.java +++ /dev/null @@ -1,106 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFile is a java bean used to create DataFiles associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "fileType") -@JsonSubTypes({ @JsonSubTypes.Type(value = DataFile.class, name = "DataFile"), - @JsonSubTypes.Type(value = CSVFile.class, name = "CSVFile")}) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DataFile extends DataStore { - - /** - * The file type - * -- GETTER -- - * Gets file type - * @return type - * -- SETTER -- - * Sets the file type - * @param fileType type - */ - private String fileType; - - /** - * The file schema - * -- GETTER -- - * Gets the file schema - * @return file schema - * -- SETTER -- - * Sets the file schema - * @param schema schema - */ - private SchemaType schema; - - /** - * The file columns - * -- GETTER -- - * Gets the file columns - * @return columns - * -- SETTER -- - * Sets the file columns - * @param columns columns - */ - private List columns; - - /** - * The network address - * -- GETTER -- - * Gets the network address - * @return columns - * -- SETTER -- - * Sets the network address. Needed to create Endpoint, which in turn is internally generated along with Connection, - * not provided by user - * @param networkAddress network address - */ - // Needed to create Endpoint, which in turn is internally generated along with Connection, not provided by user - private String networkAddress; - - /** - * The Endpoint protocol - * -- GETTER -- - * Get an Endpoint protocol - * @return network address - * -- SETTER -- - * Sets the protocol. Needed to create Endpoint, which in turn is internally generated along with Connection, - * not provided by user - * @param protocol protocol - */ - private String protocol; - - /** - * Determines if the file is incomplete - * -- GETTER -- - * Return if the file is incomplete - * - * @return if the file is incomplete - * -- SETTER -- - * Sets up if the file is incomplete - * @param incomplete if the file is incomplete - */ - @JsonProperty("incomplete") - private boolean incomplete; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataFlow.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataFlow.java deleted file mode 100644 index 3036bb23b82..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataFlow.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFlow is a java bean used to create data flow relationships. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class DataFlow implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The data supplier - * -- GETTER -- - * Gets data supplier. - * @return the data supplier - * -- SETTER -- - * Sets data supplier - * @param dataSupplier the data supplier - */ - private String dataSupplier; - - /** - * The data consumer - * -- GETTER -- - * Gets data consumer - * @return the data consumer - * -- SETTER -- - * Sets data consumer - * @param dataConsumer the data consumer - */ - private String dataConsumer; - - private String formula; - - private String description; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataItemSortOrder.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataItemSortOrder.java deleted file mode 100644 index e3970d3e76b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataItemSortOrder.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataItemSortOrder is used for schema attributes that may have multiple instances. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public enum DataItemSortOrder implements Serializable { - - /** - * The sort order is not specified - */ - UNKNOWN(0, 99, "", "The sort order is not specified."), - /** - * The attribute instances are organized so that the smallest/lowest value is first and the rest of the instances follow in ascending order. - */ - ASCENDING(1, 0, "Ascending", "The attribute instances are organized so that the " + - "smallest/lowest value is first and the rest of the instances follow in " + - "ascending order."), - /** - * The attribute instances are organized so that the smallest/lowest value is first and the rest of the instances follow in descending order. - */ - DESCENDING(2, 1, "Descending", "The attribute instances are organized so that the " + - "largest/highest value is first and the rest of the instances follow in " + - "descending order."), - /** - * TThe instances of the schema attribute may appear in any order. - */ - UNSORTED(3, 99, "Unsorted", "The instances of the schema attribute may appear in any order."); - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - private static final String ENUM_TYPE_GUID = "aaa4df8f-1aca-4de8-9abd-1ef2aadba300"; - - private static final String ENUM_TYPE_NAME = "DataItemSortOrder"; - - /** - * The code for this enum that comes from the Open Metadata Type that this enum represents - * -- GETTER -- - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - @Getter - private final int openTypeOrdinal; - - /** - * The code for this enum used for indexing based on the enum value - * -- GETTER -- - * Return the code for this enum used for indexing based on the enum value. - * - * @return int code number - */ - @Getter - private final int ordinal; - - /** - * The default name for this enum type - * -- GETTER -- - * Return the default name for this enum type. - * - * @return String name - */ - @Getter - private final String name; - - /** - * The default description for this enum - * -- GETTER -- - * Return the default description for this enum. - * - * @return String description - */ - @Getter - private final String description; - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - DataItemSortOrder(int ordinal, int openTypeOrdinal, String name, String description) { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { - return ENUM_TYPE_GUID; - } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { - return ENUM_TYPE_NAME; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataStore.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataStore.java deleted file mode 100644 index 91d891f25b2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DataStore.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.Collections; -import java.util.Date; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataStore is a java bean used to create DataStore associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DataStore extends Asset { - - /** - * The fully qualified physical location of the data store - * -- GETTER -- - * Return the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * @return string name - * -- SETTER -- - * Set up the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * @param pathName string name - */ - private String pathName; - - /** - * The time that the data store was created - * -- GETTER -- - * Return the time that the data store was created. - * @return create time - * -- SETTER -- - * Set up the time that the data store was created. - * @param createTime date - */ - private Date createTime; - - /** - * The last known time the data store was modified - * -- GETTER -- - * Return the last known time the data store was modified. - * @return modified time - * -- SETTER -- - * Setup the last known time the data store was modified. - * @param modifiedTime date - */ - private Date modifiedTime; - - /** - * The name of the encoding style used in the data store - * -- GETTER -- - * Return the name of the encoding style used in the data store. - * @return the encoding style used in the data store - * -- SETTER -- - * Set up the name of the encoding style used in the data store. - * @param encodingType string name - */ - private String encodingType; - - /** - * The name of the natural language used for text strings within the data store - * -- GETTER -- - * Return the name of the natural language used for text strings within the data store. - * @return encodingLanguage string language name - * -- SETTER -- - * Set up the name of the natural language used for text strings within the data store. - * @param encodingLanguage string language name - */ - private String encodingLanguage; - - /** - * The description of the encoding used in the data store - * -- GETTER -- - * Return the description of the encoding used in the data store. - * @return encodingDescription string text - * -- SETTER -- - * Set up the description of the encoding used in the data store. - * @param encodingDescription string text - */ - private String encodingDescription; - - /** - * The additional properties associated with the encoding process - * -- GETTER -- - * Return the additional properties associated with the encoding process - * @return additional properties associated with the encoding process - * -- SETTER -- - * Set up the additional properties associated with the encoding process. - * @param encodingProperties map of name-value pairs - */ - private Map encodingProperties; - - /** - * Return the additional properties associated with the encoding process. - * @return map of name-value pairs - */ - public Map getEncodingProperties() { - if (encodingProperties == null || encodingProperties.isEmpty()) { - return Collections.emptyMap(); - } - return encodingProperties; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Database.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Database.java deleted file mode 100644 index 2676d7e9c4e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Database.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Database is a java bean used to create Databases associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Database extends DataStore { - - /** - * The description of the database type - * -- GETTER -- - * Return a description of the database type. - * @return string type name - * -- SETTER -- - * Set up a description of the database type. - * @param databaseType string type name - */ - private String databaseType; - - /** - * The version of the database - * -- GETTER -- - * Return the version of the database - often this is related to the version of its schemas. - * @return version name - * -- SETTER -- - * Set up the version of the database - often this is related to the version of its schemas. - * @param databaseVersion version name - */ - private String databaseVersion; - - /** - * The name of this database instance - * -- GETTER -- - * Return the name of this database instance - useful if the same schemas are deployed to multiple database instances. - * @return instance name - * -- SETTER -- - * Set up the name of this database instance - useful if the same schemas are deployed to multiple database instances. - * @param databaseInstance instance name - */ - private String databaseInstance; - - /** - * The source (typically connection name) of the database information - * -- GETTER -- - * Return the source (typically connection name) of the database information. - * @return source name - * -- SETTER -- - * Set up the source (typically connection name) of the database information. - * @param databaseImportedFrom source name - */ - private String databaseImportedFrom; - - /** - * The database schema - * -- GETTER -- - * Get database schema - * @return the database schema for the database - * -- SETTER -- - * Set up the database schema for the database - * @param databaseSchema DatabaseSchema object - */ - @JsonProperty("schema") - private DatabaseSchema databaseSchema; - - /** - * The relational tables inside the database - * -- GETTER -- - * Gets the relational tables inside the database. - * @return the relational tables inside the database - * -- SETTER -- - * Sets up relational tables inside the database. - * @param tables relational tables inside the database - */ - List tables; - - /** - * The Endpoint protocol - * -- GETTER -- - * Get an Endpoint protocol - * @return network address - * -- SETTER -- - * Sets the protocol. Needed to create Endpoint, which in turn is internally generated along with Connection, - * not provided by user - * @param protocol protocol - */ - // Needed to create Endpoint, which in turn is internally generated along with Connection, not provided by user - private String protocol; - - /** - * The Endpoint network address - * -- GETTER -- - * Get an Endpoint network address - * @return network address - * -- SETTER -- - * Sets the network address. Needed to create Endpoint, which in turn is internally generated along with Connection, - * not provided by user - * @param networkAddress network address - */ - private String networkAddress; - - /** - * Determines if the database is incomplete - * -- GETTER -- - * Return if the database is incomplete - * - * @return if the database is incomplete - * -- SETTER -- - * Sets up if the database is incomplete - * @param incomplete if the database is incomplete - */ - @JsonProperty("incomplete") - private boolean incomplete; -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DatabaseSchema.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DatabaseSchema.java deleted file mode 100644 index d092a2c7db4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DatabaseSchema.java +++ /dev/null @@ -1,43 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseSchema is a java bean used to create DatabaseSchemas associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@Getter -@Setter -@ToString(callSuper = true) -public class DatabaseSchema extends Asset { - - private static final long serialVersionUID = 1L; - - /** - * Determines if the database schema is incomplete - * -- GETTER -- - * Return if the database schema is incomplete - * - * @return if the database schema is incomplete - * -- SETTER -- - * Sets up if the database schema is incomplete - * @param incomplete if the database schema is incomplete - */ - @JsonProperty("incomplete") - private boolean incomplete; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DeleteSemantic.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DeleteSemantic.java deleted file mode 100644 index 0d2ed7dac11..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/DeleteSemantic.java +++ /dev/null @@ -1,84 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DeleteSemantic defines the different types of delete for an entity - *
    - *
  • HARD - Hard-delete strategy. Process and related metadata associated is deleted by purging it from the metadata repository. Deletion - * happens cascading down to data flows.
  • - *
  • SOFT - Soft-delete strategy. Process (and related metadata) will be not removed physically but flagged as 'inactive' or temporary deleted - * from repository (deleteEntity); Process (and related metadata) can be restored in case it is needed (restoreEntity).
  • - *
  • MEMENTO - Using Memento classification. Similarly to soft delete, process asset is classified as memento asset using memento - * classification.
  • - *
- */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@ToString -public enum DeleteSemantic implements Serializable { - SOFT(0, "SOFT", "Soft delete"), - HARD(1, "HARD", "Hard delete"), - MEMENTO(1, "MEMENTO", "Memento"); - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * Return the numeric representation of the delete semantic - * -- GETTER -- - * Return the numeric representation of the delete semantic - * - * @return String - numeric representation of the delete semantic - */ - private int ordinal; - - /** - * Return the name of the delete semantic - * -- GETTER -- - * Return the name of the delete semantic - * - * @return String - name of the delete semantic - */ - private String name; - - /** - * Return the description of the delete semantic - * -- GETTER -- - * Return the description of the delete semantic - * - * @return String - description of the delete semantic - */ - private String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - DeleteSemantic(int ordinal, String name, String description) { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Endpoint.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Endpoint.java deleted file mode 100644 index 2e27f0197ca..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Endpoint.java +++ /dev/null @@ -1,98 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -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) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -/** - * The Endpoint describes the network information necessary for a connector to connect to the server - * where the Asset is accessible from. - */ -public class Endpoint extends Referenceable { - - /** - * The description of the endpoint - * -- GETTER -- - * Return the description of the endpoint. - * @return description - * -- SETTER -- - * Set up the description of the endpoint. - * @param description description - */ - private String description; - - /** - * The display name of the endpoint - * -- GETTER -- - * Return the display name of the endpoint. - * @return display name - * -- SETTER -- - * Set up the display name of the endpoint. - * @param displayName display name - */ - private String displayName; - - /** - * The encryption method of the endpoint - * -- GETTER -- - * Returns the stored encryption method property for the endpoint. This is allowing the information - * needed to work with a specific encryption mechanism used by the endpoint to be defined. - * If no encryption method property is available (typically because this is an unencrypted endpoint) - * then null is returned. - * @return encryption method - * -- SETTER -- - * Set up the encryption method of the endpoint. - * @param encryptionMethod encryption method - */ - private String encryptionMethod; - - /** - * The name of the endpoint - * -- GETTER -- - * Return the name of the endpoint. - * @return name - * -- SETTER -- - * Set up the name of the endpoint. - * @param name name - */ - private String name; - - /** - * The network address of the endpoint - * -- GETTER -- - * Returns the network address property for the endpoint. - * @return name - * -- SETTER -- - * Set up the network address of the endpoint. - * @param networkAddress network address - */ - private String networkAddress; - - /** - * The protocol of the endpoint - * -- GETTER -- - * Returns the protocol for the endpoint. - * @return name - * -- SETTER -- - * Set up the protocol of the endpoint. - * @param protocol protocol - */ - private String protocol; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Engine.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Engine.java deleted file mode 100644 index 76902b59de1..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Engine.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Engine is a java bean used to create the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode -@ToString -@Getter -@Setter -public class Engine implements Serializable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The qualified name - * -- GETTER -- - * Gets qualified name. - * @return the qualified name - * -- SETTER -- - * Sets qualified name. - * @param qualifiedName the qualified name - */ - private String qualifiedName; - - /** - * The display name - * -- GETTER -- - * Gets display name. - * @return the display name - * -- SETTER -- - * Sets display name. - * @param name the display name - */ - @JsonProperty("displayName") - private String name; - - /** - * The description - * -- GETTER -- - * Gets description. - * @return the description - * -- SETTER -- - * Sets description. - * @param description the description - */ - private String description; - - /** - * The engine type - * -- GETTER -- - * Gets engine type. - * @return the engine type - * -- SETTER -- - * Sets engine type. - * @param engineType the engine type - */ - private String engineType; - - /** - * The engine version - * -- GETTER -- - * Gets engine version. - * @return the engine version - * -- SETTER -- - * Sets engine version. - * @param engineVersion the engine version - */ - private String engineVersion; - - /** - * The patch level - * -- GETTER -- - * Gets patch level. - * @return the patch level - * -- SETTER -- - * Sets patch level. - * @param patchLevel the patch level - */ - private String patchLevel; - - /** - * The source - * -- GETTER -- - * Gets source. - * @return the source - * -- SETTER -- - * Sets source. - * @param source the source - */ - private String source; - - /** - * Additional properties - * -- GETTER -- - * Gets the additional properties - * @return the additional properties - * -- SETTER -- - * Sets the additional properties. - * @param additionalProperties the additional properties - */ - private Map additionalProperties; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/EventType.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/EventType.java deleted file mode 100644 index d7270f25895..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/EventType.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EventType type - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Getter -@Setter -public class EventType extends SchemaType { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The attribute list - * -- GETTER -- - * Gets attribute list. - * @return the attribute list - * -- SETTER -- - * Sets attribute list. - * @param attributeList the attribute list - */ - @JsonProperty("eventSchemaAttributes") - private List attributeList; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/FileFolder.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/FileFolder.java deleted file mode 100644 index ab5354314a0..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/FileFolder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FileFolder is a java bean used to create FileFolders associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class FileFolder extends DataStore { - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Identifiers.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Identifiers.java deleted file mode 100644 index 7cc3fb71c52..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Identifiers.java +++ /dev/null @@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -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) -@Getter -@Setter -@EqualsAndHashCode -@NoArgsConstructor -@ToString -public class Identifiers { - - /** - * The qualifiedName of the entity - * -- GETTER -- - * Return the entity qualifiedName - * - * @return String - qualifiedName of the entity - * -- SETTER -- - * Set up the qualifiedName of the entity - * @param qualifiedName of the entity - */ - private String qualifiedName; - -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/OwnerType.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/OwnerType.java deleted file mode 100644 index 8c813f722f3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/OwnerType.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetOwnerType defines the identifier used in an Asset's owner property. - *
    - *
  • User Identifier - The owner's user id is stored in the owner property.
  • - *
  • Profile - The owner's profile unique identifier (guid) is stored in the owner property.
  • - *
  • Other - A different identifier for the owner outside of the scope of open metadata has been used.
  • - *
- * Being able to use a profile guid in this field allows for Assets to be owned by Teams and Engines as well - * as people. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@Getter -@ToString -public enum OwnerType implements Serializable { - /** - * The owner's user id is stored in the owner property. - */ - USER_ID(0, 0, "UserId", "The owner's user id is stored in the owner property."), - /** - * The owner's profile unique identifier (guid) is stored in the owner property. - */ - PROFILE_ID(1, 1, "ProfileId", "The owner's profile unique identifier (guid) is stored in the owner property."), - /** - * A different identifier for the owner outside of the scope of open metadata has been used. - */ - OTHER(99, 99, "Other", "A different identifier for the owner outside of the scope of open metadata has been used."); - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - private static final String ENUM_TYPE_GUID = "9548390c-69f5-4dc6-950d-6feeee257b56"; - - private static final String ENUM_TYPE_NAME = "AssetOwnerType"; - - /** - * The code for this enum that comes from the Open Metadata Type that this enum represents - * -- GETTER -- - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * @return openTypeOrdinal int code number - */ - private final int openTypeOrdinal; - - /** - * The numeric representation of the enumeration - * -- GETTER -- - * Return the numeric representation of the enumeration. - * @return int ordinal - */ - private final int ordinal; - - /** - * The default name of the enumeration - * -- GETTER -- - * Return the default name of the enumeration. - * @return String name - */ - private final String name; - - /** - * The default description of the enumeration - * -- GETTER -- - * Return the default description of the enumeration. - * @return String description - */ - private final String description; - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - OwnerType(int ordinal, int openTypeOrdinal, String name, String description) { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { return ENUM_TYPE_GUID; } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { return ENUM_TYPE_NAME; } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ParentProcess.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ParentProcess.java deleted file mode 100644 index f6a3ebadf8b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ParentProcess.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFlow is a java bean used to create process hierarchies relationships. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class ParentProcess implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The qualified name - * -- GETTER -- - * Gets qualified name. - * @return the qualified name - * -- SETTER -- - * Sets qualified name. - * @param qualifiedName the qualified name - */ - private String qualifiedName; - - /** - * The process containment type - * -- GETTER -- - * Gets process containment type. - * @return the process containment type - * -- SETTER -- - * Sets process containment type. - * @param processContainmentType the process containment type - */ - @JsonProperty("containmentType") - private ProcessContainmentType processContainmentType; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Port.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Port.java deleted file mode 100644 index 66b24225407..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Port.java +++ /dev/null @@ -1,80 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The type Port. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = PortImplementation.class, name = "PortImplementation") -}) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class Port extends Referenceable { - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The display name - * -- GETTER -- - * Gets display name. - * @return the display name - * -- SETTER -- - * Sets display name. - * @param displayName the display name - */ - private String displayName; - - /** - * The port type - * --GETTER -- - * Gets port type. - * @return the port type - * -- SETTER -- - * Sets port type. - * @param portType the port type - */ - @JsonProperty("type") - private PortType portType; - - /** - * The update semantic - * -- SETTER -- - * Sets update semantic. - * @param updateSemantic the update semantic - */ - private UpdateSemantic updateSemantic; - - /** - * Gets update semantic. - * @return the update semantic - */ - public UpdateSemantic getUpdateSemantic() { - if (updateSemantic == null) { - return UpdateSemantic.REPLACE; - } - - return updateSemantic; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/PortImplementation.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/PortImplementation.java deleted file mode 100644 index bb9b9fa0a86..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/PortImplementation.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PortImplementation is a java bean used to create PortImplementations associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@ToString -public class PortImplementation extends Port { - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The schema type - * -- GETTER -- - * Gets schema type. - * @return the schema type - * -- SETTER -- - * Sets schema type. - * @param schemaType the schema type - */ - @JsonProperty("schema") - @Getter - @Setter - private SchemaType schemaType; - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/PortType.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/PortType.java deleted file mode 100644 index e10fb6161a7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/PortType.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PortType defines the different port types used for open metadata. It is used in a port implementation - * definition. - *
    - *
  • INPUT_PORT - Input Port.
  • - *
  • OUTPUT_PORT - Output Port.
  • - *
  • INOUT_PORT - Input Output Port.
  • - *
  • OUTIN_PORT - Output Input Port.
  • - *
  • OTHER - None of the above.
  • - *
- */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -@Getter -public enum PortType implements Serializable { - /** - * Input Port - */ - INPUT_PORT(0, "INPUT_PORT", "Input Port."), - /** - * Output Port - */ - OUTPUT_PORT(1, "OUTPUT_PORT", "Output Port."), - /** - * IInput Output Port - */ - INOUT_PORT(2, "INOUT_PORT", "Input Output Port."), - /** - * Output Input Port - */ - OUTIN_PORT(3, "OUTIN_PORT", "Output Input Port."), - /** - * None of the above - */ - OTHER(99, "OTHER", "None of the above."); - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The numeric representation of the instance provenance type - * -- GETTER -- - * Return the numeric representation of the instance provenance type. - * @return int ordinal - */ - private final int ordinal; - - /** - * The default name of the instance provenance type - * -- GETTER -- - * Return the default name of the instance provenance type. - * @return String name - */ - private final String name; - - /** - * The default description of the instance provenance type - * -- GETTER -- - * Return the default description of the instance provenance type. - * @return String description - */ - private final String description; - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - PortType(int ordinal, String name, String description) { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Process.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Process.java deleted file mode 100644 index 341b9bf89d5..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Process.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Process is a java bean used to create Processes associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -@NoArgsConstructor -public class Process extends Asset { - - /** - * The process name - * -- GETTER -- - * Gets the process name. - * @return the name - * -- SETTER -- - * Sets up the process name. - * @param name string name - */ - private String name; - - /** - * The description of the processing performed by this process - * -- GETTER -- - * Return the description of the processing performed by this process. - * @return string description - * -- SETTER -- - * Set up the description of the processing performed by this process. - * @param formula string description - */ - private String formula; - - /** - * The name of the programming language that this process is implemented in - * -- GETTER -- - * Return the name of the programming language that this process is implemented in. - * @return string name - * -- SETTER -- - * Set up the name of the programming language that this process is implemented in. - * @param implementationLanguage string name - */ - private String implementationLanguage; - - /** - * The port implementations - * -- GETTER -- - * Gets port implementations. - * @return the port implementations - * -- SETTER -- - * Sets port implementations. - * @param portImplementations the port implementations - */ - private List portImplementations; - - /** - * The data flows - * -- GETTER -- - * Gets data flows - * @return the data flows - * -- SETTER -- - * Sets data flows. - * @param dataFlows the data flows - */ - private List dataFlows; - - /** - * The collection to which the process belongs - * -- GETTER -- - * Retrieves the collection to which the process belongs - * @return collection the collection to which it belongs - * -- SETTER -- - * Sets the collection. - * @param collection the collection to which the process belongs - */ - private Collection collection; - - /** - * The update semantic - * -- SETTER -- - * Sets update semantic. - * @param updateSemantic the update semantic - */ - private UpdateSemantic updateSemantic; - - /** - * The parent processes - * -- GETTER -- - * Gets parent processes. - * @return the parent processes - * -- SETTER -- - * Sets parent processes. - * @param parentProcesses the parent processes - */ - private List parentProcesses; - - /** - * Gets update semantic. - * @return the update semantic - */ - public UpdateSemantic getUpdateSemantic() { - if (updateSemantic == null) { - return UpdateSemantic.REPLACE; - } - return updateSemantic; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessContainmentType.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessContainmentType.java deleted file mode 100644 index 9083d3d6def..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessContainmentType.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessContainmentType describes the type of containment that exists between two processes. - *
    - *
  • OWNED - The parent process owns the child process in the relationship
  • - *
  • APPEND - The child process is simply used by the parent
  • - *
  • OTHER - None of the above.
  • - *
- */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -@Getter -public enum ProcessContainmentType { - /** - * The parent process owns the child process in the relationship, such that if the parent is removed the child should also be removed. - * A child can have at most one such parent - */ - OWNED(0, "OWNED", "The parent process owns the child process in the relationship, such that if the parent is removed the child should also be " + - "removed. A child can have at most one such parent."), - /** - * The child process is simply used by the parent. A child process can have many such relationships to parents - */ - APPEND(1, "APPEND", "The child process is simply used by the parent. A child process can have many such relationships to parents."), - /** - * None of the above - */ - OTHER(99, "OTHER", "None of the above."); - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The numeric representation of the instance provenance type - * -- GETTER -- - * Return the numeric representation of the instance provenance type. - * - * @return int ordinal - */ - private final int ordinal; - - /** - * The default name of the instance provenance type - * -- GETTER -- - * Return the default name of the instance provenance type. - * - * @return String name - */ - private final String name; - - /** - * The default description of the instance provenance type - * -- GETTER -- - * Return the default description of the instance provenance type. - * - * @return String description - */ - private final String description; - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - ProcessContainmentType(int ordinal, String name, String description) { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessHierarchy.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessHierarchy.java deleted file mode 100644 index 32fbb1ddbd7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessHierarchy.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * ProcessHierarchy is a java bean used to create ProcessHierarchy relationships. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@ToString -public class ProcessHierarchy implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The parent process - * -- GETTER -- - * Gets parent process. - * @return the parent process - * -- SETTER -- - * Sets parent process. - * @param parentProcess the parent process - */ - private String parentProcess; - - /** - * The child process - * -- GETTER -- - * Gets child process. - * @return the child process - * -- SETTER -- - * Sets child process. - * @param childProcess the child process - */ - private String childProcess; - - /** - * The process containment type - * -- GETTER -- - * Gets process containment type. - * @return the process containment type - * -- SETTER -- - * Sets process containment type. - * @param processContainmentType the process containment type - */ - @JsonProperty("containmentType") - private ProcessContainmentType processContainmentType; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessingState.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessingState.java deleted file mode 100644 index ce5511a0c6f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/ProcessingState.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AccessLevel; -import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ProcessingState classification - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -public class ProcessingState extends Referenceable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The Sync Dates map of critical elements and sync status - * -- GETTER -- - * Gets sync states map. - * - * @return sync states map - * -- SETTER -- - * Sets sync states map. - * @param syncDatesByKey the sync states map - */ - @JsonProperty("syncDatesByKey") - private Map syncDatesByKey; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Referenceable.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Referenceable.java deleted file mode 100644 index de94ab9d008..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Referenceable.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; -import java.util.Map; - -/** - * Process is a base java bean used to create Referenceables associated with the external data engine. - */ -@EqualsAndHashCode -@ToString -@Getter -@Setter -public class Referenceable implements Serializable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The stored qualified name property for the metadata entity - * -- GETTER -- - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * @return qualified name - * -- SETTER -- - * Set up the fully qualified name. - * @param qualifiedName String name - */ - private String qualifiedName; - - /** - * A copy of the additional properties - * -- GETTER -- - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - * -- SETTER -- - * Set up additional properties. - * @param additionalProperties Additional properties object - */ - private Map additionalProperties; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/RelationalColumn.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/RelationalColumn.java deleted file mode 100644 index 8b24eccca25..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/RelationalColumn.java +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationalColumn is a java bean used to create RelationalColumn associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@ToString -@Getter -@Setter -public class RelationalColumn extends Attribute { - - /** - * The name of the formula - * -- GETTER -- - * Returns the formula. - * @return name - * -- SETTER -- - * Sets up the formula. - * @param formula formula - */ - private String formula; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/RelationalTable.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/RelationalTable.java deleted file mode 100644 index 835939caf1c..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/RelationalTable.java +++ /dev/null @@ -1,114 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationalTable is a java bean used to create RelationalTable associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@ToString -@Getter -@Setter -public class RelationalTable extends Referenceable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The display name of the relational table - * -- GETTER -- - * Returns the display name of the relational table. - * @return display name - * -- SETTER -- - * Sets up the display name of the relational table. - * @param displayName display name - */ - private String displayName; - - /** - * The type of the relational table - * -- GETTER -- - * Returns the type of the relational table. - * @return type - * -- SETTER -- - * Sets up the type of the relational table. - * @param type type - */ - private String type; - - /** - * The list of aliases of the relational table - * -- GETTER -- - * Returns list of aliases of the relational table. - * @return aliases - * -- SETTER -- - * Sets up the list of aliases of the relational table. - * @param aliases aliases - */ - private List aliases; - - /** - * Determines if the relational table if deprecated - * -- GETTER -- - * Returns if the relational table if deprecated. - * @return if the relational table if deprecated - * -- SETTER -- - * Sets up the value that determines if the relational table if deprecated. - * @param isDeprecated value saying if the relational table if deprecated - */ - private boolean isDeprecated; - - /** - * The description of the relational table - * -- GETTER -- - * Returns the description of the relational table. - * @return description - * -- SETTER -- - * Sets up the description of the relational table. - * @param description description - */ - private String description; - - /** - * The list of columns of the relational table - * -- GETTER -- - * Returns list of columns of the relational table. - * @return columns - * -- SETTER -- - * Sets up the list of columns of the relational table. - * @param columns columns - */ - private List columns; - - /** - * Determines if the table is incomplete - * -- GETTER -- - * Return if the table is incomplete - * - * @return if the table is incomplete - * -- SETTER -- - * Sets up if the table is incomplete - * @param incomplete if the table is incomplete - */ - @JsonProperty("incomplete") - private boolean incomplete; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/SchemaType.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/SchemaType.java deleted file mode 100644 index 0fd05aba169..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/SchemaType.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaType is a java bean used to create SchemaTypes associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode(callSuper = true) -@ToString -@Getter -@Setter -public class SchemaType extends Referenceable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The display name - * -- GETTER -- - * Gets display name. - * @return the display name - * -- SETTER -- - * Sets display name. - * @param displayName the display name - */ - private String displayName; - - /** - * The author - * -- GETTER -- - * Gets author. - * @return the author - * -- SETTER -- - * Sets author. - * @param author the author - */ - private String author; - - /** - * The usage - * -- GETTER -- - * Gets usage. - * @return the usage - * -- SETTER -- - * Sets usage. - * @param usage the usage - */ - private String usage; - - /** - * The encoding standard - * -- GETTER -- - * Gets encoding standard. - * @return the encoding standard - * -- SETTER -- - * Sets encoding standard. - * @param encodingStandard the encoding standard - */ - private String encodingStandard; - - /** - * The version number - * -- GETTER -- - * Gets version number. - * @return the version number - * -- SETTER -- - * Sets version number. - * @param versionNumber the version number - */ - private String versionNumber; - - /** - * The type - * -- GETTER -- - * Gets type. - * @return the type - * -- SETTER -- - * Sets type. - * @param type the type - */ - private String type; - - /** - * Determines if the schema type is deprecated - * -- GETTER -- - * Returns if the schema type is deprecated. - * @return if the schema type is deprecated - * -- SETTER -- - * Sets up the value that determines if the schema type is deprecated. - * @param isDeprecated value saying if the schema type is deprecated - */ - private boolean isDeprecated; - - /** - * The stored description property associated with the schema type - * -- SETTER -- - * Set up the stored description property associated with the schema type. - * @param description String text - * -- GETTER -- - * Returns the stored description property for the schema type. - * If no description is provided then null is returned. - * @return description - */ - private String description; - - /** - * The he name of the namespace that this schema type belongs to - * -- SETTER -- - * Set up the namespace that this schema type belongs to. - * @param namespace String text - * -- GETTER -- - * Returns the namespace that this schema type belongs to - * If no namespace is provided then null is returned. - * @return namespace - */ - private String namespace; - - /** - * The attribute list - * -- GETTER -- - * Gets attribute list. - * @return the attribute list - * -- SETTER -- - * Sets attribute list. - * @param attributeList the attribute list - */ - @JsonProperty("columns") - private List attributeList; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Topic.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Topic.java deleted file mode 100644 index 64c6c4329c6..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/Topic.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * Topic is a java bean used to create Topics associated with the external data engine. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class Topic extends Asset { - - /** - * The description of the topic type - * -- GETTER -- - * Return a description of the topic type. - * @return string type name - * -- SETTER -- - * Set up a description of the topic type. - * @param topicType string type name - */ - private String topicType; - - /** - * The list of event types - * -- GETTER -- - * Gets event type list. - * @return the event type list - * -- SETTER -- - * Sets event type list. - * @param eventTypes the event type list - */ - @JsonProperty("eventTypes") - private List eventTypes; -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/UpdateSemantic.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/UpdateSemantic.java deleted file mode 100644 index 7092a7ee81e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/UpdateSemantic.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.model; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UpdateSemantic defines the different types of update for a process - *
    - *
  • REPLACE - entities found is in the process payload will be updated or added, existing entities not included will - * be removed
  • - *
  • APPEND - entities found is in the process payload will be updated or added, existing entities not included will - * be ignored
  • - *
- */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -@Getter -public enum UpdateSemantic implements Serializable { - /** - * Replace with new entities - */ - REPLACE(0, "REPLACE", "Replace with new entities"), - /** - * Append new entities - */ - APPEND(1, "APPEND", "Append new entities"); - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The numeric representation of the instance provenance type - * -- GETTER -- - * Return the numeric representation of the instance provenance type. - * - * @return int ordinal - */ - private final int ordinal; - - /** - * The default name of the instance provenance type - * -- GETTER -- - * Return the default name of the instance provenance type. - * - * @return String name - */ - private final String name; - - /** - * The default description of the instance provenance type - * -- GETTER -- - * Return the default description of the instance provenance type. - * - * @return String description - */ - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - UpdateSemantic(int ordinal, String name, String description) { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/package-info.java deleted file mode 100644 index ea314a450cc..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These beans describe the core properties that are passed to the server to up metadata. - */ -package org.odpi.openmetadata.accessservices.dataengine.model; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataEngineOMASAPIRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataEngineOMASAPIRequestBody.java deleted file mode 100644 index bd1ec0333f2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataEngineOMASAPIRequestBody.java +++ /dev/null @@ -1,60 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataEngineOMASAPIRequestBody provides a common header for Data Engine OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DataEngineRegistrationRequestBody.class, name = "dataEngine"), - @JsonSubTypes.Type(value = PortImplementationRequestBody.class, name = "port"), - @JsonSubTypes.Type(value = ProcessRequestBody.class, name = "process"), - @JsonSubTypes.Type(value = SchemaTypeRequestBody.class, name = "schema"), - @JsonSubTypes.Type(value = DatabaseRequestBody.class, name = "database"), - @JsonSubTypes.Type(value = DatabaseRequestBody.class, name = "table"), - @JsonSubTypes.Type(value = DataFileRequestBody.class, name = "dataFile") - }) -@EqualsAndHashCode -@ToString(callSuper = true) -@NoArgsConstructor -@Getter -@Setter -public abstract class DataEngineOMASAPIRequestBody implements Serializable { - - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) - private static final long serialVersionUID = 1L; - - /** - * The unique name of the external source - * -- GETTER -- - * Gets the external source name - * @return the external source name - * -- SETTER -- - * Sets the external source name - * @param externalSourceName the external source name - */ - private String externalSourceName; - -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataEngineRegistrationRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataEngineRegistrationRequestBody.java deleted file mode 100644 index f9ce57f223a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataEngineRegistrationRequestBody.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataEngineRegistrationRequestBody describes the request body used to create/update engines. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DataEngineRegistrationRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * Engine - * -- GETTER -- - * Gets the engine - * @return the engine - * -- SETTER -- - * Sets the engine - * @param engine the engine - */ - @JsonProperty("dataEngine") - private Engine engine; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataFileRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataFileRequestBody.java deleted file mode 100644 index 9a216d4d1fa..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataFileRequestBody.java +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * DataFileRequestBody describes the request body used to create/update data files. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DataFileRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The data file to be created - * -- GETTER -- - * Return the data file bean - * - * @return the data file - * -- SETTER -- - * Set up the data file bean - * @param dataFile the data file - */ - @JsonProperty("file") - private DataFile dataFile; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataFlowsRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataFlowsRequestBody.java deleted file mode 100644 index 72946ff5c6f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DataFlowsRequestBody.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFlowsRequestBody describes the request body used to create data flow relationships - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DataFlowsRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The data flows - * -- GETTER -- - * Return the data flows - * @return the data flows - * -- SETTER -- - * Set up the data flows - * @param dataFlows the data flows - */ - private List dataFlows; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DatabaseRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DatabaseRequestBody.java deleted file mode 100644 index e490be0c9fe..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DatabaseRequestBody.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseRequestBody describes the request body used to create/update databases. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DatabaseRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The database to be created - * -- GETTER -- - * Return the database bean - * - * @return the database - * -- SETTER -- - * Set up the database bean - * @param database the database - */ - @JsonProperty("database") - private Database database; -} - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DatabaseSchemaRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DatabaseSchemaRequestBody.java deleted file mode 100644 index e3c9bfdc1b3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DatabaseSchemaRequestBody.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseSchemaRequestBody describes the request body used to create/update database schemas. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DatabaseSchemaRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The database schema to be created - * -- GETTER -- - * Return the database schema bean - * - * @return the database schema - * -- SETTER -- - * Set up the database schema bean - * @param databaseSchema the database schema - */ - @JsonProperty("databaseSchema") - private DatabaseSchema databaseSchema; - - /** - * The database qualified name to which the database schema will be linked, if it exists - * -- GETTER -- - * Return the database qualified name to which the database schema will be linked, if it exists - * - * @return the database qualified name - * -- SETTER -- - * Set up the database qualified name to which the database schema will be linked, if it exists - * @param databaseQualifiedName the database qualified name - */ - @JsonProperty("databaseQualifiedName") - private String databaseQualifiedName; - -} - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DeleteRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DeleteRequestBody.java deleted file mode 100644 index 57e9ce7437c..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/DeleteRequestBody.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * DeleteRequestBody describes the request body used to delete an entity. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class DeleteRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The unique identifier of the entity - * -- GETTER -- - * Return the entity unique identifier - * - * @return String - unique identifier of the entity - * -- SETTER -- - * Set up the unique identifier of the entity - * @param guid of the entity - */ - private String guid; - - /** - * The qualified name of the entity - * -- GETTER -- - * Return the entity qualified name - * - * @return String - qualified name of the entity - * -- SETTER -- - * Set up the qualified name of the entity - * @param qualifiedName of the entity - */ - private String qualifiedName; - - /** - * The delete semantic - * -- GETTER -- - * Return the delete semantic - * - * @return String - unique identifier of the entity - * -- SETTER -- - * Set up the delete semantic - * @param deleteSemantic of the entity - */ - private DeleteSemantic deleteSemantic = DeleteSemantic.SOFT; -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/EventTypeRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/EventTypeRequestBody.java deleted file mode 100644 index 7afd5eb7a13..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/EventTypeRequestBody.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EventTypeRequestBody describes the request body used to create/update event types. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class EventTypeRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The event type to be created - * -- GETTER -- - * Return the event type bean - * - * @return the event type - * -- SETTER -- - * Set up the event type bean - * @param eventType the event type - */ - @JsonProperty("eventType") - private EventType eventType; - - /** - * The qualified name of the topic - * -- GETTER -- - * Return the topic qualified name - * - * @return String - qualified name of the topic - * -- SETTER -- - * Set up the qualified name of the topic - * @param topicQualifiedName of the topic - */ - private String topicQualifiedName; -} - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/FindRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/FindRequestBody.java deleted file mode 100644 index 04dbb90a3fc..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/FindRequestBody.java +++ /dev/null @@ -1,70 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Identifiers; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FindRequestBody describes the request body used to search for an entity - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode -@NoArgsConstructor -@ToString -public class FindRequestBody implements Serializable { - - /** - * The identifiers name of the entity - * -- GETTER -- - * Return the entity identifiers - * - * @return String - identifiers of the entity - * -- SETTER -- - * Set up the identifiers of the entity - * @param identifiers of the entity - */ - private Identifiers identifiers; - - /** - * The externalSourceName of the entity - * -- GETTER -- - * Return the entity externalSourceName - * - * @return String - externalSourceName of the entity - * -- SETTER -- - * Set up the externalSourceName of the entity - * @param externalSourceName of the entity - */ - private String externalSourceName; - - /** - * The type of the entity - * -- GETTER -- - * Return the entity type - * - * @return String - type of the entity - * -- SETTER -- - * Set up the type of the entity - * @param type of the entity - */ - private String type; - -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/PortImplementationRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/PortImplementationRequestBody.java deleted file mode 100644 index 0121171b6dc..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/PortImplementationRequestBody.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PortImplementationRequestBody describes the request body used to create/update port implementations - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class PortImplementationRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The process qualified name - * -- GETTER -- - * Returns the process qualified name - * @return the process qualified name - * -- SETTER -- - * Sets up the process qualified name - * @param processQualifiedName the process qualified name - */ - private String processQualifiedName; - - /** - * The port implementation - * -- GETTER -- - * Returns the port implementation - * @return the port implementation - * -- SETTER -- - * Sets up the port implementation - * @param portImplementation the port implementation - */ - private PortImplementation portImplementation; - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessHierarchyRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessHierarchyRequestBody.java deleted file mode 100644 index 1b1cd2cb583..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessHierarchyRequestBody.java +++ /dev/null @@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessHierarchyRequestBody describes the request body used to create process hierarchy relationships - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class ProcessHierarchyRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The process hierarchy - * -- GETTER -- - * Returns the process hierarchy - * @return the process hierarchy - * -- SETTER -- - * Sets up the process hierarchy - * @param processHierarchy the process hierarchy - */ - private ProcessHierarchy processHierarchy; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessRequestBody.java deleted file mode 100644 index ca8dab9ca4a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessRequestBody.java +++ /dev/null @@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessRequestBody describes the request body used to create/update processes - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class ProcessRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The process - * -- GETTER -- - * Returns the process - * - * @return the process - * -- SETTER -- - * Sets up the process - * @param process the process - */ - private Process process; -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessingStateRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessingStateRequestBody.java deleted file mode 100644 index 1c4005ad5c7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/ProcessingStateRequestBody.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessingStateRequestBody describes the request body used to create processing state classifications - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -@NoArgsConstructor -@AllArgsConstructor -public class ProcessingStateRequestBody extends DataEngineOMASAPIRequestBody -{ - private static final long serialVersionUID = 1L; - - /** - * The sync state to be created - * -- GETTER -- - * Return the sync state bean - * - * @return the sync state - * -- SETTER -- - * Set up the sync state bean - * @param processingState the sync state - */ - @JsonProperty("processingState") - private ProcessingState processingState; -} - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/RelationalTableRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/RelationalTableRequestBody.java deleted file mode 100644 index 96b44be36fa..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/RelationalTableRequestBody.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationalTableRequestBody describes the request body used to create/update relational tables - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class RelationalTableRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The relational table to be created - * -- GETTER -- - * Return the relational table bean - * - * @return the relational table - * -- SETTER -- - * Set up the relational table bean - * @param relationalTable the relational table - */ - @JsonProperty("table") - private RelationalTable relationalTable; - - /** - * The qualified name of the database schema - * -- GETTER -- - * Return the database schema qualified name - * - * @return String - qualified name of the database schema - * -- SETTER -- - * Set up the qualified name of the database schema - * @param databaseSchemaQualifiedName of the database schema - */ - private String databaseSchemaQualifiedName; -} - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/SchemaTypeRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/SchemaTypeRequestBody.java deleted file mode 100644 index 3380c7f52a3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/SchemaTypeRequestBody.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypeRequestBody describes the request body used to create/update schema types - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class SchemaTypeRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The schema type - * -- GETTER -- - * Returns the schema type - * @return the schema type - * -- SETTER -- - * Sets up the schema type - * @param schemaType the schema type - */ - @JsonProperty("schema") - private SchemaType schemaType; - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/TopicRequestBody.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/TopicRequestBody.java deleted file mode 100644 index 742a305e91c..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/TopicRequestBody.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -/** - * TopicRequestBody describes the request body used to create/update topics - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Getter -@Setter -@EqualsAndHashCode(callSuper = true) -@ToString -public class TopicRequestBody extends DataEngineOMASAPIRequestBody { - - /** - * The topic to be created - * -- GETTER -- - * Return the topic bean - * - * @return the topic - * -- SETTER -- - * Set up the topic bean - * @param topic the topic - */ - @JsonProperty("topic") - private Topic topic; - -} - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/package-info.java deleted file mode 100644 index 05a291c8dbd..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-api/src/main/java/org/odpi/openmetadata/accessservices/dataengine/rest/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines the beans used to build the REST request and response payloads. - *

- * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - *

- * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.accessservices.dataengine.rest; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/README.md b/open-metadata-implementation/access-services/data-engine/data-engine-client/README.md deleted file mode 100644 index 8bec332adef..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - - -# Data Engine Open Metadata Access Service (OMAS) Client - -The Data Engine OMAS client -package provides language-specific client packages to make it easier -for data tools and applications to call the Data Engine interfaces. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/build.gradle b/open-metadata-implementation/access-services/data-engine/data-engine-client/build.gradle deleted file mode 100644 index 789e44e17c2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/build.gradle +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { -} - -dependencies { - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-api') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:open-integration-framework') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-api') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-topic-connectors') - - implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-connectors-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - - implementation 'org.springframework:spring-core' - implementation 'org.apache.commons:commons-collections4' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'org.springframework:spring-core' - testImplementation 'org.mockito:mockito-core' - testImplementation 'junit:junit' - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Data Engine OMAS Client' - -java { - withJavadocJar() -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/docs/user/java-client/README.md b/open-metadata-implementation/access-services/data-engine/data-engine-client/docs/user/java-client/README.md deleted file mode 100644 index 8791dec87bd..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/docs/user/java-client/README.md +++ /dev/null @@ -1,77 +0,0 @@ - - - -# Data Engine Open Metadata Access Service (OMAS) Client - - -The Data Engine OMAS client interface supports the creation of process, ports, schema types and corresponding relationships. - -Different implementations available: - -* `DataEngineRESTClient` - Default client implementation interacting via HTTP transport mechanism and default OCF REST client. -* `DataEngineRESTConfigurationClient` - An extension to the REST interface that can be used as helper to automate configuration of the event based client by retrieving connection details used to build the client topic connector. -* `DataEngineEventClient` - Client implementation interacting via Events transport mechanism. It is using `DataEngineInTopicClientConnector` that produces events to the input topic of Data Engine access service. - - -HTTP based REST clients can be constructed in following way: - -* No authentication embedded in the HTTP request - for test systems. -* Basic authentication using a userId and password embedded in the HTTP request. - -Both constructors take the [URL root for the server platform](https://egeria-project.org/concepts/platform-url-root/) -where the Data Engine OMAS is running and its [server name](https://egeria-project.org/concepts/server-name/). - -Here is a code example with the user id and password specified: - -```java -DataEngineClient client = new DataEngineRESTClient ("cocoMDS1", - "https://localhost:9444", - "cocoUI", - "cocoUIPassword"); - -``` -This client is set up to call the `cocoMDS1` server running on the `https://localhost:9444` -OMAG Server Platform. The userId and password is for the application -where the client is running. The userId of the real end user is passed -on each request. - -Similarly, extended REST configuration client can help retrieving additional configuration details from the remote server can be constructed in following way: - -```java -DataEngineRESTConfigurationClient client = new DataEngineRESTConfigurationClient("remoteServerName", - "https://localhost:9444", - "remoteUserName", - "remoteUserPassword"); -ConnectionResponse connectionResponse = client.getInTopicConnection("remoteServerName","remoteUserName"); -``` - -Event based client can be constructed by injecting instance of the DataEngineInTopicClientConnector. -In the example below we can create the connector with remote configuration retrieved previously and pass it to the event based client: - -```java - -DataEngineInTopicClientConnector topicConnector = (DataEngineInTopicClientConnector) connectorBroker.getConnector(connectionResponse.getConnection()); - -DataEngineClient client = new DataEngineEventClient(dataEngineInTopicClientConnector); -``` - -## Client operations - -Once you have an instance of the client, you can use it to create, update or delete the open metadata entities for the ETL jobs. - -* Create/Update/Delete a schema type -* Create/Update/Delete a port implementation, with a schema type and the corresponding PortSchema relationship -* Create/Update/Delete a process, with a corresponding port implementations involved in a transformation -* Create/Update/Delete a database, with a connection, endpoint, connector type and corresponding schema type attached -* Create/Update/Delete a database schema -* Create/Update/Delete a relational table with columns -* Create/Update/Delete a data file with columns, endpoint, connection, connector type and corresponding schema type attached -* Create/Update/Delete a topic with event types and event schema attributes - -> Note: The equivalent REST interfaces are documented in the -[data-engine-server](../../../../data-engine-server/README.md) -module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/ConnectedAssetClient.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/ConnectedAssetClient.java deleted file mode 100644 index 7bda46a5ea8..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/ConnectedAssetClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.client; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase; - -/** - * ConnectedAssetClient manages the retrieval of connections, and the creation of resource connectors used to access the - * content of data sources and services. - */ -public class ConnectedAssetClient extends ConnectedAssetClientBase -{ - private final static String serviceURLMarker = "community-profile"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's userId embedded in all HTTP requests - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker, serverUserId, serverPassword); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineClient.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineClient.java deleted file mode 100644 index 61fd1469829..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineClient.java +++ /dev/null @@ -1,521 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.client; - -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.List; -import java.util.Map; - -/** - * DataEngineClient provides the client-side interface for a data engine tool to create processes with ports, - * schemas and relationships. - */ -public interface DataEngineClient { - /** - * Create or update the process, with all the ports, schema types and corresponding relationships including - * the process hierarchy relationship. - * - * @param userId the name of the calling user - * @param process the process - * - * @return unique identifier of the process in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - String createOrUpdateProcess(String userId, Process process) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete a process - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the process to be deleted - * @param guid the unique identifier of the process to be deleted - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteProcess(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - - /** - * Create or update the engine entity - * - * @param userId the name of the calling user - * @param engine the engine bean - * - * @return unique identifier of the server in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - String createExternalDataEngine(String userId, Engine engine) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Delete the external data engine - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the external data engine - * @param guid the unique identifier of the external data engine - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteExternalDataEngine(String userId, String qualifiedName, String guid) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Create or update the schema type entity, with the corresponding schema attributes and relationships - * - * @param userId the name of the calling user - * @param schemaType the schema type bean - * - * @return unique identifier of the schema type in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - String createOrUpdateSchemaType(String userId, SchemaType schemaType) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the schema type - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the schema type - * @param guid the unique identifier of the schema type - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteSchemaType(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Create or update the port implementation entity,with the corresponding schema type and port schema relationship. It attaches the port - * implementation to the provided process - * - * @param userId the name of the calling user - * @param portImplementation the port implementation bean - * @param processQualifiedName the process qualified name - * - * @return unique identifier of the port implementation in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String createOrUpdatePortImplementation(String userId, PortImplementation portImplementation, String processQualifiedName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Delete the port implementation - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of port implementation - * @param guid the unique identifier of the port implementation - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deletePortImplementation(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - /** - * Add a ProcessHierarchy relationship to a process - * - * @param userId the name of the calling user - * @param processHierarchy the process hierarchy bean - * - * @return the unique identifier (guid) of the child of the process hierarchy that was updated - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String addProcessHierarchy(String userId, ProcessHierarchy processHierarchy) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Add data flow relationships between entities - * - * @param userId the name of the calling user - * @param dataFlows list of data flows - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - void addDataFlows(String userId, List dataFlows) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Sets external source system name using the data engine client - * - * @param externalSourceName Source system name - */ - void setExternalSourceName(String externalSourceName); - - /** - * Returns the name of the source system using data engine client - * - * @return Source system name - */ - String getExternalSourceName(); - - /** - * Create or update the database entity - * - * @param userId the name of the calling user - * @param database the database bean - * - * @return unique identifier of database in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String upsertDatabase(String userId, Database database) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Create or update the database schema entity - * - * @param userId the name of the calling user - * @param databaseSchema the database schema bean - * @param databaseQualifiedName the qualified name of the database, in case it is known - * - * @return unique identifier of database schema in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String upsertDatabaseSchema(String userId, DatabaseSchema databaseSchema, String databaseQualifiedName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Create or update the relational table entity - * - * @param userId the name of the calling user - * @param relationalTable the relational table bean - * @param databaseSchemaQualifiedName the qualified name of the database schema to which it will be related - * - * @return unique identifier of the relational table in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String upsertRelationalTable(String userId, RelationalTable relationalTable, String databaseSchemaQualifiedName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, ConnectorCheckedException; - - /** - * Create or update the data file entity - * - * @param userId the name of the calling user - * @param dataFile the data file bean - * - * @return unique identifier of the relational table in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String upsertDataFile(String userId, DataFile dataFile) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Delete the database - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the database - * @param guid the unique identifier of the database - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteDatabase(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the database schema - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the database schema - * @param guid the unique identifier of the database schema - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteDatabaseSchema(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the relational table - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the relational table - * @param guid the unique identifier of the relational table - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteRelationalTable(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the data file - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the data file - * @param guid the unique identifier of the data file - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteDataFile(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the folder - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the data file - * @param guid the unique identifier of the folder - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteFolder(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the connection - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the connection - * @param guid the unique identifier of the connection - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteConnection(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the endpoint - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the endpoint - * @param guid the unique identifier of the endpoint - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteEndpoint(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Find an entity - * - * @param userId the name of the calling user - * @param findRequestBody request body - * - * @return list of found entities - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - * @throws FunctionNotSupportedException this request is not supported in the target repositories - */ - GUIDListResponse find(String userId, FindRequestBody findRequestBody) throws ConnectorCheckedException, - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - FunctionNotSupportedException; - - /** - * Create or update the topic entity - * - * @param userId the name of the calling user - * @param topic the topic bean - * - * @return unique identifier of topic in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String upsertTopic(String userId, Topic topic) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Create or update the event type entity - * - * @param userId the name of the calling user - * @param eventType the event type bean - * @param topicQualifiedName the qualified name of the topic - * - * @return unique identifier of event type in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException internal problem with the connector - */ - String upsertEventType(String userId, EventType eventType, String topicQualifiedName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - ConnectorCheckedException; - - /** - * Delete the topic - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the topic - * @param guid the unique identifier of the topic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteTopic(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Delete the event type - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the event type - * @param guid the unique identifier of the event type - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - void deleteEventType(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException; - - /** - * Create or update the engine's processing state classification with the provided properties - * @param userId the name of the calling user - * @param properties properties of the processing state - */ - void upsertProcessingState(String userId, Map properties) throws PropertyServerException, - InvalidParameterException, UserNotAuthorizedException, ConnectorCheckedException; - - /** - * Get the engine's processing state classification's properties - * - * @param userId the name of the calling user - */ - public Map getProcessingState(String userId) throws PropertyServerException; -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineEventClient.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineEventClient.java deleted file mode 100644 index 6de282eb15e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineEventClient.java +++ /dev/null @@ -1,515 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.client; - -import org.odpi.openmetadata.accessservices.dataengine.connectors.intopic.DataEngineInTopicClientConnector; -import org.odpi.openmetadata.accessservices.dataengine.event.DataEngineEventType; -import org.odpi.openmetadata.accessservices.dataengine.event.DataEngineRegistrationEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DataFileEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DataFlowsEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DatabaseEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DatabaseSchemaEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DeleteEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.EventTypeEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.PortImplementationEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.ProcessEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.ProcessHierarchyEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.ProcessingStateEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.RelationalTableEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.SchemaTypeEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.TopicEvent; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.List; -import java.util.Map; - - -/*** - * DataEngineEventClient implements Data Engine client side events interface using provided topic connector. - * For more information see {@link DataEngineClient} interface definition. - */ -public class DataEngineEventClient implements DataEngineClient { - - private final DataEngineInTopicClientConnector topicConnector; - private String externalSource; - private DeleteSemantic deleteSemantic = DeleteSemantic.SOFT; - - /** - * Constructor to create DataEngineEventClient with unauthenticated access to the server - * - * @param dataEngineInTopicClientConnector topic connector used to publish to InTopic - */ - public DataEngineEventClient(DataEngineInTopicClientConnector dataEngineInTopicClientConnector) { - this.topicConnector = dataEngineInTopicClientConnector; - } - - /** - * Gets the {@link org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic} - * - * @return deleteSemantic used by the client for deletes - */ - public DeleteSemantic getDeleteSemantic() { - return deleteSemantic; - } - - /** - * Sets the {@link org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic} for the client - */ - public void setDeleteSemantic(DeleteSemantic deleteSemantic) { - this.deleteSemantic = deleteSemantic; - } - - @Override - public String createOrUpdateProcess(String userId, Process process) throws InvalidParameterException, ConnectorCheckedException { - ProcessEvent event = new ProcessEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.PROCESS_EVENT); - event.setProcess(process); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - @Override - public void deleteProcess(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = new DeleteEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.DELETE_PROCESS_EVENT); - event.setQualifiedName(qualifiedName); - event.setGuid(guid); - event.setDeleteSemantic(deleteSemantic); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - * - * @throws InvalidParameterException the bean properties are invalid - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - @Override - public String createExternalDataEngine(String userId, Engine engine) throws InvalidParameterException, - ConnectorCheckedException { - DataEngineRegistrationEvent event = new DataEngineRegistrationEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.DATA_ENGINE_REGISTRATION_EVENT); - event.setEngine(engine); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteExternalDataEngine(String userId, String qualifiedName, String guid) throws InvalidParameterException, - ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_DATA_ENGINE_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - * - * @throws InvalidParameterException the bean properties are invalid - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - @Override - public String createOrUpdateSchemaType(String userId, SchemaType schemaType) throws InvalidParameterException, ConnectorCheckedException { - SchemaTypeEvent event = new SchemaTypeEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.SCHEMA_TYPE_EVENT); - event.setSchemaType(schemaType); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteSchemaType(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_SCHEMA_TYPE_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - * - * @throws InvalidParameterException the bean properties are invalid - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - @Override - public String createOrUpdatePortImplementation(String userId, PortImplementation portImplementation, String processQualifiedName) throws - InvalidParameterException, - ConnectorCheckedException { - PortImplementationEvent event = new PortImplementationEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.PORT_IMPLEMENTATION_EVENT); - event.setPortImplementation(portImplementation); - event.setProcessQualifiedName(processQualifiedName); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public void deletePortImplementation(String userId, String qualifiedName, String guid) throws InvalidParameterException, - ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_PORT_IMPLEMENTATION_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - * - * @throws InvalidParameterException the bean properties are invalid - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - @Override - public String addProcessHierarchy(String userId, ProcessHierarchy processHierarchy) throws InvalidParameterException, ConnectorCheckedException { - - ProcessHierarchyEvent event = new ProcessHierarchyEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.PROCESS_HIERARCHY_EVENT); - event.setProcessHierarchy(processHierarchy); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - * - * @throws InvalidParameterException the bean properties are invalid - * @throws ConnectorCheckedException problem with the underlying connector (if used) - */ - @Override - public void addDataFlows(String userId, List dataFlows) throws InvalidParameterException, ConnectorCheckedException { - - DataFlowsEvent event = new DataFlowsEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.DATA_FLOWS_EVENT); - event.setDataFlows(dataFlows); - - topicConnector.sendEvent(event); - } - - /** - * Sets external source system name using the data engine client - * - * @param externalSourceName Source system name - */ - @Override - public void setExternalSourceName(String externalSourceName) { - this.externalSource = externalSourceName; - } - - /** - * Returns the name of the source system using data engine client - * - * @return Source system name - */ - @Override - public String getExternalSourceName() { - return this.externalSource; - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertDatabase(String userId, Database database) throws InvalidParameterException, ConnectorCheckedException { - DatabaseEvent event = new DatabaseEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.DATABASE_EVENT); - event.setDatabase(database); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertDatabaseSchema(String userId, DatabaseSchema databaseSchema, String databaseQualifiedName) throws InvalidParameterException, - ConnectorCheckedException { - DatabaseSchemaEvent event = new DatabaseSchemaEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.DATABASE_SCHEMA_EVENT); - event.setDatabaseSchema(databaseSchema); - event.setDatabaseQualifiedName(databaseQualifiedName); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertRelationalTable(String userId, RelationalTable relationalTable, String databaseSchemaQualifiedName) throws - InvalidParameterException, - ConnectorCheckedException { - RelationalTableEvent event = new RelationalTableEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.RELATIONAL_TABLE_EVENT); - event.setRelationalTable(relationalTable); - event.setDatabaseSchemaQualifiedName(databaseSchemaQualifiedName); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertDataFile(String userId, DataFile dataFile) throws InvalidParameterException, ConnectorCheckedException { - DataFileEvent event = new DataFileEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.DATA_FILE_EVENT); - event.setDataFile(dataFile); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteDatabase(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_DATABASE_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteDatabaseSchema(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_DATABASE_SCHEMA_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteRelationalTable(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_RELATIONAL_TABLE_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteDataFile(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_DATA_FILE_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteFolder(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_FOLDER_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteConnection(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_CONNECTION_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteEndpoint(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_ENDPOINT_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public GUIDListResponse find(String userId, FindRequestBody findRequestBody) throws FunctionNotSupportedException { - String methodName = "find"; - - throw new FunctionNotSupportedException(DataEngineErrorCode.METHOD_NOT_IMPLEMENTED.getMessageDefinition(methodName), - this.getClass().getName(), methodName); - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertTopic(String userId, Topic topic) throws InvalidParameterException, ConnectorCheckedException { - TopicEvent event = new TopicEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.TOPIC_EVENT); - event.setTopic(topic); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertEventType(String userId, EventType eventType, String topicQualifiedName) throws InvalidParameterException, - ConnectorCheckedException { - EventTypeEvent event = new EventTypeEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.EVENT_TYPE_EVENT); - event.setTopicQualifiedName(topicQualifiedName); - event.setEventType(eventType); - - topicConnector.sendEvent(event); - - //async interaction - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteTopic(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_TOPIC_EVENT); - - topicConnector.sendEvent(event); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteEventType(String userId, String qualifiedName, String guid) throws InvalidParameterException, ConnectorCheckedException { - DeleteEvent event = getDeleteEvent(userId, qualifiedName, guid); - event.setDataEngineEventType(DataEngineEventType.DELETE_EVENT_TYPE_EVENT); - - topicConnector.sendEvent(event); - } - - @Override - public void upsertProcessingState(String userId, Map properties) throws InvalidParameterException, ConnectorCheckedException { - - ProcessingState processingState = new ProcessingState(properties); - - ProcessingStateEvent event = new ProcessingStateEvent(); - - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setDataEngineEventType(DataEngineEventType.PROCESSING_STATE_TYPE_EVENT); - event.setProcessingState(processingState); - - topicConnector.sendEvent(event); - } - - @Override - public Map getProcessingState(String userId) { - //async interaction - return null; - } - - private DeleteEvent getDeleteEvent(String userId, String qualifiedName, String guid) { - DeleteEvent event = new DeleteEvent(); - event.setUserId(userId); - event.setExternalSourceName(externalSource); - event.setQualifiedName(qualifiedName); - event.setGuid(guid); - event.setDeleteSemantic(deleteSemantic); - return event; - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTClient.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTClient.java deleted file mode 100644 index fc000d437ea..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTClient.java +++ /dev/null @@ -1,602 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.client; - -import org.apache.commons.collections4.MapUtils; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataEngineOMASAPIRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataEngineRegistrationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFileRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseSchemaRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DeleteRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.EventTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFlowsRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.PortImplementationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessHierarchyRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessingStateRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.RelationalTableRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.SchemaTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.TopicRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.PropertiesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * The Data Engine Open Metadata Access Service (OMAS) provides an interface for data engine tools to create - * processes with ports, schemas and relationships. See interface definition for more explanation. - */ -public class DataEngineRESTClient extends OCFRESTClient implements DataEngineClient { - private static final String DATA_ENGINE_PATH = "/servers/{0}/open-metadata/access-services/data-engine/users/{1}/"; - private static final String PROCESS_URL_TEMPLATE = DATA_ENGINE_PATH + "processes"; - private static final String DATA_ENGINE_REGISTRATION_URL_TEMPLATE = DATA_ENGINE_PATH + "registration"; - private static final String SCHEMA_TYPE_URL_TEMPLATE = DATA_ENGINE_PATH + "schema-types"; - private static final String PORT_IMPLEMENTATION_URL_TEMPLATE = DATA_ENGINE_PATH + "port-implementations"; - private static final String PROCESS_HIERARCHY_URL_TEMPLATE = DATA_ENGINE_PATH + "process-hierarchies"; - private static final String DATA_FLOWS_URL_TEMPLATE = DATA_ENGINE_PATH + "data-flows"; - private static final String DATABASE_URL_TEMPLATE = DATA_ENGINE_PATH + "databases"; - private static final String DATABASE_SCHEMA_URL_TEMPLATE = DATA_ENGINE_PATH + "database-schemas"; - private static final String RELATIONAL_TABLE_URL_TEMPLATE = DATA_ENGINE_PATH + "relational-tables"; - private static final String DATA_FILE_URL_TEMPLATE = DATA_ENGINE_PATH + "data-files"; - private static final String FOLDER_URL_TEMPLATE = DATA_ENGINE_PATH + "folders"; - private static final String CONNECTION_URL_TEMPLATE = DATA_ENGINE_PATH + "connections"; - private static final String ENDPOINT_URL_TEMPLATE = DATA_ENGINE_PATH + "endpoints"; - private static final String FIND_URL_TEMPLATE = DATA_ENGINE_PATH + "find"; - private static final String TOPIC_URL_TEMPLATE = DATA_ENGINE_PATH + "topics"; - private static final String EVENT_TYPE_URL_TEMPLATE = DATA_ENGINE_PATH + "event-types"; - private static final String PROCESSING_STATE_URL_TEMPLATE = DATA_ENGINE_PATH + "processing-state"; - - private static final String PROCESS_METHOD_NAME = "createOrUpdateProcess"; - private static final String PROCESS_DELETE_METHOD_NAME = "deleteProcess"; - private static final String EXTERNAL_DATA_ENGINE_METHOD_NAME = "createExternalDataEngine"; - private static final String EXTERNAL_DATA_ENGINE_DELETE_METHOD_NAME = "deleteExternalDataEngine"; - private static final String SCHEMA_TYPE_METHOD_NAME = "createOrUpdateSchemaType"; - private static final String SCHEMA_TYPE_DELETE_METHOD_NAME = "deleteSchemaType"; - private static final String PORT_IMPLEMENTATION_METHOD_NAME = "createOrUpdatePortImplementation"; - private static final String PORT_IMPLEMENTATION_DELETE_METHOD_NAME = "deletePortImplementation"; - private static final String PROCESS_HIERARCHY_METHOD_NAME = "createOrUpdateProcessHierarchy"; - private static final String DATA_FLOWS_METHOD_NAME = "addDataFlows"; - private static final String DATABASE_METHOD_NAME = "upsertDatabase"; - private static final String DATABASE_SCHEMA_METHOD_NAME = "upsertDatabaseSchema"; - private static final String RELATIONAL_TABLE_METHOD_NAME = "upsertRelationalTable"; - private static final String DATA_FILE_METHOD_NAME = "upsertDataFile"; - private static final String DATABASE_DELETE_METHOD_NAME = "deleteDatabase"; - private static final String DATABASE_SCHEMA_DELETE_METHOD_NAME = "deleteDatabaseSchema"; - private static final String RELATIONAL_TABLE_DELETE_METHOD_NAME = "deleteRelationalTable"; - private static final String DATA_FILE_DELETE_METHOD_NAME = "deleteDataFile"; - private static final String FOLDER_DELETE_METHOD_NAME = "deleteFolder"; - private static final String CONNECTION_DELETE_METHOD_NAME = "deleteConnection"; - private static final String ENDPOINT_DELETE_METHOD_NAME = "deleteEndpoint"; - private static final String FIND_METHOD_NAME = "find"; - private static final String TOPIC_METHOD_NAME = "upsertTopic"; - private static final String EVENT_TYPE_METHOD_NAME = "upsertEventType"; - private static final String TOPIC_DELETE_METHOD_NAME = "deleteTopic"; - private static final String EVENT_TYPE_DELETE_METHOD_NAME = "deleteEventType"; - - private final String serverPlatformRootURL; - private String externalSourceName; - private DeleteSemantic deleteSemantic = DeleteSemantic.SOFT; - private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - - /** - * Create a new client without authentication. - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * - * @throws InvalidParameterException null URL or server name - */ - public DataEngineRESTClient(String serverName, String serverPlatformRootURL) throws InvalidParameterException { - super(serverName, serverPlatformRootURL); - - this.serverName = serverName; - this.serverPlatformRootURL = serverPlatformRootURL; - } - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * @param userId caller's userId embedded in all HTTP requests - * @param password caller's userId embedded in all HTTP requests - * - * @throws InvalidParameterException null URL or server name - */ - public DataEngineRESTClient(String serverName, String serverPlatformRootURL, String userId, String password) throws InvalidParameterException { - super(serverName, serverPlatformRootURL, userId, password); - - this.serverName = serverName; - this.serverPlatformRootURL = serverPlatformRootURL; - } - - public String getExternalSourceName() { - return externalSourceName; - } - - public void setExternalSourceName(String externalSourceName) { - this.externalSourceName = externalSourceName; - } - - /** - * Gets the {@link org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic} - * - * @return deleteSemantic used by the client for deletes - */ - public DeleteSemantic getDeleteSemantic() { - return deleteSemantic; - } - - /** - * Sets the {@link org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic} for the client - */ - public void setDeleteSemantic(DeleteSemantic deleteSemantic) { - this.deleteSemantic = deleteSemantic; - } - - @Override - public String createOrUpdateProcess(String userId, Process process) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - invalidParameterHandler.validateUserId(userId, PROCESS_METHOD_NAME); - - ProcessRequestBody requestBody = new ProcessRequestBody(); - requestBody.setProcess(process); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, PROCESS_METHOD_NAME, PROCESS_URL_TEMPLATE, requestBody); - } - - @Override - public void deleteProcess(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, PROCESS_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = new DeleteRequestBody(); - requestBody.setQualifiedName(qualifiedName); - requestBody.setGuid(guid); - requestBody.setExternalSourceName(externalSourceName); - requestBody.setDeleteSemantic(deleteSemantic); - - callVoidDeleteRESTCall(userId, PROCESS_DELETE_METHOD_NAME, PROCESS_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String createExternalDataEngine(String userId, Engine engine) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - - invalidParameterHandler.validateUserId(userId, EXTERNAL_DATA_ENGINE_METHOD_NAME); - - DataEngineRegistrationRequestBody requestBody = new DataEngineRegistrationRequestBody(); - requestBody.setEngine(engine); - - return callGUIDPostRESTCall(userId, EXTERNAL_DATA_ENGINE_METHOD_NAME, DATA_ENGINE_REGISTRATION_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteExternalDataEngine(String userId, String qualifiedName, String guid) throws InvalidParameterException, - PropertyServerException { - invalidParameterHandler.validateUserId(userId, EXTERNAL_DATA_ENGINE_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, EXTERNAL_DATA_ENGINE_DELETE_METHOD_NAME, DATA_ENGINE_REGISTRATION_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String createOrUpdateSchemaType(String userId, SchemaType schemaType) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - - invalidParameterHandler.validateUserId(userId, SCHEMA_TYPE_METHOD_NAME); - - SchemaTypeRequestBody requestBody = new SchemaTypeRequestBody(); - requestBody.setSchemaType(schemaType); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, SCHEMA_TYPE_METHOD_NAME, SCHEMA_TYPE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteSchemaType(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, SCHEMA_TYPE_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, SCHEMA_TYPE_DELETE_METHOD_NAME, SCHEMA_TYPE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String createOrUpdatePortImplementation(String userId, PortImplementation portImplementation, String processQualifiedName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - invalidParameterHandler.validateUserId(userId, PORT_IMPLEMENTATION_METHOD_NAME); - - PortImplementationRequestBody requestBody = new PortImplementationRequestBody(); - requestBody.setPortImplementation(portImplementation); - requestBody.setProcessQualifiedName(processQualifiedName); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, PORT_IMPLEMENTATION_METHOD_NAME, PORT_IMPLEMENTATION_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deletePortImplementation(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, PORT_IMPLEMENTATION_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, PORT_IMPLEMENTATION_DELETE_METHOD_NAME, PORT_IMPLEMENTATION_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String addProcessHierarchy(String userId, ProcessHierarchy processHierarchy) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = PROCESS_HIERARCHY_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - ProcessHierarchyRequestBody requestBody = new ProcessHierarchyRequestBody(); - requestBody.setProcessHierarchy(processHierarchy); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, methodName, PROCESS_HIERARCHY_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void addDataFlows(String userId, List dataFlows) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = DATA_FLOWS_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - DataFlowsRequestBody requestBody = new DataFlowsRequestBody(); - requestBody.setDataFlows(dataFlows); - requestBody.setExternalSourceName(externalSourceName); - - callVoidPostRESTCall(userId, methodName, DATA_FLOWS_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertDatabase(String userId, Database database) throws InvalidParameterException, - UserNotAuthorizedException, PropertyServerException { - final String methodName = DATABASE_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - DatabaseRequestBody requestBody = new DatabaseRequestBody(); - requestBody.setDatabase(database); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, methodName, DATABASE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertDatabaseSchema(String userId, DatabaseSchema databaseSchema, String databaseQualifiedName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = DATABASE_SCHEMA_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - DatabaseSchemaRequestBody requestBody = new DatabaseSchemaRequestBody(); - requestBody.setDatabaseSchema(databaseSchema); - requestBody.setDatabaseQualifiedName(databaseQualifiedName); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, methodName, DATABASE_SCHEMA_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertRelationalTable(String userId, RelationalTable relationalTable, String databaseSchemaQualifiedName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = RELATIONAL_TABLE_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - RelationalTableRequestBody requestBody = new RelationalTableRequestBody(); - requestBody.setRelationalTable(relationalTable); - requestBody.setDatabaseSchemaQualifiedName(databaseSchemaQualifiedName); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, methodName, RELATIONAL_TABLE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertDataFile(String userId, DataFile dataFile) throws InvalidParameterException, - UserNotAuthorizedException, PropertyServerException { - final String methodName = DATA_FILE_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - DataFileRequestBody requestBody = new DataFileRequestBody(); - requestBody.setDataFile(dataFile); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, methodName, DATA_FILE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteDatabase(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, DATABASE_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, DATABASE_DELETE_METHOD_NAME, DATABASE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteDatabaseSchema(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, DATABASE_SCHEMA_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, DATABASE_SCHEMA_DELETE_METHOD_NAME, DATABASE_SCHEMA_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteRelationalTable(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, RELATIONAL_TABLE_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, RELATIONAL_TABLE_DELETE_METHOD_NAME, RELATIONAL_TABLE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteDataFile(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, DATA_FILE_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, DATA_FILE_DELETE_METHOD_NAME, DATA_FILE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteFolder(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, FOLDER_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, FOLDER_DELETE_METHOD_NAME, FOLDER_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteConnection(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, CONNECTION_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, CONNECTION_DELETE_METHOD_NAME, CONNECTION_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteEndpoint(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, ENDPOINT_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, ENDPOINT_DELETE_METHOD_NAME, ENDPOINT_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public GUIDListResponse find(String userId, FindRequestBody findRequestBody) throws ConnectorCheckedException, InvalidParameterException, - UserNotAuthorizedException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, FIND_METHOD_NAME); - - return callGUIDListPostRESTCall(FIND_METHOD_NAME, serverPlatformRootURL + FIND_URL_TEMPLATE, findRequestBody, serverName, userId); - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertTopic(String userId, Topic topic) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - final String methodName = TOPIC_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - TopicRequestBody requestBody = new TopicRequestBody(); - requestBody.setTopic(topic); - requestBody.setExternalSourceName(externalSourceName); - - return callGUIDPostRESTCall(userId, methodName, TOPIC_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public String upsertEventType(String userId, EventType eventType, String topicQualifiedName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = EVENT_TYPE_METHOD_NAME; - - invalidParameterHandler.validateUserId(userId, methodName); - - EventTypeRequestBody requestBody = new EventTypeRequestBody(); - requestBody.setEventType(eventType); - requestBody.setExternalSourceName(externalSourceName); - requestBody.setTopicQualifiedName(topicQualifiedName); - - return callGUIDPostRESTCall(userId, methodName, EVENT_TYPE_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteTopic(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, TOPIC_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, TOPIC_DELETE_METHOD_NAME, TOPIC_URL_TEMPLATE, requestBody); - } - - /** - * {@inheritDoc} - */ - @Override - public void deleteEventType(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException { - invalidParameterHandler.validateUserId(userId, EVENT_TYPE_DELETE_METHOD_NAME); - - DeleteRequestBody requestBody = getDeleteRequestBody(qualifiedName, guid); - - callVoidDeleteRESTCall(userId, EVENT_TYPE_DELETE_METHOD_NAME, EVENT_TYPE_URL_TEMPLATE, requestBody); - } - - @Override - public void upsertProcessingState(String userId, Map properties) throws PropertyServerException, - InvalidParameterException, UserNotAuthorizedException { - String methodName = "upsertProcessingState"; - - ProcessingState processingState = new ProcessingState(properties); - - ProcessingStateRequestBody requestBody = new ProcessingStateRequestBody(processingState); - requestBody.setExternalSourceName(externalSourceName); - - callVoidPostRESTCall(userId, methodName, PROCESSING_STATE_URL_TEMPLATE, requestBody); - } - - @Override - public Map getProcessingState(String userId) throws PropertyServerException { - String methodName = "getProcessingState"; - - PropertiesResponse restResult = this.callGetRESTCall(methodName, PropertiesResponse.class, - serverPlatformRootURL + PROCESSING_STATE_URL_TEMPLATE, serverName, userId, externalSourceName); - - if(restResult == null || MapUtils.isEmpty(restResult.getProperties())) { - return Collections.emptyMap(); - } - return restResult.getProperties().entrySet() - .stream() - .collect(Collectors.toMap(Map.Entry::getKey, e -> (Long) e.getValue())); - } - - private void callVoidPostRESTCall(String userId, String methodName, String urlTemplate, DataEngineOMASAPIRequestBody requestBody, - Object... params) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - super.callVoidPostRESTCall(methodName, serverPlatformRootURL + urlTemplate, requestBody, serverName, userId, params); - } - - private String callGUIDPostRESTCall(String userId, String methodName, String urlTemplate, DataEngineOMASAPIRequestBody requestBody, - Object... params) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - GUIDResponse restResult = super.callGUIDPostRESTCall(methodName, serverPlatformRootURL + urlTemplate, requestBody, serverName, - userId, params); - - exceptionHandler.detectAndThrowInvalidParameterException(restResult); - exceptionHandler.detectAndThrowUserNotAuthorizedException(restResult); - exceptionHandler.detectAndThrowPropertyServerException(restResult); - - return restResult.getGUID(); - } - - private void callVoidDeleteRESTCall(String userId, String methodName, String urlTemplate, DataEngineOMASAPIRequestBody requestBody, - Object... params) throws PropertyServerException { - super.callDeleteRESTCall(methodName, VoidResponse.class, serverPlatformRootURL + urlTemplate, requestBody, serverName, userId, params); - } - - private DeleteRequestBody getDeleteRequestBody(String qualifiedName, String guid) { - DeleteRequestBody requestBody = new DeleteRequestBody(); - requestBody.setQualifiedName(qualifiedName); - requestBody.setGuid(guid); - requestBody.setExternalSourceName(externalSourceName); - requestBody.setDeleteSemantic(deleteSemantic); - - return requestBody; - } -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTConfigurationClient.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTConfigurationClient.java deleted file mode 100644 index 221a02c35d2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTConfigurationClient.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.client; - - -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.ConnectionResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * DataEngineRESTConfigurationClient provides an extension to the client-side REST interface for obtaining Data Engine access service configuration - * specifics. - */ -public class DataEngineRESTConfigurationClient extends DataEngineRESTClient { - - private static final String IN_TOPIC_CONNECTION_PATH = - "/servers/{0}/open-metadata/access-services/data-engine/users/{1}/topics/in-topic-connection"; - private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - - /** - * Create DataEngineRESTConfigurationClient with unauthenticated access to the DE OMAS server. - * - * @param serverName the server name - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * - * @throws InvalidParameterException null URL or server name - */ - public DataEngineRESTConfigurationClient(String serverName, String serverPlatformRootURL) throws InvalidParameterException { - super(serverName, serverPlatformRootURL); - - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformRootURL; - } - - /** - * Instantiates a new Data Engine REST configuration client. - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * @param userId caller's userId embedded in all HTTP requests - * @param password caller's userId embedded in all HTTP requests - * - * @throws InvalidParameterException null URL or server name - */ - public DataEngineRESTConfigurationClient(String serverName, String serverPlatformRootURL, String userId, String password) throws - InvalidParameterException { - super(serverName, serverPlatformRootURL, userId, password); - - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformRootURL; - } - - /** - * Retrieve input topic connection details from remote DE OMAS instance. - * - * @param serverName name of the server hosting DE access service - * @param userId user accessing the server hosting DE access service - * - * @return ConnectionResponse OCF object - * - * @throws InvalidParameterException input parameter(s) invalid - * @throws PropertyServerException something went wrong with the REST call stack - * @throws UserNotAuthorizedException user is not authorized - */ - public ConnectionResponse getInTopicConnection(String serverName, String userId) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - - String methodName = "getInTopicConnection"; - - invalidParameterHandler.validateUserId(serverName, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - - return callOCFConnectionGetRESTCall(methodName, serverPlatformURLRoot + IN_TOPIC_CONNECTION_PATH, serverName, userId); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/OpenMetadataStoreClient.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/OpenMetadataStoreClient.java deleted file mode 100644 index 05d04375dcb..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/OpenMetadataStoreClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.client; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.gaf.client.*; - -/** - * OpenMetadataClientBase provides an interface to the open metadata store. This is part of the Governance Action Framework (GAF) - * and provides a comprehensive interface for working with all types of metadata, subject to the user's (and this OMAS's) security permissions. - * The interface supports search, maintenance of metadata elements, classifications and relationships plus the ability to raise incident reports - * and todos along with the ability to work with metadata valid values and translations. - */ -public class OpenMetadataStoreClient extends OpenMetadataClientBase -{ - private final static String serviceURLMarker = "data-engine"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, maxPageSize); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's password embedded in all HTTP requests - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, serverUserId, serverPassword, maxPageSize); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/package-info.java deleted file mode 100644 index 6d3876cb9c9..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/main/java/org/odpi/openmetadata/accessservices/dataengine/client/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These are the Java clients for the Data Engine OMAS that can be used either by integration services or external engines that are - * using Egeria directly as their metadata management services. - */ -package org.odpi.openmetadata.accessservices.dataengine.client; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/test/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTClientTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-client/src/test/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTClientTest.java deleted file mode 100644 index 17637fe2d05..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-client/src/test/java/org/odpi/openmetadata/accessservices/dataengine/client/DataEngineRESTClientTest.java +++ /dev/null @@ -1,223 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.client; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.adapters.connectors.restclients.RESTClientConnector; -import org.odpi.openmetadata.adapters.connectors.restclients.ffdc.exceptions.RESTServerException; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.PropertiesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.util.ReflectionUtils; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -public class DataEngineRESTClientTest { - - private static final String SERVER_URL = "https://localhost:9444"; - private static final String SERVER_NAME = "TestServer"; - private static final String USER_ID = "zebra91"; - private static final String GUID = "guid"; - private static final String EXTERNAL_SOURCE_NAME = "externalSourceName"; - private static final String QUALIFIED_NAME = "qualifiedName"; - - @Mock - private RESTClientConnector connector; - - private DataEngineRESTClient dataEngineRESTClient; - - @Before - public void before() throws InvalidParameterException { - MockitoAnnotations.openMocks(this); - - dataEngineRESTClient = new DataEngineRESTClient(SERVER_NAME, SERVER_URL); - - Field connectorField = ReflectionUtils.findField(DataEngineRESTClient.class, "clientConnector"); - if (connectorField != null) { - connectorField.setAccessible(true); - ReflectionUtils.setField(connectorField, dataEngineRESTClient, connector); - connectorField.setAccessible(false); - } - - dataEngineRESTClient.setExternalSourceName(EXTERNAL_SOURCE_NAME); - } - - @Test - public void upsertDatabase() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, RESTServerException { - GUIDResponse response = mockGUIDResponse(); - Database database = new Database(); - - when(connector.callPostRESTCall(eq("upsertDatabase"), eq(GUIDResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.upsertDatabase(USER_ID, database); - assertEquals(GUID, response.getGUID()); - } - - @Test - public void upsertDatabaseSchema() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, RESTServerException { - GUIDResponse response = mockGUIDResponse(); - DatabaseSchema databaseSchema = new DatabaseSchema(); - - when(connector.callPostRESTCall(eq("upsertDatabaseSchema"), eq(GUIDResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.upsertDatabaseSchema(USER_ID, databaseSchema, null); - assertEquals(GUID, response.getGUID()); - } - - @Test - public void upsertRelationalTable() throws RESTServerException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GUIDResponse response = mockGUIDResponse(); - RelationalTable relationalTable = new RelationalTable(); - - when(connector.callPostRESTCall(eq("upsertRelationalTable"), eq(GUIDResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.upsertRelationalTable(USER_ID, relationalTable, "databaseQualifiedName"); - assertEquals(GUID, response.getGUID()); - } - - @Test - public void upsertDataFile() throws RESTServerException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GUIDResponse response = mockGUIDResponse(); - DataFile dataFile = new DataFile(); - - when(connector.callPostRESTCall(eq("upsertDataFile"), eq(GUIDResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.upsertDataFile(USER_ID, dataFile); - assertEquals(GUID, response.getGUID()); - } - - @Test - public void deleteDatabase() throws RESTServerException, InvalidParameterException, PropertyServerException { - VoidResponse response = mockVoidResponse(); - - when(connector.callDeleteRESTCall(eq("deleteDatabase"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.deleteDatabase(USER_ID, QUALIFIED_NAME, null); - - verify(connector, times(1)).callDeleteRESTCall(eq("deleteDatabase"), eq(VoidResponse.class), anyString(), any(), any()); - } - - @Test - public void deleteDatabaseSchema() throws RESTServerException, InvalidParameterException, PropertyServerException { - VoidResponse response = mockVoidResponse(); - - when(connector.callDeleteRESTCall(eq("deleteDatabaseSchema"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.deleteDatabaseSchema(USER_ID, QUALIFIED_NAME, null); - - verify(connector, times(1)).callDeleteRESTCall(eq("deleteDatabaseSchema"), - eq(VoidResponse.class), anyString(), any(), any()); - } - - @Test - public void deleteRelationalTable() throws RESTServerException, InvalidParameterException, PropertyServerException { - VoidResponse response = mockVoidResponse(); - - when(connector.callDeleteRESTCall(eq("deleteRelationalTable"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.deleteRelationalTable(USER_ID, QUALIFIED_NAME, null); - - verify(connector, times(1)).callDeleteRESTCall(eq("deleteRelationalTable"), eq(VoidResponse.class), anyString(), any(), any()); - } - - @Test - public void deleteDataFile() throws RESTServerException, InvalidParameterException, PropertyServerException { - VoidResponse response = mockVoidResponse(); - - when(connector.callDeleteRESTCall(eq("deleteDataFile"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.deleteDataFile(USER_ID, QUALIFIED_NAME, null); - - verify(connector, times(1)).callDeleteRESTCall(eq("deleteDataFile"), eq(VoidResponse.class), anyString(), any(), any()); - } - - @Test - public void deleteFolder() throws RESTServerException, InvalidParameterException, PropertyServerException { - VoidResponse response = mockVoidResponse(); - - when(connector.callDeleteRESTCall(eq("deleteFolder"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.deleteFolder(USER_ID, QUALIFIED_NAME, null); - - verify(connector, times(1)).callDeleteRESTCall(eq("deleteFolder"), eq(VoidResponse.class), anyString(), any(), any()); - } - - @Test - public void deleteConnection() throws RESTServerException, InvalidParameterException, PropertyServerException { - VoidResponse response = mockVoidResponse(); - - when(connector.callDeleteRESTCall(eq("deleteConnection"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.deleteConnection(USER_ID, QUALIFIED_NAME, null); - - verify(connector, times(1)).callDeleteRESTCall(eq("deleteConnection"), eq(VoidResponse.class), anyString(), any(), any()); - } - - @Test - public void deleteEndpoint() throws RESTServerException, InvalidParameterException, PropertyServerException { - VoidResponse response = mockVoidResponse(); - - when(connector.callDeleteRESTCall(eq("deleteEndpoint"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.deleteEndpoint(USER_ID, QUALIFIED_NAME, null); - - verify(connector, times(1)).callDeleteRESTCall(eq("deleteEndpoint"), eq(VoidResponse.class), anyString(), any(), any()); - } - - @Test - public void upsertProcessingState() throws RESTServerException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - VoidResponse response = mockVoidResponse(); - - when(connector.callPostRESTCall(eq("upsertProcessingState"), eq(VoidResponse.class), anyString(), any(), any())) - .thenReturn(response); - dataEngineRESTClient.upsertProcessingState(USER_ID, new HashMap<>()); - - verify(connector, times(1)).callPostRESTCall(eq("upsertProcessingState"), eq(VoidResponse.class), anyString(), any(), any()); - } - - - @Test - public void getProcessingState() throws RESTServerException, PropertyServerException { - Map properties = new HashMap<>(); - properties.put("key", 100L); - PropertiesResponse response = new PropertiesResponse(); - response.setProperties(properties); - - when(connector.callGetRESTCall(eq("getProcessingState"), eq(PropertiesResponse.class), anyString(), any(), any(), - any())).thenReturn(response); - dataEngineRESTClient.getProcessingState(USER_ID); - - verify(connector, times(1)).callGetRESTCall(eq("getProcessingState"), - eq(PropertiesResponse.class), anyString(), any(), any(), any()); - } - - private GUIDResponse mockGUIDResponse() { - GUIDResponse response = new GUIDResponse(); - response.setGUID(GUID); - return response; - } - - private VoidResponse mockVoidResponse() { - return new VoidResponse(); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/README.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/README.md deleted file mode 100644 index 1aaed187844..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/README.md +++ /dev/null @@ -1,15 +0,0 @@ - - - -# Data Engine Open Metadata Access Service (OMAS) server-side implementation - -Data Engine OMAS server supports the server side implementation of the access service.This includes the - * interaction with the [administration services](../../../admin-services) for - registration, configuration, initialization and termination of the access service. - * interaction with the [repository services](../../../repository-services) to work with open metadata from the - [cohort](../../../repository-services/docs/open-metadata-repository-cohort.md). - * support for the access service's API and its related event management. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/build.gradle b/open-metadata-implementation/access-services/data-engine/data-engine-server/build.gradle deleted file mode 100644 index 7c1789df55f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/build.gradle +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id "io.freefair.lombok" -} - -dependencies { - implementation 'org.springframework:spring-core' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-server') - implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-apis') - implementation project(':open-metadata-implementation:common-services:generic-handlers') - implementation 'org.slf4j:slf4j-api' - implementation 'org.codehaus.plexus:plexus-utils' - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-api') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation project(':open-metadata-implementation:common-services:repository-handler') - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-handlers') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation 'org.apache.commons:commons-collections4' - implementation 'org.springframework:spring-web' - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'com.fasterxml.jackson.core:jackson-core' - implementation 'org.apache.commons:commons-lang3' - testImplementation 'org.testng:testng' - testImplementation 'org.mockito:mockito-junit-jupiter' - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testImplementation 'org.mockito:mockito-core' - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-topic-connectors') -} - -description = 'Data Engine OMAS Server-side' - -java { - withJavadocJar() -} - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/configuration/README.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/configuration/README.md deleted file mode 100644 index 559bd0f23fa..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/configuration/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - - -# Configuring the Data Engine OMAS - - -* [Configuring the Open Metadata Access Services](https://egeria-project.org/guides/admin/servers/configuring-the-access-services) -* [Configuring the Egeria IBM Connectors](https://github.com/odpi/egeria-connector-ibm-information-server) -* [Configuring the Open Metadata Archives that are loaded on Server Startup](https://egeria-project.org/guides/admin/servers/configuring-the-startup-archives) - use to load the connector types archive - ----- -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/data-engine/data-engine-server/docs/scenarios/add-data-flows.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/add-data-flows.md deleted file mode 100644 index 3e0baecd47e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/add-data-flows.md +++ /dev/null @@ -1,83 +0,0 @@ - - - -# Add data flows - -Add DataFlows between any Referenceable, based on the qualified names of existing entities. - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/data-flows - -{ - "dataFlows": [ - { - "dataSupplier": "home/files/names.csv::Id::0", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id" - }, - { - "dataSupplier": "home/files/names.csv::First::1", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First" - }, - { - "dataSupplier": "home/files/names.csv::Last::2", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last" - }, - { - "dataSupplier": "home/files/names.csv::Location::3", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location", - "dataConsumer": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID", - "dataConsumer": "home/files/emplname.csv::EMPID::0" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME", - "dataConsumer": "home/files/emplname.csv::FNAME::1" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME", - "dataConsumer": "home/files/emplname.csv::LNAME::2" - }, - { - "dataSupplier": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID", - "dataConsumer": "home/files/emplname.csv::LOCID::3" - } - ], - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before adding data flows -`VoidReponse` with status and error message if failing. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-data-file.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-data-file.md deleted file mode 100644 index 714ad6ff4c3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-data-file.md +++ /dev/null @@ -1,65 +0,0 @@ - - - -# Create data file - -Create a data file, with the associated schema, columns, folder hierarchy and a connection. The schema is generated -automatically, the columns according to the payload, the folder structure is based on the value of file.pathName and -the connection, which also includes an endpoint, is based on the value of optional fields file.protocol and -file.networkAddress. A connector type is linked to the connection indicating which implementation the connection uses. -By default the connector type is a OCF one and it's chosen based on the file type. The data file can also be marked as incomplete, -which means that it is missing data to be completely described. - -A csv file can be created by changing the value of field file.type from "DataFile" into "CSVFile" - -More examples with all available properties for a data file can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/data-files - -{ - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform", - "file" :{ - "type" : "DataFile", - "qualifiedName" : "(file)=DATAFILE.DAT", - "displayName" : "dataFile.dat", - "incomplete" : false, - "pathName" : "/home/files/dataFile.dat", - "protocol" : "ftp", - "networkAddress" : "localhost", - "columns" : [ - { - "qualifiedName" : "(file)=DATAFILE.DAT::(column)=COLUMN-A", - "displayName" : "column-a" - }, - { - "qualifiedName" : "(file)=DATAFILE.DAT::(column)=COLUMN-B", - "displayName" : "column-b" - } - ] - } -} -``` - -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process -`GUIDResponse` - response containing the data file GUID, with status and error message if failing -`type` - type of file to be created, either a DataFile or a CSVFile -`pathName` - file system location of the data file -`protocol` - used when creating the connection, endpoint and the relationship to the proper connector type -`networkAddress` - used to create connection, endpoint and the relationship to the proper connector type - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-database-schema.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-database-schema.md deleted file mode 100644 index 73d12aa7d91..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-database-schema.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# Create database schema - -Create a database schema, linking it to a given database, if any is provided. The database schema can also be marked as incomplete, -which means that it is missing data to be completely described, like the database to which it is linked. - -More examples with all available properties for a database can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/database-schemas - -{ - "databaseQualifiedName": "(host)=HOST::(database)=MINIMAL", - "databaseSchema": { - "qualifiedName": "(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1", - "displayName": "DB2INST1", - "description": "DB2INST1 database schema description", - "owner": "Administrator IIS", - "ownerType": "USER_ID", - "zoneMembership": [ - "default" - ] - }, - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform", - "incomplete": false -} -``` - -`databaseQualifiedName` - name of the database to which the database schema will be linked -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process or entity -`incomplete` - determines if the database schema has all needed information to be described. If the value is `true`, -then the database schema is not connected to a database -

-`GUIDResponse` - response containing the database GUID, with status and error message if failing - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-database.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-database.md deleted file mode 100644 index a95a757342a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-database.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# Create database - -Create a database and all the entities inside it, if any. These entities are a database schema and relational tables. -If provided, the fields protocol and networkAddress will trigger the creation of a connection, an endpoint and a relationship -to a proper connector type. A connector type is linked to the connection indicating which implementation the connection uses. -By default, the connector type is a OCF one, but for the moment there is no current implementation for it. -This means none of these three entities will be created (connection, connector type, endpoint). - -More examples with all available properties for a database can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/databases - -{ - "database": { - "qualifiedName": "(host)=HOST::(database)=MINIMAL-basic", - "displayName": "MINIMAL-basic", - "protocol" : "ftp", - "networkAddress" : "localhost", - "schema": { - "qualifiedName": "(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1", - "displayName": "DB2INST1" - } - }, - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` - -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process -`GUIDResponse` - response containing the database GUID, with status and error message if failing -`protocol` - used to create connection, endpoint and the relationship to the proper connector type -`networkAddress` - used to create connection, endpoint and the relationship to the proper connector type - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-event-type.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-event-type.md deleted file mode 100644 index 32d7b65ae29..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-event-type.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# Create an event type - -Create an event type, with the associated event schema attributes. -More examples with all available properties for an event type can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-topics-lineage_examples.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/event-types - -{ - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform", - "topicQualifiedName": "(topic)=test-topic", - "eventType": { - "qualifiedName": "(topic)=test-topic::(eventType)=test-event", - "displayName": "test-event", - "eventSchemaAttributes": [ - { - "qualifiedName": "(topic)=test-topic::(eventType)=test-event::(eventAttribute)=event-attribute", - "displayName": "event-attribute" - } - ] - } -} -``` - -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process -`GUIDResponse` - response containing the topic GUID, with status and error message if failing - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-port-implementation.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-port-implementation.md deleted file mode 100644 index 971382190b7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-port-implementation.md +++ /dev/null @@ -1,90 +0,0 @@ - - - -# Create port implementation - -Create a PortImplementation, with associated SchemaType, PortSchema and ProcessPort relationships. - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/port-implementations - -{ - "processQualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns", - "portImplementation": { - "displayName": "NamesFileInputPort", - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputPort", - "updateSemantic": "REPLACE", - "type": "INPUT_PORT", - "schema": { - "displayName": "NamesFileInputSchema", - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema", - "author": "Platform User", - "columns": [ - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last", - "displayName": "Last", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 0, - "dataType": "VARCHAR" - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First", - "displayName": "First", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 1, - "dataType": "VARCHAR" - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id", - "displayName": "Id", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 2, - "dataType": "INTEGER" - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location", - "displayName": "Location", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 3, - "dataType": "INTEGER" - } - ] - } - }, - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` - -`externalSourceName` - qualifiedName of the external data engine tool. -`processQualifiedName` - qualifiedName of the process that the port will be attached to. - - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any port. -`GUIDResponse` - response containing the port guid, with status and error message if failing. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-process.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-process.md deleted file mode 100644 index 04a6567fc25..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-process.md +++ /dev/null @@ -1,150 +0,0 @@ - - - -# Create a process - -Create a Process, with port implementations. -For each port, it creates the associated schema type and columns. - -Check [create-port-implementation](create-port-implementation.md) -and [create-schema-types](create-schema-type.md) for examples of the more granular payloads. - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/processes - -{ - "process": - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns", - "displayName": "CopyColumns", - "name": "CopyColumns", - "description": "CopyColumns is (sub)process that describes the low level implementation activities performed by a platform or tool.", - "owner": "Platform User", - "portImplementations": [ - { - "displayName": "NamesFileInputPort", - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputPort", - "updateSemantic": "REPLACE", - "type": "INPUT_PORT", - "schema": { - "displayName": "NamesFileInputSchema", - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema", - "author": "Platform User", - "columns": [ - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last", - "displayName": "Last", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 0, - "dataType": "VARCHAR" - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First", - "displayName": "First", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 1, - "dataType": "VARCHAR" - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id", - "displayName": "Id", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 2, - "dataType": "INTEGER" - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location", - "displayName": "Location", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 3, - "dataType": "INTEGER" - } - ] - } - }, - { - "displayName": "EmplnameFileOutputPort", - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputPort", - "updateSemantic": "REPLACE", - "type": "OUTPUT_PORT", - "schema": { - "displayName": "EmplnameFileOutputSchema", - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema", - "author": "Platform User", - "columns": [ - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID", - "displayName": "EMPID", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 0 - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME", - "displayName": "FNAME", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 0 - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID", - "displayName": "LOCID", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 0 - }, - { - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME", - "displayName": "LNAME", - "minCardinality": 0, - "maxCardinality": 0, - "allowsDuplicateValues": false, - "orderedValues": false, - "position": 0 - } - ] - } - } - ], - "updateSemantic": "REPLACE" - } - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` - -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process. -`GUIDResponse` - response containing the unique identifiers of the created process, with status and error message if failing. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-relational-table.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-relational-table.md deleted file mode 100644 index b1220f78847..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-relational-table.md +++ /dev/null @@ -1,63 +0,0 @@ - - - -# Create relational table - -Create a relational table, with the associated schema type and relational columns, and attach it to a database. - -More examples with all available properties for a table can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/relational-tables - -{ - "databaseQualifiedName": "(host)=HOST::(database)=MINIMAL-basic", - "table": { - "qualifiedName": "(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic", - "displayName": "EMPLNAME-basic", - "columns": [ - { - "qualifiedName": "(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=EMPID", - "displayName": "EMPID", - "dataType": "INTEGER" - }, - { - "qualifiedName": "(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=FNAME", - "displayName": "FNAME", - "dataType": "STRING" - }, - { - "qualifiedName": "(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=LOCID", - "displayName": "LOCID", - "dataType": "INTEGER" - }, - { - "qualifiedName": "(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=SURNAME", - "displayName": "SURNAME", - "dataType": "STRING" - } - ] - }, - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` - -`databaseQualifiedName` - qualifiedName of the database. -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process. -`GUIDResponse` - response containing the database GUID, with status and error message if failing. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-schema-type.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-schema-type.md deleted file mode 100644 index d2c794a292b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-schema-type.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# Create schema type - -Create a SchemaType with SchemaAttributes and relationships - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/schema-types/ - -{ - "schema": { - "qualifiedName": "extern:fr:6c18e03b7e4f44089462e858538bd5d2", - "displayName": "EMPLOYEE", - "columns": [ - { - "qualifiedName": "source-schema-attribute-qualified-name", - "displayName": "DEPT", - "elementPosition": 0 - }, - { - "qualifiedName": "(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=EMPSTATUS", - "displayName": "EMPSTATUS", - "elementPosition": 0 - }, - { - "qualifiedName": "(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=FNAME", - "displayName": "FNAME", - "elementPosition": 0 - } - ] - }, - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any schema type. -`GUIDResponse` - response containing the schema type guid, with status and error message if failing. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-topic.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-topic.md deleted file mode 100644 index de8071748f8..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/create-topic.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# Create topic - -Create a topic, with the associated event types. For each event type it creates the associated event schema attributes -More examples with all available properties for a topic can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-topics-lineage_examples.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/topics - -{ - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform", - "topic": { - "qualifiedName": "(topic)=test-topic", - "displayName": "test-topic", - "eventTypes": [ - { - "qualifiedName": "(topic)=test-topic::(eventType)=test-event", - "displayName": "test-event", - "eventSchemaAttributes": [ - { - "qualifiedName": "(topic)=test-topic::(eventType)=test-event::(eventAttribute)=event-attribute", - "displayName": "event-attribute" - } - ] - } - ] - } -} -``` - -`externalSourceName` - qualifiedName of the external data engine tool. - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process -`GUIDResponse` - response containing the topic GUID, with status and error message if failing - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-connection.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-connection.md deleted file mode 100644 index 1766d5c1e6d..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-connection.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete connection - -Delete a connection - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/connections/ - -{ - "guid": "connectionGUID", - "qualifiedName": "Connection::ftp::localhost", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the connection to be deleted -`qualifiedName` - optional property describing the qualifiedName of the connection to be deleted
-Note that you must provide either the qualifiedName, or the guid of the connection
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-data-file.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-data-file.md deleted file mode 100644 index b3dd7d18510..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-data-file.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete data file - -Delete a DataFile with columns and relationships - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/data-files/ - -{ - "guid": "dataFileGUID", - "qualifiedName": "(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the data file to be deleted -`qualifiedName` - optional property describing the qualifiedName of the data files to be deleted
-Note that you must provide either the qualifiedName, or the guid of the data file
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-database-schema.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-database-schema.md deleted file mode 100644 index a6b1e93d9d1..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-database-schema.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete database schema - -Delete a Database Schema - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/database-schemas/ - -{ - "guid": "databaseGUID", - "qualifiedName": "(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the database schema to be deleted -`qualifiedName` - optional property describing the qualifiedName of the database schema to be deleted
-Note that you must provide either the qualifiedName, or the guid of the database schema
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-database.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-database.md deleted file mode 100644 index d61e3511a9e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-database.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete database - -Delete a Database with tables - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/databases/ - -{ - "guid": "databaseGUID", - "qualifiedName": "(host)=HOST::(database)=MINIMAL", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the database to be deleted -`qualifiedName` - optional property describing the qualifiedName of the database to be deleted
-Note that you must provide either the qualifiedName, or the guid of the database
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-endpoint.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-endpoint.md deleted file mode 100644 index 011ebba70a1..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-endpoint.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete endpoint - -Delete an endpoint - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/endpoints/ - -{ - "guid": "endpointGUID", - "qualifiedName": "Endpoint::ftp::localhost", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the endpoint to be deleted -`qualifiedName` - optional property describing the qualifiedName of the endpoint to be deleted
-Note that you must provide either the qualifiedName, or the guid of the endpoint
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-event-type.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-event-type.md deleted file mode 100644 index dab1cef4af2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-event-type.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete event type - -Delete an Event Type with event schema attributes - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-topics-lineage_examples.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/event-types/ - -{ - "guid": "eventTypeGUID", - "qualifiedName": "(topic)=test-topic::(eventType)=test-event", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the event type to be deleted -`qualifiedName` - optional property describing the qualifiedName of the event type to be deleted
-Note that you must provide either the qualifiedName, or the guid of the event type
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-port-implementation.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-port-implementation.md deleted file mode 100644 index df7a04105d3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-port-implementation.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# Delete a port implementation - -Delete a Port Implementation, with the associated schema type and columns. - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/port-implementations - -{ - "guid": "portImplementationGUID", - "qualifiedName": "portImplementationQualifiedName", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} - -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the port implementation to be deleted -`qualifiedName` - optional property describing the qualifiedName of the port implementation to be deleted
-Note that you must provide either the qualifiedName or the guid of the port implementation
-`VoidRespone` - void response with status and error message if failing ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-process.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-process.md deleted file mode 100644 index e8272566dc8..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-process.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# Delete processes - -Delete a Process, with the associated port implementations and data flows. -For each port, it will delete the associated schema type and columns. - -Check [delete-port-implementation](delete-port-implementation.md) -and [delete-schema-types](create-schema-type.md) for examples of the more granular payloads. - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/processes - -{ - "qualifiedName": "(process)=CopyColumsFlow::(process)=CopyColumns", - "guid": "processGUID", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` - -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the process to be deleted -`qualifiedName` - optional property describing the qualifiedName of the process to be deleted
-Note that you must provide either the qualifiedName or the guid of the port implementation
-`VoidRespone` - void response with status and error message if failing ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-relational-table.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-relational-table.md deleted file mode 100644 index 783679a2b2d..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-relational-table.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete relational table - -Delete a RelationalTable with columns and relationships - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/relational-tables/ - -{ - "guid": "schemaGUID", - "qualifiedName": "(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the schema type to be deleted -`qualifiedName` - optional property describing the qualifiedName of the relational table to be deleted
-Note that you must provide either the qualifiedNam,e or the guid of the relational table
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-schema-type.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-schema-type.md deleted file mode 100644 index c447153ccb4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-schema-type.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete schema type - -Delete a SchemaType with columns and relationships - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/schema-types/ - -{ - "guid": "schemaGUID", - "qualifiedName": "schemaQualifiedName", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the schema type to be deleted -`qualifiedName` - optional property describing the qualifiedName of the schema type to be deleted
-Note that you must provide either the qualifiedName, or the guid of the schema type
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-topic.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-topic.md deleted file mode 100644 index 131396c3eb9..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/delete-topic.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# Delete topic - -Delete a Topic with event types - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-topics-lineage_examples.postman_collection.json) - -``` -DELETE {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/topics/ - -{ - "guid": "topicGUID", - "qualifiedName": "(topic)=test-topic", - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform" -} -``` -`externalSourceName` - qualifiedName of the external data engine tool.
-`guid` - optional property describing the unique identifier of the topic to be deleted -`qualifiedName` - optional property describing the qualifiedName of the topic to be deleted
-Note that you must provide either the qualifiedName, or the guid of the topic
-`VoidRespone` - void response with status and error message if failing - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/find-entity.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/find-entity.md deleted file mode 100644 index f02d242b021..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/find-entity.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# Find entity - -Find a Data Engine related entity, based on provided criteria - -More examples on finding an entity can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json) - - -``` -POST {{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/find -{ - "identifiers" : { - "qualifiedName": "(file)=CSVFILE.CSV" - }, - "externalSourceName": "(organization)=Company::(project)=ExternalDataPlatform", - "type": "Referenceable" -} -``` - -`qualifiedName` - entity identifier (mandatory) -`externalSourceName` - qualifiedName of the external data engine tool (optional) - Note that you need to register the data engine tool with [register-data-engine-tool](register-data-engine-tool.md) - before creating any process -`type` - type of file to be search (optional - defaults to Referenceable) -`GUIDListResponse` - response containing list of GUIDs, that match find criteria - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/lookup-registration.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/lookup-registration.md deleted file mode 100644 index 734826aea8b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/lookup-registration.md +++ /dev/null @@ -1,27 +0,0 @@ - - - -# Lookup registration - -Lookup registration submitted by an external tool. - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) - -``` -GET {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/software-server-capabilities/{engineQualifiedName} -``` - -`GUIDResponse` - response containing the external tool guid, with status and error message if failing. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/register-data-engine-tool.md b/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/register-data-engine-tool.md deleted file mode 100644 index 311cb35e927..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/docs/scenarios/register-data-engine-tool.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# Register tool - -Register an external tool. - -More examples can be found in the -[sample collection](../../../docs/samples/collections/DataEngine-process_endpoints.postman_collection.json) - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}/software-server-capabilities - -{ - "dataEngine": - { - "qualifiedName": "qualifiedName", - "displayName": "DataStage", - "description": "Data Stage", - "engineType": "DataEngine", - "engineVersion": "1", - "enginePatchLevel": "1", - "vendor": "ibm", - "version": "123", - "source": "source" - } -} -``` - -`GUIDResponse` - response containing the external tool guid, with status and error message if failing. - - ----- -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/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineAdmin.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineAdmin.java deleted file mode 100644 index b8adffb98cd..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineAdmin.java +++ /dev/null @@ -1,159 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.admin; - -import org.odpi.openmetadata.accessservices.dataengine.connectors.intopic.DataEngineInTopicClientProvider; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineAuditCode; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.server.listeners.DataEngineInTopicListener; -import org.odpi.openmetadata.accessservices.dataengine.server.processors.DataEngineEventProcessor; -import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; -import org.odpi.openmetadata.adminservices.registration.AccessServiceAdmin; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditingComponent; -import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - -/** - * DataEngineAdmin is the class that is called by the OMAG Server to initialize and terminate - * the Data Engine OMAS. The initialization call provides this OMAS with resources from the - * Open Metadata Repository Services. - */ -public class DataEngineAdmin extends AccessServiceAdmin { - - private AuditLog auditLog; - private DataEngineServicesInstance instance; - private String serverName; - - private static final Logger log = LoggerFactory.getLogger(DataEngineAdmin.class); - - /** - * Initialize the access service. - * - * @param accessServiceConfig - specific configuration properties for this access service. - * @param enterpriseOMRSTopicConnector - connector for receiving OMRS Events from the cohorts - * @param repositoryConnector - connector for querying the cohort repositories - * @param auditLog - audit log component for logging messages. - * @param serverUserName - user id to use on OMRS calls where there is no end user. - */ - @Override - public void initialize(AccessServiceConfig accessServiceConfig, OMRSTopicConnector enterpriseOMRSTopicConnector, - OMRSRepositoryConnector repositoryConnector, AuditLog auditLog, String serverUserName) throws - OMAGConfigurationErrorException { - final String actionDescription = "initialize"; - - - auditLog.logMessage(actionDescription, DataEngineAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - try { - this.auditLog = auditLog; - - List supportedZones = this.extractSupportedZones(accessServiceConfig.getAccessServiceOptions(), - accessServiceConfig.getAccessServiceName(), auditLog); - List defaultZones = this.extractDefaultZones(accessServiceConfig.getAccessServiceOptions(), - accessServiceConfig.getAccessServiceName(), auditLog); - - instance = new DataEngineServicesInstance(repositoryConnector, supportedZones, defaultZones, auditLog, serverUserName, - repositoryConnector.getMaxPageSize(), accessServiceConfig.getAccessServiceInTopic()); - - serverName = instance.getServerName(); - - if (accessServiceConfig.getAccessServiceInTopic() != null) { - DataEngineEventProcessor dataEngineEventProcessor = new DataEngineEventProcessor(instance, auditLog); - DataEngineInTopicListener dataEngineInTopicListener = new DataEngineInTopicListener(auditLog, dataEngineEventProcessor); - - OpenMetadataTopicConnector dataEngineInTopicConnector = initializeDataEngineTopicConnector( - accessServiceConfig.getAccessServiceInTopic()); //TODO: Check if this should be moved / done form AccessServicesAdmin (?) - if (dataEngineInTopicConnector != null) { - dataEngineInTopicConnector.registerListener(dataEngineInTopicListener); - dataEngineInTopicConnector.start(); - } - } - - auditLog.logMessage(actionDescription, DataEngineAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName)); - } catch (OMAGConfigurationErrorException e) { - throw e; - } catch (Exception error) { - auditLog.logException(actionDescription, DataEngineAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage(), - serverName), error); - - super.throwUnexpectedInitializationException(actionDescription, AccessServiceDescription.DATA_ENGINE_OMAS.getAccessServiceFullName(), - error); - } - } - - /** - * Shutdown the access service. - */ - @Override - public void shutdown() { - - if (instance != null) { - instance.shutdown(); - } - - if (auditLog != null) { - final String actionDescription = "shutdown"; - - auditLog.logMessage(actionDescription, DataEngineAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(serverName)); - } - } - - /** - * Returns the connector created from topic connection properties - * - * @param topicConnection properties of the topic connection - * - * @return the connector created based on the topic connection properties - */ - private OpenMetadataTopicConnector getTopicConnector(Connection topicConnection) throws - OMAGConfigurationErrorException { - try { - ConnectorBroker connectorBroker = new ConnectorBroker(auditLog); - - OpenMetadataTopicConnector topicConnector = (OpenMetadataTopicConnector) connectorBroker.getConnector(topicConnection); - - topicConnector.setAuditLog(auditLog.createNewAuditLog(OMRSAuditingComponent.OPEN_METADATA_TOPIC_CONNECTOR)); - - return topicConnector; - } catch (Exception error) { - String methodName = "getTopicConnector"; - - OMAGConfigurationErrorException e = new OMAGConfigurationErrorException(DataEngineErrorCode.NULL_TOPIC_CONNECTOR.getMessageDefinition(), - this.getClass().getName(), methodName); - log.error("Exception in returning the topic connector for Data Engine: ", error); - - throw e; - } - } - - /** - * Returns the topic created based on connection properties - * - * @param topicConnection properties of the topic - * - * @return the topic created based on the connection properties - */ - private OpenMetadataTopicConnector initializeDataEngineTopicConnector(Connection topicConnection) throws OMAGConfigurationErrorException { - final String actionDescription = "initialize"; - if (topicConnection != null) { - try { - return getTopicConnector(topicConnection); - } catch (Exception e) { - auditLog.logException(actionDescription, DataEngineAuditCode.ERROR_INITIALIZING_TOPIC_CONNECTION.getMessageDefinition(e.getMessage(), - serverName), e); - throw e; - } - - } - return null; - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineInstanceHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineInstanceHandler.java deleted file mode 100644 index 6de1b9f7780..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineInstanceHandler.java +++ /dev/null @@ -1,347 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.admin; - -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCollectionHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCommonHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineConnectionAndEndpointHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineDataFileHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineEventTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineFindHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineFolderHierarchyHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEnginePortHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineProcessHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRegistrationHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRelationalDataHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineTopicHandler; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; - -/** - * DataEngineInstanceHandler retrieves information from the instance map for the access service instances. - * The instance map is thread-safe. Instances are added and removed by the DataEngineAdmin class. - */ -public class DataEngineInstanceHandler extends OMASServiceInstanceHandler { - - /** - * Default constructor registers the access service - */ - public DataEngineInstanceHandler() { - super(AccessServiceDescription.DATA_ENGINE_OMAS.getAccessServiceName() + " OMAS"); - - DataEngineRegistration.registerAccessService(); - } - - /** - * Retrieve the process handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineProcessHandler getProcessHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, - serverName, serviceOperationName); - - return instance.getProcessHandler(); - } - - - /** - * Retrieve the collection handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineCollectionHandler getCollectionHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - return instance.getDataEngineCollectionHandler(); - } - - /** - * Retrieve the registration handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of called operation - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineRegistrationHandler getRegistrationHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - return instance.getDataEngineRegistrationHandler(); - } - - /** - * Retrieve the common handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of called operation - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineCommonHandler getCommonHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - return instance.getDataEngineCommonHandler(); - } - - /** - * Retrieve the data engine schema type handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineSchemaTypeHandler getDataEngineSchemaTypeHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - return instance.getDataEngineSchemaTypeHandler(); - } - - /** - * Retrieve the port handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEnginePortHandler getPortHandler(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - return instance.getDataEnginePortHandler(); - } - - /** - * Retrieve the port handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineRelationalDataHandler getRelationalDataHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - return instance.getDataEngineRelationalDataHandler(); - } - - /** - * Return the connection used in the client to create a connector to access events to the input topic. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return connection object for client - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public Connection getInTopicConnection(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - if (instance != null) { - return instance.getInTopicClientConnection(serverName); - } - - return null; - } - - /** - * Retrieve the DataFile handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineDataFileHandler getDataFileHandler(String userId, String serverName, String serviceOperationName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, - serverName, serviceOperationName); - return instance.getDataEngineDataFileHandler(); - } - - /** - * Retrieve the folder hierarchy handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineFolderHierarchyHandler getFolderHierarchyHandler(String userId, String serverName, String serviceOperationName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, - serverName, serviceOperationName); - return instance.getDataEngineFolderHierarchyHandler(); - } - - /** - * Retrieve the connection and endpoint handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineConnectionAndEndpointHandler getConnectionAndEndpointHandler(String userId, String serverName, String serviceOperationName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, - serverName, serviceOperationName); - return instance.getDataEngineConnectionAndEndpointHandler(); - } - - /** - * Retrieve the find handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineFindHandler getFindHandler(String userId, String serverName, String serviceOperationName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, - serverName, serviceOperationName); - return instance.getDataEngineFindHandler(); - } - - /** - * Retrieve the topic handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineTopicHandler getTopicHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - return instance.getDataEngineTopicHandler(); - } - - /** - * Retrieve the event type handler for the access service - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * - * @return handler for use by the requested instance - * - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineEventTypeHandler getEventTypeHandler(String userId, String serverName, String serviceOperationName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineServicesInstance instance = (DataEngineServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - return instance.getDataEngineEventTypeHandler(); - } -} - - diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineRegistration.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineRegistration.java deleted file mode 100644 index db4873ff66e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineRegistration.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.admin; - -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceRegistrationEntry; -import org.odpi.openmetadata.adminservices.registration.OMAGAccessServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; - -/** - * DataEngineRegistration registers the access service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * access service in the server and it can be configured and used. - */ -class DataEngineRegistration { - private DataEngineRegistration() { - } - - /** - * Pass information about this access service to the OMAG Server administration services. - */ - static void registerAccessService() { - AccessServiceDescription myDescription = AccessServiceDescription.DATA_ENGINE_OMAS; - - AccessServiceRegistrationEntry myRegistration = new AccessServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - DataEngineAdmin.class.getName()); - - OMAGAccessServiceRegistration.registerAccessService(myRegistration); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineServicesInstance.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineServicesInstance.java deleted file mode 100644 index b4b20c88ede..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/DataEngineServicesInstance.java +++ /dev/null @@ -1,371 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.admin; - -import lombok.AccessLevel; -import lombok.Getter; -import org.odpi.openmetadata.accessservices.dataengine.connectors.intopic.DataEngineInTopicClientProvider; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.Collection; -import org.odpi.openmetadata.accessservices.dataengine.model.ConnectorType; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.Endpoint; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.FileFolder; -import org.odpi.openmetadata.accessservices.dataengine.model.Port; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalColumn; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.CollectionConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.ConnectionConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.ConnectorTypeConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.DataFileConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.DatabaseColumnConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.DatabaseConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.DatabaseSchemaConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.DatabaseTableConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.EndpointConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.EventTypeConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.FileFolderConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.PortConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.ProcessConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.ReferenceableConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.SchemaAttributeConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.SchemaTypeConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.converters.TopicConverter; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCollectionHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCommonHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineConnectionAndEndpointHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineDataFileHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineEventTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineFindHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineFolderHierarchyHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEnginePortHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineProcessHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRegistrationHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRelationalDataHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaAttributeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineTopicHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.service.ClockService; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EventTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.commonservices.generichandlers.PortHandler; -import org.odpi.openmetadata.commonservices.generichandlers.RelationalDataHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; -import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - -import java.time.Clock; -import java.util.List; - -/** - * DataEngineServicesInstance caches references to OMRS objects for a specific server. - * It is also responsible for registering itself in the instance map. - */ -public class DataEngineServicesInstance extends OMASServiceInstance { - - private static final AccessServiceDescription description = AccessServiceDescription.DATA_ENGINE_OMAS; - - /** - * -- GETTER -- - * Returns the Data Engine process handler. - * @return the Data Engine process handler - */ - @Getter(AccessLevel.PACKAGE) - private final DataEngineProcessHandler processHandler; - - /** - * -- GETTER -- - * Returns the Data Engine registration handler. - * @return the Data Engine registration handler - */ - @Getter(AccessLevel.PACKAGE) - private final DataEngineRegistrationHandler dataEngineRegistrationHandler; - - /** - * -- GETTER -- - * Returns the Data Engine schema type handler. - * @return the Data Engine schema type handler - */ - @Getter(AccessLevel.PACKAGE) - private final DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler; - - /** - * -- GETTER -- - * Returns the Data Engine collection handler. - * @return the Data Engine collection handler - */ - @Getter - private final DataEngineCollectionHandler dataEngineCollectionHandler; - - /** - * -- GETTER -- - * Returns the Data Engine port handler. - * @return the Data Engine port handler - */ - @Getter(AccessLevel.PACKAGE) - private final DataEnginePortHandler dataEnginePortHandler; - - /** - * -- GETTER -- - * Returns the Data Engine relational data handler. - * @return the Data Engine relational data handler - */ - @Getter - private final DataEngineRelationalDataHandler dataEngineRelationalDataHandler; - - /** - * -- GETTER -- - * Returns the Data Engine file handler. - * @return the Data Engine file handler - */ - @Getter - private final DataEngineDataFileHandler dataEngineDataFileHandler; - - /** - * -- GETTER -- - * Returns the Data Engine common handler. - * @return the Data Engine common handler - */ - @Getter - private final DataEngineCommonHandler dataEngineCommonHandler; - - /** - * -- GETTER -- - * Returns the Data Engine folder hierarchy handler. - * @return the Data Engine folder hierarchy handler - */ - @Getter - private final DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler; - - /** - * -- GETTER -- - * Returns the Data Engine connection and endpoint handler. - * @return the Data Engine connection and endpoint handler - */ - @Getter - private final DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler; - - /** - * -- GETTER -- - * Returns the Data Engine find handler. - * @return the Data Engine find handler - */ - @Getter - private final DataEngineFindHandler dataEngineFindHandler; - - /** - * -- GETTER -- - * Returns the Data Engine topic handler. - * @return the Data Engine topic handler - */ - @Getter(AccessLevel.PACKAGE) - private final DataEngineTopicHandler dataEngineTopicHandler; - - /** - * -- GETTER -- - * Returns the Data Engine event type handler. - * @return the Data Engine event type handler - */ - @Getter(AccessLevel.PACKAGE) - private final DataEngineEventTypeHandler dataEngineEventTypeHandler; - - /** - * -- GETTER -- - * Returns the Data Engine schema attribute handler. - * @return the Data Engine schema attribute handler - */ - @Getter(AccessLevel.PACKAGE) - private final DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler; - - /** - * Sets up the local repository connector that will service the REST Calls - * - * @param repositoryConnector link to the repository responsible for servicing the REST calls - * @param supportedZones list of zones that DataEngine is allowed to serve Assets from - * @param defaultZones list of zones that DataEngine sets up in new Asset instances - * @param auditLog logging destination - * @param localServerUserId userId used for server initiated actions - * @param maxPageSize max number of results to return on single request - * - * @throws NewInstanceException a problem occurred during initialization - */ - DataEngineServicesInstance(OMRSRepositoryConnector repositoryConnector, List supportedZones, List defaultZones, - AuditLog auditLog, String localServerUserId, int maxPageSize, Connection inTopicConnection) throws - NewInstanceException { - - - super(description.getAccessServiceFullName(), repositoryConnector, supportedZones, defaultZones, null, auditLog, - localServerUserId, maxPageSize, DataEngineInTopicClientProvider.class.getName(), inTopicConnection, - null, null); - - if (repositoryHandler == null) { - final String methodName = "new ServiceInstance"; - - throw new NewInstanceException(DataEngineErrorCode.OMRS_NOT_INITIALIZED.getMessageDefinition(methodName), this.getClass().getName(), - methodName); - } - - final AssetHandler assetHandler = new AssetHandler<>(new ProcessConverter<>(repositoryHelper, serviceName, serverName), - Process.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, localServerUserId, - securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - final OpenMetadataAPIGenericHandler collectionOpenMetadataAPIGenericHandler = - new OpenMetadataAPIGenericHandler<>(new CollectionConverter<>(repositoryHelper, serviceName, serverName), Collection.class, - serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, localServerUserId, - securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - final SchemaTypeHandler schemaTypeHandler = new SchemaTypeHandler<>(new SchemaTypeConverter<>(repositoryHelper, serviceName, - serverName), SchemaType.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, - localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - final SchemaAttributeHandler schemaAttributeHandler = - new SchemaAttributeHandler<>(new SchemaAttributeConverter<>(repositoryHelper, serviceName, serverName), - Attribute.class, new SchemaTypeConverter<>(repositoryHelper, serviceName, serverName), - SchemaType.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, - localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - final RelationalDataHandler relationalDataHandler = - new RelationalDataHandler<>(new DatabaseConverter<>(repositoryHelper, serviceName, serverName), - Database.class, - new DatabaseSchemaConverter<>(repositoryHelper, serviceName, serverName), - DatabaseSchema.class, - new DatabaseTableConverter<>(repositoryHelper, serviceName, serverName), - RelationalTable.class, - new DatabaseTableConverter<>(repositoryHelper, serviceName, serverName), - RelationalTable.class, - new DatabaseColumnConverter<>(repositoryHelper, serviceName, serverName), - RelationalColumn.class, - new SchemaTypeConverter<>(repositoryHelper, serviceName, serverName), - SchemaType.class, - serviceName, - serverName, - invalidParameterHandler, - repositoryHandler, - repositoryHelper, - localServerUserId, - securityVerifier, - supportedZones, - defaultZones, - publishZones, - auditLog); - - AssetHandler databaseSchemaAssetHandler = new AssetHandler<>(new DatabaseSchemaConverter<>(repositoryHelper, serviceName,serverName), - DatabaseSchema.class, - serviceName, - serverName, - invalidParameterHandler, - repositoryHandler, - repositoryHelper, - localServerUserId, - securityVerifier, - supportedZones, - defaultZones, - publishZones, - auditLog); - - final PortHandler portHandler = new PortHandler<>(new PortConverter<>(repositoryHelper, serviceName, serverName), Port.class, - serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, localServerUserId, securityVerifier, - supportedZones, defaultZones, publishZones, auditLog); - - final SoftwareCapabilityHandler softwareServerCapabilityHandler = - new SoftwareCapabilityHandler<>(new DatabaseTableConverter<>(repositoryHelper, serviceName, serverName), - Engine.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, - repositoryHelper, localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - final AssetHandler topicHandler = new AssetHandler<>(new TopicConverter<>(repositoryHelper, serviceName, serverName), - Topic.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, localServerUserId, - securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - final EventTypeHandler eventTypeHandler = new EventTypeHandler<>(new EventTypeConverter<>(repositoryHelper, serviceName, serverName), - EventType.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, localServerUserId, - securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - final OpenMetadataAPIGenericHandler referenceableHandler = - new OpenMetadataAPIGenericHandler<>(new ReferenceableConverter<>(repositoryHelper, serviceName, serverName), - Referenceable.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, - repositoryHelper, localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - ClockService clockService = new ClockService(Clock.systemUTC()); - dataEngineRegistrationHandler = new DataEngineRegistrationHandler(serviceName, serverName, invalidParameterHandler, - repositoryHelper, softwareServerCapabilityHandler, clockService); - - dataEngineCommonHandler = new DataEngineCommonHandler(serviceName, serverName, invalidParameterHandler, - referenceableHandler, repositoryHelper, dataEngineRegistrationHandler, clockService); - - final ConnectionHandler connectionHandler = - new ConnectionHandler<>(new ConnectionConverter<>(repositoryHelper, serviceName, serverName), - org.odpi.openmetadata.accessservices.dataengine.model.Connection.class, serviceName, serverName, - invalidParameterHandler, repositoryHandler, repositoryHelper, localServerUserId, securityVerifier, - supportedZones, defaultZones, publishZones, auditLog); - final EndpointHandler endpointHandler = - new EndpointHandler<>(new EndpointConverter<>(repositoryHelper, serviceName, serverName), - Endpoint.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, - localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - ConnectorTypeHandler connectorTypeHandler = new ConnectorTypeHandler<>( - new ConnectorTypeConverter<>(repositoryHelper, serviceName, serverName), ConnectorType.class, - serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, localServerUserId, - securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - dataEngineConnectionAndEndpointHandler = - new DataEngineConnectionAndEndpointHandler(invalidParameterHandler, repositoryHelper, serviceName, serverName, - dataEngineCommonHandler, connectionHandler, endpointHandler, connectorTypeHandler); - - processHandler = new DataEngineProcessHandler(serviceName, serverName, invalidParameterHandler, repositoryHelper, - assetHandler, dataEngineRegistrationHandler, dataEngineCommonHandler); - - dataEngineSchemaAttributeHandler = new DataEngineSchemaAttributeHandler(serviceName, serverName, invalidParameterHandler, - repositoryHelper, schemaAttributeHandler, dataEngineRegistrationHandler, dataEngineCommonHandler); - dataEngineSchemaTypeHandler = new DataEngineSchemaTypeHandler(serviceName, serverName, invalidParameterHandler, - repositoryHelper, schemaTypeHandler, dataEngineRegistrationHandler, dataEngineCommonHandler, dataEngineSchemaAttributeHandler); - - dataEngineCollectionHandler = new DataEngineCollectionHandler(serviceName, serverName, invalidParameterHandler, - repositoryHelper, collectionOpenMetadataAPIGenericHandler, dataEngineRegistrationHandler, dataEngineCommonHandler); - - dataEnginePortHandler = new DataEnginePortHandler(serviceName, serverName, invalidParameterHandler, repositoryHelper, - dataEngineCommonHandler, portHandler, dataEngineRegistrationHandler); - dataEngineRelationalDataHandler = new DataEngineRelationalDataHandler(serviceName, serverName, invalidParameterHandler, - relationalDataHandler, databaseSchemaAssetHandler, dataEngineRegistrationHandler, dataEngineCommonHandler, - dataEngineConnectionAndEndpointHandler); - - final AssetHandler folderHandler = new AssetHandler<>(new FileFolderConverter<>(repositoryHelper, serviceName, serverName), - FileFolder.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, - localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - dataEngineFolderHierarchyHandler = new DataEngineFolderHierarchyHandler(invalidParameterHandler, referenceableHandler, - dataEngineCommonHandler, folderHandler); - - final AssetHandler fileHandler = new AssetHandler<>(new DataFileConverter<>(repositoryHelper, serviceName, serverName), - DataFile.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, repositoryHelper, - localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - dataEngineDataFileHandler = new DataEngineDataFileHandler(invalidParameterHandler, repositoryHelper, - dataEngineCommonHandler, fileHandler, dataEngineSchemaTypeHandler, dataEngineFolderHierarchyHandler, - dataEngineConnectionAndEndpointHandler); - - dataEngineFindHandler = new DataEngineFindHandler(invalidParameterHandler, repositoryHelper, referenceableHandler, - dataEngineCommonHandler, serviceName, serverName); - - dataEngineTopicHandler = new DataEngineTopicHandler(invalidParameterHandler, topicHandler, - dataEngineRegistrationHandler, dataEngineCommonHandler); - dataEngineEventTypeHandler = new DataEngineEventTypeHandler(invalidParameterHandler, eventTypeHandler, dataEngineRegistrationHandler, - dataEngineCommonHandler, dataEngineSchemaAttributeHandler); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/package-info.java deleted file mode 100644 index 0e3b910d9db..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/admin/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the implementation of the admin classes that are called during server start up and shut down. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.admin; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/CollectionBuilder.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/CollectionBuilder.java deleted file mode 100644 index ec08db8d111..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/CollectionBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.builders; - -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * CollectionBuilder is able to build the properties for a Collection entity. - */ -public class CollectionBuilder extends ReferenceableBuilder { - - private final String collectionName; - - /** - * Constructor for simple creates. - * - * @param qualifiedName unique name - * @param collectionName collection name - * @param typeId type GUID to use for the entity - * @param repositoryHelper helper methods - * @param serviceName name of this OMAS - * @param serverName name of local server - */ - public CollectionBuilder(String qualifiedName, String collectionName, String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, - String serviceName, String serverName) { - - super(qualifiedName, typeId, typeName, repositoryHelper, serviceName, serverName); - this.collectionName = collectionName; - } - - /** - * Return the supplied bean properties in an InstanceProperties object. - * - * @param methodName name of the calling method - * @return InstanceProperties object - * @throws InvalidParameterException there is a problem with the properties - */ - @Override - public InstanceProperties getInstanceProperties(String methodName) throws InvalidParameterException { - InstanceProperties properties = super.getInstanceProperties(methodName); - if (collectionName != null) { - - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.NAME.name, collectionName, methodName); - } - return properties; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/EndpointBuilder.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/EndpointBuilder.java deleted file mode 100644 index b62d39904d4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/EndpointBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.builders; - -import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * EndpointBuilder is able to build the properties for an Endpoint entity. - */ -public class EndpointBuilder extends ReferenceableBuilder { - - private final String protocol; - private final String networkAddress; - - /** - * Constructor for endpoint creates. - * - * @param protocol the protocol - * @param networkAddress the network address - * @param qualifiedName unique name - * @param typeId type GUID to use for the entity - * @param repositoryHelper helper methods - * @param serviceName name of this OMAS - * @param serverName name of local server - */ - public EndpointBuilder(String protocol, String networkAddress, String qualifiedName, String typeId, String typeName, - OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(qualifiedName, typeId, typeName, repositoryHelper, serviceName, serverName); - this.protocol = protocol; - this.networkAddress = networkAddress; - } - - /** - * Return the supplied bean properties in an InstanceProperties object. - * - * @param methodName name of the calling method - * @return InstanceProperties object - * @throws InvalidParameterException there is a problem with the properties - */ - @Override - public InstanceProperties getInstanceProperties(String methodName) throws InvalidParameterException { - - InstanceProperties properties = super.getInstanceProperties(methodName); - - if (networkAddress != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, OpenMetadataType.NETWORK_ADDRESS_PROPERTY_NAME, - networkAddress, methodName); - } - - if (protocol != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, OpenMetadataType.PROTOCOL_PROPERTY_NAME, - protocol, methodName); - } - - return properties; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/ExternalDataEnginePropertiesBuilder.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/ExternalDataEnginePropertiesBuilder.java deleted file mode 100644 index c5c7225b3ef..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/ExternalDataEnginePropertiesBuilder.java +++ /dev/null @@ -1,129 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.builders; - - -import org.apache.commons.collections4.MapUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.commonservices.ocf.metadatamanagement.builders.ReferenceableBuilder; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Map; - -/** - * ExternalDataEnginePropertiesBuilder is able to build the properties for an Engine entity. - */ -public class ExternalDataEnginePropertiesBuilder extends ReferenceableBuilder { - - private final String name; - private final String description; - private final String deployedImplementationType; - private final String capabilityVersion; - private final String source; - private final String patchLevel; - - /** - * Constructor supporting all properties. - * - * @param qualifiedName unique name - * @param name new value for the display name. - * @param description new description for the discovery engine. - * @param deployedImplementationType new description of the type of discovery engine. - * @param capabilityVersion new version number for the discovery engine implementation. - * @param patchLevel new patch level for the discovery engine implementation. - * @param source new source description for the implementation of the discovery engine. - * @param additionalProperties additional properties - * @param repositoryHelper helper methods - * @param serviceName name of this OMAS - * @param serverName name of local server - */ - public ExternalDataEnginePropertiesBuilder(String qualifiedName, String name, String description, - String deployedImplementationType, String capabilityVersion, String patchLevel, String source, - Map additionalProperties, - OMRSRepositoryHelper repositoryHelper, String serviceName, - String serverName) { - - super(qualifiedName, additionalProperties, repositoryHelper, serviceName, serverName); - - this.name = name; - this.description = description; - this.deployedImplementationType = deployedImplementationType; - this.capabilityVersion = capabilityVersion; - this.patchLevel = patchLevel; - this.source = source; - } - - /** - * Return the supplied bean properties in an InstanceProperties object. - * - * @param methodName name of the calling method - * - * @return InstanceProperties object - * - * @throws InvalidParameterException there is a problem with the properties - */ - @Override - public InstanceProperties getInstanceProperties(String methodName) throws InvalidParameterException { - InstanceProperties properties = super.getInstanceProperties(methodName); - - if (name != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.NAME.name, name, methodName); - } - - if (description != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.DESCRIPTION.name, description, methodName); - } - - if (deployedImplementationType != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name, deployedImplementationType, methodName); - } - - if (capabilityVersion != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.CAPABILITY_VERSION.name, capabilityVersion, methodName); - } - - if (patchLevel != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.PATCH_LEVEL.name, patchLevel, methodName); - } - - if (source != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.SOURCE.name, source, methodName); - } - - if(MapUtils.isNotEmpty(additionalProperties)) { - properties = repositoryHelper.addStringMapPropertyToInstance(serviceName, properties, - OpenMetadataProperty.ADDITIONAL_PROPERTIES.name, additionalProperties, methodName); - } - - return properties; - } - - /** - * Return the supplied bean properties that represent a name in an InstanceProperties object. - * - * @param methodName name of the calling method - * - * @return InstanceProperties object - */ - @Override - public InstanceProperties getNameInstanceProperties(String methodName) { - InstanceProperties properties = super.getNameInstanceProperties(methodName); - - if (name != null) { - String literalName = repositoryHelper.getExactMatchRegex(name); - - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.NAME.name, literalName, methodName); - } - - return properties; - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/ProcessPropertiesBuilder.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/ProcessPropertiesBuilder.java deleted file mode 100644 index 1af4d5df545..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/ProcessPropertiesBuilder.java +++ /dev/null @@ -1,79 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.builders; - -import org.odpi.openmetadata.commonservices.generichandlers.AssetBuilder; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Map; - -/** - * ProcessPropertiesBuilder is able to build the properties for a Process entity. - */ -public class ProcessPropertiesBuilder extends AssetBuilder { - private final String processDisplayName; - private final String formula; - private final String implementationLanguage; - - /** - * Constructor for process with all properties - * - * @param qualifiedName unique name - * @param processDisplayName process display name - * @param technicalName technical name - * @param technicalDescription description - * @param typeName type name to use for the entity - * @param typeGUID type GUID to use for the entity - * @param formula the process formula - * @param implementationLanguage the implementation language - * @param additionalProperties additional process properties - * @param repositoryHelper helper methods - * @param serviceName name of this OMAS - * @param serverName name of local server - */ - public ProcessPropertiesBuilder(String qualifiedName, String processDisplayName, String technicalName, String technicalDescription, - String typeGUID, String typeName, String formula, String implementationLanguage, - Map additionalProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, - String serverName) { - super(qualifiedName, technicalName, null, technicalDescription, additionalProperties, typeGUID, typeName, null, repositoryHelper, - serviceName, serverName); - - this.processDisplayName = processDisplayName; - this.formula = formula; - this.implementationLanguage = implementationLanguage; - } - - /** - * Return the supplied bean properties in an InstanceProperties object. - * - * @param methodName name of the calling method - * @return InstanceProperties object - * @throws InvalidParameterException there is a problem with the properties - */ - @Override - public InstanceProperties getInstanceProperties(String methodName) throws InvalidParameterException { - InstanceProperties properties = super.getInstanceProperties(methodName); - - if (processDisplayName != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.DISPLAY_NAME.name, - processDisplayName, methodName); - } - - if (formula != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataProperty.FORMULA.name, - formula, methodName); - } - - if (implementationLanguage != null) { - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, - OpenMetadataType.IMPLEMENTATION_LANGUAGE_PROPERTY_NAME, formula, methodName); - } - return properties; - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/package-info.java deleted file mode 100644 index 0a36b7a3b26..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/builders/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the builders needed for converting beans from the repository services (eg entities and relationships) - * into Data Engine OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.builders; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/CollectionConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/CollectionConverter.java deleted file mode 100644 index ecd54d2ad35..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/CollectionConverter.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * CollectionConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Collection bean. - */ -public class CollectionConverter extends OpenMetadataAPIGenericConverter { - /** - * Constructor captures the initial content - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - public CollectionConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ConnectionConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ConnectionConverter.java deleted file mode 100644 index a566cdda2e6..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ConnectionConverter.java +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * ConnectionConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Connection bean. - */ -public class ConnectionConverter extends OpenMetadataAPIGenericConverter { - - public ConnectionConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ConnectorTypeConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ConnectorTypeConverter.java deleted file mode 100644 index 53d7a88f8de..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ConnectorTypeConverter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.accessservices.dataengine.model.ConnectorType; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -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.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ConnectorTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ConnectorTypeElement bean. - */ -public class ConnectorTypeConverter extends OpenMetadataAPIGenericConverter { - - public ConnectorTypeConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, EntityDetail entity, String methodName) throws PropertyServerException { - try { - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectorType) { - ConnectorType bean = (ConnectorType) returnBean; - - if (entity != null) { - - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - bean.setQualifiedName(this.removeQualifiedName(instanceProperties)); - bean.setDisplayName(this.removeDisplayName(instanceProperties)); - bean.setDescription(this.removeDescription(instanceProperties)); - bean.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); - bean.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); - bean.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); - bean.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); - bean.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); - bean.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); - bean.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); - bean.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); - bean.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); - bean.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); - bean.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); - bean.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); - bean.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); - bean.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - bean.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - } - else { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, EntityDetail entity, Relationship relationship, String methodName) - throws PropertyServerException { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DataFileConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DataFileConverter.java deleted file mode 100644 index a608f7e9359..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DataFileConverter.java +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * DataFileConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a DataFile bean. - */ -public class DataFileConverter extends OpenMetadataAPIGenericConverter { - - public DataFileConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseColumnConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseColumnConverter.java deleted file mode 100644 index b6e8928c983..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseColumnConverter.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * DatabaseColumnConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a DatabaseColumn bean. - */ -public class DatabaseColumnConverter extends OpenMetadataAPIGenericConverter { - public DatabaseColumnConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseConverter.java deleted file mode 100644 index 2e79c7fbe40..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseConverter.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * DatabaseConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Database bean. - */ -public class DatabaseConverter extends OpenMetadataAPIGenericConverter { - public DatabaseConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseSchemaConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseSchemaConverter.java deleted file mode 100644 index 7f66e9cc638..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseSchemaConverter.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * DatabaseSchemaConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a DatabaseSchema bean. - */ -public class DatabaseSchemaConverter extends OpenMetadataAPIGenericConverter { - public DatabaseSchemaConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseTableConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseTableConverter.java deleted file mode 100644 index a1f843822e3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/DatabaseTableConverter.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -/** - * DatabaseTableConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a RelationalTable bean. - */ -public class DatabaseTableConverter extends OpenMetadataAPIGenericConverter { - public DatabaseTableConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/EndpointConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/EndpointConverter.java deleted file mode 100644 index 49fda0465ee..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/EndpointConverter.java +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * EndpointConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Endpoint bean. - */ -public class EndpointConverter extends OpenMetadataAPIGenericConverter { - - public EndpointConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/EventTypeConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/EventTypeConverter.java deleted file mode 100644 index 0145c78d6c4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/EventTypeConverter.java +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * EventTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a EventType bean. - */ -public class EventTypeConverter extends OpenMetadataAPIGenericConverter { - public EventTypeConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/FileFolderConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/FileFolderConverter.java deleted file mode 100644 index c94bbddb25f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/FileFolderConverter.java +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * FileFolderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a FileFolderElement bean. - */ -public class FileFolderConverter extends OpenMetadataAPIGenericConverter { - - public FileFolderConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/PortConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/PortConverter.java deleted file mode 100644 index a3bf2901aef..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/PortConverter.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -/** - * PortConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Port bean. - */ -public class PortConverter extends OpenMetadataAPIGenericConverter { - public PortConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ProcessConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ProcessConverter.java deleted file mode 100644 index 87eb9ed97ce..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ProcessConverter.java +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * ProcessConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Process bean. - */ -public class ProcessConverter extends OpenMetadataAPIGenericConverter { - public ProcessConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ReferenceableConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ReferenceableConverter.java deleted file mode 100644 index 36a7b69f6f4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/ReferenceableConverter.java +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -/** - * ReferenceableConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Referenceable bean. - */ -public class ReferenceableConverter extends OpenMetadataAPIGenericConverter { - - public ReferenceableConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/SchemaAttributeConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/SchemaAttributeConverter.java deleted file mode 100644 index 82d40e9f2cf..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/SchemaAttributeConverter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * SchemaAttributeConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) - * EntityDetail object into a SchemaAttribute bean. - */ -public class SchemaAttributeConverter extends OpenMetadataAPIGenericConverter { - - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SchemaAttributeConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/SchemaTypeConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/SchemaTypeConverter.java deleted file mode 100644 index ff86f20fa0e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/SchemaTypeConverter.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - - -/** - * SchemaTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an SchemaType bean. - */ -public class SchemaTypeConverter extends OpenMetadataAPIGenericConverter { - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SchemaTypeConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } - - /** - * Return the converted bean. This is a special method used for schema types since they are stored - * as a collection of instances. - * - * @param beanClass name of the class to create - * @param schemaRootHeader unique identifier of the schema element that holds the root information - * @param schemaTypeTypeName name of type of the schema type to create - * @param instanceProperties properties describing the schema type - * @param attributeCount number of attributes (for a complex schema type) - * @param validValueSetGUID unique identifier of the set of valid values (for an enum schema type) - * @param externalSchemaType bean containing the properties of the schema type that is shared by multiple attributes/assets - * @param mapFromSchemaType bean containing the properties of the schema type that is part of a map definition - * @param mapToSchemaType bean containing the properties of the schema type that is part of a map definition - * @param schemaTypeOptions list of schema types that could be the type for this attribute - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewSchemaTypeBean(Class beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, - InstanceProperties instanceProperties, List schemaRootClassifications, - int attributeCount, String validValueSetGUID, B externalSchemaType, B mapFromSchemaType, - B mapToSchemaType, List schemaTypeOptions, String methodName) throws PropertyServerException { - try { - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof SchemaType) { - SchemaType bean = (SchemaType) returnBean; - bean.setQualifiedName(this.removeQualifiedName(instanceProperties)); - bean.setDisplayName(this.removeDisplayName(instanceProperties)); - bean.setAuthor(this.removeAuthor(instanceProperties)); - bean.setUsage(this.removeUsage(instanceProperties)); - bean.setEncodingStandard(this.removeEncodingStandard(instanceProperties)); - bean.setVersionNumber(this.removeVersionNumber(instanceProperties)); - bean.setType(this.removeDataType(instanceProperties)); - } - - return returnBean; - } catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - return null; - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/TopicConverter.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/TopicConverter.java deleted file mode 100644 index 6a300963c52..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/TopicConverter.java +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * TopicConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a Topic bean. - */ -public class TopicConverter extends OpenMetadataAPIGenericConverter { - public TopicConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { - super(repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/package-info.java deleted file mode 100644 index 88d445da0db..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/converters/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the converters that take beans from the repository services (eg entities and relationships) - * and converts them into DAta Engine OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.converters; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCollectionHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCollectionHandler.java deleted file mode 100644 index cee2700cd20..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCollectionHandler.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.odpi.openmetadata.accessservices.dataengine.model.Collection; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.CollectionBuilder; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Optional; - -/** - * DataEngineCollectionHandler manages collection objects. It runs server-side in the - * DataEngine OMAS and creates and retrieves collections entities through the OMRSRepositoryConnector. - */ -public class DataEngineCollectionHandler { - private final String serviceName; - private final String serverName; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final OpenMetadataAPIGenericHandler collectionOpenMetadataAPIGenericHandler; - private final DataEngineRegistrationHandler dataEngineRegistrationHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param dataEngineRegistrationHandler provides calls for retrieving external data engine guid - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param collectionOpenMetadataAPIGenericHandler helps building model for creating Collection metadata associated with Process assets - */ - public DataEngineCollectionHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, - OMRSRepositoryHelper repositoryHelper, - OpenMetadataAPIGenericHandler collectionOpenMetadataAPIGenericHandler, - DataEngineRegistrationHandler dataEngineRegistrationHandler, - DataEngineCommonHandler dataEngineCommonHandler) { - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.collectionOpenMetadataAPIGenericHandler = collectionOpenMetadataAPIGenericHandler; - this.dataEngineRegistrationHandler = dataEngineRegistrationHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - } - - /** - * Create the schema type entity, with the corresponding schema attributes and relationships if it doesn't exist or - * updates the existing one. - * - * @param userId the name of the calling user - * @param collection the collection type values - * @param externalSourceName the unique name of the external source - * @return unique identifier of the schema type in the repository - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String createCollection(String userId, Collection collection, String externalSourceName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - String methodName = "createCollection"; - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(collection.getQualifiedName(), OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - - String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngine(userId, externalSourceName); - - CollectionBuilder builder = getCollectionBuilder(collection); - - return collectionOpenMetadataAPIGenericHandler.createBeanInRepository(userId, externalSourceGUID, externalSourceName, - OpenMetadataType.COLLECTION.typeGUID, OpenMetadataType.COLLECTION.typeName, builder, dataEngineCommonHandler.getNow(), methodName); - } - - CollectionBuilder getCollectionBuilder(Collection collection) { - return new CollectionBuilder(collection.getQualifiedName(), - collection.getName(), OpenMetadataType.COLLECTION.typeGUID, OpenMetadataType.COLLECTION.typeName, repositoryHelper, serviceName, serverName); - } - - /** - * Find out if the Transformation Project object is already stored in the repository as a Collection. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the process to be searched - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional findCollectionEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.COLLECTION.typeName); - } - - /** - * Create CollectionMembership relationships between a Process asset and a Collection. Verifies that the - * relationship is not present before creating it - * - * @param userId the name of the calling user - * @param processGUID the unique identifier of the process - * @param collectionGUID the unique identifier of the collection - * @param externalSourceName the unique name of the external source - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void addCollectionMembershipRelationship(String userId, String processGUID, String collectionGUID, String externalSourceName) - throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - - dataEngineCommonHandler.upsertExternalRelationship(userId, processGUID, collectionGUID, OpenMetadataType.COLLECTION_MEMBERSHIP_RELATIONSHIP.typeName, - OpenMetadataType.COLLECTION.typeName, OpenMetadataType.PROCESS.typeName, externalSourceName, null); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandler.java deleted file mode 100644 index 845a8b39645..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandler.java +++ /dev/null @@ -1,440 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DataItemSortOrder; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.OwnerType; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.accessservices.dataengine.server.service.ClockService; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -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.properties.instances.RelationshipDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotDeletedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - - -/** - * DataEngineCommonHandler manages objects from the property server. It runs server-side in the DataEngine OMAS - * and creates port entities with wire relationships through the OMRSRepositoryConnector. - */ -public class DataEngineCommonHandler { - private final String serviceName; - private final String serverName; - private final OpenMetadataAPIGenericHandler genericHandler; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final DataEngineRegistrationHandler dataEngineRegistrationHandler; - private final ClockService clockService; - - private static final Logger log = LoggerFactory.getLogger(DataEngineCommonHandler.class); - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param genericHandler manages calls to the repository services - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param dataEngineRegistrationHandler provides calls for retrieving external data engine guid - */ - public DataEngineCommonHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, - OpenMetadataAPIGenericHandler genericHandler, OMRSRepositoryHelper repositoryHelper, - DataEngineRegistrationHandler dataEngineRegistrationHandler, ClockService clockService) { - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.genericHandler = genericHandler; - this.repositoryHelper = repositoryHelper; - this.dataEngineRegistrationHandler = dataEngineRegistrationHandler; - this.clockService = clockService; - } - - /** - * Build an EntityDetail object based on the instance properties on an entity bean - * - * @param entityGUID unique identifier of entity to update - * @param instanceProperties the properties of the entity - * - * @return an EntityDetail object containing the entity properties - */ - protected EntityDetail buildEntityDetail(String entityGUID, InstanceProperties instanceProperties) { - EntityDetail entityDetail = new EntityDetail(); - - entityDetail.setGUID(entityGUID); - entityDetail.setProperties(instanceProperties); - - return entityDetail; - } - - /** - * Build an Relationship object based on the instance properties of a relationship - * - * @param entityGUID unique identifier of entity to update - * @param instanceProperties the properties of the relationship - * - * @return an Relationship object containing the entity properties - */ - protected Relationship buildRelationship(String entityGUID, InstanceProperties instanceProperties) { - Relationship relationship = new Relationship(); - - relationship.setGUID(entityGUID); - relationship.setProperties(instanceProperties); - - return relationship; - } - - /** - * Find out if the entity is already stored in the repository. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the entity to be searched - * @param entityTypeName the type name of the entity - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional findEntity(String userId, String qualifiedName, String entityTypeName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - final String methodName = "findEntity"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(qualifiedName, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, methodName); - - TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, entityTypeName); - - EntityDetail retrievedEntity = genericHandler.getEntityByValue(userId, qualifiedName, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - entityTypeDef.getGUID(), entityTypeDef.getName(), Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), - false, false, getNow(), methodName); - - String guid = null; - if(retrievedEntity != null) { - guid = retrievedEntity.getGUID(); - } - log.trace("Searching for entity with qualifiedName: {}. Result is {}", qualifiedName, guid); - - return Optional.ofNullable(retrievedEntity); - } - - /** - * Fetch the entity using the identifier and the type name. It uses the unique identifier to retrieve the entity - * - * @param userId the user identifier - * @param entityDetailGUID the entity unique identifier - * @param entityTypeName the entity type name - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws UserNotAuthorizedException user not authorized to issue this request. - * @throws PropertyServerException problem retrieving the entity. - */ - public Optional getEntityDetails(String userId, String entityDetailGUID, String entityTypeName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "getEntityDetails"; - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(entityDetailGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - EntityDetail retrievedEntity = genericHandler.getEntityFromRepository(userId, entityDetailGUID, - CommonMapper.GUID_PROPERTY_NAME, entityTypeName, null, null, - false, false, null, getNow(), methodName); - - return Optional.ofNullable(retrievedEntity); - } - - /** - * Create or updates an external relationship between two entities. Verifies that the relationship is not present before creating it. If the - * relationship is present, verifies the instanceProperties for the relationship to be updated. - * - * @param userId the name of the calling user - * @param firstGUID the unique identifier of the entity at first end - * @param secondGUID the unique identifier of the entity at second end - * @param relationshipTypeName type name for the relationship to create - * @param firstEntityTypeName type name for the entity at first end - * @param secondEntityTypeName type name for the entity at the second end - * @param externalSourceName the unique name of the external source - * @param relationshipProperties the properties for the relationship - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - protected void upsertExternalRelationship(String userId, String firstGUID, String secondGUID, String relationshipTypeName, - String firstEntityTypeName, String secondEntityTypeName, String externalSourceName, - InstanceProperties relationshipProperties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - - final String methodName = "upsertExternalRelationship"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(firstGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - invalidParameterHandler.validateGUID(secondGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngine(userId, externalSourceName); - - Optional relationship = findRelationship(userId, firstGUID, secondGUID, firstEntityTypeName, - secondEntityTypeName, relationshipTypeName); - if (relationship.isEmpty()) { - - TypeDef relationshipTypeDef = repositoryHelper.getTypeDefByName(userId, relationshipTypeName); - - genericHandler.uncheckedLinkElementToElement(userId, externalSourceGUID, externalSourceName, firstGUID, - CommonMapper.GUID_PROPERTY_NAME, firstEntityTypeName, secondGUID, CommonMapper.GUID_PROPERTY_NAME, - secondEntityTypeName, false, false, null, - relationshipTypeDef.getGUID(), relationshipTypeName, relationshipProperties, getNow(), methodName); - } else { - Relationship originalRelationship = relationship.get(); - String relationshipGUID = originalRelationship.getGUID(); - - RelationshipDifferences relationshipDifferences = repositoryHelper.getRelationshipDifferences(originalRelationship, - buildRelationship(relationshipGUID, relationshipProperties), true); - - if (relationshipDifferences.hasInstancePropertiesDifferences()) { - genericHandler.updateRelationshipProperties(userId, externalSourceGUID, externalSourceName, relationshipGUID, - OpenMetadataProperty.GUID.name, originalRelationship.getType().getTypeDefName(), true, - relationshipProperties, false, false, getNow(), methodName); - } - } - } - - /** - * Find out if the relationship is already stored in the repository. - * It will search for relationships that have the source firstGUID and target secondGUID - * - * @param userId the name of the calling user - * @param firstGUID the unique identifier of the entity at first end - * @param secondGUID the unique identifier of the entity at second end - * @param firstEntityTypeName type name for the entity at first end - * @param secondEntityTypeName type name for the entity at second end - * @param relationshipTypeName type name for the relationship to create - * - * @return The found relationship or an empty Optional - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - protected Optional findRelationship(String userId, String firstGUID, String secondGUID, String firstEntityTypeName, - String secondEntityTypeName, String relationshipTypeName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "findRelationship"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(firstGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - invalidParameterHandler.validateName(secondGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - TypeDef relationshipTypeDef = repositoryHelper.getTypeDefByName(userId, relationshipTypeName); - Relationship relationshipBetweenEntities = genericHandler.getUniqueAttachmentLink(userId, firstGUID, - CommonMapper.GUID_PROPERTY_NAME, firstEntityTypeName, relationshipTypeDef.getGUID(), - relationshipTypeDef.getName(), secondGUID, secondEntityTypeName, 0, - false, false, getNow(), methodName); - - if (relationshipBetweenEntities == null) { - return Optional.empty(); - } - - if (firstGUID.equalsIgnoreCase(relationshipBetweenEntities.getEntityOneProxy().getGUID()) - && secondGUID.equalsIgnoreCase(relationshipBetweenEntities.getEntityTwoProxy().getGUID())) { - return Optional.of(relationshipBetweenEntities); - } - - return Optional.empty(); - } - - /** - * Remove entity - * - * @param userId the name of the calling user - * @param entityGUID the unique identifier of the port to be removed - * @param entityTypeName the type name of the entity - * @param externalSourceName the external data engine - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - protected void removeEntity(String userId, String entityGUID, String entityTypeName, String externalSourceName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "removeEntity"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(entityGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, entityTypeName); - String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngine(userId, externalSourceName); - - genericHandler.deleteBeanInRepository(userId, externalSourceGUID, externalSourceName, entityGUID, OpenMetadataProperty.GUID.name, - entityTypeDef.getGUID(), entityTypeDef.getName(), null, null, - false, false, getNow(), methodName); - } - - /** - * Return the owner type ordinal - * - * @param ownerType AssetOwnerType enum - * - * @return DataItemSortOrder enum ordinal - */ - protected int getOwnerTypeOrdinal(OwnerType ownerType) { - int ownerTypeOrdinal = OwnerType.USER_ID.getOpenTypeOrdinal(); - - if (ownerType != null) { - ownerTypeOrdinal = ownerType.getOpenTypeOrdinal(); - } - return ownerTypeOrdinal; - } - - /** - * Return the ordinal for the order that the column is arranged in - * - * @param column the column to - * - * @return DataItemSortOrder enum ordinal - */ - protected int getSortOrder(Attribute column) { - int sortOrder = DataItemSortOrder.UNKNOWN.getOpenTypeOrdinal(); - if (column.getSortOrder() != null) { - sortOrder = column.getSortOrder().getOpenTypeOrdinal(); - } - return sortOrder; - } - - /** - * Thrown an {@link org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException} - * @param errorCode error code - * @param methodName calling method - * @param params additional params for error message - * @throws InvalidParameterException Thrown an {@link org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException} - * with specific error code and message - */ - public void throwInvalidParameterException(DataEngineErrorCode errorCode, String methodName, String... params) throws - InvalidParameterException { - - throw new InvalidParameterException(errorCode.getMessageDefinition(params), this.getClass().getName(), methodName, "qualifiedName"); - } - - /** - * Thrown an {@link org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotDeletedException} - * @param errorCode error code - * @param methodName calling method - * @param params additional params for error message - * @throws EntityNotDeletedException Thrown an {@link org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotDeletedException} - * with specific error code and message - */ - public void throwEntityNotDeletedException(DataEngineErrorCode errorCode, String methodName, String... params) throws EntityNotDeletedException { - - throw new EntityNotDeletedException(errorCode.getMessageDefinition(params), this.getClass().getName(), methodName); - } - - /** - * Return the set of entities at the other end of the requested relationship type. - * - * @param userId the name of the calling user - * @param guid starting entity's GUID - * @param relationshipTypeName type name for the relationship to follow - * @param resultingElementTypeName resulting entity's type name - * @param entityTypeName starting entity's type name - * - * @return retrieved entities or empty set - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - protected Set getEntitiesForRelationship(String userId, String guid, String relationshipTypeName, - String resultingElementTypeName, String entityTypeName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - final String methodName = "getEntitiesForRelationship"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(guid, CommonMapper.GUID_PROPERTY_NAME, methodName); - - TypeDef relationshipTypeDef = repositoryHelper.getTypeDefByName(userId, relationshipTypeName); - - List entities = genericHandler.getAttachedEntities(userId, guid, CommonMapper.GUID_PROPERTY_NAME, - entityTypeName, relationshipTypeDef.getGUID(), relationshipTypeName, resultingElementTypeName, - null, null, 0, false, - false, 0, invalidParameterHandler.getMaxPagingSize(), getNow(), methodName); - - if (CollectionUtils.isEmpty(entities)) { - return new HashSet<>(); - } - - return entities.parallelStream().collect(Collectors.toSet()); - } - - /** - * Return the entity at the other end of the requested relationship type. - * - * @param userId the name of the calling user - * @param entityGUID the unique identifier of the starting entity - * @param relationshipTypeName the relationship type name - * @param entityTypeName the entity of the starting end type name - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - protected Optional getEntityForRelationship(String userId, String entityGUID, String relationshipTypeName, - String entityTypeName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "getEntityForRelationship"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(entityGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - TypeDef relationshipTypeDef = repositoryHelper.getTypeDefByName(userId, relationshipTypeName); - EntityDetail entity = genericHandler.getAttachedEntity(userId, entityGUID, OpenMetadataProperty.GUID.name, - entityTypeName, relationshipTypeDef.getGUID(), relationshipTypeDef.getName(), null, - false, false, getNow(), methodName); - return Optional.ofNullable(entity); - } - - protected void validateDeleteSemantic(DeleteSemantic deleteSemantic, String methodName) throws FunctionNotSupportedException { - if (deleteSemantic != DeleteSemantic.SOFT) { - throw new FunctionNotSupportedException(OMRSErrorCode.METHOD_NOT_IMPLEMENTED.getMessageDefinition(methodName, this.getClass().getName(), - serverName), this.getClass().getName(), methodName); - } - } - - /** - * @return current date and time - */ - protected Date getNow() { - return clockService.getNow(); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineConnectionAndEndpointHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineConnectionAndEndpointHandler.java deleted file mode 100644 index b8f8695c4c4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineConnectionAndEndpointHandler.java +++ /dev/null @@ -1,301 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.accessservices.dataengine.model.Connection; -import org.odpi.openmetadata.accessservices.dataengine.model.ConnectorType; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Endpoint; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.EndpointBuilder; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Date; -import java.util.List; -import java.util.Optional; - - - - -/** - * DataEngineConnectionAndEndpointHandler manages Connection and Endpoint objects from the property server. It runs server-side - * in the DataEngine OMAS and creates Connection and Endpoint entities with wire relationships through the OMRSRepositoryConnector. - */ -public class DataEngineConnectionAndEndpointHandler { - - private static final Logger log = LoggerFactory.getLogger(DataEngineConnectionAndEndpointHandler.class); - private static final int START_FROM = 0; - private static final int PAGE_SIZE = 10; - private static final String SEARCH_STRING_PARAMETER_NAME = "searchString"; - private static final String OCF = "Open Connector Framework (OCF)"; - private static final String COLON = ":"; - private static final String CONNECTION = " Connection"; - private static final String ENDPOINT = " Endpoint"; - private static final String CONNECTOR_TYPE = " ConnectorType"; - private static final String ASSET_GUID = "assetGUID"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String TYPE_NAME = "typeName"; - private static final String EXTERNAL_SOURCE_GUID = "externalSourceGuid"; - private static final String EXTERNAL_SOURCE_NAME = "externalSourceName"; - private static final String NETWORK_ADDRESS = "networkAddress"; - private static final String CONNECTOR_TYPE_GUID_PARAMETER_NAME = "connectorTypeGUID"; - private static final String ENDPOINT_GUID_PARAMETER_NAME = "endpointGUID"; - private static final String CONNECTION_CREATED = "A new Connection for asset [{}] was created. Connection qualified name is [{}] " + - "and GUID is [{}]. The Connection has relationships to an Endpoint [{}] and a ConnectorType [{}]."; - private static final String ENDPOINT_UPDATED = "The existing Endpoint for asset [{}] was updated. Endpoint qualified name is [{}]."; - private static final String ASSET_NOT_FOUND = "[{}] asset could not be found. Connection and Endpoint creation is aborted."; - private static final String PROPER_CONNECTOR_TYPE_NOT_FOUND = "A proper ConnectorType for the asset type name [{}] " + - "could not be found. Connection and Endpoint creation is aborted for asset [{}]."; - private static final String PROPER_CONNECTOR_TYPE_FOUND = "A proper ConnectorType for the asset type name [{}] was found: [{}]."; - private static final String EXISTING_ENDPOINT_NOT_FOUND = "Existing Endpoint [{}] for asset [{}] was not found and could not be updated."; - private static final String ACCESS_INFORMATION = "Access information to connect to the actual asset: "; - private static final String CONNECTION_GUID_PARAMETER_NAME = "connectionGUID"; - private final InvalidParameterHandler invalidParameterHandler; - private final OMRSRepositoryHelper repositoryHelper; - private final String serviceName; - private final String serverName; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final ConnectionHandler connectionHandler; - private final EndpointHandler endpointHandler; - private final ConnectorTypeHandler connectorTypeHandler; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param serviceName service name - * @param serverName server name - * @param dataEngineCommonHandler provides common Data Engine OMAS utilities - * @param connectionHandler provides utilities specific for manipulating Connection - * @param endpointHandler provides utilities specific for manipulating Endpoint - * @param connectorTypeHandler provides utilities specific for manipulating ConnectorType - */ - public DataEngineConnectionAndEndpointHandler(InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, - String serviceName, String serverName, DataEngineCommonHandler dataEngineCommonHandler, - ConnectionHandler connectionHandler, EndpointHandler endpointHandler, - ConnectorTypeHandler connectorTypeHandler) { - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.serviceName = serviceName; - this.serverName = serverName; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.connectionHandler = connectionHandler; - this.endpointHandler = endpointHandler; - this.connectorTypeHandler = connectorTypeHandler; - } - - /** - * Constructs an Endpoint linked to a Connection, which in turn links it to provided asset - * - * @param assetQualifiedName asset qualified name - * @param assetGUID asset GUID - * @param assetTypeName asset type name - * @param protocol property of Endpoint - * @param networkAddress property of Endpoint - * @param externalSourceGUID external source guid - * @param externalSourceName external source name - * @param userID user id - * - * @throws InvalidParameterException if invalid parameters - * @throws PropertyServerException if errors in repository - * @throws UserNotAuthorizedException if user not authorized - */ - public void upsertConnectionAndEndpoint(String assetQualifiedName, String assetGUID, String assetTypeName, String protocol, - String networkAddress, String externalSourceGUID, String externalSourceName, - String userID) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - final String methodName = "upsertConnectionAndEndpoint"; - if (StringUtils.isEmpty(networkAddress)) { - return; - } - validateParameters(assetQualifiedName, assetTypeName, externalSourceGUID, externalSourceName, userID, methodName); - Optional existingAsset = dataEngineCommonHandler.findEntity(userID, assetQualifiedName, assetTypeName); - if (existingAsset.isEmpty()) { - log.debug(ASSET_NOT_FOUND, assetQualifiedName); - return; - } - - Optional optionalConnectorType = getProperConnectorType(assetTypeName, userID); - if (optionalConnectorType.isEmpty()) { - log.debug(PROPER_CONNECTOR_TYPE_NOT_FOUND, assetTypeName, assetQualifiedName); - return; - } - - ConnectorType connectorType = optionalConnectorType.get(); - log.debug(PROPER_CONNECTOR_TYPE_FOUND, assetTypeName, connectorType.getQualifiedName()); - - String connectionQualifiedName = getConnectionQualifiedName(assetTypeName, assetQualifiedName); - Optional existingConnection = dataEngineCommonHandler.findEntity(userID, connectionQualifiedName, - OpenMetadataType.CONNECTION_TYPE_NAME); - if (existingConnection.isEmpty()) { - createConnectionAndRelatedEntities(assetQualifiedName, assetGUID, assetTypeName, protocol, networkAddress, - externalSourceGUID, externalSourceName, userID, methodName, connectorType, connectionQualifiedName); - } else { - updateEndpoint(protocol, networkAddress, assetTypeName, assetQualifiedName, externalSourceGUID, - externalSourceName, userID); - } - } - - private void createConnectionAndRelatedEntities(String assetQualifiedName, String assetGUID, String assetTypeName, String protocol, String networkAddress, String externalSourceGUID, String externalSourceName, String userID, String methodName, ConnectorType connectorType, String connectionQualifiedName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - String connectorProviderClassName = connectorType.getClass().getSimpleName(); - String connectorTypeQualifiedName = getConnectorTypeQualifiedName(assetTypeName, assetQualifiedName); - Date now = dataEngineCommonHandler.getNow(); - String connectorTypeGUID = connectorTypeHandler.getConnectorTypeForConnection(userID, externalSourceGUID, - externalSourceName, null, connectorTypeQualifiedName, connectorTypeQualifiedName, - null, assetTypeName, null, connectorProviderClassName, - OpenMetadataType.CONNECTOR_FRAMEWORK_NAME_DEFAULT, OpenMetadataType.CONNECTOR_INTERFACE_LANGUAGE_DEFAULT, - null, null, null, null, - null, null, null, null, - null, false, false, now, methodName); - - String endpointQualifiedName = getEndpointQualifiedName(assetTypeName, assetQualifiedName); - String endpointGUID = endpointHandler.createEndpoint(userID, externalSourceGUID, externalSourceName, null, - endpointQualifiedName, endpointQualifiedName, ACCESS_INFORMATION + networkAddress, networkAddress, - protocol, null, null, null, null, null, - null, now, methodName); - - String connectionGUID = connectionHandler.createConnection(userID, externalSourceGUID, externalSourceName, assetGUID, ASSET_GUID, - null, connectionQualifiedName, connectionQualifiedName, null, null, - null, null, null, null, null, - OpenMetadataType.CONNECTION_TYPE_NAME, null, connectorTypeGUID, CONNECTOR_TYPE_GUID_PARAMETER_NAME, - endpointGUID, ENDPOINT_GUID_PARAMETER_NAME, null, null, false, - false, connectionHandler.getSupportedZones(), now, methodName); - - log.debug(CONNECTION_CREATED, assetQualifiedName, connectionQualifiedName, connectionGUID, endpointGUID, connectorTypeGUID); - } - - private String getConnectorTypeQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + ":" + assetQualifiedName + CONNECTOR_TYPE; - } - - private String getConnectionQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + COLON + assetQualifiedName + CONNECTION; - } - - private Optional getProperConnectorType(String assetTypeName, String userId) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - final String methodName = "getProperConnectorType"; - - List connectorTypes = connectorTypeHandler.findConnectorTypes(userId, assetTypeName, - SEARCH_STRING_PARAMETER_NAME, START_FROM, PAGE_SIZE, false, false, dataEngineCommonHandler.getNow(), - methodName); - if(CollectionUtils.isEmpty(connectorTypes)) { - return Optional.empty(); - } - - return connectorTypes.stream().filter(connectorType -> OCF.equals(connectorType.getConnectorFrameworkName())).findAny(); - } - - /** - * Remove the connection - * - * @param userId the name of the calling user - * @param connectionGUID unique identifier of the connection to be removed - * @param deleteSemantic the delete semantic - * @param externalSourceName the external data engine - * @param externalSourceGUID the external data engine GUID - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeConnection(String userId, String connectionGUID, DeleteSemantic deleteSemantic, String externalSourceName, - String externalSourceGUID) throws FunctionNotSupportedException, InvalidParameterException, - PropertyServerException, UserNotAuthorizedException { - final String methodName = "removeConnection"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(connectionGUID, OpenMetadataProperty.GUID.name, methodName); - - connectionHandler.removeConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, - CONNECTION_GUID_PARAMETER_NAME, false, false, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Remove the endpoint - * - * @param userId the name of the calling user - * @param endpointGUID unique identifier of the endpoint to be removed - * @param deleteSemantic the delete semantic - * @param externalSourceName the external data engine - * @param externalSourceGUID the external data engine GUID - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeEndpoint(String userId, String endpointGUID, DeleteSemantic deleteSemantic, String externalSourceName, - String externalSourceGUID) throws FunctionNotSupportedException, InvalidParameterException, - PropertyServerException, UserNotAuthorizedException { - final String methodName = "removeEndpoint"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(endpointGUID, OpenMetadataProperty.GUID.name, methodName); - - endpointHandler.removeEndpoint(userId, externalSourceGUID, externalSourceName, endpointGUID, - ENDPOINT_GUID_PARAMETER_NAME, false, false, dataEngineCommonHandler.getNow(), methodName); - } - - private void updateEndpoint(String protocol, String networkAddress, String assetTypeName, String assetQualifiedName, - String externalSourceGUID, String externalSourceName, String userID) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - final String methodName = "updateEndpoint"; - String endpointQualifiedName = getEndpointQualifiedName(assetTypeName, assetQualifiedName); - Optional existingEndpoint = dataEngineCommonHandler.findEntity(userID, endpointQualifiedName, - OpenMetadataType.ENDPOINT_TYPE_NAME); - - if (existingEndpoint.isEmpty()) { - log.debug(EXISTING_ENDPOINT_NOT_FOUND, endpointQualifiedName, assetQualifiedName); - return; - } - - String endpointGUID = existingEndpoint.get().getGUID(); - String description = ACCESS_INFORMATION + networkAddress; - endpointHandler.updateEndpoint(userID, externalSourceGUID, externalSourceName, endpointGUID, ENDPOINT_GUID_PARAMETER_NAME, - endpointQualifiedName, endpointQualifiedName, description, networkAddress, - protocol, null, null, null, - null, true, null, null, false, - false, dataEngineCommonHandler.getNow(), methodName); - - log.debug(ENDPOINT_UPDATED, assetQualifiedName, endpointQualifiedName); - } - - private String getEndpointQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + COLON + assetQualifiedName + ENDPOINT; - } - - EndpointBuilder getEndpointBuilder(String protocol, String networkAddress, String qualifiedName) { - return new EndpointBuilder(protocol, networkAddress, qualifiedName, OpenMetadataType.ENDPOINT_TYPE_GUID, - OpenMetadataType.ENDPOINT_TYPE_NAME, repositoryHelper, serviceName, serverName); - } - - private void validateParameters(String qualifiedName, String typeName, String externalSourceGuid, String externalSourceName, - String userId, String methodName) throws InvalidParameterException { - invalidParameterHandler.validateName(qualifiedName, QUALIFIED_NAME, methodName); - invalidParameterHandler.validateName(typeName, TYPE_NAME, methodName); - invalidParameterHandler.validateName(externalSourceGuid, EXTERNAL_SOURCE_GUID, methodName); - invalidParameterHandler.validateName(externalSourceName, EXTERNAL_SOURCE_NAME, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineDataFileHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineDataFileHandler.java deleted file mode 100644 index 630ffe0a522..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineDataFileHandler.java +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Map; -import java.util.Optional; - - -/** - * DataFileHandler manages DataFile objects from the property server. It runs server-side in the DataEngine OMAS - * and creates DataFile entities with wire relationships through the OMRSRepositoryConnector. - */ -public class DataEngineDataFileHandler { - - private static final String FILE_GUID_PARAMETER_NAME = "fileGUID"; - - private final InvalidParameterHandler invalidParameterHandler; - private final OMRSRepositoryHelper repositoryHelper; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final AssetHandler fileHandler; - private final DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler; - private final DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler; - private final DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param dataEngineCommonHandler provides common Data Engine Omas utilities - * @param fileHandler provides utilities specific for manipulating DataFile and CSVFile - * @param dataEngineSchemaTypeHandler provides utilities specific for manipulating SchemaType - * @param dataEngineFolderHierarchyHandler provides utilities specific for manipulating FileFolder - * @param dataEngineConnectionAndEndpointHandler provides utilities specific for manipulating Connections and Endpoints - */ - public DataEngineDataFileHandler(InvalidParameterHandler invalidParameterHandler,OMRSRepositoryHelper repositoryHelper, - DataEngineCommonHandler dataEngineCommonHandler, AssetHandler fileHandler, - DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler, - DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler, - DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler) { - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.fileHandler = fileHandler; - this.dataEngineSchemaTypeHandler = dataEngineSchemaTypeHandler; - this.dataEngineFolderHierarchyHandler = dataEngineFolderHierarchyHandler; - this.dataEngineConnectionAndEndpointHandler = dataEngineConnectionAndEndpointHandler; - } - - /** - * Constructs a DataFile or CSVFile, its specific TabularSchemaType and its TabularColumns. It also calls for the creation - * of its folder structure, the Connection and Endpoint - * - * @param fileTypeName file type name - * @param fileTypeGuid file type guid - * @param file actual data file - * @param schemaType file schema - * @param extendedProperties extended properties - * @param externalSourceGuid external source guid - * @param externalSourceName external source name - * @param userId user id - * @param methodName method name - * - * @return guid of data file - * - * @throws InvalidParameterException if invalid parameters - * @throws PropertyServerException if errors in repository - * @throws UserNotAuthorizedException if user not authorized - */ - public String upsertFileAssetIntoCatalog(String fileTypeName, String fileTypeGuid, DataFile file, SchemaType schemaType, - Map extendedProperties, String externalSourceGuid, - String externalSourceName, String userId, String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - validateParameters(file, schemaType, externalSourceGuid, userId, methodName); - - Optional fileAsEntity = dataEngineCommonHandler.findEntity(userId, file.getQualifiedName(), file.getFileType()); - - String fileGuid; - if (fileAsEntity.isPresent()) { - fileGuid = updateFileInRepository(userId, externalSourceGuid, externalSourceName, fileAsEntity.get(), file, - extendedProperties, methodName); - } else { - fileGuid = createFileInRepository(fileTypeName, fileTypeGuid, file, extendedProperties, externalSourceGuid, - externalSourceName, userId, methodName); - } - String schemaTypeGuid = dataEngineSchemaTypeHandler.upsertSchemaType(userId, schemaType, fileGuid, externalSourceName); - dataEngineCommonHandler.upsertExternalRelationship(userId, fileGuid, schemaTypeGuid, OpenMetadataType.ASSET_TO_SCHEMA_TYPE_TYPE_NAME, - fileTypeName, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME, externalSourceName, null); - dataEngineFolderHierarchyHandler.upsertFolderHierarchy(fileGuid, file.getFileType(), file.getPathName(), - externalSourceGuid, externalSourceName, userId, methodName); - - dataEngineConnectionAndEndpointHandler.upsertConnectionAndEndpoint(file.getQualifiedName(), fileGuid, fileTypeName, - file.getProtocol(), file.getNetworkAddress(), externalSourceGuid, externalSourceName, userId); - - if (file.getIncomplete()) { - fileHandler.setClassificationInRepository(userId, externalSourceGuid, externalSourceName, fileGuid, FILE_GUID_PARAMETER_NAME, fileTypeName, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, null, - true, false, false, dataEngineCommonHandler.getNow(), methodName); - } - - return fileGuid; - } - - /** - * Remove the data file - * - * @param userId the name of the calling user - * @param dataFileGUID unique identifier of the file to be removed - * @param externalSourceName the external data engine name - * @param externalSourceGUID the external data engine unique identifier - * @param deleteSemantic the delete semantic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeDataFile(String userId, String dataFileGUID, String externalSourceName, String externalSourceGUID, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - final String methodName = "removeDataFile"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - - Optional schemaType = dataEngineCommonHandler.getEntityForRelationship(userId, dataFileGUID, - OpenMetadataType.ASSET_TO_SCHEMA_TYPE_TYPE_NAME, OpenMetadataType.DATA_FILE.typeName); - if (schemaType.isPresent()) { - dataEngineSchemaTypeHandler.removeSchemaType(userId, schemaType.get().getGUID(), externalSourceName, deleteSemantic); - - fileHandler.deleteBeanInRepository(userId, externalSourceGUID, externalSourceName, dataFileGUID, OpenMetadataProperty.GUID.name, - OpenMetadataType.DATA_FILE.typeGUID, OpenMetadataType.DATA_FILE.typeName, null, null, false, - false, dataEngineCommonHandler.getNow(), methodName); - } else { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.ENTITY_NOT_DELETED, methodName, dataFileGUID); - } - } - - private String updateFileInRepository(String userId, String externalSourceGuid, String externalSourceName, - EntityDetail fileAsEntity, DataFile file, Map extendedProperties, - String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, OpenMetadataType.DATA_FILE.typeName); - - fileHandler.updateAsset(userId, externalSourceGuid, externalSourceName, fileAsEntity.getGUID(), - CommonMapper.GUID_PROPERTY_NAME, file.getQualifiedName(), file.getDisplayName(), null, - file.getDescription(), file.getAdditionalProperties(), entityTypeDef.getGUID(), - entityTypeDef.getName(), extendedProperties, null, null, true, - false, false, dataEngineCommonHandler.getNow(), methodName); - return fileAsEntity.getGUID(); - } - - private String createFileInRepository(String typeName, String typeGuid, DataFile file, Map extendedProperties, - String externalSourceGuid, String externalSourceName, String userId, String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - int ownerType = dataEngineCommonHandler.getOwnerTypeOrdinal(file.getOwnerType()); - - return fileHandler.createAssetInRepository(userId, externalSourceGuid, externalSourceName, - file.getQualifiedName(), file.getDisplayName(), null, file.getDescription(), file.getZoneMembership(), - file.getOwner(), ownerType, file.getOriginOrganizationGUID(), - file.getOriginBusinessCapabilityGUID(), file.getOtherOriginValues(), file.getAdditionalProperties(), - typeGuid, typeName, extendedProperties, null, null, InstanceStatus.ACTIVE, - dataEngineCommonHandler.getNow(), methodName); - } - - private void validateParameters(DataFile file, SchemaType schemaType, String externalSourceGuid, String userId, String methodName) throws - InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateObject(externalSourceGuid, "externalSourceGuid", methodName); - invalidParameterHandler.validateObject(file, "file", methodName); - invalidParameterHandler.validateName(file.getQualifiedName(), "file.qualifiedName", methodName); - if (schemaType != null) { - invalidParameterHandler.validateObject(schemaType.getQualifiedName(), "schema.qualifiedName", methodName); - } - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineEventTypeHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineEventTypeHandler.java deleted file mode 100644 index b711ba10fb3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineEventTypeHandler.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EventTypeHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Date; -import java.util.List; -import java.util.Optional; - - - -/** - * DataEngineEventTypeHandler manages event type objects. It runs server-side in the - * DataEngine OMAS and creates and retrieves collections entities through the OMRSRepositoryConnector. - */ -public class DataEngineEventTypeHandler { - private final InvalidParameterHandler invalidParameterHandler; - private final EventTypeHandler eventTypeHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final DataEngineRegistrationHandler registrationHandler; - private final DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler; - protected static final String EVENT_TYPE_GUID_PARAMETER_NAME = "eventTypeGUID"; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param invalidParameterHandler handler for managing parameter errors - * @param eventTypeHandler provides utilities specific for manipulating event type entities - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param dataEngineRegistrationHandler provides utilities for engine entities - * @param dataEngineSchemaAttributeHandler provides utilities specific for schema attribute entities - */ - public DataEngineEventTypeHandler(InvalidParameterHandler invalidParameterHandler, EventTypeHandler eventTypeHandler, - DataEngineRegistrationHandler dataEngineRegistrationHandler, DataEngineCommonHandler dataEngineCommonHandler, - DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler) { - this.invalidParameterHandler = invalidParameterHandler; - this.eventTypeHandler = eventTypeHandler; - this.registrationHandler = dataEngineRegistrationHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.dataEngineSchemaAttributeHandler = dataEngineSchemaAttributeHandler; - } - - /** - * Create or update the event type with event schema attributes - * - * @param userId the name of the calling user - * @param eventType the values of the event type - * @param topicGUID the unique identifier of the topic - * @param externalSourceName the unique name of the external source - * @return unique identifier of the event type in the repository - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertEventType(String userId, EventType eventType, String topicGUID, String externalSourceName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertEventType"; - - validateParameters(userId, methodName, eventType.getQualifiedName(), eventType.getDisplayName()); - - Optional originalEventTypeEntity = dataEngineCommonHandler.findEntity(userId, eventType.getQualifiedName(), - OpenMetadataType.EVENT_TYPE_TYPE_NAME); - String eventTypeGUID; - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - Date now = dataEngineCommonHandler.getNow(); - if (originalEventTypeEntity.isEmpty()) { - eventTypeHandler.verifyExternalSourceIdentity(userId, externalSourceGUID, externalSourceName, - false, false, null, null); - eventTypeGUID = eventTypeHandler.createEventType(userId, externalSourceGUID, externalSourceName, topicGUID, OpenMetadataProperty.GUID.name, - eventType.getQualifiedName(), eventType.getDisplayName(), eventType.getDescription(), eventType.getVersionNumber(), - eventType.getIsDeprecated(), eventType.getAuthor(), eventType.getUsage(), eventType.getEncodingStandard(), - eventType.getNamespace(), eventType.getAdditionalProperties(), OpenMetadataType.EVENT_TYPE_TYPE_NAME, null, - null, null, false, false, now, methodName); - } else { - eventTypeGUID = originalEventTypeEntity.get().getGUID(); - eventTypeHandler.updateEventType(userId, externalSourceGUID, externalSourceName, eventTypeGUID, EVENT_TYPE_GUID_PARAMETER_NAME, - eventType.getQualifiedName(), eventType.getDisplayName(), eventType.getDescription(), eventType.getVersionNumber(), - eventType.getIsDeprecated(), eventType.getAuthor(), eventType.getUsage(), eventType.getEncodingStandard(), - eventType.getNamespace(), eventType.getAdditionalProperties(), OpenMetadataType.EVENT_TYPE_TYPE_NAME, null, - null, null, true, false, false, now, methodName); - } - - List attributeList = eventType.getAttributeList(); - if (CollectionUtils.isNotEmpty(attributeList)) { - attributeList.forEach(column -> { - column.setTypeName(OpenMetadataType.EVENT_SCHEMA_ATTRIBUTE_TYPE_NAME); - column.setTypeGuid(OpenMetadataType.EVENT_SCHEMA_ATTRIBUTE_TYPE_GUID); - }); - } - dataEngineSchemaAttributeHandler.upsertSchemaAttributes(userId, attributeList, externalSourceName, externalSourceGUID, eventTypeGUID); - - return eventTypeGUID; - } - - /** - * Verifies if the parameters are valid for a request - * - * @param userId the name of the calling user - * @param methodName name of the calling method - * @param qualifiedName the qualified name - * @param displayName the display name - * @throws InvalidParameterException the bean properties are invalid - */ - private void validateParameters(String userId, String methodName, String qualifiedName, String displayName) throws InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(qualifiedName, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - invalidParameterHandler.validateName(displayName, OpenMetadataProperty.DISPLAY_NAME.name, methodName); - } - - /** - * Remove the event type - * - * @param userId the name of the calling user - * @param eventTypeGUID unique identifier of the event type to be removed - * @param qualifiedName event type's qualified name - * @param externalSourceName the external data engine name - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeEventType(String userId, String eventTypeGUID, String qualifiedName, String externalSourceName, - DeleteSemantic deleteSemantic) throws FunctionNotSupportedException, InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "removeEventType"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - eventTypeHandler.removeEventType(userId, externalSourceGUID, externalSourceName, eventTypeGUID, EVENT_TYPE_GUID_PARAMETER_NAME, qualifiedName, - false, false, dataEngineCommonHandler.getNow(), methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFindHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFindHandler.java deleted file mode 100644 index 427b14d9ff5..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFindHandler.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -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.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - - -/** - * Manages find operations for DataEngine related objects - */ -public class DataEngineFindHandler { - - private final InvalidParameterHandler invalidParameterHandler; - private final OMRSRepositoryHelper repositoryHelper; - private final OpenMetadataAPIGenericHandler genericHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final String serviceName; - private final String serverName; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param genericHandler generic handler that provides utilities to manipulate entities - * @param serviceName service name - * @param serverName server name - */ - public DataEngineFindHandler(InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, - OpenMetadataAPIGenericHandler genericHandler, - DataEngineCommonHandler dataEngineCommonHandler, String serviceName, String serverName) { - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.genericHandler = genericHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.serviceName = serviceName; - this.serverName = serverName; - } - - /** - * Performs a find for a DataEngine related object. External repositories are included - * - * @param userId user id - * @param findRequestBody contains search criteria - * @param methodName method name - * - * @return a list of guids - * - * @throws InvalidParameterException if invalid parameters - * @throws PropertyServerException if errors in repository - * @throws UserNotAuthorizedException if user not authorized - * @throws FunctionNotSupportedException if function not supported - * @throws RepositoryErrorException if error in repository - * @throws PropertyErrorException if a property does not match - * @throws TypeErrorException if type is unknown - * @throws PagingErrorException if paging is erroneously defined - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException if user not authorized - * @throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException if invalid parameters - */ - public GUIDListResponse find(FindRequestBody findRequestBody, String userId, String methodName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - validateParameters(findRequestBody, userId, methodName); - - GUIDListResponse searchResponse = new GUIDListResponse(); - - String typeGuid = getTypeGuid(userId, findRequestBody.getType()); - final String externalSourceName = findRequestBody.getExternalSourceName(); - - List result = genericHandler.getEntitiesByValue(userId, findRequestBody.getIdentifiers().getQualifiedName(), - OpenMetadataProperty.QUALIFIED_NAME.name, typeGuid, findRequestBody.getType(), Collections.singletonList(OpenMetadataProperty.QUALIFIED_NAME.name), - true, null, null, false, false, - 0, invalidParameterHandler.getMaxPagingSize(), dataEngineCommonHandler.getNow(), methodName); - - if(!Objects.isNull(result)){ - List guids = result.stream() - .filter(ed -> Objects.isNull(externalSourceName) || externalSourceName.contentEquals(ed.getMetadataCollectionName())) - .map(EntityDetail::getGUID).collect(Collectors.toList()); - searchResponse.setGUIDs(guids); - } - - return searchResponse; - } - - private void validateParameters(FindRequestBody findRequestBody, String userId, String methodName) - throws InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateObject(findRequestBody, "findRequestBody", methodName); - invalidParameterHandler.validateObject(findRequestBody.getIdentifiers(), "findRequestBody.identifiers", methodName); - invalidParameterHandler.validateName(findRequestBody.getIdentifiers().getQualifiedName(), - "findRequestBody.identifiers.qualifiedName", methodName); - } - - private InstanceProperties buildInstanceProperties(String userId, String matchRegex){ - InstanceProperties instanceProperties = new InstanceProperties(); - - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValue.setPrimitiveValue(matchRegex); - primitivePropertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getName()); - primitivePropertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getGUID()); - - instanceProperties.setProperty(OpenMetadataProperty.QUALIFIED_NAME.name, primitivePropertyValue); - - return instanceProperties; - } - - private String getTypeGuid(String userId, String typeName){ - if(typeName == null){ - return OpenMetadataType.REFERENCEABLE.typeGUID; - } - TypeDef typeDef = repositoryHelper.getTypeDefByName(userId, typeName); - return typeDef == null ? OpenMetadataType.REFERENCEABLE.typeGUID : typeDef.getGUID(); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFolderHierarchyHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFolderHierarchyHandler.java deleted file mode 100644 index 2405927e838..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFolderHierarchyHandler.java +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.FileFolder; -import org.odpi.openmetadata.accessservices.dataengine.model.OwnerType; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.io.File; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Optional; - - - -/** - * FolderHierarchyHandler manages FileFolder objects from the property server. It runs server-side in the DataEngine OMAS - * and creates FileFolder entities with wire relationships through the OMRSRepositoryConnector. - */ -public class DataEngineFolderHierarchyHandler { - - private final InvalidParameterHandler invalidParameterHandler; - private final OpenMetadataAPIGenericHandler genericHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final AssetHandler folderHandler; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param invalidParameterHandler handler for managing parameter errors - * @param genericHandler manages calls to the repository services - * @param dataEngineCommonHandler provides common Data Engine Omas utilities - * @param folderHandler provides utilities specific for manipulating FileFolders - */ - public DataEngineFolderHierarchyHandler(InvalidParameterHandler invalidParameterHandler, - OpenMetadataAPIGenericHandler genericHandler, - DataEngineCommonHandler dataEngineCommonHandler, - AssetHandler folderHandler) { - - this.invalidParameterHandler = invalidParameterHandler; - this.genericHandler = genericHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.folderHandler = folderHandler; - } - - /** - * Construct the folder structure in which a data file is stored all the way to the Engine. Care is - * taken to maintain uniqueness of the relationship NestedFile that is between the file and the first folder. - * - * @param fileGuid data file guid - * @param fileType data file type - * @param pathName file path - * @param externalSourceGuid external source guid - * @param externalSourceName external source name - * @param userId user id - * @param methodName method name - * - * @throws InvalidParameterException if invalid parameters - * @throws PropertyServerException if errors in repository - * @throws UserNotAuthorizedException if user not authorized - */ - public void upsertFolderHierarchy(String fileGuid, String fileType, String pathName, String externalSourceGuid, - String externalSourceName, String userId, String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - if (StringUtils.isEmpty(pathName)) { - return; - } - validateParameters(fileGuid, externalSourceGuid, externalSourceName, userId, methodName); - List folders = extractFolders(pathName, externalSourceName, methodName); - - String folderGuid = ""; - String previousEntityGuid = fileGuid; - String previousEntityType = fileType; - String relationshipTypeName = OpenMetadataType.NESTED_FILE_TYPE_NAME; - for (FileFolder folder : folders) { - if (relationshipTypeName.equals(OpenMetadataType.NESTED_FILE_TYPE_NAME)) { - deleteExistingNestedFileRelationships(fileGuid, externalSourceGuid, externalSourceName, userId, methodName); - } - folderGuid = upsertFolder(externalSourceGuid, externalSourceName, folder, userId, methodName); - dataEngineCommonHandler.upsertExternalRelationship(userId, folderGuid, previousEntityGuid, relationshipTypeName, - OpenMetadataType.FILE_FOLDER.typeName, previousEntityType, externalSourceName, null); - - previousEntityGuid = folderGuid; - previousEntityType = OpenMetadataType.FILE_FOLDER.typeName; - relationshipTypeName = OpenMetadataType.FOLDER_HIERARCHY_TYPE_NAME; - } - - dataEngineCommonHandler.upsertExternalRelationship(userId, externalSourceGuid, folderGuid, OpenMetadataType.SERVER_ASSET_USE_RELATIONSHIP.typeName, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName, OpenMetadataType.FILE_FOLDER.typeName, externalSourceName, null); - } - - /** - * Remove the folder - * - * @param userId the name of the calling user - * @param folderGUID unique identifier of the folder to be removed - * @param externalSourceName the external data engine name - * @param deleteSemantic the delete semantic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeFolder(String userId, String folderGUID, DeleteSemantic deleteSemantic, String externalSourceName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - FunctionNotSupportedException { - String methodName = "removeFolder"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(folderGUID, OpenMetadataProperty.GUID.name, methodName); - - dataEngineCommonHandler.removeEntity(userId, folderGUID, OpenMetadataType.FILE_FOLDER.typeName, externalSourceName); - } - - private void deleteExistingNestedFileRelationships(String fileGuid, String externalSourceGuid, String externalSourceName, String userId, - String methodName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - Date now = dataEngineCommonHandler.getNow(); - List relationships = genericHandler.getAttachmentLinks(userId, fileGuid, CommonMapper.GUID_PROPERTY_NAME, - OpenMetadataType.DATA_FILE.typeName, OpenMetadataType.NESTED_FILE_TYPE_GUID, - OpenMetadataType.NESTED_FILE_TYPE_NAME, null, null, 2, - false, false,0, invalidParameterHandler.getMaxPagingSize(), now, methodName); - - if (CollectionUtils.isEmpty(relationships)) { - return; - } - for (Relationship relationship : relationships) { - genericHandler.deleteRelationship(userId, externalSourceGuid, externalSourceName, relationship.getGUID(), - CommonMapper.GUID_PROPERTY_NAME, relationship.getType().getTypeDefName(), false, false,now, methodName); - } - } - - private String upsertFolder(String externalSourceGuid, String externalSourceName, FileFolder folder, String userId, String methodName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Optional folderAsEntity = dataEngineCommonHandler.findEntity(userId, folder.getQualifiedName(), OpenMetadataType.FILE_FOLDER.typeName); - - if (folderAsEntity.isPresent()) { - return folderAsEntity.get().getGUID(); - } - - return folderHandler.createAssetInRepository(userId, externalSourceGuid, externalSourceName, - folder.getQualifiedName(), folder.getDisplayName(), null, folder.getDescription(), folder.getZoneMembership(), - folder.getOwner(), folder.getOwnerType().getOpenTypeOrdinal(), null, - null, folder.getOtherOriginValues(), folder.getAdditionalProperties(), - OpenMetadataType.FILE_FOLDER.typeGUID, OpenMetadataType.FILE_FOLDER.typeName, null, null, null, - InstanceStatus.ACTIVE, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Extracts each folder path and builds FileFolders, with the qualified name of the form - * '::'. The order is important, meaning the first folder is the one containing the file - * and the last one the root, and used in creating the folder hierarchy structure al the way to the Engine - * - * @param pathName file path - * @param externalSourceName name of Engine - * @param methodName method name - * - * @return list of FileFolders - */ - private List extractFolders(String pathName, String externalSourceName, String methodName) - throws InvalidParameterException { - - // java.nio.file.Paths works with backslash '/' alone, so reverse the slash but remember it to set it correctly in FileFolder's pathName - boolean fileSeparatorReversed = false; - if (pathName.contains("\\")) { - pathName = pathName.replace("\\", "/"); - fileSeparatorReversed = true; - } - - Path path = Paths.get(pathName); - File parentFile = path.toFile().getParentFile(); - invalidParameterHandler.validateObject(parentFile, "pathName", methodName); - - List folders = new ArrayList<>(); - // move from parent to parent until the root is reached - while (parentFile != null) { - String parentFilePath = fileSeparatorReversed ? parentFile.getPath().replace("/", "\\") : parentFile.getPath(); - FileFolder folder = buildFileFolder(parentFilePath, externalSourceName); - folders.add(folder); - parentFile = parentFile.getParentFile(); - } - return folders; - } - - private FileFolder buildFileFolder(String pathName, String externalSourceName) { - FileFolder fileFolder = new FileFolder(); - fileFolder.setQualifiedName(externalSourceName + "::" + pathName); - fileFolder.setPathName(pathName); - fileFolder.setDisplayName(computeDisplayName(pathName)); - fileFolder.setOwnerType(OwnerType.USER_ID); - - return fileFolder; - } - - /** - * Will return the name of the last folder in pathName. Takes root folder into account. - * When called with argument "/folder", return value is "folder". - * When called with argument "/", return value is "/" - * - * @param pathName path - * - * @return folder name - */ - private String computeDisplayName(String pathName) { - return new File(pathName).getName().length() < 1 ? pathName : new File(pathName).getName(); - } - - private void validateParameters(String fileGuid, String externalSourceGuid, String externalSourceName, String userId, String methodName) - throws InvalidParameterException { - invalidParameterHandler.validateObject(fileGuid, "fileGuid", methodName); - invalidParameterHandler.validateObject(externalSourceGuid, "externalSourceGuid", methodName); - invalidParameterHandler.validateObject(externalSourceName, "externalSourceName", methodName); - invalidParameterHandler.validateUserId(userId, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandler.java deleted file mode 100644 index aa13cc8d89f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandler.java +++ /dev/null @@ -1,215 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Port; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.PortBuilder; -import org.odpi.openmetadata.commonservices.generichandlers.PortHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Optional; - - - -/** - * PortHandler manages Port objects from the property server. It runs server-side in the DataEngine OMAS - * and creates port entities with wire relationships through the OMRSRepositoryConnector. - */ -public class DataEnginePortHandler { - private final String serviceName; - private final String serverName; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final PortHandler portHandler; - private final DataEngineRegistrationHandler registrationHandler; - - private static final String PROCESS_GUID_PARAMETER_NAME = "processGUID"; - private static final String PORT_GUID_PARAMETER_NAME = "portGUID"; - private static final String SCHEMA_TYPE_GUID_PARAMETER_NAME = "schemaTypeGUID"; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param portHandler provides utilities for manipulating the repository services ports - * @param registrationHandler provides utilities for manipulating engine entities - */ - public DataEnginePortHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, - OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler, - PortHandler portHandler, DataEngineRegistrationHandler registrationHandler) { - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.portHandler = portHandler; - this.registrationHandler = registrationHandler; - } - - /** - * Create the port implementation attached to a process. - * - * @param userId the name of the calling user - * @param port the port implementation values - * @param processGUID the unique identifier of the process - * @param externalSourceName the unique name of the external source - * @return unique identifier of the port implementation in the repository - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String createPortImplementation(String userId, PortImplementation port, String processGUID, String externalSourceName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - final String methodName = "createPortImplementation"; - validatePortParameters(userId, port.getQualifiedName(), port.getDisplayName(), methodName); - invalidParameterHandler.validateGUID(processGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - return portHandler.createPort(userId, externalSourceGUID, externalSourceName, processGUID, PROCESS_GUID_PARAMETER_NAME, port.getQualifiedName(), - port.getDisplayName(), port.getPortType().getOrdinal(), port.getAdditionalProperties(), OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, - null, false, false, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Update the port implementation - * - * @param userId the name of the calling user - * @param originalPortEntity the created port entity - * @param port the port implementation new values - * @param externalSourceName the external data engine - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void updatePortImplementation(String userId, EntityDetail originalPortEntity, PortImplementation port, - String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - final String methodName = "updatePortImplementation"; - validatePortParameters(userId, port.getQualifiedName(), port.getDisplayName(), methodName); - String portGUID = originalPortEntity.getGUID(); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - PortBuilder updatedPortBuilder = new PortBuilder(port.getQualifiedName(), port.getDisplayName(), port.getPortType().getOrdinal(), - port.getAdditionalProperties(), externalSourceGUID, externalSourceName, null, repositoryHelper, serviceName, serverName); - EntityDetail updatedPortEntity = dataEngineCommonHandler.buildEntityDetail(portGUID, updatedPortBuilder.getInstanceProperties(methodName)); - EntityDetailDifferences entityDetailDifferences = repositoryHelper.getEntityDetailDifferences(originalPortEntity, updatedPortEntity, true); - if (!entityDetailDifferences.hasInstancePropertiesDifferences()) { - return; - } - - portHandler.updatePort(userId, externalSourceGUID, externalSourceName, portGUID, PORT_GUID_PARAMETER_NAME, port.getQualifiedName(), - port.getDisplayName(), port.getPortType().getOrdinal(), port.getAdditionalProperties(), OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, null, - null, null, false, false, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Create a PortSchema relationship between a Port and the corresponding SchemaType. Verifies that the - * relationship is not present before creating it - * - * @param userId the name of the calling user - * @param portGUID the unique identifier of the port - * @param schemaTypeGUID the unique identifier of the schema type - * @param externalSourceName the unique name of the external source - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void addPortSchemaRelationship(String userId, String portGUID, String schemaTypeGUID, String externalSourceName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "addPortSchemaRelationship"; - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(portGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - invalidParameterHandler.validateGUID(schemaTypeGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - Optional relationship = dataEngineCommonHandler.findRelationship(userId, portGUID, schemaTypeGUID, - OpenMetadataType.PORT_TYPE_NAME, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME, OpenMetadataType.PORT_SCHEMA_RELATIONSHIP_TYPE_NAME); - if (relationship.isEmpty()) { - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - portHandler.setupPortSchemaType(userId, externalSourceGUID, externalSourceName, portGUID, PORT_GUID_PARAMETER_NAME, - schemaTypeGUID, SCHEMA_TYPE_GUID_PARAMETER_NAME, null, null, false, false, - dataEngineCommonHandler.getNow(), methodName); - } - } - - /** - * Retrieve the schema type that is linked to the port - * - * @param userId the name of the calling user - * @param portGUID the unique identifier of the port - * @return retrieved entity or an empty optional - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional findSchemaTypeForPort(String userId, String portGUID) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - return dataEngineCommonHandler.getEntityForRelationship(userId, portGUID, OpenMetadataType.PORT_SCHEMA_RELATIONSHIP_TYPE_NAME, - OpenMetadataType.PORT_TYPE_NAME); - } - - /** - * Remove the port - * - * @param userId the name of the calling user - * @param portGUID unique identifier of the port to be removed - * @param externalSourceName the external data engine - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removePort(String userId, String portGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - FunctionNotSupportedException { - final String methodName = "removePort"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - portHandler.removePort(userId, externalSourceGUID, externalSourceName, portGUID, PORT_GUID_PARAMETER_NAME, - false, false, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Find out if the PortImplementation object is already stored in the repository. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the process to be searched - * @return optional with entity details if found, empty optional if not found - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional findPortImplementationEntity(String userId, String qualifiedName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - } - - private void validatePortParameters(String userId, String qualifiedName, String displayName, String methodName) throws InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(displayName, OpenMetadataProperty.DISPLAY_NAME.name, methodName); - invalidParameterHandler.validateName(qualifiedName, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineProcessHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineProcessHandler.java deleted file mode 100644 index 07be74786e9..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineProcessHandler.java +++ /dev/null @@ -1,308 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - - -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.ParentProcess; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessContainmentType; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.ProcessPropertiesBuilder; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.Set; - - - - -/** - * ProcessHandler manages Process objects from the property server. It runs server-side in the DataEngine OMAS - * and creates process entities and relationships through the OMRSRepositoryConnector. - */ -public class DataEngineProcessHandler { - private final String serviceName; - private final String serverName; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final AssetHandler assetHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final DataEngineRegistrationHandler registrationHandler; - - protected static final String PROCESS_GUID_PARAMETER_NAME = "processGUID"; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param assetHandler provides utilities for manipulating the repository services assets - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param registrationHandler provides utilities for manipulating engine entities - **/ - public DataEngineProcessHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, - OMRSRepositoryHelper repositoryHelper, AssetHandler assetHandler, - DataEngineRegistrationHandler registrationHandler, DataEngineCommonHandler dataEngineCommonHandler) { - - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.assetHandler = assetHandler; - this.registrationHandler = registrationHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - } - - /** - * Create the process - * - * @param userId the name of the calling user - * @param process the values of the process - * @param externalSourceName the unique name of the external source - * - * @return unique identifier of the process in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String createProcess(String userId, Process process, String externalSourceName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "createProcess"; - validateProcessParameters(userId, process.getQualifiedName(), methodName); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - - return assetHandler.createAssetInRepository(userId, externalSourceGUID, externalSourceName, process.getQualifiedName(), process.getName(), - null, process.getDescription(), process.getZoneMembership(), process.getOwner(), - dataEngineCommonHandler.getOwnerTypeOrdinal(process.getOwnerType()), process.getOriginBusinessCapabilityGUID(), - process.getOriginBusinessCapabilityGUID(), process.getOtherOriginValues(), process.getAdditionalProperties(), - OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, buildProcessExtendedProperties(process), null, null, - InstanceStatus.DRAFT, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Update the process - * - * @param userId the name of the calling user - * @param originalProcessEntity the created process entity - * @param updatedProcess the new values of the process - * @param externalSourceName the external data engine - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void updateProcess(String userId, EntityDetail originalProcessEntity, Process updatedProcess, String externalSourceName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - - final String methodName = "updateProcess"; - - validateProcessParameters(userId, updatedProcess.getQualifiedName(), methodName); - - String processGUID = originalProcessEntity.getGUID(); - - ProcessPropertiesBuilder updatedProcessBuilder = getProcessPropertiesBuilder(updatedProcess); - - InstanceProperties updatedProcessProperties = updatedProcessBuilder.getInstanceProperties(methodName); - EntityDetail updatedProcessEntity = dataEngineCommonHandler.buildEntityDetail(processGUID, updatedProcessProperties); - EntityDetailDifferences entityDetailDifferences = repositoryHelper.getEntityDetailDifferences(originalProcessEntity, - updatedProcessEntity, true); - if (!entityDetailDifferences.hasInstancePropertiesDifferences()) { - return; - } - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - assetHandler.updateAsset(userId, externalSourceGUID, externalSourceName, processGUID, PROCESS_GUID_PARAMETER_NAME, - updatedProcess.getQualifiedName(), updatedProcess.getName(), null, updatedProcess.getDescription(), - updatedProcess.getAdditionalProperties(), OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, - buildProcessExtendedProperties(updatedProcess), null, null, true, false, - false, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Find out if the Process object is already stored in the repository. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the process to be searched - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional findProcessEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.PROCESS.typeName); - } - - /** - * Update the process instance status - * - * @param userId the name of the calling user - * @param processGUID the process GUID - * @param instanceStatus the status of the process - * @param externalSourceName the external data engine - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void updateProcessStatus(String userId, String processGUID, InstanceStatus instanceStatus, String externalSourceName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - - final String methodName = "updateProcessStatus"; - final String processStatusParameterName = "processStatus"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(processGUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - - TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, OpenMetadataType.PROCESS.typeName); - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - - assetHandler.updateBeanStatusInRepository(userId, externalSourceGUID, externalSourceName, processGUID, PROCESS_GUID_PARAMETER_NAME, - entityTypeDef.getGUID(), entityTypeDef.getName(), false, false, instanceStatus, processStatusParameterName, - dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Retrieve all port objects that are connected to the process - * - * @param userId the name of the calling user - * @param processGUID the unique identifier of the process - * @param portTypeName the type of the port to be retrieved - * - * @return A set of the retrieved ports or an empty set - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Set getPortsForProcess(String userId, String processGUID, String portTypeName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - return dataEngineCommonHandler.getEntitiesForRelationship(userId, processGUID, OpenMetadataType.PROCESS_PORT_TYPE_NAME, - portTypeName, OpenMetadataType.PROCESS.typeName); - } - - private void validateProcessParameters(String userId, String qualifiedName, String methodName) throws InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(qualifiedName, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } - - ProcessPropertiesBuilder getProcessPropertiesBuilder(Process process) { - return new ProcessPropertiesBuilder(process.getQualifiedName(), process.getDisplayName(), process.getName(), process.getDescription(), - OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, process.getFormula(), process.getImplementationLanguage(), process.getAdditionalProperties(), - repositoryHelper, serverName, serviceName); - } - - /** - * Creates a process hierarchy relationship - * @param userId the name of the calling user - * @param parentProcess the parent process - * @param processGUID the process GUID - * @param externalSourceName the external data engine - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void upsertProcessHierarchyRelationship(String userId, ParentProcess parentProcess, String processGUID, - String externalSourceName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertProcessHierarchyRelationship"; - - ProcessContainmentType processContainmentType = parentProcess.getProcessContainmentType(); - InstanceProperties relationshipProperties = repositoryHelper.addEnumPropertyToInstance(serviceName, null, - CommonMapper.CONTAINMENT_TYPE, processContainmentType.getOrdinal(), processContainmentType.getName(), - processContainmentType.getDescription(), methodName); - - Optional parentProcessEntity = findProcessEntity(userId, parentProcess.getQualifiedName()); - if (parentProcessEntity.isPresent()) { - dataEngineCommonHandler.upsertExternalRelationship(userId, parentProcessEntity.get().getGUID(), processGUID, - OpenMetadataType.PROCESS_HIERARCHY_TYPE_NAME, OpenMetadataType.PROCESS.typeName, OpenMetadataType.PROCESS.typeName, externalSourceName, relationshipProperties); - } else { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.PROCESS_NOT_FOUND, methodName, - parentProcess.getQualifiedName()); - } - } - - /** - * Build the extendedProperties map for a process, by adding type specific properties to the map - * - * @param process the process for which the extended properties map is built - * - * @return map containing the process extended properties - */ - private Map buildProcessExtendedProperties(Process process) { - Map extendedProperties = new HashMap<>(); - - String formula = process.getFormula(); - String implementationLanguage = process.getImplementationLanguage(); - String displayName = process.getDisplayName(); - - if (formula != null) { - extendedProperties.put(OpenMetadataProperty.FORMULA.name, formula); - } - if (implementationLanguage != null) { - extendedProperties.put(OpenMetadataType.IMPLEMENTATION_LANGUAGE_PROPERTY_NAME, implementationLanguage); - } - if (displayName != null) { - extendedProperties.put(OpenMetadataProperty.DISPLAY_NAME.name, displayName); - } - return extendedProperties; - } - - /** - * Remove the process - * - * @param userId the name of the calling user - * @param processGUID unique identifier of the port to be removed - * @param externalSourceName the external data engine - * @param deleteSemantic the delete semantic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeProcess(String userId, String processGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - FunctionNotSupportedException { - final String methodName = "removeProcess"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - assetHandler.deleteBeanInRepository(userId, externalSourceGUID, externalSourceName, processGUID, PROCESS_GUID_PARAMETER_NAME, - OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, null, null, false, - false, dataEngineCommonHandler.getNow(), methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRegistrationHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRegistrationHandler.java deleted file mode 100644 index 850c2325df1..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRegistrationHandler.java +++ /dev/null @@ -1,279 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.ExternalDataEnginePropertiesBuilder; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.accessservices.dataengine.server.service.ClockService; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -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.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import static org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper.GUID_PROPERTY_NAME; -import static org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper.QUALIFIED_NAME_PROPERTY_NAME; - - -/** - * DataEngineRegistrationHandler manages Engine objects from external data engines. It runs - * server-side in the DataEngine OMAS and creates engine entities through the - * SoftwareCapabilityHandler. - */ -public class DataEngineRegistrationHandler { - - private static final String EXTERNAL_ENGINE_PARAMETER_NAME = "externalSourceGUID"; - protected static final String SYNC_DATES_BY_KEY = "syncDatesByKey"; - private final String serviceName; - private final String serverName; - private final OMRSRepositoryHelper repositoryHelper; - private final SoftwareCapabilityHandler softwareServerCapabilityHandler; - private final InvalidParameterHandler invalidParameterHandler; - private final ClockService clockService; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param softwareServerCapabilityHandler handler for the creation of engine objects - */ - public DataEngineRegistrationHandler(String serviceName, String serverName, - InvalidParameterHandler invalidParameterHandler, - OMRSRepositoryHelper repositoryHelper, - SoftwareCapabilityHandler softwareServerCapabilityHandler, - ClockService clockService) { - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.softwareServerCapabilityHandler = softwareServerCapabilityHandler; - this.clockService = clockService; - } - - /** - * Create the engine entity from an external data engine - * - * @param userId the name of the calling user - * @param engine the entity of external data engine - * @return unique identifier of the external data engine in the repository - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertExternalDataEngine(String userId, Engine engine) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "upsertExternalDataEngine"; - - invalidParameterHandler.validateUserId(userId, methodName); - - String externalEngineName = engine.getQualifiedName(); - invalidParameterHandler.validateName(externalEngineName, QUALIFIED_NAME_PROPERTY_NAME, - methodName); - - TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, OpenMetadataType.ENGINE.typeName); - - String externalEngineGUID = getExternalDataEngine(userId, externalEngineName); - if (externalEngineGUID == null) { - externalEngineGUID = softwareServerCapabilityHandler.createSoftwareCapability(userId, null, - null, entityTypeDef.getName(), null, externalEngineName, - engine.getName(), engine.getDescription(), engine.getEngineType(), - engine.getEngineVersion(), engine.getPatchLevel(), engine.getSource(), - engine.getAdditionalProperties(), null, null, null, - null, false, false, clockService.getNow(), methodName); - } else { - ExternalDataEnginePropertiesBuilder builder = getExternalDataEnginePropertiesBuilder(engine); - InstanceProperties properties = builder.getInstanceProperties(methodName); - - softwareServerCapabilityHandler.updateBeanInRepository(userId, externalEngineGUID, externalEngineName, externalEngineGUID, - GUID_PROPERTY_NAME, entityTypeDef.getGUID(), entityTypeDef.getName(), properties, true, methodName); - } - - return externalEngineGUID; - } - - /** - * Return the guid of an engine entity from an external data engine - * - * @param userId identifier of calling user - * @param qualifiedName qualified name of the external data engine - * @return the guid of the external data engine - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem retrieving the discovery engine definition - */ - public String getExternalDataEngine(String userId, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, - PropertyServerException { - final String methodName = "getExternalDataEngineByQualifiedName"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(qualifiedName, QUALIFIED_NAME_PROPERTY_NAME, methodName); - - TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, OpenMetadataType.ENGINE.typeName); - EntityDetail retrievedEntity = softwareServerCapabilityHandler.getEntityByValue(userId, qualifiedName, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - entityTypeDef.getGUID(), entityTypeDef.getName(), Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), - false, false, clockService.getNow(), methodName); - - if (retrievedEntity == null) { - return null; - } - - return retrievedEntity.getGUID(); - } - - /** - * Removes the data engine. Currently not implemented, it will throw a {@link org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException} - * - * @param userId identifier of calling user - * @param qualifiedName qualified name of the external data engine - * @param externalSourceName the external data engine - * @param deleteSemantic the delete semantic - * @throws FunctionNotSupportedException no implemented, it will throw an exception - */ - public void removeExternalDataEngine(String userId, String qualifiedName, String externalSourceName, DeleteSemantic deleteSemantic) throws - FunctionNotSupportedException { - final String methodName = "removeExternalDataEngine"; - - throw new FunctionNotSupportedException(OMRSErrorCode.METHOD_NOT_IMPLEMENTED.getMessageDefinition(methodName, this.getClass().getName(), - serverName), this.getClass().getName(), methodName); - } - - ExternalDataEnginePropertiesBuilder getExternalDataEnginePropertiesBuilder(Engine engine) { - return new ExternalDataEnginePropertiesBuilder(engine.getQualifiedName(), - engine.getName(), engine.getDescription(), engine.getEngineType(), - engine.getEngineVersion(), engine.getPatchLevel(), engine.getSource(), - engine.getAdditionalProperties(), repositoryHelper, serviceName, serverName); - } - - /** - * Sets the ProcessingState Classification for the data engine - * - * @param userId identifier of calling user - * @param processingState the processing state - * @param externalSourceName the external data engine - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem retrieving the discovery engine definition - */ - public void upsertProcessingStateClassification(String userId, ProcessingState processingState, String externalSourceName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - final String methodName = "upsertProcessingStateClassification"; - - invalidParameterHandler.validateUserId(userId, methodName); - - String externalSourceGUID = this.getExternalDataEngine(userId, externalSourceName); - validateExternalDataEngine(externalSourceName, methodName, externalSourceGUID); - - EntityDetail retrievedEntity = getDataEngineEntity(userId, externalSourceName, methodName); - - //Check if the entity has this classification and if it does then merge the syncDatesByKey - Map newSyncDatesByKey = updateSyncDatesByKey(processingState, retrievedEntity); - - if (newSyncDatesByKey.isEmpty()) { - newSyncDatesByKey = processingState.getSyncDatesByKey(); - } - - InstanceProperties instanceProperties = new InstanceProperties(); - instanceProperties = repositoryHelper.addLongMapPropertyToInstance(null, instanceProperties, SYNC_DATES_BY_KEY, - newSyncDatesByKey, methodName); - - softwareServerCapabilityHandler.setClassificationInRepository(userId, null, null, - externalSourceGUID, EXTERNAL_ENGINE_PARAMETER_NAME, OpenMetadataType.ENGINE.typeName, OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_NAME, instanceProperties, true, false, - false, clockService.getNow(), methodName); - } - - /** - * Retrieves the ProcessingState Classification for the data engine - * - * @param userId identifier of calling user - * @param externalSourceName the external data engine - * @return the ProcessingState Classification for the data engine - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem retrieving the discovery engine definition - */ - public ProcessingState getProcessingStateClassification(String userId, String externalSourceName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "getProcessingStateClassification"; - invalidParameterHandler.validateUserId(userId, methodName); - - String externalSourceGUID = this.getExternalDataEngine(userId, externalSourceName); - validateExternalDataEngine(externalSourceName, methodName, externalSourceGUID); - - EntityDetail engineEntity = getDataEngineEntity(userId, externalSourceName, methodName); - - Map syncDatesByKey = getSyncDatesByKey(engineEntity); - return new ProcessingState(syncDatesByKey); - } - - private EntityDetail getDataEngineEntity(String userId, String externalSourceName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, OpenMetadataType.ENGINE.typeName); - return softwareServerCapabilityHandler.getEntityByValue(userId, externalSourceName, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - entityTypeDef.getGUID(), entityTypeDef.getName(), Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), - false, false, clockService.getNow(), methodName); - } - - private void validateExternalDataEngine(String externalSourceName, String methodName, String externalSourceGUID) throws InvalidParameterException { - if (externalSourceGUID == null) { - ExceptionMessageDefinition messageDefinition = DataEngineErrorCode.ENGINE_NOT_FOUND.getMessageDefinition(externalSourceName); - throw new InvalidParameterException(messageDefinition, this.getClass().getName(), methodName, EXTERNAL_ENGINE_PARAMETER_NAME); - } - } - - private Map updateSyncDatesByKey(ProcessingState processingState, EntityDetail retrievedEntity) { - Map newSyncDatesByKey = new HashMap<>(); - if (retrievedEntity.getClassifications() != null) { - for (Classification classification : retrievedEntity.getClassifications()) { - if (classification != null && classification.getName().equals(OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_NAME)) { - MapPropertyValue syncDatesByKey = (MapPropertyValue) classification.getProperties().getPropertyValue(SYNC_DATES_BY_KEY); - for (Map.Entry entry : syncDatesByKey.getMapValues().getInstanceProperties().entrySet()) { - newSyncDatesByKey.put(entry.getKey().toString(), - ((Long) ((PrimitivePropertyValue) entry.getValue()).getPrimitiveValue()).longValue()); - } - newSyncDatesByKey.putAll(processingState.getSyncDatesByKey()); - } - } - } - return newSyncDatesByKey; - } - - private Map getSyncDatesByKey(EntityDetail retrievedEntity) { - Map newSyncDatesByKey = new HashMap<>(); - if (retrievedEntity.getClassifications() != null) { - for (Classification classification : retrievedEntity.getClassifications()) { - if (classification != null && classification.getName().equals(OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_NAME)) { - MapPropertyValue syncDatesByKey = (MapPropertyValue) classification.getProperties().getPropertyValue(SYNC_DATES_BY_KEY); - for (Map.Entry entry : syncDatesByKey.getMapValues().getInstanceProperties().entrySet()) { - newSyncDatesByKey.put(entry.getKey().toString(), - ((Long) ((PrimitivePropertyValue) entry.getValue()).getPrimitiveValue()).longValue()); - } - } - } - } - return newSyncDatesByKey; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRelationalDataHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRelationalDataHandler.java deleted file mode 100644 index f7729478313..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRelationalDataHandler.java +++ /dev/null @@ -1,480 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.codehaus.plexus.util.StringUtils; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalColumn; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.commonservices.generichandlers.RelationalDataHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -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.ffdc.exception.FunctionNotSupportedException; - -import java.util.Date; -import java.util.List; -import java.util.Optional; - - - -/** - * DataEngineRelationalDataHandler manages Databases and RelationalTables objects from the property server. It runs server-side in the DataEngine - * OMAS and creates entities and relationships through the OMRSRepositoryConnector. - */ -public class DataEngineRelationalDataHandler { - - private static final String DATABASE_SCHEMA_GUID = "databaseSchemaGUID"; - private static final String DATABASE_GUID = "databaseGUID"; - private final String serviceName; - private final String serverName; - private final InvalidParameterHandler invalidParameterHandler; - private final RelationalDataHandler - relationalDataHandler; - private final AssetHandler databaseSchemaAssetHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final DataEngineRegistrationHandler registrationHandler; - private final DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param relationalDataHandler provides utilities for manipulating the repository services assets - * @param databaseSchemaAssetHandler provides utilities for manipulating database schema assets - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param registrationHandler creates engine entities - * @param dataEngineConnectionAndEndpointHandler provides utilities specific for manipulating Connections and Endpoints - **/ - public DataEngineRelationalDataHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, - RelationalDataHandler relationalDataHandler, AssetHandler databaseSchemaAssetHandler, - DataEngineRegistrationHandler registrationHandler, DataEngineCommonHandler dataEngineCommonHandler, - DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler) { - - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.relationalDataHandler = relationalDataHandler; - this.databaseSchemaAssetHandler = databaseSchemaAssetHandler; - this.registrationHandler = registrationHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.dataEngineConnectionAndEndpointHandler = dataEngineConnectionAndEndpointHandler; - } - - /** - * Create or update the database and the inside entities, if any (a database schema and relational tables) - * - * @param userId the name of the calling user - * @param database the values of the database - * @param externalSourceName the unique name of the external source - * - * @return unique identifier of the database in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertDatabase(String userId, Database database, String externalSourceName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "upsertDatabase"; - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - Optional originalDatabaseEntity = findDatabaseEntity(userId, database.getQualifiedName()); - - int ownerTypeOrdinal = dataEngineCommonHandler.getOwnerTypeOrdinal(database.getOwnerType()); - Date now = dataEngineCommonHandler.getNow(); - String databaseGUID; - if (originalDatabaseEntity.isEmpty()) { - databaseGUID = relationalDataHandler.createDatabase(userId, externalSourceGUID, externalSourceName, database.getQualifiedName(), - database.getDisplayName(), null, database.getDescription(), database.getOwner(), ownerTypeOrdinal, database.getZoneMembership(), - database.getOriginOrganizationGUID(), database.getOriginBusinessCapabilityGUID(), database.getOtherOriginValues(), - database.getPathName(), database.getCreateTime(), database.getModifiedTime(), database.getEncodingType(), - database.getEncodingLanguage(), database.getEncodingDescription(), database.getEncodingProperties(), database.getDatabaseType(), - database.getDatabaseVersion(), database.getDatabaseInstance(), database.getDatabaseImportedFrom(), - database.getAdditionalProperties(), OpenMetadataType.DATABASE_TYPE_NAME, null, null, - null, null, false, false, now, methodName); - } else { - databaseGUID = originalDatabaseEntity.get().getGUID(); - relationalDataHandler.updateDatabase(userId, externalSourceGUID, externalSourceName, databaseGUID, database.getQualifiedName(), - database.getDisplayName(), database.getDescription(), database.getOwner(), ownerTypeOrdinal, database.getZoneMembership(), - database.getOriginOrganizationGUID(), database.getOriginBusinessCapabilityGUID(), database.getOtherOriginValues(), - database.getCreateTime(), database.getModifiedTime(), database.getEncodingType(), database.getEncodingLanguage(), - database.getEncodingDescription(), database.getEncodingProperties(), database.getDatabaseType(), database.getDatabaseVersion(), - database.getDatabaseInstance(), database.getDatabaseImportedFrom(), database.getAdditionalProperties(), - OpenMetadataType.DATABASE_TYPE_NAME, null, null, null, null, true, - false, false, now, methodName); - } - - if (database.getIncomplete()) { - databaseSchemaAssetHandler.setClassificationInRepository(userId, externalSourceGUID, externalSourceName, databaseGUID, - DATABASE_GUID, OpenMetadataType.DATABASE_TYPE_NAME, OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, - null, true, false, false, now, methodName); - } - - dataEngineConnectionAndEndpointHandler.upsertConnectionAndEndpoint(database.getQualifiedName(), - databaseGUID, OpenMetadataType.DATABASE_TYPE_NAME, database.getProtocol(), database.getNetworkAddress(), - externalSourceGUID, externalSourceName, userId); - - DatabaseSchema databaseSchema = database.getDatabaseSchema(); - if (databaseSchema != null) { - upsertDatabaseSchema(userId, databaseGUID, databaseSchema, externalSourceName); - List tables = database.getTables(); - if (CollectionUtils.isNotEmpty(tables)) { - for (RelationalTable table : tables) { - String databaseSchemaQualifiedName = databaseSchema.getQualifiedName(); - upsertRelationalTable(userId, databaseSchemaQualifiedName, table, externalSourceName); - } - } - } - - return databaseGUID; - } - - /** - * Find out if the Database object is already stored in the repository. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the database to be searched - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - private Optional findDatabaseEntity(String userId, String qualifiedName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.DATABASE_TYPE_NAME); - } - - /** - * Find out if the DatabaseSchema object is already stored in the repository. - * It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the database schema to be searched - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - private Optional findDatabaseSchemaEntity(String userId, String qualifiedName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - } - - /** - * Create or update the database schema - * - * @param userId the name of the calling user - * @param databaseGUID the unique identifier of the database - * @param databaseSchema the values of the database schema - * @param externalSourceName the unique name of the external source - * - * @return database schema GUID - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertDatabaseSchema(String userId, String databaseGUID, DatabaseSchema databaseSchema, String externalSourceName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - - final String methodName = "upsertDatabaseSchema"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(databaseSchema.getQualifiedName(), OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - Optional originalDatabaseSchemaEntity = dataEngineCommonHandler.findEntity(userId, databaseSchema.getQualifiedName(), - OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - - String databaseSchemaGUID; - int ownerTypeOrdinal = dataEngineCommonHandler.getOwnerTypeOrdinal(databaseSchema.getOwnerType()); - Date now = dataEngineCommonHandler.getNow(); - if (originalDatabaseSchemaEntity.isEmpty()) { - databaseSchemaGUID = relationalDataHandler.createDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseGUID, - databaseSchema.getQualifiedName(), databaseSchema.getDisplayName(), null, databaseSchema.getDescription(), databaseSchema.getOwner(), - ownerTypeOrdinal, databaseSchema.getZoneMembership(), databaseSchema.getOriginOrganizationGUID(), - databaseSchema.getOriginBusinessCapabilityGUID(), databaseSchema.getOtherOriginValues(), - databaseSchema.getAdditionalProperties(), OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, null, - null, null, null, false, false, now, methodName); - } else { - databaseSchemaGUID = originalDatabaseSchemaEntity.get().getGUID(); - relationalDataHandler.updateDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID, - databaseSchema.getQualifiedName(), databaseSchema.getDisplayName(), null, databaseSchema.getDescription(), databaseSchema.getOwner(), - ownerTypeOrdinal, databaseSchema.getZoneMembership(), databaseSchema.getOriginOrganizationGUID(), - databaseSchema.getOriginBusinessCapabilityGUID(), databaseSchema.getOtherOriginValues(), - databaseSchema.getAdditionalProperties(), OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, null, - null, null, null, true, false, false, now, methodName); - - if (StringUtils.isNotEmpty(databaseGUID)) { - databaseSchemaAssetHandler.linkElementToElement(userId, externalSourceGUID, externalSourceName, databaseGUID, - DATABASE_GUID, OpenMetadataType.DATABASE_TYPE_NAME, databaseSchemaGUID, DATABASE_SCHEMA_GUID, - OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, false, false, - OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_RELATIONSHIP.typeGUID, OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_RELATIONSHIP.typeName, - (InstanceProperties) null, null, null, now, methodName); - } - } - - if (databaseSchema.getIncomplete()) { - databaseSchemaAssetHandler.setClassificationInRepository(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID, DATABASE_SCHEMA_GUID, - OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, - null, true, false, false, now, methodName); - } - return databaseSchemaGUID; - } - - /** - * Create or update the relational table - * - * @param userId the name of the calling user - * @param databaseSchemaQualifiedName the database qualified name - * @param relationalTable the values of the relational table - * @param externalSourceName the unique name of the external source - * - * @return unique identifier of the relational table in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertRelationalTable(String userId, String databaseSchemaQualifiedName, RelationalTable relationalTable, - String externalSourceName) throws InvalidParameterException, - PropertyServerException, UserNotAuthorizedException { - final String methodName = "upsertRelationalTable"; - validateParameters(userId, methodName, relationalTable.getQualifiedName(), relationalTable.getDisplayName()); - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - - String relationalTableGUID; - Optional originalRelationalTableEntity = dataEngineCommonHandler.findEntity(userId, - relationalTable.getQualifiedName(), OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME); - Date now = dataEngineCommonHandler.getNow(); - if (originalRelationalTableEntity.isEmpty()) { - Optional databaseSchemaEntity = findDatabaseSchemaEntity(userId, databaseSchemaQualifiedName); - if (databaseSchemaEntity.isEmpty()) { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.DATABASE_SCHEMA_NOT_FOUND, - methodName, databaseSchemaQualifiedName); - } - - String databaseSchemaGUID = databaseSchemaEntity.get().getGUID(); - relationalTableGUID = relationalDataHandler.createDatabaseTable(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID, - relationalTable.getQualifiedName(), relationalTable.getDisplayName(), relationalTable.getDescription(), - relationalTable.getIsDeprecated(), relationalTable.getAliases(), relationalTable.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, null, null, null, null, - false, false, now, methodName); - } else { - relationalTableGUID = originalRelationalTableEntity.get().getGUID(); - relationalDataHandler.updateDatabaseTable(userId, externalSourceGUID, externalSourceName, relationalTableGUID, - relationalTable.getQualifiedName(), relationalTable.getDisplayName(), relationalTable.getDescription(), - relationalTable.getIsDeprecated(), relationalTable.getAliases(), relationalTable.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, null, null, null, null, - true, false, false, now, methodName); - } - - upsertRelationalColumns(userId, externalSourceGUID, externalSourceName, relationalTableGUID, relationalTable.getColumns()); - - if (relationalTable.getIncomplete()) { - databaseSchemaAssetHandler.setClassificationInRepository(userId, externalSourceGUID, externalSourceName, - relationalTableGUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_GUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, null, true, false, - false, now, methodName); - } - return relationalTableGUID; - } - - /** - * Create or update the relational columns of a relational table - * - * @param userId the name of the calling user - * @param columns the values of the columns - * @param relationalTableGUID the unique identifier of the relational table - * @param externalSourceName the unique name of the external source - * @param externalSourceGUID the unique name of the external source - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - private void upsertRelationalColumns(String userId, String externalSourceGUID, String externalSourceName, String relationalTableGUID, - List columns) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertRelationalColumns"; - - if (CollectionUtils.isEmpty(columns)) { - return; - } - - Date now = dataEngineCommonHandler.getNow(); - for (RelationalColumn column : columns) { - int sortOrder = dataEngineCommonHandler.getSortOrder(column); - - Optional originalRelationalColumnEntity = dataEngineCommonHandler.findEntity(userId, column.getQualifiedName(), - OpenMetadataType.RELATIONAL_COLUMN_TYPE_NAME); - if (originalRelationalColumnEntity.isEmpty()) { - relationalDataHandler.createDatabaseColumn(userId, externalSourceGUID, externalSourceName, relationalTableGUID, - column.getQualifiedName(), column.getDisplayName(), column.getDescription(), column.getExternalTypeGUID(), - column.getDataType(), column.getDefaultValue(), column.getFixedValue(), column.getValidValuesSetGUID(), column.getFormula(), - column.getIsDeprecated(), column.getPosition(), column.getMinCardinality(), column.getMaxCardinality(), - column.getAllowsDuplicateValues(), column.getOrderedValues(), column.getDefaultValueOverride(), sortOrder, - column.getMinimumLength(), column.getLength(), column.getPrecision(), column.getIsNullable(), column.getNativeClass(), - column.getAliases(), column.getAdditionalProperties(), OpenMetadataType.RELATIONAL_COLUMN_TYPE_NAME, null, - null, null, null, false, false, now, methodName); - } else { - relationalDataHandler.updateDatabaseColumn(userId, externalSourceGUID, externalSourceName, - originalRelationalColumnEntity.get().getGUID(), column.getQualifiedName(), column.getDisplayName(), column.getDescription(), - column.getDataType(), column.getDefaultValue(), column.getFixedValue(), column.getFormula(), column.getIsDeprecated(), - column.getPosition(), column.getMinCardinality(), column.getMaxCardinality(), column.getAllowsDuplicateValues(), - column.getOrderedValues(), column.getDefaultValueOverride(), sortOrder, column.getMinimumLength(), column.getLength(), - column.getPrecision(), column.getIsNullable(), column.getNativeClass(), column.getAliases(), - column.getAdditionalProperties(), OpenMetadataType.RELATIONAL_COLUMN_TYPE_NAME, null, - null, null, null, true, false, - false, now, methodName); - } - } - } - - /** - * Verifies if the parameters are valid for a request - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name - * @param displayName the display name - * @param methodName name of the calling method - * - * @throws InvalidParameterException the bean properties are invalid - */ - private void validateParameters(String userId, String methodName, String qualifiedName, String displayName) throws InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(qualifiedName, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - invalidParameterHandler.validateName(displayName, OpenMetadataProperty.DISPLAY_NAME.name, methodName); - } - - /** - * Remove the database - * - * @param userId the name of the calling user - * @param databaseGUID unique identifier of the database to be removed - * @param externalSourceName the external data engine name - * @param deleteSemantic the delete semantic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeDatabase(String userId, String databaseGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws - FunctionNotSupportedException, - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "removeDatabase"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(databaseGUID, OpenMetadataProperty.GUID.name, methodName); - - Optional databaseOptional = dataEngineCommonHandler.getEntityDetails(userId, databaseGUID, OpenMetadataType.DATABASE_TYPE_NAME); - if (databaseOptional.isPresent()) { - EntityDetail databaseEntity = databaseOptional.get(); - String databaseQualifiedName = databaseEntity.getProperties().getPropertyValue(OpenMetadataProperty.QUALIFIED_NAME.name).valueAsString(); - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - relationalDataHandler.removeDatabase(userId, externalSourceGUID, externalSourceName, databaseGUID, databaseQualifiedName, - false, false, dataEngineCommonHandler.getNow(), methodName); - } else { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.ENTITY_NOT_DELETED, methodName, databaseGUID); - } - } - - /** - * Remove the relational table - * - * @param userId the name of the calling user - * @param relationalTableGUID unique identifier of the relational table to be removed - * @param externalSourceName the external data engine name - * @param deleteSemantic the delete semantic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeRelationalTable(String userId, String relationalTableGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws - FunctionNotSupportedException, - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - - final String methodName = "removeRelationalTable"; - - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(relationalTableGUID, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - - Optional tableEntity = dataEngineCommonHandler.getEntityDetails(userId, relationalTableGUID, - OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME); - if (tableEntity.isEmpty()) { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.ENTITY_NOT_DELETED, methodName, relationalTableGUID); - } - String tableQualifiedName = tableEntity.get().getProperties().getPropertyValue(OpenMetadataProperty.QUALIFIED_NAME.name).valueAsString(); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - relationalDataHandler.removeDatabaseTable(userId, externalSourceGUID, externalSourceName, relationalTableGUID, OpenMetadataProperty.GUID.name, - tableQualifiedName, false, false, dataEngineCommonHandler.getNow(), methodName); - } - - /** - * Removes the database schema - * - * @param userId the name of the calling user - * @param databaseSchemaGUID unique identifier of the database schema to be removed - * @param externalSourceName the external data engine name - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeDatabaseSchema(String userId, String databaseSchemaGUID, String externalSourceName, DeleteSemantic deleteSemantic) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - final String methodName = "removeDatabaseSchema"; - - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(databaseSchemaGUID, OpenMetadataProperty.GUID.name, methodName); - - Optional databaseSchemaOptional = dataEngineCommonHandler.getEntityDetails(userId, databaseSchemaGUID, - OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - if (databaseSchemaOptional.isPresent()) { - EntityDetail databaseSchemaEntity = databaseSchemaOptional.get(); - String databaseSchemaQualifiedName = databaseSchemaEntity.getProperties().getPropertyValue(OpenMetadataProperty.QUALIFIED_NAME.name).valueAsString(); - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - relationalDataHandler.removeDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID, - databaseSchemaQualifiedName, false, false, dataEngineCommonHandler.getNow(), methodName); - - } else { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.ENTITY_NOT_DELETED, methodName, databaseSchemaGUID); - } - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaAttributeHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaAttributeHandler.java deleted file mode 100644 index aaf3a487f14..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaAttributeHandler.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeBuilder; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.springframework.util.CollectionUtils; - -import java.util.HashMap; -import java.util.List; -import java.util.Optional; - - -/** - * DataEngineSchemaAttributeHandler manages schema attributes objects from the property server. It runs server-side in the - * DataEngine OMAS and creates and retrieves schema type entities through the OMRSRepositoryConnector. - */ -public class DataEngineSchemaAttributeHandler { - protected static final String SCHEMA_TYPE_GUID_PARAMETER_NAME = "schemaTypeGUID"; - private final String serviceName; - private final String serverName; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final SchemaAttributeHandler schemaAttributeHandler; - private final DataEngineRegistrationHandler dataEngineRegistrationHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param dataEngineRegistrationHandler provides calls for retrieving external data engine guid - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param schemaAttributeHandler handler for managing schema attributes in the metadata repositories - */ - public DataEngineSchemaAttributeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, - OMRSRepositoryHelper repositoryHelper, - SchemaAttributeHandler schemaAttributeHandler, - DataEngineRegistrationHandler dataEngineRegistrationHandler, - DataEngineCommonHandler dataEngineCommonHandler) { - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.schemaAttributeHandler = schemaAttributeHandler; - this.dataEngineRegistrationHandler = dataEngineRegistrationHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - } - - /** - * Find out if the SchemaAttribute object is already stored in the repository. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the process to be searched - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - private Optional findSchemaAttributeEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.SCHEMA_ATTRIBUTE.typeName); - } - - /** - * Creates or updates the list of schema attributes - * - * @param userId the name of the calling user - * @param attributeList the list of attributes - * @param externalSourceName the unique name of the external source - * @param externalSourceGUID the guid of the external source - * @param schemaTypeGUID the guid of the schema type - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void upsertSchemaAttributes(String userId, List attributeList, String externalSourceName, String externalSourceGUID, - String schemaTypeGUID) throws UserNotAuthorizedException, PropertyServerException, - InvalidParameterException { - if (CollectionUtils.isEmpty(attributeList)) { - return; - } - for (Attribute tabularColumn : attributeList) { - Optional schemaAttributeEntity = findSchemaAttributeEntity(userId, tabularColumn.getQualifiedName()); - if (schemaAttributeEntity.isEmpty()) { - createSchemaAttribute(userId, schemaTypeGUID, tabularColumn, externalSourceName); - } else { - String schemaAttributeGUID = schemaAttributeEntity.get().getGUID(); - EntityDetail updatedSchemaAttributeEntity = buildSchemaAttributeEntityDetail(schemaAttributeGUID, tabularColumn); - EntityDetailDifferences entityDetailDifferences = repositoryHelper.getEntityDetailDifferences(schemaAttributeEntity.get(), - updatedSchemaAttributeEntity, true); - - if (entityDetailDifferences.hasInstancePropertiesDifferences()) { - updateSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID, tabularColumn); - } - } - } - } - - private EntityDetail buildSchemaAttributeEntityDetail(String schemaAttributeGUID, Attribute attribute) throws InvalidParameterException { - String methodName = "buildSchemaAttributeEntityDetail"; - SchemaAttributeBuilder schemaAttributeBuilder = getSchemaAttributeBuilder(attribute); - - return dataEngineCommonHandler.buildEntityDetail(schemaAttributeGUID, schemaAttributeBuilder.getInstanceProperties(methodName)); - } - - private SchemaAttributeBuilder getSchemaAttributeBuilder(Attribute attribute) { - HashMap additionalProperties = new HashMap<>(); - return new SchemaAttributeBuilder(attribute.getQualifiedName(), attribute.getDisplayName(), attribute.getDescription(), - attribute.getPosition(), attribute.getMinCardinality(), attribute.getMaxCardinality(), attribute.getIsDeprecated(), - attribute.getDefaultValueOverride(), attribute.getAllowsDuplicateValues(), attribute.getOrderedValues(), - dataEngineCommonHandler.getSortOrder(attribute), attribute.getMinimumLength(), attribute.getLength(), attribute.getPrecision(), - attribute.getIsNullable(), attribute.getNativeClass(), attribute.getAliases(), additionalProperties, - attribute.getTypeGuid() != null ? attribute.getTypeGuid() : OpenMetadataType.TABULAR_COLUMN_TYPE_GUID, - attribute.getTypeName() != null ? attribute.getTypeName() : OpenMetadataType.TABULAR_COLUMN_TYPE_NAME, - null, repositoryHelper, serviceName, serverName); - } - - private void createSchemaAttribute(String userId, String schemaTypeGUID, Attribute attribute, String externalSourceName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "createSchemaAttribute"; - - String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngine(userId, externalSourceName); - - schemaAttributeHandler.createNestedSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaTypeGUID, - SCHEMA_TYPE_GUID_PARAMETER_NAME, attribute.getQualifiedName(), OpenMetadataProperty.QUALIFIED_NAME.name, attribute.getDisplayName(), - attribute.getDescription(), attribute.getExternalTypeGUID(), attribute.getDataType(), attribute.getDefaultValue(), - attribute.getFixedValue(), attribute.getValidValuesSetGUID(), null, attribute.getIsDeprecated(), attribute.getPosition(), - attribute.getMinCardinality(), attribute.getMaxCardinality(), attribute.getAllowsDuplicateValues(), attribute.getOrderedValues(), - attribute.getDefaultValueOverride(), dataEngineCommonHandler.getSortOrder(attribute), attribute.getMinimumLength(), - attribute.getLength(), attribute.getPrecision(), attribute.getIsNullable(), attribute.getNativeClass(), attribute.getAliases(), - attribute.getAdditionalProperties(), attribute.getTypeName() != null ? attribute.getTypeName() : OpenMetadataType.TABULAR_COLUMN_TYPE_NAME, - null, null, null, false, false, - dataEngineCommonHandler.getNow(), methodName); - } - - private void updateSchemaAttribute(String userId, String externalSourceGUID, String externalSourceName, String schemaAttributeGUID, - Attribute attribute) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "updateSchemaAttribute"; - - SchemaAttributeBuilder schemaAttributeBuilder = getSchemaAttributeBuilder(attribute); - schemaAttributeHandler.updateSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID, - schemaAttributeBuilder.getInstanceProperties(methodName), false, false, dataEngineCommonHandler.getNow(), methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaTypeHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaTypeHandler.java deleted file mode 100644 index bcf609d9e92..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaTypeHandler.java +++ /dev/null @@ -1,302 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeBuilder; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Date; -import java.util.HashSet; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - - - -/** - * DataEngineSchemaTypeHandler manages schema types objects from the property server. It runs server-side in the - * DataEngine OMAS and creates and retrieves schema type entities through the OMRSRepositoryConnector. - */ -public class DataEngineSchemaTypeHandler { - protected static final String SCHEMA_TYPE_GUID_PARAMETER_NAME = "schemaTypeGUID"; - private final String serviceName; - private final String serverName; - private final OMRSRepositoryHelper repositoryHelper; - private final InvalidParameterHandler invalidParameterHandler; - private final SchemaTypeHandler schemaTypeHandler; - private final DataEngineRegistrationHandler dataEngineRegistrationHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param serviceName name of this service - * @param serverName name of the local server - * @param invalidParameterHandler handler for managing parameter errors - * @param repositoryHelper provides utilities for manipulating the repository services objects - * @param schemaTypeHandler handler for managing schema elements in the metadata repositories - * @param dataEngineRegistrationHandler provides calls for retrieving external data engine guid - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param dataEngineSchemaAttributeHandler provides utilities for manipulating schema attributes - */ - public DataEngineSchemaTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, - OMRSRepositoryHelper repositoryHelper, SchemaTypeHandler schemaTypeHandler, - DataEngineRegistrationHandler dataEngineRegistrationHandler, - DataEngineCommonHandler dataEngineCommonHandler, - DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler) { - this.serviceName = serviceName; - this.serverName = serverName; - this.invalidParameterHandler = invalidParameterHandler; - this.repositoryHelper = repositoryHelper; - this.schemaTypeHandler = schemaTypeHandler; - this.dataEngineRegistrationHandler = dataEngineRegistrationHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - this.dataEngineSchemaAttributeHandler = dataEngineSchemaAttributeHandler; - } - - /** - * Create the schema type entity, with the corresponding schema attributes and relationships if it doesn't exist or - * updates the existing one. - * - * @param userId the name of the calling user - * @param schemaType the schema type values - * @param externalSourceName the unique name of the external source - * - * @return unique identifier of the schema type in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertSchemaType(String userId, SchemaType schemaType, String anchorGUID, String externalSourceName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertSchemaType"; - final String anchorGUIDParameterName = "anchorGUID"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(schemaType.getQualifiedName(), OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - invalidParameterHandler.validateName(schemaType.getDisplayName(), OpenMetadataProperty.DISPLAY_NAME.name, methodName); - - Optional originalSchemaTypeEntity = findSchemaTypeEntity(userId, schemaType.getQualifiedName()); - - SchemaTypeBuilder schemaTypeBuilder = getSchemaTypeBuilder(schemaType); - if (anchorGUID != null) - { - EntityDetail anchorEntity = schemaTypeHandler.getEntityFromRepository(userId, - anchorGUID, - anchorGUIDParameterName, - OpenMetadataType.OPEN_METADATA_ROOT.typeName, - null, - null, - false, - false, - null, - methodName); - - if (anchorEntity != null) - { - schemaTypeBuilder.setAnchors(userId, - anchorEntity.getGUID(), - anchorEntity.getType().getTypeDefName(), - schemaTypeHandler.getDomainName(anchorEntity), - methodName); - } - } - - String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngine(userId, externalSourceName); - - String schemaTypeGUID; - Date now = dataEngineCommonHandler.getNow(); - if (originalSchemaTypeEntity.isEmpty()) { - schemaTypeGUID = schemaTypeHandler.addSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeBuilder, - null, null, false, false, now, methodName); - } else { - schemaTypeGUID = originalSchemaTypeEntity.get().getGUID(); - EntityDetail updatedSchemaTypeEntity = buildSchemaTypeEntityDetail(schemaTypeGUID, schemaType); - EntityDetailDifferences entityDetailDifferences = repositoryHelper.getEntityDetailDifferences(originalSchemaTypeEntity.get(), - updatedSchemaTypeEntity, true); - - if (entityDetailDifferences.hasInstancePropertiesDifferences()) { - schemaTypeHandler.updateSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeGUID, SCHEMA_TYPE_GUID_PARAMETER_NAME, - schemaTypeBuilder, true, false, false, now, methodName); - } - } - - dataEngineSchemaAttributeHandler.upsertSchemaAttributes(userId, schemaType.getAttributeList(), externalSourceName, externalSourceGUID, - schemaTypeGUID); - - return schemaTypeGUID; - } - - /** - * Find out if the SchemaType object is already stored in the repository. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the schema type to be searched - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional findSchemaTypeEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME); - } - - /** - * Create DataFlow relationship between two entities - * - * @param userId the name of the calling user - * @param dataSupplierQualifiedName the qualified name of the data supplier entity - * @param dataConsumerQualifiedName the qualified name of the data consumer entity - * @param externalSourceName the unique name of the external source - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void addDataFlowRelationship(String userId, String dataSupplierQualifiedName, String dataConsumerQualifiedName, String externalSourceName, - String formula, String description) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - String methodName = "addDataFlowRelationship"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(dataSupplierQualifiedName, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - invalidParameterHandler.validateName(dataConsumerQualifiedName, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - - Optional dataSupplierEntity = getDataFlowEntity(userId, dataSupplierQualifiedName); - Optional dataconsumertEntity = getDataFlowEntity(userId, dataConsumerQualifiedName); - - if (dataSupplierEntity.isEmpty()) { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.REFERENCEABLE_NOT_FOUND, methodName, - dataSupplierQualifiedName); - return; - } - if (dataconsumertEntity.isEmpty()) { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.REFERENCEABLE_NOT_FOUND, methodName, - dataConsumerQualifiedName); - return; - } - - InstanceProperties relationshipProperties = repositoryHelper.addStringPropertyToInstance(serviceName, null, - OpenMetadataProperty.DESCRIPTION.name, description, methodName); - relationshipProperties = repositoryHelper.addStringPropertyToInstance(serviceName, relationshipProperties, - OpenMetadataProperty.FORMULA.name, formula, methodName); - - dataEngineCommonHandler.upsertExternalRelationship(userId, dataSupplierEntity.get().getGUID(), dataconsumertEntity.get().getGUID(), - OpenMetadataType.DATA_FLOW_TYPE_NAME, dataSupplierEntity.get().getType().getTypeDefName(), - dataconsumertEntity.get().getType().getTypeDefName(), externalSourceName, relationshipProperties); - } - - /** - * Returns the entity used to create the data flow. If the entity is of type TabularSchemaType, then it will return the attached - * Asset - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name of the entity - * - * @return An optional containing the entity for which to create the data flow, or an empty optional - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - private Optional getDataFlowEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - Optional referenceableEntity = dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.REFERENCEABLE.typeName); - - if (referenceableEntity.isPresent()) { - EntityDetail entityDetail = referenceableEntity.get(); - - if (OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_NAME.equalsIgnoreCase(entityDetail.getType().getTypeDefName())) { - return dataEngineCommonHandler.getEntityForRelationship(userId, entityDetail.getGUID(), - OpenMetadataType.ASSET_TO_SCHEMA_TYPE_TYPE_NAME, OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_NAME); - } - } - - return referenceableEntity; - } - - /** - * Remove the schema type with the associated schema attributes - * - * @param userId the name of the calling user - * @param schemaTypeGUID the unique identifier of the schema type - * @param externalSourceName the external data engine - * @param deleteSemantic the delete semantic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeSchemaType(String userId, String schemaTypeGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - FunctionNotSupportedException { - String methodName = "removeSchemaType"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(schemaTypeGUID, OpenMetadataProperty.GUID.name, methodName); - - // remove the tabular columns manually, because schemaTypeHandler.removeSchemaType does not remove the columns - Set schemaAttributeGUIDs = getSchemaAttributesForSchemaType(userId, schemaTypeGUID); - for (String schemaAttributeGUID : schemaAttributeGUIDs) { - dataEngineCommonHandler.removeEntity(userId, schemaAttributeGUID, OpenMetadataType.TABULAR_COLUMN_TYPE_NAME, externalSourceName); - } - dataEngineCommonHandler.removeEntity(userId, schemaTypeGUID, OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_NAME, externalSourceName); - } - - private Set getSchemaAttributesForSchemaType(String userId, String schemaTypeGUID) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - Set entities = dataEngineCommonHandler.getEntitiesForRelationship(userId, schemaTypeGUID, - OpenMetadataType.TYPE_TO_ATTRIBUTE_RELATIONSHIP_TYPE_NAME, - OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, - OpenMetadataType.SCHEMA_TYPE_TYPE_NAME); - - if (CollectionUtils.isEmpty(entities)) { - return new HashSet<>(); - } - - return entities.parallelStream().map(InstanceHeader::getGUID).collect(Collectors.toSet()); - } - - private EntityDetail buildSchemaTypeEntityDetail(String schemaTypeGUID, SchemaType schemaType) throws InvalidParameterException { - String methodName = "buildSchemaTypeEntityDetail"; - - SchemaTypeBuilder schemaTypeBuilder = getSchemaTypeBuilder(schemaType); - return dataEngineCommonHandler.buildEntityDetail(schemaTypeGUID, schemaTypeBuilder.getInstanceProperties(methodName)); - } - - SchemaTypeBuilder getSchemaTypeBuilder(SchemaType schemaType) { - return new SchemaTypeBuilder(schemaType.getQualifiedName(), schemaType.getDisplayName(), null, - schemaType.getVersionNumber(), false, schemaType.getAuthor(), schemaType.getUsage(), - schemaType.getEncodingStandard(), null, null, - OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_GUID, OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_NAME, - null, repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineTopicHandler.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineTopicHandler.java deleted file mode 100644 index c1b823bae35..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineTopicHandler.java +++ /dev/null @@ -1,162 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; - - - -/** - * DataEngineTopicHandler manages topic objects. It runs server-side in the - * DataEngine OMAS and creates and retrieves collections entities through the OMRSRepositoryConnector. - */ -public class DataEngineTopicHandler { - private final InvalidParameterHandler invalidParameterHandler; - private final AssetHandler topicHandler; - private final DataEngineCommonHandler dataEngineCommonHandler; - private final DataEngineRegistrationHandler registrationHandler; - - protected static final String TOPIC_GUID_PARAMETER_NAME = "topicGUID"; - - /** - * Construct the handler information needed to interact with the repository services - * - * @param invalidParameterHandler handler for managing parameter errors - * @param topicHandler provides utilities specific for manipulating topic entities - * @param dataEngineCommonHandler provides utilities for manipulating entities - * @param dataEngineRegistrationHandler provides utilities for engine entities - */ - public DataEngineTopicHandler(InvalidParameterHandler invalidParameterHandler, AssetHandler topicHandler, - DataEngineRegistrationHandler dataEngineRegistrationHandler, - DataEngineCommonHandler dataEngineCommonHandler) { - this.invalidParameterHandler = invalidParameterHandler; - this.topicHandler = topicHandler; - this.registrationHandler = dataEngineRegistrationHandler; - this.dataEngineCommonHandler = dataEngineCommonHandler; - } - - /** - * Create or update the topic with event types - * - * @param userId the name of the calling user - * @param topic the values of the topic - * @param externalSourceName the unique name of the external source - * - * @return unique identifier of the topic in the repository - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertTopic(String userId, Topic topic, String externalSourceName) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertTopic"; - validateParameters(userId, methodName, topic.getQualifiedName(), topic.getDisplayName()); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - Optional originalTopicEntity = findTopicEntity(userId, topic.getQualifiedName()); - - Map extendedProperties = new HashMap<>(); - if (StringUtils.isNotEmpty(topic.getTopicType())) { - extendedProperties.put(OpenMetadataProperty.TOPIC_TYPE.name, topic.getTopicType()); - } - int ownerTypeOrdinal = dataEngineCommonHandler.getOwnerTypeOrdinal(topic.getOwnerType()); - Date now = dataEngineCommonHandler.getNow(); - String topicGUID; - if (originalTopicEntity.isEmpty()) { - topicHandler.verifyExternalSourceIdentity(userId, externalSourceGUID, externalSourceName, - false, false, null, methodName); - topicGUID = topicHandler.createAssetInRepository(userId, externalSourceGUID, externalSourceName, topic.getQualifiedName(), - topic.getDisplayName(), null, topic.getDescription(), topic.getZoneMembership(), topic.getOwner(), ownerTypeOrdinal, - topic.getOriginOrganizationGUID(), topic.getOriginBusinessCapabilityGUID(), topic.getOtherOriginValues(), - topic.getAdditionalProperties(), OpenMetadataType.TOPIC.typeGUID, OpenMetadataType.TOPIC.typeName, extendedProperties, - null, null, InstanceStatus.ACTIVE, now, methodName); - } else { - topicGUID = originalTopicEntity.get().getGUID(); - topicHandler.updateAsset(userId, externalSourceGUID, externalSourceName, topicGUID, TOPIC_GUID_PARAMETER_NAME, - topic.getQualifiedName(), topic.getDisplayName(), null, topic.getDescription(), topic.getAdditionalProperties(), - OpenMetadataType.TOPIC.typeName, OpenMetadataType.TOPIC.typeName, extendedProperties, null, null, true, - false, false, now, methodName); - } - - return topicGUID; - } - - /** - * Find out if the Topic object is already stored in the repository. It uses the fully qualified name to retrieve the entity - * - * @param userId the name of the calling user - * @param qualifiedName the qualifiedName name of the process to be searched - * - * @return optional with entity details if found, empty optional if not found - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional findTopicEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - return dataEngineCommonHandler.findEntity(userId, qualifiedName, OpenMetadataType.TOPIC.typeName); - } - - /** - * Verifies if the parameters are valid for a request - * - * @param userId the name of the calling user - * @param qualifiedName the qualified name - * @param displayName the display name - * @param methodName name of the calling method - * - * @throws InvalidParameterException the bean properties are invalid - */ - private void validateParameters(String userId, String methodName, String qualifiedName, String displayName) throws InvalidParameterException { - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(qualifiedName, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - invalidParameterHandler.validateName(displayName, OpenMetadataProperty.DISPLAY_NAME.name, methodName); - } - - /** - * Remove the topic - * - * @param userId the name of the calling user - * @param topicGUID unique identifier of the topic to be removed - * @param externalSourceName the external data engine name - * @param deleteSemantic the delete semantic - * - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void removeTopic(String userId, String topicGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws - FunctionNotSupportedException, - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "removeTopic"; - dataEngineCommonHandler.validateDeleteSemantic(deleteSemantic, methodName); - - String externalSourceGUID = registrationHandler.getExternalDataEngine(userId, externalSourceName); - topicHandler.deleteBeanInRepository(userId, externalSourceGUID, externalSourceName, topicGUID, TOPIC_GUID_PARAMETER_NAME, - OpenMetadataType.TOPIC.typeGUID, OpenMetadataType.TOPIC.typeName, null, null, false, - false, dataEngineCommonHandler.getNow(), methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/package-info.java deleted file mode 100644 index 210742b7151..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These handlers drive the interaction with the metadata repositories. They augment the generic handlers with - * the management function for the external identifiers. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/listeners/DataEngineInTopicListener.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/listeners/DataEngineInTopicListener.java deleted file mode 100644 index 817c0770ace..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/listeners/DataEngineInTopicListener.java +++ /dev/null @@ -1,114 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.listeners; - - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectReader; -import org.odpi.openmetadata.accessservices.dataengine.event.DataEngineEventHeader; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineAuditCode; -import org.odpi.openmetadata.accessservices.dataengine.server.processors.DataEngineEventProcessor; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; - -/** - * The Data Engine in topic processor is listening events from external data engines about - * metadata changes. It will handle different types of events defined in Data Engine OMAS API module. - */ -public class DataEngineInTopicListener implements OpenMetadataTopicListener { - private static final Logger log = LoggerFactory.getLogger(DataEngineInTopicListener.class); - private static final ObjectReader OBJECT_READER = new ObjectMapper().reader(); - private final AuditLog auditLog; - private final DataEngineEventProcessor dataEngineEventProcessor; - - /** - * The constructor is given the connection to the out topic for Data Engine OMAS along with classes for - * testing and manipulating instances. - * - * @param auditLog audit log - * @param dataEngineEventProcessor the event processor for Data Engine OMAS - */ - public DataEngineInTopicListener(AuditLog auditLog, DataEngineEventProcessor dataEngineEventProcessor) { - this.auditLog = auditLog; - this.dataEngineEventProcessor = dataEngineEventProcessor; - } - - /** - * Method to pass an event received on topic. - * - * @param dataEngineEvent inbound event - */ - @Override - public void processEvent(String dataEngineEvent) { - log.debug("Processing instance event {}", dataEngineEvent); - - if (dataEngineEvent == null) { - log.debug("Null instance event - ignoring event"); - } else { - - try { - DataEngineEventHeader dataEngineEventHeader = OBJECT_READER.readValue(dataEngineEvent, DataEngineEventHeader.class); - - if ((dataEngineEventHeader != null)) { - switch (dataEngineEventHeader.getDataEngineEventType()) { - case DATA_ENGINE_REGISTRATION_EVENT -> - dataEngineEventProcessor.processDataEngineRegistrationEvent(dataEngineEvent); - case DATA_FLOWS_EVENT -> dataEngineEventProcessor.processDataFlowsEvent(dataEngineEvent); - case PORT_IMPLEMENTATION_EVENT -> - dataEngineEventProcessor.processPortImplementationEvent(dataEngineEvent); - case PROCESS_EVENT -> dataEngineEventProcessor.processProcessEvent(dataEngineEvent); - case SCHEMA_TYPE_EVENT -> dataEngineEventProcessor.processSchemaTypeEvent(dataEngineEvent); - case PROCESS_HIERARCHY_EVENT -> - dataEngineEventProcessor.processProcessHierarchyEvent(dataEngineEvent); - case DELETE_PROCESS_EVENT -> - dataEngineEventProcessor.processDeleteProcessEvent(dataEngineEvent); - case DELETE_PORT_IMPLEMENTATION_EVENT -> - dataEngineEventProcessor.processDeletePortImplementationEvent(dataEngineEvent); - case DELETE_SCHEMA_TYPE_EVENT -> - dataEngineEventProcessor.processDeleteSchemaTypeEvent(dataEngineEvent); - case DELETE_DATA_ENGINE_EVENT -> - dataEngineEventProcessor.processDeleteDataEngineEvent(dataEngineEvent); - case DATABASE_EVENT -> dataEngineEventProcessor.processDatabaseEvent(dataEngineEvent); - case DATABASE_SCHEMA_EVENT -> - dataEngineEventProcessor.processDatabaseSchemaEvent(dataEngineEvent); - case RELATIONAL_TABLE_EVENT -> - dataEngineEventProcessor.processRelationalTableEvent(dataEngineEvent); - case DATA_FILE_EVENT -> dataEngineEventProcessor.processDataFileEvent(dataEngineEvent); - case DELETE_DATABASE_EVENT -> - dataEngineEventProcessor.processDeleteDatabaseEvent(dataEngineEvent); - case DELETE_DATABASE_SCHEMA_EVENT -> - dataEngineEventProcessor.processDeleteDatabaseSchemaEvent(dataEngineEvent); - case DELETE_RELATIONAL_TABLE_EVENT -> - dataEngineEventProcessor.processDeleteRelationalTableEvent(dataEngineEvent); - case DELETE_DATA_FILE_EVENT -> - dataEngineEventProcessor.processDeleteDataFileEvent(dataEngineEvent); - case DELETE_FOLDER_EVENT -> dataEngineEventProcessor.processDeleteFolderEvent(dataEngineEvent); - case DELETE_CONNECTION_EVENT -> - dataEngineEventProcessor.processDeleteConnectionEvent(dataEngineEvent); - case DELETE_ENDPOINT_EVENT -> - dataEngineEventProcessor.processDeleteEndpointEvent(dataEngineEvent); - case TOPIC_EVENT -> dataEngineEventProcessor.processTopicEvent(dataEngineEvent); - case EVENT_TYPE_EVENT -> dataEngineEventProcessor.processEventTypeEvent(dataEngineEvent); - case DELETE_TOPIC_EVENT -> dataEngineEventProcessor.processDeleteTopicEvent(dataEngineEvent); - case DELETE_EVENT_TYPE_EVENT -> - dataEngineEventProcessor.processDeleteEventTypeEvent(dataEngineEvent); - case PROCESSING_STATE_TYPE_EVENT -> - dataEngineEventProcessor.processProcessingStateEvent(dataEngineEvent); - default -> log.debug("Ignored instance event - unknown event type"); - } - } else { - log.debug("Ignored instance event - null Data Engine event type"); - } - } catch (IOException e) { - log.debug("Exception processing event from in Data Engine In Topic", e); - - auditLog.logException("process Data Engine inTopic Event", - DataEngineAuditCode.PROCESS_EVENT_EXCEPTION.getMessageDefinition(e.getMessage()), e); - } - } - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/listeners/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/listeners/package-info.java deleted file mode 100644 index 9fd382bb847..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/listeners/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * Supports the processing of events from the repository services that notify this module of changes to the metadata - * in the repository services. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.listeners; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/mappers/CommonMapper.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/mappers/CommonMapper.java deleted file mode 100644 index 4cef56c793a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/mappers/CommonMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.mappers; - -/** - * CommonMapper provides property name mapping for entities. - */ -public class CommonMapper { - /** - * The GUID property name - */ - public static final String GUID_PROPERTY_NAME = "guid"; - /** - * The qualifiedName property name - */ - public static final String QUALIFIED_NAME_PROPERTY_NAME = "qualifiedName"; - /** - * The containmentType property name - */ - public static final String CONTAINMENT_TYPE = "containmentType"; - - private CommonMapper() {} -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/mappers/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/mappers/package-info.java deleted file mode 100644 index 1b88d7f9cd7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/mappers/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * CommonMapper provides property name mapping for entities. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.mappers; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/processors/DataEngineEventProcessor.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/processors/DataEngineEventProcessor.java deleted file mode 100644 index e911c4f716e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/processors/DataEngineEventProcessor.java +++ /dev/null @@ -1,582 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.processors; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectReader; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.accessservices.dataengine.event.DataEngineRegistrationEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DataFileEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DataFlowsEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DatabaseEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DatabaseSchemaEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.DeleteEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.EventTypeEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.PortImplementationEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.ProcessEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.ProcessHierarchyEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.ProcessingStateEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.RelationalTableEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.SchemaTypeEvent; -import org.odpi.openmetadata.accessservices.dataengine.event.TopicEvent; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineAuditCode; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.server.admin.DataEngineServicesInstance; -import org.odpi.openmetadata.accessservices.dataengine.server.service.DataEngineRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; -import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotDeletedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; - - - -/** - * The Data Engine event processor is processing events from external data engines about - * metadata changes. It will handle different types of events defined in Data Engine OMAS API module. - */ - -public class DataEngineEventProcessor { - private static final ObjectReader OBJECT_READER = new ObjectMapper().reader(); - private static final Logger log = LoggerFactory.getLogger(DataEngineEventProcessor.class); - private static final String DEBUG_MESSAGE_METHOD = "Calling method: {}"; - - private final AuditLog auditLog; - private final String serverName; - - private final DataEngineRESTServices dataEngineRESTServices = new DataEngineRESTServices(); - - /** - * The constructor is given the connection to the out topic for Data Engine OMAS - * along with classes for testing and manipulating instances. - * - * @param instance server instance - * @param auditLog audit log - * - * @throws NewInstanceException * @throws NewInstanceException a problem occurred during initialization - */ - public DataEngineEventProcessor(DataEngineServicesInstance instance, AuditLog auditLog) throws NewInstanceException { - this.auditLog = auditLog; - this.serverName = instance.getServerName(); - } - - /** - * Process a {@link DataEngineRegistrationEvent} - * - * @param dataEngineEvent the event to be processed - */ - public void processDataEngineRegistrationEvent(String dataEngineEvent) { - final String methodName = "processDataEngineRegistrationEvent"; - - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DataEngineRegistrationEvent dataEngineRegistrationEvent = OBJECT_READER.readValue(dataEngineEvent, DataEngineRegistrationEvent.class); - dataEngineRESTServices.createExternalDataEngine(dataEngineRegistrationEvent.getUserId(), serverName, - dataEngineRegistrationEvent.getEngine()); - - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link ProcessHierarchyEvent} - * - * @param dataEngineEvent the event to be processed - */ - public void processProcessHierarchyEvent(String dataEngineEvent) { - final String methodName = "processProcessHierarchyEvent"; - - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - ProcessHierarchyEvent processHierarchyEvent = OBJECT_READER.readValue(dataEngineEvent, ProcessHierarchyEvent.class); - - dataEngineRESTServices.addProcessHierarchyToProcess(processHierarchyEvent.getUserId(), serverName, - processHierarchyEvent.getProcessHierarchy(), - processHierarchyEvent.getExternalSourceName()); - - } catch (IOException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link PortImplementationEvent} - * - * @param dataEngineEvent the event to be processed - */ - public void processPortImplementationEvent(String dataEngineEvent) { - final String methodName = "processPortImplementationEvent"; - - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - PortImplementationEvent portImplementationEvent = OBJECT_READER.readValue(dataEngineEvent, PortImplementationEvent.class); - String externalSourceName = portImplementationEvent.getExternalSourceName(); - String userId = portImplementationEvent.getUserId(); - PortImplementation portImplementation = portImplementationEvent.getPortImplementation(); - - String processGUID = dataEngineRESTServices.getEntityGUID(serverName, userId, portImplementationEvent.getProcessQualifiedName(), - OpenMetadataType.PROCESS.typeName).orElse(null); - - dataEngineRESTServices.updateProcessStatus(userId, serverName, processGUID, InstanceStatus.DRAFT, externalSourceName); - - String portImplementationGUID = dataEngineRESTServices.upsertPortImplementation(userId, serverName, portImplementation, processGUID, - externalSourceName); - dataEngineRESTServices.upsertSchemaType(userId, serverName, portImplementationGUID, portImplementation.getSchemaType(), - externalSourceName); - - dataEngineRESTServices.updateProcessStatus(userId, serverName, processGUID, InstanceStatus.ACTIVE, externalSourceName); - } catch (IOException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException | FunctionNotSupportedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DataFlowsEvent} - * - * @param dataEngineEvent the event to be processed - */ - public void processDataFlowsEvent(String dataEngineEvent) { - final String methodName = "processDataFlowsEvent"; - - log.trace(DEBUG_MESSAGE_METHOD, methodName); - - try { - DataFlowsEvent dataFlowsEvent = OBJECT_READER.readValue(dataEngineEvent, DataFlowsEvent.class); - - if (CollectionUtils.isEmpty(dataFlowsEvent.getDataFlows())) { - return; - } - - FFDCResponseBase response = new FFDCResponseBase(); - - dataEngineRESTServices.addDataFlows(dataFlowsEvent.getUserId(), serverName, dataFlowsEvent.getDataFlows(), - response, dataFlowsEvent.getExternalSourceName()); - } catch (IOException | UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link ProcessEvent} - * - * @param dataEngineEvent the event to be processed - */ - public void processProcessEvent(String dataEngineEvent) { - final String methodName = "processProcessEvent"; - - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - ProcessEvent processesEvent = OBJECT_READER.readValue(dataEngineEvent, ProcessEvent.class); - - dataEngineRESTServices.upsertProcess(processesEvent.getUserId(), serverName, processesEvent.getProcess(), - processesEvent.getExternalSourceName()); - } catch (IOException e) { - log.debug("Exception in parsing event from in Data Engine In Topic", e); - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link SchemaTypeEvent} - * - * @param schemaTypeEvent the event to be processed - */ - public void processSchemaTypeEvent(String schemaTypeEvent) { - final String methodName = "processSchemaTypeEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - SchemaTypeEvent schemaEvent = OBJECT_READER.readValue(schemaTypeEvent, SchemaTypeEvent.class); - - String portGUID = null; - if (StringUtils.isNotEmpty(schemaEvent.getPortQualifiedName())) { - portGUID = dataEngineRESTServices.getEntityGUID(serverName, schemaEvent.getUserId(), schemaEvent.getPortQualifiedName(), - OpenMetadataType.PORT_TYPE_NAME).orElse(null); - } - dataEngineRESTServices.upsertSchemaType(schemaEvent.getUserId(), serverName, portGUID, schemaEvent.getSchemaType(), - schemaEvent.getExternalSourceName()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(schemaTypeEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a schema type - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteSchemaTypeEvent(String dataEngineEvent) { - final String methodName = "processDeleteSchemaTypeEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteSchemaType(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a data engine - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteDataEngineEvent(String dataEngineEvent) { - final String methodName = "processDeleteDataEngineEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteExternalDataEngine(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a process - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteProcessEvent(String dataEngineEvent) { - final String methodName = "processDeleteProcessEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteProcess(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a port implementation - * - * @param dataEngineEvent the event to be processed - */ - public void processDeletePortImplementationEvent(String dataEngineEvent) { - final String methodName = "processDeletePortImplementationEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deletePort(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DatabaseEvent} for creating a database - * - * @param dataEngineEvent the event to be processed - */ - public void processDatabaseEvent(String dataEngineEvent) { - final String methodName = "processDatabaseEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DatabaseEvent databaseEvent = OBJECT_READER.readValue(dataEngineEvent, DatabaseEvent.class); - - dataEngineRESTServices.upsertDatabase(databaseEvent.getUserId(), serverName, databaseEvent.getDatabase(), - databaseEvent.getExternalSourceName()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DatabaseSchemaEvent} for creating a database schema - * - * @param dataEngineEvent the event to be processed - */ - public void processDatabaseSchemaEvent(String dataEngineEvent) { - final String methodName = "processDatabaseSchemaEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DatabaseSchemaEvent databaseSchemaEvent = OBJECT_READER.readValue(dataEngineEvent, DatabaseSchemaEvent.class); - - dataEngineRESTServices.upsertDatabaseSchema(databaseSchemaEvent.getUserId(), serverName, - databaseSchemaEvent.getDatabaseQualifiedName(), databaseSchemaEvent.getDatabaseSchema(), - databaseSchemaEvent.getExternalSourceName()); - - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link RelationalTableEvent} for creating a relational table - * - * @param dataEngineEvent the event to be processed - */ - public void processRelationalTableEvent(String dataEngineEvent) { - final String methodName = "processRelationalTableEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - RelationalTableEvent relationalTableEvent = OBJECT_READER.readValue(dataEngineEvent, RelationalTableEvent.class); - - dataEngineRESTServices.upsertRelationalTable(relationalTableEvent.getUserId(), serverName, - relationalTableEvent.getDatabaseSchemaQualifiedName(), relationalTableEvent.getRelationalTable(), - relationalTableEvent.getExternalSourceName()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DataFileEvent} for creating a data file - * - * @param dataEngineEvent the event to be processed - */ - public void processDataFileEvent(String dataEngineEvent) { - final String methodName = "processDataFileEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DataFileEvent dataFileEvent = OBJECT_READER.readValue(dataEngineEvent, DataFileEvent.class); - - dataEngineRESTServices.upsertDataFile(dataFileEvent.getUserId(), serverName, dataFileEvent.getDataFile(), - dataFileEvent.getExternalSourceName()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a database - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteDatabaseEvent(String dataEngineEvent) { - final String methodName = "processDeleteDatabaseEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteDatabase(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a database schema - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteDatabaseSchemaEvent(String dataEngineEvent) { - final String methodName = "processDeleteDatabaseSchemaEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteDatabaseSchema(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a relational table - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteRelationalTableEvent(String dataEngineEvent) { - final String methodName = "processDeleteRelationalTableEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteRelationalTable(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a data file - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteDataFileEvent(String dataEngineEvent) { - final String methodName = "processDeleteDataFileEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteDataFile(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a folder - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteFolderEvent(String dataEngineEvent) { - final String methodName = "processDeleteFolderEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteFolder(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a connection - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteConnectionEvent(String dataEngineEvent) { - final String methodName = "processDeleteConnectionEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteConnection(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting an endpoint - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteEndpointEvent(String dataEngineEvent) { - final String methodName = "processDeleteEndpointEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteEndpoint(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link TopicEvent} for creating a topic - * - * @param dataEngineEvent the event to be processed - */ - public void processTopicEvent(String dataEngineEvent) { - final String methodName = "processTopicEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - TopicEvent topicEvent = OBJECT_READER.readValue(dataEngineEvent, TopicEvent.class); - - dataEngineRESTServices.upsertTopic(topicEvent.getUserId(), serverName, topicEvent.getTopic(), topicEvent.getExternalSourceName()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link EventTypeEvent} for creating a topic - * - * @param dataEngineEvent the event to be processed - */ - public void processEventTypeEvent(String dataEngineEvent) { - final String methodName = "processEventTypeEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - EventTypeEvent eventTypeEvent = OBJECT_READER.readValue(dataEngineEvent, EventTypeEvent.class); - String topicGUID = dataEngineRESTServices.getTopicGUID(eventTypeEvent.getUserId(), serverName, eventTypeEvent.getTopicQualifiedName(), - methodName); - - dataEngineRESTServices.upsertEventType(eventTypeEvent.getUserId(), serverName, eventTypeEvent.getEventType(), topicGUID, - eventTypeEvent.getExternalSourceName()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting a topic - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteTopicEvent(String dataEngineEvent) { - final String methodName = "processDeleteTopicEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteTopic(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link DeleteEvent} for deleting an event type - * - * @param dataEngineEvent the event to be processed - */ - public void processDeleteEventTypeEvent(String dataEngineEvent) { - final String methodName = "processDeleteEventTypeEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - DeleteEvent deleteEvent = OBJECT_READER.readValue(dataEngineEvent, DeleteEvent.class); - - dataEngineRESTServices.deleteEventType(deleteEvent.getUserId(), serverName, deleteEvent.getExternalSourceName(), - deleteEvent.getGuid(), deleteEvent.getQualifiedName(), deleteEvent.getDeleteSemantic()); - } catch (IOException | UserNotAuthorizedException | PropertyServerException | InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException e) { - logException(dataEngineEvent, methodName, e); - } - } - - /** - * Process a {@link ProcessingStateEvent} for deleting an event type - * - * @param dataEngineEvent the event to be processed - */ - public void processProcessingStateEvent(String dataEngineEvent) { - final String methodName = "processProcessingStateEvent"; - log.trace(DEBUG_MESSAGE_METHOD, methodName); - try { - ProcessingStateEvent event = OBJECT_READER.readValue(dataEngineEvent, ProcessingStateEvent.class); - - dataEngineRESTServices.upsertProcessingState(event.getUserId(), serverName, event.getProcessingState(), - event.getExternalSourceName()); - } catch (IOException e) { - logException(dataEngineEvent, methodName, e); - } - } - - private void logException(String dataEngineEvent, String methodName, Exception e) { - log.debug("Exception in processing {} from in Data Engine In Topic:", dataEngineEvent, e); - - auditLog.logException(methodName, DataEngineAuditCode.PARSE_EVENT_EXCEPTION.getMessageDefinition(dataEngineEvent, e.toString()), e); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/processors/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/processors/package-info.java deleted file mode 100644 index becc9bf40fe..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/processors/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * Provides the server side support for the event processing. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.processors; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/ClockService.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/ClockService.java deleted file mode 100644 index 40a0911b3ae..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/ClockService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.service; - -import java.time.Clock; -import java.time.Instant; -import java.util.Date; - -/** - * ClockService manages a Clock instance and provides an utility method for getting the current dte and time - */ -public class ClockService { - - private final Clock clock; - - public ClockService(Clock clock) { - this.clock = clock; - } - - /** - * Retrieves the current date - * - * @return current date and time - */ - public Date getNow() { - return Date.from(Instant.now(clock)); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/DataEngineRESTServices.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/DataEngineRESTServices.java deleted file mode 100644 index 53bd8b5f21b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/DataEngineRESTServices.java +++ /dev/null @@ -1,2103 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.service; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.CSVFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Collection; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.ParentProcess; -import org.odpi.openmetadata.accessservices.dataengine.model.Port; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.accessservices.dataengine.model.UpdateSemantic; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataEngineOMASAPIRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataEngineRegistrationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFileRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFlowsRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseSchemaRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DeleteRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.EventTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.PortImplementationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessHierarchyRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessingStateRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.RelationalTableRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.SchemaTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.TopicRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.server.admin.DataEngineInstanceHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCollectionHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCommonHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineConnectionAndEndpointHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineDataFileHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineEventTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineFindHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineFolderHierarchyHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEnginePortHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineProcessHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRegistrationHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRelationalDataHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineTopicHandler; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.PropertiesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.ConnectionResponse; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotDeletedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - -import static java.util.stream.Collectors.partitioningBy; - -/** - * The DataEngineRESTServices provides the server-side implementation of the Data Engine Open Metadata Assess Service - * (OMAS). This service provide the functionality to create processes, ports with schema types and corresponding - * relationships. - */ -public class DataEngineRESTServices { - - private static final Logger log = LoggerFactory.getLogger(DataEngineRESTServices.class); - private static final String DEBUG_MESSAGE_METHOD_DETAILS = "Calling method {} for entity: {}"; - private static final String DEBUG_MESSAGE_METHOD_RETURN = "Returning from method: {} with response: {}"; - private static final String EXCEPTION_WHILE_ADDING_DATA_FLOW = "Exception while adding data flow {} : {}"; - private static final String EXCEPTION_WHILE_CREATING_PROCESS = "Exception while creating process {} : {}"; - private static final String EXCEPTION_WHILE_CREATING_PROCESS_HIERARCHY = "Exception while creating process relationships for process {} : {}"; - private static final String DEBUG_DELETE_MESSAGE = "Data Engine OMAS deleted entity with GUID {} and type {}"; - private static final String PROCESS_UPSERT = "Data Engine OMAS has created or updated a Process with qualified name {} and guid {}"; - private static final String EXTERNAL_ENGINE_WAS_REGISTERED = - "Data Engine OMAS has registered an external engine with qualified name {} and GUID {}"; - private static final String PROCESS_HIERARCHY_ADDED_BETWEEN_CHILD_AND_PARENT_PROCESS = - "Data Engine OMAS has added a relationship of type ProcessHierarchy between child process {} and parent process {}"; - private static final String CHILD_PROCESS = "childProcess"; - private static final String DATABASE_SCHEMA_PARAMETER_NAME = "databaseSchema"; - private static final String DATABASE_PARAMETER_NAME = "database"; - private static final String RELATIONAL_TABLE_PARAMETER_NAME = "relationalTable"; - private static final String SCHEMA = "Schema"; - private static final String SCHEMA_SUFFIX = "::schema"; - private static final String EXTERNAL_SOURCE_NAME_PARAMETER_NAME = "externalSourceName"; - private static final String UPSERT_METHOD_CALLS_FOR = "Method {} will take longer. Inside it, upsert method will be called for: {} and/or {}"; - private static final String TOPIC_PARAMETER_NAME = "topic"; - private static final String PROCESSING_STATE = "processingState"; - private static final String EVENT_TYPE_PARAMETER_NAME = "eventType"; - private static final String TOPIC_QUALIFIED_NAME_PARAMETER_NAME = "topicQualifiedName"; - private final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - private final DataEngineInstanceHandler instanceHandler = new DataEngineInstanceHandler(); - - /** - * Create the external data engine as engine entity - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the server - * @return the unique identifier (guid) of the created external data engine - */ - public GUIDResponse createExternalDataEngine(String serverName, String userId, - DataEngineRegistrationRequestBody requestBody) { - final String methodName = "createExternalDataEngine"; - - GUIDResponse response = new GUIDResponse(); - - try { - if (requestBody == null) { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); - return response; - } - response.setGUID(createExternalDataEngine(userId, serverName, requestBody.getEngine())); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); - return response; - } - - /** - * Get the unique identifier from a external data engine qualified name - * - * @param serverName name of the service to route the request to - * @param userId identifier of calling user - * @param qualifiedName qualified name of the external data engine - * @return the unique identifier from an engine definition for an external data engine - */ - public GUIDResponse getExternalDataEngine(String serverName, String userId, String qualifiedName) { - final String methodName = "getExternalDataEngineByQualifiedName"; - - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, qualifiedName); - - GUIDResponse response = new GUIDResponse(); - - try { - DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - - response.setGUID(handler.getExternalDataEngine(userId, qualifiedName)); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); - return response; - } - - /** - * Delete the external data engine. Not yet implemented, it will throw FunctionNotSupportedException if used - * - * @param serverName name of the service to route the request to - * @param userId identifier of calling user - * @param requestBody properties of the external data engine - * @return void response - */ - public VoidResponse deleteExternalDataEngine(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteExternalDataEngine"; - - VoidResponse response = new VoidResponse(); - - try { - deleteExternalDataEngine(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Delete the external data engine. Not yet implemented, it will throw FunctionNotSupportedException if used - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the schema type - * @param qualifiedName the qualified name of the schema type - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public void deleteExternalDataEngine(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, UserNotAuthorizedException, - PropertyServerException, - FunctionNotSupportedException { - final String methodName = "deleteExternalDataEngine"; - - DataEngineRegistrationHandler dataEngineRegistrationHandler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - - Optional dataEngineGUID = Optional.ofNullable(guid); - if (dataEngineGUID.isEmpty()) { - dataEngineGUID = Optional.ofNullable(dataEngineRegistrationHandler.getExternalDataEngine(userId, qualifiedName)); - } - - if (dataEngineGUID.isEmpty()) { - return; - } - - dataEngineRegistrationHandler.removeExternalDataEngine(userId, qualifiedName, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, dataEngineGUID, OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName); - } - - /** - * Get the unique identifier of an entity - * - * @param serverName name of the service to route the request to - * @param userId identifier of calling user - * @param qualifiedName qualified name of the port - * @param typeName the type name of the entity - * @return the unique identifier of the entity or empty optional - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional getEntityGUID(String serverName, String userId, String qualifiedName, String typeName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - return getEntityDetails(serverName, userId, qualifiedName, typeName).map(InstanceHeader::getGUID); - } - - /** - * Get the entity details of an entity - * - * @param serverName name of the service to route the request to - * @param userId identifier of calling user - * @param qualifiedName qualified name of the port - * @param typeName the type name of the entity - * @return the entity details of the entity or empty optional - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public Optional getEntityDetails(String serverName, String userId, String qualifiedName, String typeName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "getEntityDetails"; - if (StringUtils.isEmpty(qualifiedName)) { - return Optional.empty(); - } - - DataEngineCommonHandler dataEngineCommonHandler = instanceHandler.getCommonHandler(userId, serverName, methodName); - return dataEngineCommonHandler.findEntity(userId, qualifiedName, typeName); - } - - /** - * Create the SchemaType with schema attributes and corresponding relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param schemaTypeRequestBody properties of the schema type - * @return the unique identifier (guid) of the created schema type - */ - public GUIDResponse upsertSchemaType(String userId, String serverName, SchemaTypeRequestBody schemaTypeRequestBody) { - final String methodName = "upsertSchemaType"; - - GUIDResponse response = new GUIDResponse(); - - try { - validateRequestBody(userId, serverName, schemaTypeRequestBody, methodName); - - String externalSourceName = schemaTypeRequestBody.getExternalSourceName(); - String schemasTypeGUID = upsertSchemaType(userId, serverName, null, schemaTypeRequestBody.getSchemaType(), - externalSourceName); - - response.setGUID(schemasTypeGUID); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the SchemaType with schema attributes and corresponding relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the schema type - * @return void response - */ - public VoidResponse deleteSchemaType(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteSchemaType"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteSchemaType(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the SchemaType with schema attributes and corresponding relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the schema type - * @param qualifiedName the qualified name of the schema type - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteSchemaType(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, UserNotAuthorizedException, - PropertyServerException, FunctionNotSupportedException, - EntityNotDeletedException { - final String methodName = "deleteSchemaType"; - - DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler = instanceHandler.getDataEngineSchemaTypeHandler(userId, serverName, methodName); - - String schemaTypeGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME, methodName); - dataEngineSchemaTypeHandler.removeSchemaType(userId, schemaTypeGUID, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, schemaTypeGUID, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME); - } - - /** - * Create or update the Port Implementation with a PortSchema relationship - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param portImplementationRequestBody properties of the port - * @return the unique identifier (guid) of the created port - */ - public GUIDResponse upsertPortImplementation(String userId, String serverName, PortImplementationRequestBody portImplementationRequestBody) { - final String methodName = "upsertPortImplementation"; - - GUIDResponse response = new GUIDResponse(); - try { - validateRequestBody(userId, serverName, portImplementationRequestBody, methodName); - - String processGUID = getEntityGUID(serverName, userId, portImplementationRequestBody.getProcessQualifiedName(), OpenMetadataType.PROCESS.typeName) - .orElse(null); - String externalSourceName = portImplementationRequestBody.getExternalSourceName(); - PortImplementation portImplementation = portImplementationRequestBody.getPortImplementation(); - - updateProcessStatus(userId, serverName, processGUID, InstanceStatus.DRAFT, externalSourceName); - - String portImplementationGUID = upsertPortImplementation(userId, serverName, portImplementation, processGUID, externalSourceName); - response.setGUID(portImplementationGUID); - upsertSchemaType(userId, serverName, portImplementationGUID, portImplementation.getSchemaType(), externalSourceName); - - updateProcessStatus(userId, serverName, processGUID, InstanceStatus.ACTIVE, externalSourceName); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the Port with the associated schema type and relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the port - * @param portType the type of the port - * @return void response - */ - public VoidResponse deletePort(String userId, String serverName, DeleteRequestBody requestBody, String portType) { - final String methodName = "deletePort"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deletePort(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), portType, - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Delete the Port with the associated schema type and relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the port - * @param qualifiedName the qualified name of the port - * @param portType the port type - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deletePort(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, String portType, - DeleteSemantic deleteSemantic) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, - FunctionNotSupportedException, EntityNotDeletedException { - final String methodName = "deletePort"; - - String portGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.PORT_TYPE_NAME, methodName); - DataEnginePortHandler dataEnginePortHandler = instanceHandler.getPortHandler(userId, serverName, methodName); - - if (OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME.equalsIgnoreCase(portType)) { - Optional schemaType = dataEnginePortHandler.findSchemaTypeForPort(userId, portGUID); - if (schemaType.isPresent()) { - deleteSchemaType(userId, serverName, externalSourceName, schemaType.get().getGUID(), null, deleteSemantic); - } - } - - dataEnginePortHandler.removePort(userId, portGUID, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, portGUID, OpenMetadataType.PORT_TYPE_NAME); - } - - - /** - * Add the provided ProcessHierarchy relationship - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param processHierarchyRequestBody properties of the process hierarchy - * @return the unique identifier (guid) of the child of the process hierarchy that was updated - */ - public GUIDResponse addProcessHierarchy(String userId, String serverName, ProcessHierarchyRequestBody processHierarchyRequestBody) { - final String methodName = "addProcessHierarchy"; - - GUIDResponse response = new GUIDResponse(); - - try { - validateRequestBody(userId, serverName, processHierarchyRequestBody, methodName); - - response.setGUID(addProcessHierarchyToProcess(userId, serverName, processHierarchyRequestBody.getProcessHierarchy(), - processHierarchyRequestBody.getExternalSourceName())); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Create or update the process with ports, schema types and data flows - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param processRequestBody properties of the process - * @return a list unique identifiers (GUIDs) of the created/updated process - */ - public GUIDResponse upsertProcess(String userId, String serverName, ProcessRequestBody processRequestBody) { - final String methodName = "upsertProcess"; - GUIDResponse response = new GUIDResponse(); - try { - validateRequestBody(userId, serverName, processRequestBody, methodName); - - Process process = processRequestBody.getProcess(); - if (process == null) { - restExceptionHandler.handleMissingValue("process", methodName); - return response; - } - return upsertProcess(userId, serverName, process, processRequestBody.getExternalSourceName()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Delete a process, with the associated port implementations and data flows - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param requestBody properties of the processes - * @return void response - */ - public VoidResponse deleteProcess(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteProcess"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteProcess(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Delete a process, with the associated port implementations and data flows - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the process - * @param qualifiedName the qualified name of the process - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteProcess(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, - FunctionNotSupportedException, EntityNotDeletedException { - final String methodName = "deleteProcess"; - - String processGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.PROCESS.typeName, methodName); - - DataEngineProcessHandler processHandler = instanceHandler.getProcessHandler(userId, serverName, methodName); - - Set portImplementations = processHandler.getPortsForProcess(userId, processGUID, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - for (EntityDetail port : portImplementations) { - deletePort(userId, serverName, externalSourceName, port.getGUID(), null, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, deleteSemantic); - } - - processHandler.removeProcess(userId, processGUID, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, processGUID, OpenMetadataType.PROCESS.typeName); - } - - /** - * Add a a ProcessHierarchy relationship to the process - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param processHierarchy the process hierarchy values - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the child of the process hierarchy that was updated - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String addProcessHierarchyToProcess(String userId, String serverName, ProcessHierarchy processHierarchy, String externalSourceName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "addProcessHierarchyToProcess"; - - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, processHierarchy); - - DataEngineProcessHandler processHandler = instanceHandler.getProcessHandler(userId, serverName, methodName); - - Optional childProcessEntity = processHandler.findProcessEntity(userId, processHierarchy.getChildProcess()); - - String childProcessGUID; - if (childProcessEntity.isPresent()) { - childProcessGUID = childProcessEntity.get().getGUID(); - ParentProcess parentProcess = new ParentProcess(); - parentProcess.setQualifiedName(processHierarchy.getParentProcess()); - parentProcess.setProcessContainmentType(processHierarchy.getProcessContainmentType()); - processHandler.upsertProcessHierarchyRelationship(userId, parentProcess, childProcessGUID, externalSourceName); - } else { - throw new InvalidParameterException(DataEngineErrorCode.PROCESS_NOT_FOUND.getMessageDefinition(processHierarchy.getChildProcess()), - this.getClass().getName(), methodName, CHILD_PROCESS); - } - - log.info(PROCESS_HIERARCHY_ADDED_BETWEEN_CHILD_AND_PARENT_PROCESS, processHierarchy.getChildProcess(), - processHierarchy.getParentProcess()); - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, childProcessGUID); - return childProcessGUID; - } - - /** - * Create or update a Port Implementation with an associated SchemaType - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param portImplementation the port implementation values - * @param processGUID the unique identifier of the process - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created port implementation - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - */ - public String upsertPortImplementation(String userId, String serverName, PortImplementation portImplementation, String processGUID, - String externalSourceName) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException, FunctionNotSupportedException { - final String methodName = "upsertPortImplementation"; - log.trace(DEBUG_MESSAGE_METHOD_DETAILS, methodName, portImplementation); - - DataEnginePortHandler dataEnginePortHandler = instanceHandler.getPortHandler(userId, serverName, methodName); - - Optional portEntity = dataEnginePortHandler.findPortImplementationEntity(userId, portImplementation.getQualifiedName()); - String portImplementationGUID; - if (portEntity.isEmpty()) { - portImplementationGUID = dataEnginePortHandler.createPortImplementation(userId, portImplementation, processGUID, externalSourceName); - } else { - portImplementationGUID = portEntity.get().getGUID(); - dataEnginePortHandler.updatePortImplementation(userId, portEntity.get(), portImplementation, externalSourceName); - - if (portImplementation.getUpdateSemantic() == UpdateSemantic.REPLACE) { - Optional schemaTypeForPort = dataEnginePortHandler.findSchemaTypeForPort(userId, portImplementationGUID); - if (schemaTypeForPort.isPresent()) { - String oldSchemaTypeQualifiedName = - schemaTypeForPort.get().getProperties().getPropertyValue(OpenMetadataProperty.QUALIFIED_NAME.name).valueAsString(); - deleteObsoleteSchemaType(userId, serverName, portImplementation.getSchemaType().getQualifiedName(), oldSchemaTypeQualifiedName, - externalSourceName); - } - } - } - - log.trace(DEBUG_MESSAGE_METHOD_RETURN, methodName, portImplementationGUID); - return portImplementationGUID; - } - - /** - * Create the external data engine as engine entity - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param engine the engine values - * @return he unique identifier (guid) of the created external data engine - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String createExternalDataEngine(String userId, String serverName, Engine engine) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "createExternalDataEngine"; - - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, engine); - - if (engine == null) { - return null; - } - - DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - - String externalDataEngineGUID = handler.upsertExternalDataEngine(userId, engine); - - log.info(EXTERNAL_ENGINE_WAS_REGISTERED, engine.getQualifiedName(), externalDataEngineGUID); - return externalDataEngineGUID; - } - - /** - * Create DataFlows relationships between schema attributes - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param dataFlows the list of daa flows to be created - * @param response the response object that will capture the exceptions that might occur during - * parallel processing - * @param externalSourceName the unique name of the external source - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public void addDataFlows(String userId, String serverName, List dataFlows, FFDCResponseBase response, - String externalSourceName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "addDataFlows"; - - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, dataFlows); - - if (CollectionUtils.isEmpty(dataFlows)) { - return; - } - - DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler = instanceHandler.getDataEngineSchemaTypeHandler(userId, serverName, methodName); - - dataFlows.parallelStream().forEach(dataFlow -> { - try { - dataEngineSchemaTypeHandler.addDataFlowRelationship(userId, dataFlow.getDataSupplier(), - dataFlow.getDataConsumer(), externalSourceName, dataFlow.getFormula(), dataFlow.getDescription()); - } catch (Exception error) { - log.error(EXCEPTION_WHILE_ADDING_DATA_FLOW, dataFlow.toString(), error.toString()); - restExceptionHandler.captureExceptions(response, error, methodName); - } - }); - } - - /** - * Create DataFlow relationships between schema attributes - * - * @param userId the name of the calling user - * @param serverName ame of server instance to call - * @param dataFlowsRequestBody list of data flows - * @return void response - */ - public VoidResponse addDataFlows(String userId, String serverName, DataFlowsRequestBody dataFlowsRequestBody) { - final String methodName = "addDataFlows"; - - VoidResponse response = new VoidResponse(); - try { - if (dataFlowsRequestBody == null) { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); - return response; - } - - addDataFlows(userId, serverName, dataFlowsRequestBody.getDataFlows(), response, - dataFlowsRequestBody.getExternalSourceName()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); - - return response; - } - - /** - * Retrieve in topic connection details from the service instance hosting Data Engine access service - * - * @param serverName the name of server instance to call - * @param userId the name/identifier of the calling user - * @return OCF API ConnectionResponse object describing the details for the input topic connection used - * or - * InvalidParameterException one of the parameters is null or invalid or - * UserNotAuthorizedException user not authorized to issue this request or - * PropertyServerException problem retrieving the discovery engine definition - */ - public ConnectionResponse getInTopicConnection(String serverName, String userId) { - - final String methodName = "getInTopicConnection"; - ConnectionResponse response = new ConnectionResponse(); - - try { - response.setConnection(instanceHandler.getInTopicConnection(userId, serverName, methodName)); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - - /** - * Create or update a SchemaType - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param portImplementationGUID the unique identifier of the port implementation - * @param schemaType the schema type values - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created schema type - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertSchemaType(String userId, String serverName, String portImplementationGUID, SchemaType schemaType, - String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - final String methodName = "upsertSchemaType"; - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, schemaType); - - DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler = instanceHandler.getDataEngineSchemaTypeHandler(userId, serverName, methodName); - DataEnginePortHandler dataEnginePortHandler = instanceHandler.getPortHandler(userId, serverName, methodName); - - String schemaTypeGUID = dataEngineSchemaTypeHandler.upsertSchemaType(userId, schemaType, portImplementationGUID, externalSourceName); - if (StringUtils.isNotEmpty(portImplementationGUID)) { - dataEnginePortHandler.addPortSchemaRelationship(userId, portImplementationGUID, schemaTypeGUID, methodName); - } - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, schemaTypeGUID); - - return schemaTypeGUID; - } - - /** - * Create or update the Database with corresponding associated schema type and relationship - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param databaseRequestBody properties of the database - * @return the unique identifier (guid) of the created database - */ - public GUIDResponse upsertDatabase(String userId, String serverName, DatabaseRequestBody databaseRequestBody) { - final String methodName = "upsertDatabase"; - - GUIDResponse response = new GUIDResponse(); - try { - validateDatabaseRequestBody(userId, serverName, databaseRequestBody, methodName); - - String databaseGUID = upsertDatabase(userId, serverName, databaseRequestBody.getDatabase(), databaseRequestBody.getExternalSourceName()); - response.setGUID(databaseGUID); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Create or update the Database with corresponding associated schema type and relationship - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param database the database values - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created database - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertDatabase(String userId, String serverName, Database database, String externalSourceName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "upsertDatabase"; - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, database); - DatabaseSchema databaseSchema = database.getDatabaseSchema(); - List tables = database.getTables(); - if (databaseSchema != null || CollectionUtils.isNotEmpty(tables)) { - log.debug(UPSERT_METHOD_CALLS_FOR, methodName, databaseSchema, tables); - } - - DataEngineRelationalDataHandler dataEngineRelationalDataHandler = instanceHandler.getRelationalDataHandler(userId, serverName, methodName); - String databaseGUID = dataEngineRelationalDataHandler.upsertDatabase(userId, database, externalSourceName); - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, databaseGUID); - return databaseGUID; - } - - /** - * Create or update the Database Schema with corresponding related entities and classifications - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param databaseSchemaRequestBody RequestBody properties of the database - * @return the unique identifier (guid) of the created database - */ - public GUIDResponse upsertDatabaseSchema(String userId, String serverName, DatabaseSchemaRequestBody databaseSchemaRequestBody) { - final String methodName = "upsertDatabaseSchema"; - - GUIDResponse response = new GUIDResponse(); - try { - validateDatabaseSchemaRequestBody(userId, serverName, databaseSchemaRequestBody, methodName); - - DatabaseSchema databaseSchema = databaseSchemaRequestBody.getDatabaseSchema(); - String databaseGUID = upsertDatabaseSchema(userId, serverName, databaseSchemaRequestBody.getDatabaseQualifiedName(), databaseSchema, - databaseSchemaRequestBody.getExternalSourceName()); - response.setGUID(databaseGUID); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Create or update the DatabaseSchema with corresponding relationship to the database, if provided and not virtual - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param databaseQualifiedName the database entity to which the database schema will be linked, if it exists - * @param databaseSchema the database schema values - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created database schema - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertDatabaseSchema(String userId, String serverName, String databaseQualifiedName, DatabaseSchema databaseSchema, - String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, - PropertyServerException { - - final String methodName = "upsertDatabaseSchema"; - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, databaseSchema); - - DataEngineRelationalDataHandler dataEngineRelationalDataHandler = instanceHandler.getRelationalDataHandler(userId, - serverName, methodName); - - Optional databaseEntityOptional = getEntityDetails(serverName, userId, databaseQualifiedName, OpenMetadataType.DATABASE_TYPE_NAME); - String databaseGUID = null; - if (databaseEntityOptional.isPresent()) { - databaseGUID = databaseEntityOptional.get().getGUID(); - } - - String databaseSchemaGUID = dataEngineRelationalDataHandler.upsertDatabaseSchema(userId, databaseGUID, databaseSchema, externalSourceName); - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, databaseSchemaGUID); - return databaseSchemaGUID; - } - - /** - * Delete the Database with all the associated relational tables - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the database - * @return void response - */ - public VoidResponse deleteDatabase(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteDatabase"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteDatabase(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the Database with all the associated relational tables - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the database - * @param qualifiedName the qualified name of the database - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteDatabase(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - EntityNotDeletedException, FunctionNotSupportedException { - - final String methodName = "deleteDatabase"; - - DataEngineRelationalDataHandler relationalDataHandler = instanceHandler.getRelationalDataHandler(userId, serverName, methodName); - - String databaseGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.DATABASE_TYPE_NAME, methodName); - relationalDataHandler.removeDatabase(userId, databaseGUID, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, databaseGUID, OpenMetadataType.DATABASE_TYPE_NAME); - } - - /** - * Delete the DatabaseSchema with all the associated relational tables - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the database schema - * @return void response - */ - public VoidResponse deleteDatabaseSchema(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteDatabaseSchema"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteDatabaseSchema(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), - requestBody.getQualifiedName(), requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the DatabaseSchema with all the associated relational tables - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the database schema - * @param qualifiedName the qualified name of the database schema - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteDatabaseSchema(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException, - EntityNotDeletedException, FunctionNotSupportedException { - - final String methodName = "deleteDatabaseSchema"; - - DataEngineRelationalDataHandler relationalDataHandler = instanceHandler.getRelationalDataHandler(userId, serverName, methodName); - String databaseSchemaGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, methodName); - relationalDataHandler.removeDatabaseSchema(userId, databaseSchemaGUID, externalSourceName, deleteSemantic); - - log.debug(DEBUG_DELETE_MESSAGE, databaseSchemaGUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - } - - /** - * Create the Relational Table with Relational Columns and corresponding relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param relationalTableRequestBody properties of the relational table - * @return the unique identifier (guid) of the created relational table - */ - public GUIDResponse upsertRelationalTable(String userId, String serverName, RelationalTableRequestBody relationalTableRequestBody) { - final String methodName = "upsertRelationalTable"; - - GUIDResponse response = new GUIDResponse(); - - try { - validateRelationalTableRequestBody(userId, serverName, relationalTableRequestBody, methodName); - - String relationalTableGUID = upsertRelationalTable(userId, serverName, relationalTableRequestBody.getDatabaseSchemaQualifiedName(), - relationalTableRequestBody.getRelationalTable(), relationalTableRequestBody.getExternalSourceName()); - response.setGUID(relationalTableGUID); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Create the Relational Table with Relational Columns and corresponding relationships - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param databaseSchemaQualifiedName the unique name of the database - * @param relationalTable the relational table values - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created relational table - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertRelationalTable(String userId, String serverName, String databaseSchemaQualifiedName, RelationalTable relationalTable, - String externalSourceName) throws InvalidParameterException, - UserNotAuthorizedException, PropertyServerException { - final String methodName = "upsertRelationalTable"; - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, relationalTable); - - DataEngineRelationalDataHandler dataEngineRelationalDataHandler = instanceHandler.getRelationalDataHandler(userId, - serverName, methodName); - - String relationalTableGUID = dataEngineRelationalDataHandler.upsertRelationalTable(userId, databaseSchemaQualifiedName, - relationalTable, externalSourceName); - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, relationalTableGUID); - return relationalTableGUID; - } - - /** - * Delete the Relational Table with all the associated Relational Columns - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the relational table - * @return void response - */ - public VoidResponse deleteRelationalTable(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteRelationalTable"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteRelationalTable(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the Relational Table with all the associated Relational Columns - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the relational table - * @param qualifiedName the qualified name of the relational table - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteRelationalTable(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException, EntityNotDeletedException, - FunctionNotSupportedException { - - final String methodName = "deleteRelationalTable"; - - DataEngineRelationalDataHandler relationalDataHandler = instanceHandler.getRelationalDataHandler(userId, serverName, methodName); - - String relationalTableGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, methodName); - relationalDataHandler.removeRelationalTable(userId, relationalTableGUID, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, relationalTableGUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME); - } - - - /** - * Updates or inserts a DataFile or CSVFile, along with its schema, columns and folder hierarchy - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param dataFileRequestBody properties of the data file - * @return the unique identifier (guid) of the created data file - */ - public GUIDResponse upsertDataFile(String serverName, String userId, DataFileRequestBody dataFileRequestBody) { - String methodName = "upsertDataFile"; - GUIDResponse response = new GUIDResponse(); - String guid; - - try { - validateRequestBody(userId, serverName, dataFileRequestBody, methodName); - - guid = upsertDataFile(userId, serverName, dataFileRequestBody.getDataFile(), dataFileRequestBody.getExternalSourceName()); - response.setGUID(guid); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Updates or inserts a DataFile or CSVFile, along with its schema, columns and folder hierarchy - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param file the data file properties - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created data file - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertDataFile(String userId, String serverName, DataFile file, String externalSourceName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - String methodName = "upsertDataFile"; - - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, file); - - DataEngineDataFileHandler dataFileHandler = instanceHandler.getDataFileHandler(userId, serverName, methodName); - DataEngineRegistrationHandler registrationHandler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - - String externalSourceGuid = registrationHandler.getExternalDataEngine(userId, externalSourceName); - - List columns = file.getColumns(); - SchemaType schemaType = getDefaultSchemaTypeIfAbsentAndAddAttributes(file, file.getSchema(), columns); - - Map extendedProperties = getExtendedProperties(file); - String fileTypeGuid = file instanceof CSVFile ? OpenMetadataType.CSV_FILE.typeGUID : OpenMetadataType.DATA_FILE.typeGUID; - String fileTypeName = file instanceof CSVFile ? OpenMetadataType.CSV_FILE.typeName : OpenMetadataType.DATA_FILE.typeName; - file.setFileType(fileTypeName); - - if (CollectionUtils.isNotEmpty(columns)) { - columns.forEach(column -> { - column.setTypeName(OpenMetadataType.TABULAR_FILE_COLUMN_TYPE_NAME); - column.setTypeGuid(OpenMetadataType.TABULAR_FILE_COLUMN_TYPE_GUID); - }); - } - - String guid = dataFileHandler.upsertFileAssetIntoCatalog(fileTypeName, fileTypeGuid, file, schemaType, - extendedProperties, externalSourceGuid, externalSourceName, userId, methodName); - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, guid); - return guid; - } - - /** - * Delete the Data File with all the associated Tabular Columns - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the data file - * @return void response - */ - public VoidResponse deleteDataFile(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteDataFile"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteDataFile(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the Data File with all the associated Tabular Columns - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the data file - * @param qualifiedName the qualified name of the data file - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteDataFile(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, EntityNotDeletedException, - UserNotAuthorizedException, FunctionNotSupportedException { - final String methodName = "deleteDataFile"; - - DataEngineDataFileHandler dataFileHandler = instanceHandler.getDataFileHandler(userId, serverName, methodName); - DataEngineRegistrationHandler registrationHandler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - - String dataFileGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.DATA_FILE.typeName, methodName); - - String externalSourceGuid = registrationHandler.getExternalDataEngine(userId, externalSourceName); - dataFileHandler.removeDataFile(userId, dataFileGUID, externalSourceName, externalSourceGuid, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, dataFileGUID, OpenMetadataType.DATA_FILE.typeName); - } - - /** - * Delete the File Folder - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the folder - * @return void response - */ - public VoidResponse deleteFolder(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteFolder"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteFolder(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the File Folder - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the folder - * @param qualifiedName the qualified name of the folder - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteFolder(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - EntityNotDeletedException, FunctionNotSupportedException { - - final String methodName = "deleteFolder"; - String folderGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.FILE_FOLDER.typeName, methodName); - - DataEngineFolderHierarchyHandler folderHierarchyHandler = instanceHandler.getFolderHierarchyHandler(userId, serverName, methodName); - folderHierarchyHandler.removeFolder(userId, folderGUID, deleteSemantic, externalSourceName); - - log.debug(DEBUG_DELETE_MESSAGE, folderGUID, OpenMetadataType.FILE_FOLDER.typeName); - } - - /** - * Delete the Connection - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the connection - * @return void response - */ - public VoidResponse deleteConnection(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteConnection"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteConnection(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the Connection - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the connection - * @param qualifiedName the qualified name of the connection - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteConnection(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, EntityNotDeletedException, - UserNotAuthorizedException, FunctionNotSupportedException { - - final String methodName = "deleteConnection"; - String connectionGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.CONNECTION_TYPE_NAME, methodName); - - DataEngineConnectionAndEndpointHandler connectionAndEndpointHandler = instanceHandler.getConnectionAndEndpointHandler(userId, serverName, - methodName); - - DataEngineRegistrationHandler registrationHandler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - String externalSourceGuid = registrationHandler.getExternalDataEngine(userId, externalSourceName); - connectionAndEndpointHandler.removeConnection(userId, connectionGUID, deleteSemantic, externalSourceName, externalSourceGuid); - - log.debug(DEBUG_DELETE_MESSAGE, connectionGUID, OpenMetadataType.CONNECTION_TYPE_NAME); - } - - /** - * Delete the Endpoint - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the endpoint - * @return void response - */ - public VoidResponse deleteEndpoint(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteEndpoint"; - - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteEndpoint(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - return response; - } - - /** - * Delete the Endpoint - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the endpoint - * @param qualifiedName the qualified name of the endpoint - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteEndpoint(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, EntityNotDeletedException, - UserNotAuthorizedException, FunctionNotSupportedException { - - final String methodName = "deleteEndpoint"; - String endpointGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.ENDPOINT_TYPE_NAME, methodName); - - DataEngineConnectionAndEndpointHandler connectionAndEndpointHandler = instanceHandler.getConnectionAndEndpointHandler(userId, serverName, - methodName); - DataEngineRegistrationHandler registrationHandler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - String externalSourceGuid = registrationHandler.getExternalDataEngine(userId, externalSourceName); - connectionAndEndpointHandler.removeEndpoint(userId, endpointGUID, deleteSemantic, externalSourceName, externalSourceGuid); - - log.debug(DEBUG_DELETE_MESSAGE, endpointGUID, OpenMetadataType.ENDPOINT_TYPE_NAME); - } - - private String getEntityGUID(String userId, String serverName, String guid, String qualifiedName, String entityTypeName, String methodName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - EntityNotDeletedException { - Optional entityGUIDOptional = Optional.ofNullable(guid); - if (entityGUIDOptional.isEmpty()) { - entityGUIDOptional = getEntityGUID(serverName, userId, qualifiedName, entityTypeName); - } - if (entityGUIDOptional.isPresent()) { - return entityGUIDOptional.get(); - } else { - throwEntityNotDeletedException(userId, serverName, methodName, qualifiedName); - } - return null; - } - - private void deleteObsoleteSchemaType(String userId, String serverName, String schemaTypeQualifiedName, String oldSchemaTypeQualifiedName, - String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, - PropertyServerException, FunctionNotSupportedException { - final String methodName = "deleteObsoleteSchemaType"; - - if (oldSchemaTypeQualifiedName.equalsIgnoreCase(schemaTypeQualifiedName)) { - return; - } - - Optional schemaTypeGUID = getEntityGUID(serverName, userId, oldSchemaTypeQualifiedName, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME); - if (schemaTypeGUID.isEmpty()) { - return; - } - - DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler = instanceHandler.getDataEngineSchemaTypeHandler(userId, serverName, methodName); - dataEngineSchemaTypeHandler.removeSchemaType(userId, schemaTypeGUID.get(), externalSourceName, DeleteSemantic.SOFT); - } - - /** - * Update the process status - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param processGUID the GUID of the process - * @param instanceStatus the {@link org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus} - * @param externalSourceName the name of the external source - * @return void response - */ - public VoidResponse updateProcessStatus(String userId, String serverName, String processGUID, InstanceStatus instanceStatus, - String externalSourceName) { - final String methodName = "updateProcessStatus"; - - log.trace(DEBUG_MESSAGE_METHOD_DETAILS, methodName, processGUID); - - VoidResponse response = new VoidResponse(); - try { - DataEngineProcessHandler processHandler = instanceHandler.getProcessHandler(userId, serverName, methodName); - - processHandler.updateProcessStatus(userId, processGUID, instanceStatus, externalSourceName); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - log.trace(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); - - return response; - } - - /** - * Create the process with ports, schema types and data flows - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param process properties of the process - * @param externalSourceName the name of the external source - * @return the unique identifier (guid) of the created process - */ - public GUIDResponse upsertProcess(String userId, String serverName, Process process, String externalSourceName) { - final String methodName = "upsertProcess"; - - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, process); - - String qualifiedName = process.getQualifiedName(); - List portImplementations = process.getPortImplementations(); - UpdateSemantic updateSemantic = process.getUpdateSemantic(); - - GUIDResponse response = new GUIDResponse(); - - try { - DataEngineProcessHandler processHandler = instanceHandler.getProcessHandler(userId, serverName, methodName); - - Optional processEntity = processHandler.findProcessEntity(userId, qualifiedName); - String processGUID; - if (processEntity.isEmpty()) { - processGUID = processHandler.createProcess(userId, process, externalSourceName); - } else { - processGUID = processEntity.get().getGUID(); - processHandler.updateProcess(userId, processEntity.get(), process, externalSourceName); - processHandler.updateProcessStatus(userId, processGUID, InstanceStatus.DRAFT, externalSourceName); - - if (updateSemantic == UpdateSemantic.REPLACE) { - deleteObsoletePorts(userId, serverName, portImplementations, processGUID, response, - externalSourceName); - } - } - - String collectionGUID = createCollection(userId, serverName, process.getCollection(), externalSourceName); - if (collectionGUID != null) { - addProcessCollectionRelationship(userId, serverName, processGUID, collectionGUID, externalSourceName); - } - - upsertPortImplementations(userId, serverName, portImplementations, processGUID, response, externalSourceName); - - if (response.getRelatedHTTPCode() == HttpStatus.OK.value()) { - processHandler.updateProcessStatus(userId, processGUID, InstanceStatus.ACTIVE, externalSourceName); - addProcessHierarchyRelationships(userId, serverName, process, processGUID, response, externalSourceName); - } - - log.info(PROCESS_UPSERT, qualifiedName, processGUID); - response.setGUID(processGUID); - } catch (Exception error) { - log.error(EXCEPTION_WHILE_CREATING_PROCESS, qualifiedName, error.toString()); - restExceptionHandler.captureExceptions(response, error, methodName); - } - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); - - return response; - } - - private String createCollection(String userId, String serverName, Collection collection, String externalSourceName) throws - UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - final String methodName = "createCollection"; - DataEngineCollectionHandler dataEngineCollectionHandler = instanceHandler.getCollectionHandler(userId, serverName, methodName); - - if (collection == null) { - return null; - } - - String collectionGUID; - String collectionQualifiedName = collection.getQualifiedName(); - Optional collectionEntity = dataEngineCollectionHandler.findCollectionEntity(userId, collectionQualifiedName); - if (collectionEntity.isEmpty()) { - collectionGUID = dataEngineCollectionHandler.createCollection(userId, collection, externalSourceName); - } else { - collectionGUID = collectionEntity.get().getGUID(); - } - return collectionGUID; - } - - private void addProcessHierarchyRelationships(String userId, String serverName, Process process, String processGUID, GUIDResponse response, - String externalSourceName) { - final String methodName = "addProcessHierarchyRelationships"; - - List parentProcesses = process.getParentProcesses(); - if (CollectionUtils.isNotEmpty(parentProcesses)) { - try { - DataEngineProcessHandler processHandler = instanceHandler.getProcessHandler(userId, serverName, methodName); - for (ParentProcess parentProcess : parentProcesses) { - processHandler.upsertProcessHierarchyRelationship(userId, parentProcess, processGUID, externalSourceName); - } - } catch (Exception error) { - log.error(EXCEPTION_WHILE_CREATING_PROCESS_HIERARCHY, process.getQualifiedName(), error.toString()); - restExceptionHandler.captureExceptions(response, error, methodName); - } - } - } - - private void addProcessCollectionRelationship(String userId, String serverName, String processGUID, String collectionGUID, - String externalSourceName) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - - final String methodName = "addProcessCollectionRelationship"; - - DataEngineCollectionHandler dataEngineCollectionHandler = instanceHandler.getCollectionHandler(userId, serverName, methodName); - - dataEngineCollectionHandler.addCollectionMembershipRelationship(userId, collectionGUID, processGUID, externalSourceName); - } - - private void deleteObsoletePorts(String userId, String serverName, List ports, String processGUID, - GUIDResponse response, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "deleteObsoletePorts"; - if (CollectionUtils.isEmpty(ports)) { - return; - } - - DataEngineProcessHandler processHandler = instanceHandler.getProcessHandler(userId, serverName, methodName); - DataEnginePortHandler dataEnginePortHandler = instanceHandler.getPortHandler(userId, serverName, methodName); - - Set existingPorts = processHandler.getPortsForProcess(userId, processGUID, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - Set portQualifiedNames = existingPorts.stream() - .map(entityDetail -> entityDetail.getProperties().getPropertyValue(OpenMetadataProperty.QUALIFIED_NAME.name).valueAsString()) - .collect(Collectors.toSet()); - Set newPortQualifiedNames = ports.stream().map(Referenceable::getQualifiedName).collect(Collectors.toSet()); - - // delete ports that are not in the process payload anymore - List obsoletePortQualifiedNames = - portQualifiedNames.stream().collect(partitioningBy(newPortQualifiedNames::contains)).get(Boolean.FALSE); - obsoletePortQualifiedNames.forEach(portQualifiedName -> { - try { - Optional portGUID = getEntityGUID(serverName, userId, portQualifiedName, OpenMetadataType.PORT_TYPE_NAME); - if (portGUID.isPresent()) { - dataEnginePortHandler.removePort(userId, portGUID.get(), externalSourceName, DeleteSemantic.SOFT); - } - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - }); - } - - - private void upsertPortImplementations(String userId, String serverName, List portImplementations, String processGUID, - GUIDResponse response, String externalSourceName) { - final String methodName = "upsertPortImplementations"; - if (CollectionUtils.isEmpty(portImplementations)) { - return; - } - - Map schemaTypeMap = new HashMap<>(); - // first create port implementations sequentially - try { - for (PortImplementation portImplementation : portImplementations) { - if (portImplementation == null) { - continue; - } - String portGUID = upsertPortImplementation(userId, serverName, portImplementation, processGUID, externalSourceName); - schemaTypeMap.put(portGUID, portImplementation.getSchemaType()); - } - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - - // then create the schema types with attributes in parallel - schemaTypeMap.keySet().parallelStream().forEach(portGUID -> - { - try { - upsertSchemaType(userId, serverName, portGUID, schemaTypeMap.get(portGUID), externalSourceName); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - }); - } - - private void validateDatabaseRequestBody(String userId, String serverName, DatabaseRequestBody databaseRequestBody, String methodName) throws - InvalidParameterException { - validateRequestBody(userId, serverName, databaseRequestBody, methodName); - - if (databaseRequestBody.getDatabase() == null) { - restExceptionHandler.handleMissingValue(DATABASE_PARAMETER_NAME, methodName); - } - } - - private void validateDatabaseSchemaRequestBody(String userId, String serverName, DatabaseSchemaRequestBody databaseSchemaRequestBody, - String methodName) throws InvalidParameterException { - validateRequestBody(userId, serverName, databaseSchemaRequestBody, methodName); - - if (databaseSchemaRequestBody.getDatabaseSchema() == null) { - restExceptionHandler.handleMissingValue(DATABASE_SCHEMA_PARAMETER_NAME, methodName); - } - } - - private void validateRelationalTableRequestBody(String userId, String serverName, RelationalTableRequestBody relationalTableRequestBody, - String methodName) throws InvalidParameterException { - validateRequestBody(userId, serverName, relationalTableRequestBody, methodName); - - if (relationalTableRequestBody.getRelationalTable() == null) { - restExceptionHandler.handleMissingValue(RELATIONAL_TABLE_PARAMETER_NAME, methodName); - } - - } - - private void validateRequestBody(String userId, String serverName, DataEngineOMASAPIRequestBody requestBody, String methodName) - throws InvalidParameterException { - if (requestBody == null) { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); - } - if (StringUtils.isEmpty(requestBody.getExternalSourceName())) { - restExceptionHandler.handleMissingValue(EXTERNAL_SOURCE_NAME_PARAMETER_NAME, methodName); - } - } - - private SchemaType getDefaultSchemaTypeIfAbsentAndAddAttributes(DataFile file, SchemaType schemaType, List attributes) { - if (schemaType == null) { - schemaType = new SchemaType(); - schemaType.setQualifiedName(file.getQualifiedName() + SCHEMA_SUFFIX); - schemaType.setDisplayName(SCHEMA); - } - schemaType.setAttributeList(attributes); - return schemaType; - } - - private HashMap getExtendedProperties(DataFile file) { - HashMap extendedProperties = new HashMap<>(); - - if (file instanceof CSVFile) { - CSVFile csvFile = (CSVFile) file; - extendedProperties.put(OpenMetadataProperty.FILE_TYPE.name, csvFile.getFileType()); - extendedProperties.put(OpenMetadataType.DELIMITER_CHARACTER_PROPERTY_NAME, csvFile.getDelimiterCharacter()); - extendedProperties.put(OpenMetadataType.QUOTE_CHARACTER_PROPERTY_NAME, csvFile.getQuoteCharacter()); - } else { - extendedProperties.put(OpenMetadataProperty.FILE_TYPE.name, file.getFileType()); - } - return extendedProperties; - } - - private void throwEntityNotDeletedException(String userId, String serverName, String methodName, String qualifiedName) throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException, - EntityNotDeletedException { - DataEngineCommonHandler dataEngineCommonHandler = instanceHandler.getCommonHandler(userId, serverName, methodName); - dataEngineCommonHandler.throwEntityNotDeletedException(DataEngineErrorCode.ENTITY_NOT_DELETED, methodName, qualifiedName); - } - - /** - * Performs a find for a DataEngine related object - * - * @param userId user id - * @param serverName server name - * @param findRequestBody contains find criteria - * @return a list of GUIDs - */ - public GUIDListResponse find(String userId, String serverName, FindRequestBody findRequestBody) { - - String methodName = "find"; - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, findRequestBody); - - GUIDListResponse findResponse = new GUIDListResponse(); - try { - DataEngineFindHandler findHandler = instanceHandler.getFindHandler(userId, serverName, methodName); - findResponse = findHandler.find(findRequestBody, userId, methodName); - } catch (Exception e) { - restExceptionHandler.captureExceptions(findResponse, e, methodName); - } - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, findResponse); - return findResponse; - } - - /** - * Create or update the Topic with corresponding event types and relationship - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param topicRequestBody properties of the topic - * @return the unique identifier (guid) of the created topic - */ - public GUIDResponse upsertTopic(String userId, String serverName, TopicRequestBody topicRequestBody) { - final String methodName = "upsertTopic"; - - GUIDResponse response = new GUIDResponse(); - try { - if (!isTopicRequestBodyValid(userId, serverName, topicRequestBody, methodName)) return response; - - String topicGUID = upsertTopic(userId, serverName, topicRequestBody.getTopic(), topicRequestBody.getExternalSourceName()); - response.setGUID(topicGUID); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Create or update the Topic with corresponding event types and relationship - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param topic the topic values - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created topic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertTopic(String userId, String serverName, Topic topic, String externalSourceName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertTopic"; - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, topic); - - DataEngineTopicHandler dataEngineTopicHandler = instanceHandler.getTopicHandler(userId, serverName, methodName); - String topicGUID = dataEngineTopicHandler.upsertTopic(userId, topic, externalSourceName); - - upsertEventTypes(userId, serverName, topic.getEventTypes(), topicGUID, externalSourceName); - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, topicGUID); - return topicGUID; - } - - /** - * /** - * Create or update a list of EventTypes with corresponding event schema attributes - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param eventTypes the event type list - * @param topicGUID the unique identifier of the topic - * @param externalSourceName the unique name of the external source - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - private void upsertEventTypes(String userId, String serverName, List eventTypes, String topicGUID, String externalSourceName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (CollectionUtils.isEmpty(eventTypes)) { - return; - } - for (EventType eventType : eventTypes) { - upsertEventType(userId, serverName, eventType, topicGUID, externalSourceName); - } - } - - /** - * Delete the Topic with all the associated event types - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the topic - * @return void response - */ - public VoidResponse deleteTopic(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteTopic"; - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteTopic(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Delete the Topic with all the associated event types - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the topic - * @param qualifiedName the qualified name of the topic - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteTopic(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - EntityNotDeletedException, FunctionNotSupportedException { - final String methodName = "deleteTopic"; - - DataEngineTopicHandler dataEngineTopicHandler = instanceHandler.getTopicHandler(userId, serverName, methodName); - - String topicGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.TOPIC.typeName, methodName); - dataEngineTopicHandler.removeTopic(userId, topicGUID, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, topicGUID, OpenMetadataType.TOPIC.typeName); - } - - /** - * Create or update the EventType with corresponding associated event schema attributes - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param eventTypeRequestBody properties of the event type - * @return the unique identifier (guid) of the created event type - */ - public GUIDResponse upsertEventType(String userId, String serverName, EventTypeRequestBody eventTypeRequestBody) { - final String methodName = "upsertEventType"; - - GUIDResponse response = new GUIDResponse(); - try { - if (!isEventTypeRequestBodyValid(userId, serverName, eventTypeRequestBody, methodName)) return response; - - String topicGUID = getTopicGUID(userId, serverName, eventTypeRequestBody.getTopicQualifiedName(), methodName); - - String eventTypeGUID = upsertEventType(userId, serverName, eventTypeRequestBody.getEventType(), - topicGUID, eventTypeRequestBody.getExternalSourceName()); - response.setGUID(eventTypeGUID); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Get the unique identifier of a topic - * - * @param serverName name of the service to route the request to - * @param userId identifier of calling user - * @param topicQualifiedName qualified name of the topic - * @param methodName the name of the calling method - * @return the unique identifier of the entity - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String getTopicGUID(String userId, String serverName, String topicQualifiedName, String methodName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - DataEngineTopicHandler dataEngineTopicHandler = instanceHandler.getTopicHandler(userId, serverName, methodName); - DataEngineCommonHandler dataEngineCommonHandler = instanceHandler.getCommonHandler(userId, serverName, methodName); - Optional topicEntity = dataEngineTopicHandler.findTopicEntity(userId, topicQualifiedName); - if (topicEntity.isEmpty()) { - dataEngineCommonHandler.throwInvalidParameterException(DataEngineErrorCode.TOPIC_NOT_FOUND, methodName, topicQualifiedName); - } - return topicEntity.get().getGUID(); - } - - /** - * Create or update the EventType with corresponding event schema attributes - * - * @param userId the name of the calling user - * @param serverName name of server instance to call - * @param eventType the event type values - * @param topicGUID the unique identifier of the topic - * @param externalSourceName the unique name of the external source - * @return the unique identifier (guid) of the created event type - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - public String upsertEventType(String userId, String serverName, EventType eventType, String topicGUID, String externalSourceName) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertEventType"; - log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, eventType); - - DataEngineEventTypeHandler dataEngineEventTypeHandler = instanceHandler.getEventTypeHandler(userId, serverName, methodName); - String eventTypeGUID = dataEngineEventTypeHandler.upsertEventType(userId, eventType, topicGUID, externalSourceName); - - log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, eventTypeGUID); - return eventTypeGUID; - } - - /** - * Delete the EventType with all the associated event schema attributes - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the event type - * @return void response - */ - public VoidResponse deleteEventType(String userId, String serverName, DeleteRequestBody requestBody) { - final String methodName = "deleteEventType"; - VoidResponse response = new VoidResponse(); - - try { - validateRequestBody(userId, serverName, requestBody, methodName); - - deleteEventType(userId, serverName, requestBody.getExternalSourceName(), requestBody.getGuid(), requestBody.getQualifiedName(), - requestBody.getDeleteSemantic()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Delete the EventType with all the associated event schema attributes - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param externalSourceName the unique name of the external source - * @param guid the unique identifier of the event type - * @param qualifiedName the qualified name of the event type - * @param deleteSemantic the delete semantic - * @throws InvalidParameterException the bean properties are invalid - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - * @throws FunctionNotSupportedException the repository does not support this call. - * @throws EntityNotDeletedException the entity could not be deleted - */ - public void deleteEventType(String userId, String serverName, String externalSourceName, String guid, String qualifiedName, - DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException, EntityNotDeletedException, - FunctionNotSupportedException { - - final String methodName = "deleteEventType"; - - DataEngineEventTypeHandler dataEngineEventTypeHandler = instanceHandler.getEventTypeHandler(userId, serverName, methodName); - - String eventTypeGUID = getEntityGUID(userId, serverName, guid, qualifiedName, OpenMetadataType.EVENT_TYPE_TYPE_NAME, methodName); - dataEngineEventTypeHandler.removeEventType(userId, eventTypeGUID, qualifiedName, externalSourceName, deleteSemantic); - log.debug(DEBUG_DELETE_MESSAGE, eventTypeGUID, OpenMetadataType.TOPIC.typeName); - } - - /** - * Create or update the ProcessingState with provided map of critical elements and sync states - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param processingStateRequestBody map of critical elements and sync states - * @return void response - */ - public VoidResponse upsertProcessingState(String userId, String serverName, ProcessingStateRequestBody processingStateRequestBody) { - final String methodName = "upsertProcessingState"; - - VoidResponse response = new VoidResponse(); - try { - validateRequestBody(userId, serverName, processingStateRequestBody, methodName); - - ProcessingState processingState = processingStateRequestBody.getProcessingState(); - if (processingState == null) { - restExceptionHandler.handleMissingValue(PROCESSING_STATE, methodName); - return response; - } - return upsertProcessingState(userId, serverName, processingState, processingStateRequestBody.getExternalSourceName()); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - public PropertiesResponse getProcessingState(String userId, String serverName, String externalSourceName) { - final String methodName = "getProcessingState"; - - PropertiesResponse response = new PropertiesResponse(); - try { - DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - ProcessingState processingState = handler.getProcessingStateClassification(userId, externalSourceName); - Map properties = new HashMap<>(processingState.getSyncDatesByKey()); - response.setProperties(properties); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - /** - * Create or update the ProcessingState with provided map of critical elements and sync states - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param processingState map of critical elements and sync states - * @param externalSourceName the unique name of the external source - * @return void response - */ - public VoidResponse upsertProcessingState(String userId, String serverName, ProcessingState processingState, String externalSourceName) { - final String methodName = "upsertProcessingState"; - - VoidResponse response = new VoidResponse(); - try { - DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); - handler.upsertProcessingStateClassification(userId, processingState, externalSourceName); - } catch (Exception error) { - restExceptionHandler.captureExceptions(response, error, methodName); - } - return response; - } - - private boolean isTopicRequestBodyValid(String userId, String serverName, TopicRequestBody topicRequestBody, String methodName) throws - InvalidParameterException { - validateRequestBody(userId, serverName, topicRequestBody, methodName); - - if (topicRequestBody.getTopic() == null) { - restExceptionHandler.handleMissingValue(TOPIC_PARAMETER_NAME, methodName); - return false; - } - return true; - } - - private boolean isEventTypeRequestBodyValid(String userId, String serverName, EventTypeRequestBody eventTypeRequestBody, String methodName) throws - InvalidParameterException { - validateRequestBody(userId, serverName, eventTypeRequestBody, methodName); - - if (eventTypeRequestBody.getTopicQualifiedName() == null) { - restExceptionHandler.handleMissingValue(TOPIC_QUALIFIED_NAME_PARAMETER_NAME, methodName); - return false; - } - if (eventTypeRequestBody.getEventType() == null) { - restExceptionHandler.handleMissingValue(EVENT_TYPE_PARAMETER_NAME, methodName); - return false; - } - return true; - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/package-info.java deleted file mode 100644 index d50e9c2c525..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/service/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * Provides the server side support for the REST API - */ -package org.odpi.openmetadata.accessservices.dataengine.server.service; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCollectionHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCollectionHandlerTest.java deleted file mode 100644 index 8d2635c110a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCollectionHandlerTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.Spy; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.Collection; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.CollectionBuilder; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.metadatasecurity.properties.Asset; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import java.lang.reflect.InvocationTargetException; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.odpi.openmetadata.accessservices.dataengine.server.util.MockedExceptionUtil.mockException; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineCollectionHandlerTest { - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String GUID = "guid"; - private static final String PROCESS_GUID = "processGuid"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private AssetHandler assetHandler; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Spy - @InjectMocks - private DataEngineCollectionHandler dataEngineCollectionHandler; - - @Test - void createCollectionTest() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "createCollection"; - - Collection collection = getCollection(); - CollectionBuilder mockedBuilder = Mockito.mock(CollectionBuilder.class); - - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(EXTERNAL_SOURCE_DE_GUID); - - when(assetHandler.createBeanInRepository(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, OpenMetadataType.COLLECTION.typeGUID, - OpenMetadataType.COLLECTION.typeName, mockedBuilder, null, methodName)).thenReturn(GUID); - - doReturn(mockedBuilder).when(dataEngineCollectionHandler).getCollectionBuilder(collection); - - String result = dataEngineCollectionHandler.createCollection(USER, collection, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - assertEquals(GUID, result); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } - - @Test - void createProcessUserNotAuthorizedExceptionTest() throws UserNotAuthorizedException, PropertyServerException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, InvalidParameterException, InvocationTargetException { - String methodName = "createCollection"; - - Collection collection = getCollection(); - CollectionBuilder mockedBuilder = Mockito.mock(CollectionBuilder.class); - - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(EXTERNAL_SOURCE_DE_GUID); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(assetHandler).createBeanInRepository(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - OpenMetadataType.COLLECTION.typeGUID, OpenMetadataType.COLLECTION.typeName, mockedBuilder, null, methodName); - - doReturn(mockedBuilder).when(dataEngineCollectionHandler).getCollectionBuilder(collection); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEngineCollectionHandler.createCollection(USER, collection, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void findProcessTest() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(GUID); - Optional optionalOfMockedEntity = Optional.of(entityDetail); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.COLLECTION.typeName)).thenReturn(optionalOfMockedEntity); - - Optional result = dataEngineCollectionHandler.findCollectionEntity(USER, QUALIFIED_NAME); - - assertTrue(result.isPresent()); - assertEquals(GUID, result.get().getGUID()); - } - - @Test - void findProcessNotExistingTest() throws UserNotAuthorizedException, PropertyServerException, - InvalidParameterException { - - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.COLLECTION.typeName)).thenReturn(Optional.empty()); - - Optional result = dataEngineCollectionHandler.findCollectionEntity(USER, QUALIFIED_NAME); - - assertFalse(result.isPresent()); - } - - @Test - void addProcessCollectionRelationshipTest() throws UserNotAuthorizedException, PropertyServerException, - InvalidParameterException { - dataEngineCollectionHandler.addCollectionMembershipRelationship(USER, PROCESS_GUID, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, PROCESS_GUID, GUID, - OpenMetadataType.COLLECTION_MEMBERSHIP_RELATIONSHIP.typeName, - OpenMetadataType.COLLECTION.typeName, - OpenMetadataType.PROCESS.typeName, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - null); - } - - - private Collection getCollection() { - Collection collection = new Collection(); - collection.setQualifiedName(QUALIFIED_NAME); - collection.setName(NAME); - return collection; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandlerTest.java deleted file mode 100644 index 07c0fa4e208..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandlerTest.java +++ /dev/null @@ -1,364 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.accessservices.dataengine.server.service.ClockService; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -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.instances.RelationshipDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.lang.reflect.InvocationTargetException; -import java.util.Collections; -import java.util.Optional; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyBoolean; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.odpi.openmetadata.accessservices.dataengine.server.util.MockedExceptionUtil.mockException; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineCommonHandlerTest { - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String USER = "user"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceGUID"; - private static final String GUID = "entityGuid"; - private static final String ENTITY_TYPE_NAME = "entityTypeName"; - private static final String ENTITY_TYPE_GUID = "entityTypeGUID"; - private static final String FIRST_GUID = "firstGUID"; - private static final String SECOND_GUID = "secondGUID"; - private static final String RELATIONSHIP_TYPE_NAME = "relationshipTypeName"; - private static final String RELATIONSHIP_TYPE_GUID = "relationshipTypeGUID"; - private static final String RELATIONSHIP_GUID = "relationshipGUID"; - - @Mock - private OpenMetadataAPIGenericHandler genericHandler; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private ClockService clockService; - - @InjectMocks - private DataEngineCommonHandler dataEngineCommonHandler; - - @BeforeEach - void before() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - mockTypeDef(ENTITY_TYPE_NAME, ENTITY_TYPE_GUID); - } - - @Test - void findEntity() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "findEntity"; - when(repositoryHelper.getExactMatchRegex(QUALIFIED_NAME)).thenReturn(QUALIFIED_NAME); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(genericHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - ENTITY_TYPE_GUID, ENTITY_TYPE_NAME, Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), - false, false, null, methodName)).thenReturn(mockedEntity); - - Optional result = dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, ENTITY_TYPE_NAME); - - assertTrue(result.isPresent()); - assertEquals(GUID, result.get().getGUID()); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, methodName); - } - - @Test - void findEntity_throwsUserNotAuthorizedException() throws PropertyServerException, UserNotAuthorizedException, - InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvalidParameterException { - String methodName = "findEntity"; - when(repositoryHelper.getExactMatchRegex(QUALIFIED_NAME)).thenReturn(QUALIFIED_NAME); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(genericHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - ENTITY_TYPE_GUID, ENTITY_TYPE_NAME, Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), - false, false, null, methodName)).thenThrow(mockedException); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> dataEngineCommonHandler.findEntity(USER, - QUALIFIED_NAME, ENTITY_TYPE_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void upsertExternalRelationship() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "upsertExternalRelationship"; - - mockTypeDef(RELATIONSHIP_TYPE_NAME, RELATIONSHIP_TYPE_GUID); - - dataEngineCommonHandler.upsertExternalRelationship(USER, FIRST_GUID, SECOND_GUID, RELATIONSHIP_TYPE_NAME, ENTITY_TYPE_NAME, - ENTITY_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(genericHandler, times(1)).uncheckedLinkElementToElement(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, FIRST_GUID, - CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_NAME, SECOND_GUID, CommonMapper.GUID_PROPERTY_NAME, - ENTITY_TYPE_NAME, false, false, null, - RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE_NAME, null, null, methodName); - } - - @Test - void upsertExternalRelationship_existingRelationship() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - final String methodName = "upsertExternalRelationship"; - - mockTypeDef(RELATIONSHIP_TYPE_NAME, RELATIONSHIP_TYPE_GUID); - Relationship mockedRelationship = mock(Relationship.class); - EntityProxy firstEntityProxy = mockEntityProxy(FIRST_GUID); - EntityProxy secondEntityProxy = mockEntityProxy(SECOND_GUID); - InstanceType relationshipType = mock(InstanceType.class); - when(mockedRelationship.getEntityOneProxy()).thenReturn(firstEntityProxy); - when(mockedRelationship.getEntityTwoProxy()).thenReturn(secondEntityProxy); - when(mockedRelationship.getGUID()).thenReturn(RELATIONSHIP_GUID); - when(mockedRelationship.getType()).thenReturn(relationshipType); - when(relationshipType.getTypeDefName()).thenReturn(RELATIONSHIP_TYPE_NAME); - - when(genericHandler.getUniqueAttachmentLink(USER, FIRST_GUID, CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_NAME, - RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE_NAME, SECOND_GUID, ENTITY_TYPE_NAME, 0, false, false, null, - "findRelationship")).thenReturn(mockedRelationship); - - RelationshipDifferences mockedDifferences = mock(RelationshipDifferences.class); - when(mockedDifferences.hasInstancePropertiesDifferences()).thenReturn(true); - - when(repositoryHelper.getRelationshipDifferences(any(), any(), anyBoolean())).thenReturn(mockedDifferences); - - dataEngineCommonHandler.upsertExternalRelationship(USER, FIRST_GUID, SECOND_GUID, RELATIONSHIP_TYPE_NAME, ENTITY_TYPE_NAME, - ENTITY_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(genericHandler, times(0)).linkElementToElement(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, FIRST_GUID, - CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_NAME, SECOND_GUID, CommonMapper.GUID_PROPERTY_NAME, - ENTITY_TYPE_NAME, false, false, null, - RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE_NAME, null, null, null, null, methodName); - - verify(genericHandler, times(1)).updateRelationshipProperties(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, RELATIONSHIP_GUID, OpenMetadataProperty.GUID.name, RELATIONSHIP_TYPE_NAME, - true, null, false, false, null, methodName); - } - - @Test - void removeEntity() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "removeEntity"; - - dataEngineCommonHandler.removeEntity(USER, GUID, ENTITY_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID, CommonMapper.GUID_PROPERTY_NAME, - methodName); - verify(genericHandler, times(1)).deleteBeanInRepository(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, GUID, OpenMetadataProperty.GUID.name, ENTITY_TYPE_GUID, ENTITY_TYPE_NAME, - null, null, false, false, null,methodName); - } - - @Test - void removeEntity_throwsUserNotAuthorizedException() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - InvocationTargetException, NoSuchMethodException, InstantiationException, - IllegalAccessException { - String methodName = "removeEntity"; - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(genericHandler).deleteBeanInRepository(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, GUID, OpenMetadataProperty.GUID.name, ENTITY_TYPE_GUID, ENTITY_TYPE_NAME, - null, null, false, false, null, methodName); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> dataEngineCommonHandler.removeEntity(USER, GUID, - ENTITY_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - - @Test - void findRelationship() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockTypeDef(RELATIONSHIP_TYPE_NAME, RELATIONSHIP_TYPE_GUID); - Relationship mockedRelationship = mock(Relationship.class); - EntityProxy firstEntityProxy = mockEntityProxy(FIRST_GUID); - EntityProxy secondEntityProxy = mockEntityProxy(SECOND_GUID); - when(mockedRelationship.getEntityOneProxy()).thenReturn(firstEntityProxy); - when(mockedRelationship.getEntityTwoProxy()).thenReturn(secondEntityProxy); - - String methodName = "findRelationship"; - when(genericHandler.getUniqueAttachmentLink(USER, FIRST_GUID, CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_NAME, - RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE_NAME, SECOND_GUID, ENTITY_TYPE_NAME, 0, - false, false, null, methodName)) - .thenReturn(mockedRelationship); - - Optional result = dataEngineCommonHandler.findRelationship(USER, FIRST_GUID, SECOND_GUID, - ENTITY_TYPE_NAME, ENTITY_TYPE_NAME, RELATIONSHIP_TYPE_NAME); - - assertTrue(result.isPresent()); - assertEquals(mockedRelationship, result.get()); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(FIRST_GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - verify(invalidParameterHandler, times(1)).validateName(SECOND_GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - } - - @Test - void getEntityDetails() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "getEntityDetails"; - EntityDetail mockedEntity = mock(EntityDetail.class); - - when(genericHandler.getEntityFromRepository(USER, GUID, CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_NAME, - null, null, false, false, - null, null, methodName)).thenReturn(mockedEntity); - - Optional result = dataEngineCommonHandler.getEntityDetails(USER, GUID, ENTITY_TYPE_NAME); - assertTrue(result.isPresent()); - assertEquals(mockedEntity, result.get()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - } - - @Test - void getEntityDetails_noEntity() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "getEntityDetails"; - when(genericHandler.getEntityByValue(USER, GUID, CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_GUID, ENTITY_TYPE_NAME, - Collections.singletonList(CommonMapper.GUID_PROPERTY_NAME), false, false, - null, methodName)).thenReturn(null); - - Optional result = dataEngineCommonHandler.getEntityDetails(USER, GUID, ENTITY_TYPE_NAME); - assertFalse(result.isPresent()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - } - @Test - void getEntitiesForRelationship() throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException { - final String methodName = "getEntitiesForRelationship"; - mockTypeDef(RELATIONSHIP_TYPE_NAME, RELATIONSHIP_TYPE_GUID); - EntityDetail mockedEntity = mock(EntityDetail.class); - when(genericHandler.getAttachedEntities(USER, GUID, CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_NAME, - RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE_NAME, ENTITY_TYPE_NAME, null, null, 0, - false, false, 0, - invalidParameterHandler.getMaxPagingSize(), null, methodName)).thenReturn(Collections.singletonList(mockedEntity)); - - Set result = dataEngineCommonHandler.getEntitiesForRelationship(USER, GUID, RELATIONSHIP_TYPE_NAME, - ENTITY_TYPE_NAME, ENTITY_TYPE_NAME); - - assertEquals(1, result.size()); - assertTrue(result.contains(mockedEntity)); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - } - - @Test - void getEntitiesForRelationship_noEntities() throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException { - final String methodName = "getEntitiesForRelationship"; - mockTypeDef(RELATIONSHIP_TYPE_NAME, RELATIONSHIP_TYPE_GUID); - - when(genericHandler.getAttachedEntities(USER, GUID, CommonMapper.GUID_PROPERTY_NAME, ENTITY_TYPE_NAME, - RELATIONSHIP_TYPE_GUID, RELATIONSHIP_TYPE_NAME, ENTITY_TYPE_NAME, null, null, 0, false, false,0, - invalidParameterHandler.getMaxPagingSize(), null, methodName)).thenReturn(null); - - Set result = dataEngineCommonHandler.getEntitiesForRelationship(USER, GUID, RELATIONSHIP_TYPE_NAME, - ENTITY_TYPE_NAME, ENTITY_TYPE_NAME); - assertTrue(result.isEmpty()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - } - - @Test - void getEntityForRelationship() throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException { - final String methodName = "getEntityForRelationship"; - mockTypeDef(RELATIONSHIP_TYPE_NAME, RELATIONSHIP_TYPE_GUID); - EntityDetail mockedEntity = mock(EntityDetail.class); - when(genericHandler.getAttachedEntity(USER, GUID, OpenMetadataProperty.GUID.name, ENTITY_TYPE_NAME, RELATIONSHIP_TYPE_GUID, - RELATIONSHIP_TYPE_NAME, null, false, false, null, - methodName)).thenReturn(mockedEntity); - - Optional result = dataEngineCommonHandler.getEntityForRelationship(USER, GUID, RELATIONSHIP_TYPE_NAME, - ENTITY_TYPE_NAME); - assertTrue(result.isPresent()); - assertEquals(mockedEntity, result.get()); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - } - - @Test - void getEntityForRelationship_noEntity() throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException { - final String methodName = "getEntityForRelationship"; - mockTypeDef(RELATIONSHIP_TYPE_NAME, RELATIONSHIP_TYPE_GUID); - - when(genericHandler.getAttachedEntity(USER, GUID, OpenMetadataProperty.GUID.name, ENTITY_TYPE_NAME, RELATIONSHIP_TYPE_GUID, - RELATIONSHIP_TYPE_NAME, ENTITY_TYPE_NAME, false, false, null, - methodName)).thenReturn(null); - - Optional result = dataEngineCommonHandler.getEntityForRelationship(USER, GUID, RELATIONSHIP_TYPE_NAME, - ENTITY_TYPE_NAME); - assertFalse(result.isPresent()); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID, CommonMapper.GUID_PROPERTY_NAME, methodName); - } - - @Test - void validateDeleteSemantic_Hard() { - assertThrows(FunctionNotSupportedException.class, () -> - dataEngineCommonHandler.validateDeleteSemantic(DeleteSemantic.HARD, "test")); - } - - @Test - void validateDeleteSemantic_Memento() { - assertThrows(FunctionNotSupportedException.class, () -> - dataEngineCommonHandler.validateDeleteSemantic(DeleteSemantic.MEMENTO, "test")); - } - - private void mockTypeDef(String typeName, String typeGUID) { - TypeDef entityTypeDef = mock(TypeDef.class); - when(repositoryHelper.getTypeDefByName(USER, typeName)).thenReturn(entityTypeDef); - - when(entityTypeDef.getName()).thenReturn(typeName); - when(entityTypeDef.getGUID()).thenReturn(typeGUID); - } - - private EntityProxy mockEntityProxy(String guid) { - EntityProxy entityProxy = mock(EntityProxy.class); - when(entityProxy.getGUID()).thenReturn(guid); - - return entityProxy; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineConnectionAndEndpointHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineConnectionAndEndpointHandlerTest.java deleted file mode 100644 index b4b228eb2ec..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineConnectionAndEndpointHandlerTest.java +++ /dev/null @@ -1,270 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.Spy; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.Connection; -import org.odpi.openmetadata.accessservices.dataengine.model.ConnectorType; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Endpoint; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.EndpointBuilder; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.lang.reflect.Field; -import java.util.Collections; -import java.util.Optional; - -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineConnectionAndEndpointHandlerTest { - - private static final String USER = "user"; - private static final String ASSET_GUID = "assetGUID"; - private static final String CONNECTION_GUID = "connectionGUID"; - private static final String ENDPOINT_GUID = "endpointGUID"; - private static final String CONNECTOR_TYPE_GUID = "connectorTypeGUID"; - private static final String ASSET_QUALIFIED_NAME = "qualifiedName"; - private static final String EXTERNAL_SOURCE_GUID = "externalSourceGUID"; - private static final String EXTERNAL_SOURCE_NAME = "externalSourceName"; - private static final String PROTOCOL = "protocol"; - private static final String NETWORK_ADDRESS = "networkAddress"; - private static final int START_FROM = 0; - private static final int PAGE_SIZE = 10; - private static final String SEARCH_STRING_PARAMETER_NAME = "searchString"; - private static final String OCF = "Open Connector Framework (OCF)"; - private static final String COLON = ":"; - private static final String CONNECTION = " Connection"; - private static final String ENDPOINT = " Endpoint"; - private static final String CONNECTOR_TYPE = " ConnectorType"; - private static final String GET_PROPER_CONNECTOR_TYPE_METHOD_NAME = "getProperConnectorType"; - private static final String UPSERT_CONNECTION_AND_ENDPOINT_METHOD_NAME = "upsertConnectionAndEndpoint"; - private static final String UPDATE_ENDPOINT_METHOD_NAME = "updateEndpoint"; - private static final String CONNECTOR_PROVIDER_CLASS_NAME = "ConnectorType"; - private static final String ACCESS_INFORMATION = "Access information to connect to the actual asset: "; - private static final String CONNECTOR_TYPE_GUID_PARAMETER_NAME = "connectorTypeGUID"; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - @Mock - private InvalidParameterHandler invalidParameterHandler; - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - @Mock - private ConnectionHandler connectionHandler; - @Mock - private EndpointHandler endpointHandler; - @Mock - private ConnectorTypeHandler connectorTypeHandler; - - @Spy - @InjectMocks - private DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler; - - @Test - void insertConnectionAndEndpoint() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - EndpointBuilder mockedEndpointBuilder = mockEndpointBuilder(); - - mockDataEngineCommonHandler(true, mockedEndpointBuilder); - - dataEngineConnectionAndEndpointHandler.upsertConnectionAndEndpoint(ASSET_QUALIFIED_NAME, ASSET_GUID, OpenMetadataType.CSV_FILE.typeName, - PROTOCOL, NETWORK_ADDRESS, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER); - - verify(dataEngineCommonHandler, times(1)).findEntity(USER, ASSET_QUALIFIED_NAME, OpenMetadataType.CSV_FILE.typeName); - - verify(connectorTypeHandler, times(1)).findConnectorTypes(USER, OpenMetadataType.CSV_FILE.typeName, - SEARCH_STRING_PARAMETER_NAME, START_FROM, PAGE_SIZE, false, false, null, GET_PROPER_CONNECTOR_TYPE_METHOD_NAME); - - String connectionQualifiedName = getConnectionQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - verify(dataEngineCommonHandler, times(1)).findEntity(USER, connectionQualifiedName, OpenMetadataType.CONNECTION_TYPE_NAME); - - String connectorTypeQualifiedName = getConnectorTypeQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - verify(connectorTypeHandler, times(1)).getConnectorTypeForConnection(USER, EXTERNAL_SOURCE_GUID, - EXTERNAL_SOURCE_NAME, null, connectorTypeQualifiedName, connectorTypeQualifiedName, - null, OpenMetadataType.CSV_FILE.typeName, null, CONNECTOR_PROVIDER_CLASS_NAME, - OpenMetadataType.CONNECTOR_FRAMEWORK_NAME_DEFAULT, OpenMetadataType.CONNECTOR_INTERFACE_LANGUAGE_DEFAULT, - null, null, null, null, - null, null, null, null, - null, false, false, null, UPSERT_CONNECTION_AND_ENDPOINT_METHOD_NAME); - - String endpointQualifiedName = getEndpointQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - String description = ACCESS_INFORMATION + NETWORK_ADDRESS; - verify(endpointHandler, times(1)).createEndpoint(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, - null, endpointQualifiedName, endpointQualifiedName, description, NETWORK_ADDRESS, PROTOCOL, - null, null, null, null, null, null, null, UPSERT_CONNECTION_AND_ENDPOINT_METHOD_NAME); - - verify(connectionHandler, times(1)).createConnection(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, - ASSET_GUID, ASSET_GUID, null, connectionQualifiedName, connectionQualifiedName, null, null, - null, null, null, null, null, - OpenMetadataType.CONNECTION_TYPE_NAME, null, CONNECTOR_TYPE_GUID, CONNECTOR_TYPE_GUID_PARAMETER_NAME, ENDPOINT_GUID, - ENDPOINT_GUID, null, null, false, false, connectionHandler.getSupportedZones(), null, UPSERT_CONNECTION_AND_ENDPOINT_METHOD_NAME); - } - - @Test - void updateConnectionAndEndpoint() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - EndpointBuilder mockedEndpointBuilder = mockEndpointBuilder(); - - mockDataEngineCommonHandler(false, mockedEndpointBuilder); - - dataEngineConnectionAndEndpointHandler.upsertConnectionAndEndpoint(ASSET_QUALIFIED_NAME, ASSET_GUID, OpenMetadataType.CSV_FILE.typeName, - PROTOCOL, NETWORK_ADDRESS, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER); - - verify(dataEngineCommonHandler, times(1)).findEntity(USER, ASSET_QUALIFIED_NAME, OpenMetadataType.CSV_FILE.typeName); - - verify(connectorTypeHandler, times(1)).findConnectorTypes(USER, OpenMetadataType.CSV_FILE.typeName, - SEARCH_STRING_PARAMETER_NAME, START_FROM, PAGE_SIZE, false, false, null, GET_PROPER_CONNECTOR_TYPE_METHOD_NAME); - - String connectionQualifiedName = getConnectionQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - verify(dataEngineCommonHandler, times(1)).findEntity(USER, connectionQualifiedName, OpenMetadataType.CONNECTION_TYPE_NAME); - - String endpointQualifiedName = getEndpointQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - verify(dataEngineCommonHandler, times(1)).findEntity(USER, endpointQualifiedName, OpenMetadataType.ENDPOINT_TYPE_NAME); - - String description = ACCESS_INFORMATION + NETWORK_ADDRESS; - verify(endpointHandler, times(1)).updateEndpoint(USER, EXTERNAL_SOURCE_GUID, - EXTERNAL_SOURCE_NAME, ENDPOINT_GUID, ENDPOINT_GUID, endpointQualifiedName, endpointQualifiedName, - description, NETWORK_ADDRESS, PROTOCOL, null, null, null, - null, true, null, null, false, false, null, UPDATE_ENDPOINT_METHOD_NAME); - } - - /** - * Issue -> https://github.com/mockito/mockito/issues/1066 - * Unable to properly inject generics; connectionHandler mock is also used for endpointHandler even though a separate mock is defined - * Fix: set mocked objects as field values via reflection - */ - @BeforeEach - public void beforeEach() throws NoSuchFieldException, IllegalAccessException { - Field connectionHandlerField = DataEngineConnectionAndEndpointHandler.class.getDeclaredField("connectionHandler"); - boolean connectionHandlerIsAccessible = connectionHandlerField.isAccessible(); - connectionHandlerField.setAccessible(true); - connectionHandlerField.set(dataEngineConnectionAndEndpointHandler, connectionHandler); - connectionHandlerField.setAccessible(connectionHandlerIsAccessible); - - Field endpointHandlerField = DataEngineConnectionAndEndpointHandler.class.getDeclaredField("endpointHandler"); - boolean endpointHandlerIsAccessible = endpointHandlerField.isAccessible(); - endpointHandlerField.setAccessible(true); - endpointHandlerField.set(dataEngineConnectionAndEndpointHandler, endpointHandler); - endpointHandlerField.setAccessible(endpointHandlerIsAccessible); - } - - @Test - void removeConnection() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - String methodName = "removeConnection"; - dataEngineConnectionAndEndpointHandler.removeConnection(USER, CONNECTION_GUID, DeleteSemantic.SOFT, - EXTERNAL_SOURCE_NAME, EXTERNAL_SOURCE_GUID); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, methodName); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(CONNECTION_GUID, OpenMetadataProperty.GUID.name, methodName); - verify(connectionHandler, times(1)).removeConnection(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, - CONNECTION_GUID, CONNECTION_GUID, false, false, null, methodName); - } - - @Test - void removeEndpoint() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - String methodName = "removeEndpoint"; - dataEngineConnectionAndEndpointHandler.removeEndpoint(USER, ENDPOINT_GUID, DeleteSemantic.SOFT, EXTERNAL_SOURCE_NAME, EXTERNAL_SOURCE_GUID); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, methodName); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(ENDPOINT_GUID, OpenMetadataProperty.GUID.name, methodName); - verify(endpointHandler, times(1)).removeEndpoint(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, - ENDPOINT_GUID, ENDPOINT_GUID, false, false, null, methodName); - } - - private void mockDataEngineCommonHandler(boolean insert, EndpointBuilder endpointBuilder) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - EntityDetail asset = new EntityDetail(); - asset.setGUID(ASSET_GUID); - when(dataEngineCommonHandler.findEntity(USER, ASSET_QUALIFIED_NAME, OpenMetadataType.CSV_FILE.typeName)).thenReturn(Optional.of(asset)); - - ConnectorType connectorType = new ConnectorType(); - connectorType.setConnectorFrameworkName(OCF); - when(connectorTypeHandler.findConnectorTypes(USER, OpenMetadataType.CSV_FILE.typeName, SEARCH_STRING_PARAMETER_NAME, START_FROM, - PAGE_SIZE, false, false, null, GET_PROPER_CONNECTOR_TYPE_METHOD_NAME)).thenReturn(Collections.singletonList(connectorType)); - - String connectionQualifiedName = getConnectionQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - if(insert) { - when(dataEngineCommonHandler.findEntity(USER, connectionQualifiedName, OpenMetadataType.CONNECTION_TYPE_NAME)).thenReturn(Optional.empty()); - - String connectorTypeQualifiedName = getConnectorTypeQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - when(connectorTypeHandler.getConnectorTypeForConnection(USER, EXTERNAL_SOURCE_GUID, - EXTERNAL_SOURCE_NAME, null, connectorTypeQualifiedName, connectorTypeQualifiedName, - null, OpenMetadataType.CSV_FILE.typeName, null, CONNECTOR_PROVIDER_CLASS_NAME, - OpenMetadataType.CONNECTOR_FRAMEWORK_NAME_DEFAULT, OpenMetadataType.CONNECTOR_INTERFACE_LANGUAGE_DEFAULT, - null, null, null, null, - null, null, null, null, - null, false, false, null, UPSERT_CONNECTION_AND_ENDPOINT_METHOD_NAME)).thenReturn(CONNECTOR_TYPE_GUID); - - String endpointQualifiedName = getEndpointQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - String description = ACCESS_INFORMATION + NETWORK_ADDRESS; - when(endpointHandler.createEndpoint(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, null, - endpointQualifiedName, endpointQualifiedName, description, NETWORK_ADDRESS, PROTOCOL, - null, null, null, null, null, null, null, - UPSERT_CONNECTION_AND_ENDPOINT_METHOD_NAME)).thenReturn(ENDPOINT_GUID); - - return; - } - - Optional connection = Optional.of(new EntityDetail()); - when(dataEngineCommonHandler.findEntity(USER, connectionQualifiedName, OpenMetadataType.CONNECTION_TYPE_NAME)).thenReturn(connection); - - EntityDetail endpointEntityDetail = new EntityDetail(); - endpointEntityDetail.setGUID(ENDPOINT_GUID); - Optional endpoint = Optional.of(endpointEntityDetail); - String endpointQualifiedName = getEndpointQualifiedName(OpenMetadataType.CSV_FILE.typeName, ASSET_QUALIFIED_NAME); - when(dataEngineCommonHandler.findEntity(USER, endpointQualifiedName, OpenMetadataType.ENDPOINT_TYPE_NAME)).thenReturn(endpoint); - - doNothing().when(endpointHandler).updateBeanInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, - ENDPOINT_GUID, OpenMetadataProperty.GUID.name, OpenMetadataType.ENDPOINT_TYPE_GUID, OpenMetadataType.ENDPOINT_TYPE_NAME, - null, false, UPDATE_ENDPOINT_METHOD_NAME); - } - - - private EndpointBuilder mockEndpointBuilder() { - EndpointBuilder mockedEndpointBuilder = Mockito.mock(EndpointBuilder.class); - doReturn(mockedEndpointBuilder).when(dataEngineConnectionAndEndpointHandler) - .getEndpointBuilder(PROTOCOL, NETWORK_ADDRESS, getEndpointQualifiedName(ASSET_QUALIFIED_NAME, OpenMetadataType.CSV_FILE.typeName)); - return mockedEndpointBuilder; - } - - private String getConnectionQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + COLON + assetQualifiedName + CONNECTION; - } - - private String getEndpointQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + COLON + assetQualifiedName + ENDPOINT; - } - - private String getConnectorTypeQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + ":" + assetQualifiedName + CONNECTOR_TYPE; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineDataFileHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineDataFileHandlerTest.java deleted file mode 100644 index 7b46bc36baa..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineDataFileHandlerTest.java +++ /dev/null @@ -1,302 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.CSVFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataItemSortOrder; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -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.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineDataFileHandlerTest { - - private static final String USER = "user"; - private static final String METHOD = "method"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String OWNER = "owner"; - private static final String FILE_TYPE = "csv"; - private static final String DESCRIPTION = "description"; - private static final String PATH = "path"; - private static final String AUTHOR = "author"; - private static final String USAGE = "usage"; - private static final int POSITION = 1; - private static final String NATIVE_CLASS = "nativeClass"; - private static final String ENCODING_STANDARD = "encodingStandard"; - private static final String VERSION_NUMBER = "versionNumber"; - private static final String EXTERNAL_SOURCE_GUID = "externalSourceGuid"; - private static final String EXTERNAL_SOURCE_NAME = "externalSourceName"; - private static final String SCHEMA_TYPE_GUID = "schemaTypeGuid"; - private static final String GUID_VALUE = "1"; - private static final String PROTOCOL = "protocol"; - private static final String NETWORK_ADDRESS = "networkAddress"; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private AssetHandler fileHandler; - - @Mock - private DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler; - - @Mock - private DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler; - - @Mock - private DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler; - - @InjectMocks - private DataEngineDataFileHandler dataEngineDataFileHandler; - - @Test - void insertCsvFileToCatalog() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - CSVFile csvFile = getCsvFile(); - SchemaType schemaType = getTabularSchema(); - List columns = getTabularColumns(); - schemaType.setAttributeList(columns); - mockDataEngineCommonHandler(false); - mockDataEngineSchemaTypeHandler(); - - when(fileHandler.createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, QUALIFIED_NAME, NAME, null, - DESCRIPTION, null, OWNER, 0, null, null, - null, null, OpenMetadataType.CSV_FILE.typeGUID, OpenMetadataType.CSV_FILE.typeName, getExtendedProperties(), - null, null, InstanceStatus.ACTIVE, null, METHOD)).thenReturn(GUID_VALUE); - - String guid = dataEngineDataFileHandler.upsertFileAssetIntoCatalog(OpenMetadataType.CSV_FILE.typeName, OpenMetadataType.CSV_FILE.typeGUID, csvFile, schemaType, - getExtendedProperties(), EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER, METHOD); - - verify(dataEngineCommonHandler, times(1)).findEntity(USER, QUALIFIED_NAME, FILE_TYPE); - verify(fileHandler, times(1)). - createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, QUALIFIED_NAME, NAME, null, DESCRIPTION, - null, OWNER, 0, null, null, - null, null, OpenMetadataType.CSV_FILE.typeGUID, OpenMetadataType.CSV_FILE.typeName, - getExtendedProperties(), null, null, InstanceStatus.ACTIVE, null, METHOD); - verify(dataEngineSchemaTypeHandler, times(1)).upsertSchemaType(USER, schemaType, guid, EXTERNAL_SOURCE_NAME); - verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, guid, SCHEMA_TYPE_GUID, - OpenMetadataType.ASSET_TO_SCHEMA_TYPE_TYPE_NAME, OpenMetadataType.CSV_FILE.typeName, - OpenMetadataType.SCHEMA_TYPE_TYPE_NAME, EXTERNAL_SOURCE_NAME, null); - verify(dataEngineFolderHierarchyHandler, times(1)).upsertFolderHierarchy(guid, FILE_TYPE, - PATH, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER, METHOD); - verify(dataEngineConnectionAndEndpointHandler, times(1)).upsertConnectionAndEndpoint(QUALIFIED_NAME, - guid, OpenMetadataType.CSV_FILE.typeName, PROTOCOL, NETWORK_ADDRESS, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER); - } - - @Test - void insertIncompleteCsvFileToCatalog() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - CSVFile csvFile = getCsvFile(); - csvFile.setIncomplete(true); - SchemaType schemaType = getTabularSchema(); - List columns = getTabularColumns(); - schemaType.setAttributeList(columns); - mockDataEngineCommonHandler(false); - mockDataEngineSchemaTypeHandler(); - - when(fileHandler.createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, QUALIFIED_NAME, NAME, null, - DESCRIPTION, null, OWNER, 0, null, null, - null, null, OpenMetadataType.CSV_FILE.typeGUID, OpenMetadataType.CSV_FILE.typeName, getExtendedProperties(), - null, null, InstanceStatus.ACTIVE, null, METHOD)).thenReturn(GUID_VALUE); - - - String guid = dataEngineDataFileHandler.upsertFileAssetIntoCatalog(OpenMetadataType.CSV_FILE.typeName, OpenMetadataType.CSV_FILE.typeGUID, csvFile, schemaType, - getExtendedProperties(), EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER, METHOD); - - verify(dataEngineCommonHandler, times(1)).findEntity(USER, QUALIFIED_NAME, FILE_TYPE); - verify(fileHandler, times(1)). - createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, QUALIFIED_NAME, NAME, null, DESCRIPTION, - null, OWNER, 0, null, null, - null, null, OpenMetadataType.CSV_FILE.typeGUID, OpenMetadataType.CSV_FILE.typeName, - getExtendedProperties(), null, null, InstanceStatus.ACTIVE, null, METHOD); - verify(dataEngineSchemaTypeHandler, times(1)).upsertSchemaType(USER, schemaType, guid, EXTERNAL_SOURCE_NAME); - verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, guid, SCHEMA_TYPE_GUID, - OpenMetadataType.ASSET_TO_SCHEMA_TYPE_TYPE_NAME, OpenMetadataType.CSV_FILE.typeName, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME, EXTERNAL_SOURCE_NAME, null); - verify(dataEngineFolderHierarchyHandler, times(1)).upsertFolderHierarchy(guid, FILE_TYPE, - PATH, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER, METHOD); - verify(dataEngineConnectionAndEndpointHandler, times(1)).upsertConnectionAndEndpoint(QUALIFIED_NAME, - guid, OpenMetadataType.CSV_FILE.typeName, PROTOCOL, NETWORK_ADDRESS, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER); - - verify(fileHandler, times(1)).setClassificationInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, guid, - "fileGUID", OpenMetadataType.CSV_FILE.typeName, OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, (InstanceProperties) null, true, false, - false,null, METHOD); - } - - @Test - void updateCsvFileToCatalog() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - CSVFile csvFile = getCsvFile(); - SchemaType schemaType = getTabularSchema(); - List columns = getTabularColumns(); - schemaType.setAttributeList(columns); - mockDataEngineCommonHandler(true); - mockRepositoryHelper(); - mockDataEngineSchemaTypeHandler(); - - String guid = dataEngineDataFileHandler.upsertFileAssetIntoCatalog(OpenMetadataType.CSV_FILE.typeName, OpenMetadataType.CSV_FILE.typeGUID, csvFile, schemaType, - getExtendedProperties(), EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER, METHOD); - - verify(dataEngineCommonHandler, times(1)).findEntity(USER, csvFile.getQualifiedName(), csvFile.getFileType()); - verify(fileHandler, times(1)). - updateAsset(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, GUID_VALUE, CommonMapper.GUID_PROPERTY_NAME, - QUALIFIED_NAME, NAME, null, DESCRIPTION, null, OpenMetadataType.CSV_FILE.typeGUID, OpenMetadataType.CSV_FILE.typeName, - getExtendedProperties(),null, null, true, false, false, null, METHOD); - verify(dataEngineSchemaTypeHandler, times(1)).upsertSchemaType(USER, schemaType, guid, EXTERNAL_SOURCE_NAME); - verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, guid, SCHEMA_TYPE_GUID, - OpenMetadataType.ASSET_TO_SCHEMA_TYPE_TYPE_NAME, OpenMetadataType.CSV_FILE.typeName, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME, EXTERNAL_SOURCE_NAME, null); - verify(dataEngineFolderHierarchyHandler, times(1)).upsertFolderHierarchy(guid, FILE_TYPE, - PATH, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER, METHOD); - verify(dataEngineConnectionAndEndpointHandler, times(1)).upsertConnectionAndEndpoint(QUALIFIED_NAME, - GUID_VALUE, OpenMetadataType.CSV_FILE.typeName, PROTOCOL, NETWORK_ADDRESS, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, USER); - } - - @Test - void removeDataFile() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - - final String methodName = "removeDataFile"; - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(SCHEMA_TYPE_GUID); - when(dataEngineCommonHandler.getEntityForRelationship(USER, GUID_VALUE, OpenMetadataType.ASSET_TO_SCHEMA_TYPE_TYPE_NAME, - OpenMetadataType.DATA_FILE.typeName)).thenReturn(Optional.of(mockedEntity)); - - dataEngineDataFileHandler.removeDataFile(USER, GUID_VALUE, EXTERNAL_SOURCE_NAME, EXTERNAL_SOURCE_GUID, DeleteSemantic.SOFT); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, methodName); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, SCHEMA_TYPE_GUID, EXTERNAL_SOURCE_NAME, DeleteSemantic.SOFT); - verify(fileHandler, times(1)).deleteBeanInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, GUID_VALUE, - OpenMetadataProperty.GUID.name, OpenMetadataType.DATA_FILE.typeGUID, - OpenMetadataType.DATA_FILE.typeName, null, null, false, false, null, methodName); - } - - @Test - void removeDataFile_throwsFunctionNotSupportedException() throws FunctionNotSupportedException { - FunctionNotSupportedException mockedException = mock(FunctionNotSupportedException.class); - doThrow(mockedException).when(dataEngineCommonHandler).validateDeleteSemantic(DeleteSemantic.HARD, "removeDataFile"); - - assertThrows(FunctionNotSupportedException.class, () -> - dataEngineDataFileHandler.removeDataFile(USER, GUID_VALUE, EXTERNAL_SOURCE_NAME, EXTERNAL_SOURCE_GUID, DeleteSemantic.HARD)); - } - - private void mockDataEngineCommonHandler(boolean update) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (update) { - EntityDetail entityDetail = new EntityDetail(); - entityDetail.setGUID(GUID_VALUE); - - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, FILE_TYPE)).thenReturn(Optional.of(entityDetail)); - return; - } - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.CSV_FILE.typeName)).thenReturn(Optional.empty()); - } - - private void mockRepositoryHelper() { - TypeDef entityTypeDef = mock(TypeDef.class); - when(entityTypeDef.getGUID()).thenReturn(OpenMetadataType.CSV_FILE.typeGUID); - when(entityTypeDef.getName()).thenReturn(OpenMetadataType.CSV_FILE.typeName); - - when(repositoryHelper.getTypeDefByName(USER, OpenMetadataType.DATA_FILE.typeName)).thenReturn(entityTypeDef); - } - - private void mockDataEngineSchemaTypeHandler() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SchemaType schemaType = getTabularSchema(); - List columns = getTabularColumns(); - schemaType.setAttributeList(columns); - when(dataEngineSchemaTypeHandler.upsertSchemaType(USER, schemaType, GUID_VALUE, EXTERNAL_SOURCE_NAME)).thenReturn(SCHEMA_TYPE_GUID); - } - - private CSVFile getCsvFile() { - CSVFile csvFile = new CSVFile(); - csvFile.setQualifiedName(QUALIFIED_NAME); - csvFile.setDisplayName(NAME); - csvFile.setOwner(OWNER); - csvFile.setFileType(FILE_TYPE); - csvFile.setDescription(DESCRIPTION); - csvFile.setPathName(PATH); - csvFile.setDelimiterCharacter(","); - csvFile.setQuoteCharacter("\""); - csvFile.setProtocol(PROTOCOL); - csvFile.setNetworkAddress(NETWORK_ADDRESS); - - return csvFile; - } - - private SchemaType getTabularSchema() { - SchemaType tabularSchema = new SchemaType(); - tabularSchema.setQualifiedName(QUALIFIED_NAME); - tabularSchema.setDisplayName(NAME); - tabularSchema.setAuthor(AUTHOR); - tabularSchema.setUsage(USAGE); - tabularSchema.setEncodingStandard(ENCODING_STANDARD); - tabularSchema.setVersionNumber(VERSION_NUMBER); - - return tabularSchema; - } - - private List getTabularColumns() { - List tabularColumns = new ArrayList<>(); - - Attribute tabularColumn = new Attribute(); - tabularColumn.setQualifiedName(QUALIFIED_NAME); - tabularColumn.setDisplayName(NAME); - tabularColumn.setDescription(DESCRIPTION); - tabularColumn.setPosition(POSITION); - tabularColumn.setNativeClass(NATIVE_CLASS); - tabularColumn.setSortOrder(DataItemSortOrder.ASCENDING); - - tabularColumns.add(tabularColumn); - - return tabularColumns; - } - - private Map getExtendedProperties() { - Map extendedProperties = new HashMap<>(); - extendedProperties.put(FILE_TYPE, FILE_TYPE); - extendedProperties.put(OpenMetadataType.DELIMITER_CHARACTER_PROPERTY_NAME, ","); - extendedProperties.put(OpenMetadataType.QUOTE_CHARACTER_PROPERTY_NAME, "'"); - - return extendedProperties; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineEventTypeHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineEventTypeHandlerTest.java deleted file mode 100644 index 3c961486a22..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineEventTypeHandlerTest.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EventTypeHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Collections; -import java.util.List; -import java.util.Optional; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.internal.verification.VerificationModeFactory.times; -import static org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineEventTypeHandler.EVENT_TYPE_GUID_PARAMETER_NAME; -import static org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineTopicHandler.TOPIC_GUID_PARAMETER_NAME; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineEventTypeHandlerTest { - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String DISPLAY_NAME = "name"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - private static final String GUID = "guid"; - private static final String EVENT_SCHEMA_QUALIFIED_NAME = "eventSchemaAttributeQName"; - private static final String EVENT_SCHEMA_ATTRIBUTE_NAME = "eventSchemaAttributeName"; - private static final String TOPIC_GUID = "topicGUID"; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private EventTypeHandler eventTypeHandler; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler; - - @InjectMocks - DataEngineEventTypeHandler dataEngineEventTypeHandler; - - @Test - void upsertEventType_create() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.EVENT_TYPE_TYPE_NAME)).thenReturn(Optional.empty()); - - when(eventTypeHandler.createEventType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - TOPIC_GUID, TOPIC_GUID_PARAMETER_NAME, QUALIFIED_NAME, DISPLAY_NAME, null, null, false, - null, null, null, null, null, OpenMetadataType.EVENT_TYPE_TYPE_NAME, null, - null, null, false, false, null, - "upsertEventType")).thenReturn(GUID); - EventType eventType = getEventType(); - List attributeList = Collections.singletonList(getAttribute()); - eventType.setAttributeList(attributeList); - - dataEngineEventTypeHandler.upsertEventType(USER, eventType, TOPIC_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(eventTypeHandler, times(1)).createEventType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - TOPIC_GUID, TOPIC_GUID_PARAMETER_NAME, QUALIFIED_NAME, DISPLAY_NAME, null, null, false, - null, null, null, null, null, OpenMetadataType.EVENT_TYPE_TYPE_NAME, null, - null, null, false, false, null, - "upsertEventType"); - verify(dataEngineSchemaAttributeHandler, Mockito.times(1)).upsertSchemaAttributes(USER, attributeList, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID, GUID); - } - - @Test - void upsertEventType_update() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - EntityDetail eventTypeDetails = mockEntityDetail(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.EVENT_TYPE_TYPE_NAME)).thenReturn(Optional.of(eventTypeDetails)); - - EventType eventType = getEventType(); - List attributeList = Collections.singletonList(getAttribute()); - eventType.setAttributeList(attributeList); - - dataEngineEventTypeHandler.upsertEventType(USER, eventType, TOPIC_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(eventTypeHandler, times(1)).updateEventType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - GUID, EVENT_TYPE_GUID_PARAMETER_NAME, QUALIFIED_NAME, DISPLAY_NAME, null, null, false, - null, null, null, null, null, OpenMetadataType.EVENT_TYPE_TYPE_NAME, null, - null, null, true,false, false, null, - "upsertEventType"); - verify(dataEngineSchemaAttributeHandler, Mockito.times(1)).upsertSchemaAttributes(USER, attributeList, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID, GUID); - } - - @Test - void removeEventType() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineEventTypeHandler.removeEventType(USER, GUID, QUALIFIED_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, "removeEventType"); - verify(eventTypeHandler, times(1)).removeEventType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - GUID, EVENT_TYPE_GUID_PARAMETER_NAME, QUALIFIED_NAME, false, false, null, "removeEventType"); - } - - private EventType getEventType() { - EventType eventType = new EventType(); - eventType.setQualifiedName(QUALIFIED_NAME); - eventType.setDisplayName(DISPLAY_NAME); - - return eventType; - } - - private Attribute getAttribute() { - Attribute attribute = new Attribute(); - attribute.setTypeName(OpenMetadataType.EVENT_SCHEMA_ATTRIBUTE_TYPE_NAME); - attribute.setQualifiedName(EVENT_SCHEMA_QUALIFIED_NAME); - attribute.setDisplayName(EVENT_SCHEMA_ATTRIBUTE_NAME); - - return attribute; - } - - private EntityDetail mockEntityDetail(String guid) { - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(guid); - return entityDetail; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFinderHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFinderHandlerTest.java deleted file mode 100644 index a73cfe9b46c..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFinderHandlerTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.model.Identifiers; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineFinderHandlerTest { - - private static final String USER = "user"; - private static final String METHOD = "method"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String EXTERNAL_SOURCE_NAME = "externalSourceName"; - private static final String GUID_VALUE = "1"; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private OpenMetadataAPIGenericHandler genericHandler; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private OMRSMetadataCollection omrsMetadataCollection; - - @InjectMocks - private DataEngineFindHandler dataEngineFindHandler; - - @Test - void find() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - mockRepositoryHelper(); - List findResult = buildFindResult(); - - when(genericHandler.getEntitiesByValue(USER, QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, Collections.singletonList(OpenMetadataProperty.QUALIFIED_NAME.name), true, - null, null, false, false, - 0, invalidParameterHandler.getMaxPagingSize(), null, METHOD)).thenReturn(findResult); - - FindRequestBody findRequestBody = buildFindRequestBody(); - GUIDListResponse guidListResponse = dataEngineFindHandler.find(findRequestBody, USER, METHOD); - - assertEquals(1, guidListResponse.getGUIDs().size()); - verify(repositoryHelper, times(1)).getTypeDefByName(USER, OpenMetadataType.REFERENCEABLE.typeName); - } - - private void mockRepositoryHelper(){ - when(repositoryHelper.getExactMatchRegex(QUALIFIED_NAME, false)).thenReturn(QUALIFIED_NAME); - - TypeDef referenceableTypeDef = mock(TypeDef.class); - when(referenceableTypeDef.getGUID()).thenReturn(OpenMetadataType.REFERENCEABLE.typeGUID); - when(repositoryHelper.getTypeDefByName(USER, OpenMetadataType.REFERENCEABLE.typeName)).thenReturn(referenceableTypeDef); - } - - private FindRequestBody buildFindRequestBody(){ - Identifiers identifiers = new Identifiers(); - identifiers.setQualifiedName(QUALIFIED_NAME); - - FindRequestBody findRequestBody = new FindRequestBody(); - findRequestBody.setType(OpenMetadataType.REFERENCEABLE.typeName); - findRequestBody.setExternalSourceName(EXTERNAL_SOURCE_NAME); - findRequestBody.setIdentifiers(identifiers); - - return findRequestBody; - } - - private List buildFindResult(){ - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(GUID_VALUE); - when(entityDetail.getMetadataCollectionName()).thenReturn(EXTERNAL_SOURCE_NAME); - - List findResult = new ArrayList<>(); - findResult.add(entityDetail); - return findResult; - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFolderHierarchyHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFolderHierarchyHandlerTest.java deleted file mode 100644 index b9773f34e86..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFolderHierarchyHandlerTest.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.FileFolder; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Collections; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineFolderHierarchyHandlerTest { - - private static final String USER = "user"; - private static final String METHOD = "method"; - private static final String PATH = "/test/file.txt"; - private static final String EXTERNAL_SOURCE_GUID = "externalSourceGuid"; - private static final String EXTERNAL_SOURCE_NAME = "externalSourceName"; - private static final String GUID_VALUE_1 = "1"; - private static final String GUID_VALUE_2 = "2"; - private static final String GUID_VALUE_3 = "3"; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private OpenMetadataAPIGenericHandler genericHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private AssetHandler folderHandler; - - @InjectMocks - private DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler; - - @Test - void upsertFolderHierarchy() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockDataEngineCommonHandler(); - mockFolderHandler(); - - when(genericHandler.getAttachmentLinks(USER, GUID_VALUE_3, CommonMapper.GUID_PROPERTY_NAME, OpenMetadataType.DATA_FILE.typeName, - null, null, null, null, - 2, false, false, 0, - invalidParameterHandler.getMaxPagingSize(), null, METHOD)).thenReturn(Collections.emptyList()); - - dataEngineFolderHierarchyHandler.upsertFolderHierarchy(GUID_VALUE_3, OpenMetadataType.DATA_FILE.typeName, PATH, EXTERNAL_SOURCE_GUID, - EXTERNAL_SOURCE_NAME, USER, METHOD); - - verify(dataEngineCommonHandler, times(1)).findEntity(USER, EXTERNAL_SOURCE_NAME + "::/test", - OpenMetadataType.FILE_FOLDER.typeName); - verify(folderHandler, times(1)).createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, - EXTERNAL_SOURCE_NAME, EXTERNAL_SOURCE_NAME + "::/test", "test", null, null, - null, null, 0, null, null, - null, null, OpenMetadataType.FILE_FOLDER.typeGUID, OpenMetadataType.FILE_FOLDER.typeName, null, null, - null, InstanceStatus.ACTIVE, null, METHOD); - verify(folderHandler, times(1)).createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, - EXTERNAL_SOURCE_NAME, EXTERNAL_SOURCE_NAME + "::/", "/", null, - null, null, null, 0, null, null, - null, null, OpenMetadataType.FILE_FOLDER.typeGUID, OpenMetadataType.FILE_FOLDER.typeName, null, - null, null, InstanceStatus.ACTIVE, null, METHOD); - // verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, GUID_VALUE_1, GUID_VALUE_2, - // NESTED_FILE_TYPE_NAME, FILE_FOLDER.typeName, FILE_FOLDER.typeName, EXTERNAL_SOURCE_NAME,null); - - verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, EXTERNAL_SOURCE_GUID, - GUID_VALUE_2, OpenMetadataType.SERVER_ASSET_USE_RELATIONSHIP.typeName, OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName, - OpenMetadataType.FILE_FOLDER.typeName, EXTERNAL_SOURCE_NAME, - null); - } - - @Test - void removeFolder() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - - - final String methodName = "removeFolder"; - dataEngineFolderHierarchyHandler.removeFolder(USER, GUID_VALUE_1, DeleteSemantic.SOFT, EXTERNAL_SOURCE_NAME); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, methodName); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(GUID_VALUE_1, OpenMetadataProperty.GUID.name, methodName); - verify(dataEngineCommonHandler, times(1)).removeEntity(USER, GUID_VALUE_1, OpenMetadataType.FILE_FOLDER.typeName, EXTERNAL_SOURCE_NAME); - } - - @Test - void removeFolder_throwsFunctionNotSupportedException() throws FunctionNotSupportedException { - FunctionNotSupportedException mockedException = mock(FunctionNotSupportedException.class); - doThrow(mockedException).when(dataEngineCommonHandler).validateDeleteSemantic(DeleteSemantic.HARD, "removeFolder"); - - assertThrows(FunctionNotSupportedException.class, () -> - dataEngineFolderHierarchyHandler.removeFolder(USER, GUID_VALUE_1, DeleteSemantic.HARD, EXTERNAL_SOURCE_NAME)); - } - - - private void mockDataEngineCommonHandler() - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineCommonHandler.findEntity(USER, EXTERNAL_SOURCE_NAME + "::/test", OpenMetadataType.FILE_FOLDER.typeName)) - .thenReturn(Optional.empty()); - when(dataEngineCommonHandler.findEntity(USER, EXTERNAL_SOURCE_NAME + "::/", OpenMetadataType.FILE_FOLDER.typeName)) - .thenReturn(Optional.empty()); - } - - private void mockFolderHandler() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(folderHandler.createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, - EXTERNAL_SOURCE_NAME + "::/test", "test", null, null, null, - null, 0, null, null, null, - null, OpenMetadataType.FILE_FOLDER.typeGUID, OpenMetadataType.FILE_FOLDER.typeName, null, null, - null, InstanceStatus.ACTIVE, null, METHOD)). - thenReturn(GUID_VALUE_1); - when(folderHandler.createAssetInRepository(USER, EXTERNAL_SOURCE_GUID, EXTERNAL_SOURCE_NAME, - EXTERNAL_SOURCE_NAME + "::/", "/", null, null, null, - null, 0, null, null, null, - null, OpenMetadataType.FILE_FOLDER.typeGUID, OpenMetadataType.FILE_FOLDER.typeName, null, null, - null, InstanceStatus.ACTIVE, null, METHOD)). - thenReturn(GUID_VALUE_2); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandlerTest.java deleted file mode 100644 index bae9b178040..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandlerTest.java +++ /dev/null @@ -1,320 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Port; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.PortType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.PortHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.lang.reflect.InvocationTargetException; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.Mockito.*; -import static org.odpi.openmetadata.accessservices.dataengine.server.util.MockedExceptionUtil.mockException; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEnginePortHandlerTest { - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String GUID = "guid"; - private static final String SCHEMA_GUID = "schemaGuid"; - private static final String PORT_GUID = "portGuid"; - private static final String PROCESS_GUID = "portGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private PortHandler portHandler; - - @InjectMocks - private DataEnginePortHandler dataEnginePortHandler; - - @BeforeEach - void setup() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - } - - @Test - void createPortImplementation() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - String methodName = "createPort"; - - when(portHandler.createPort(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, PROCESS_GUID, - "processGUID", QUALIFIED_NAME, NAME, PortType.INOUT_PORT.getOrdinal(), null, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, - null, false, false, null, methodName)).thenReturn(GUID); - String result = dataEnginePortHandler.createPortImplementation(USER, getPortImplementation(), PROCESS_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - assertEquals(GUID, result); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - verify(invalidParameterHandler, times(1)).validateName(NAME, OpenMetadataProperty.DISPLAY_NAME.name, methodName); - verify(portHandler, times(1)).createPort(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, PROCESS_GUID, - "processGUID", QUALIFIED_NAME, NAME, PortType.INOUT_PORT.getOrdinal(), null, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, - null, false, false, null, methodName); - } - - @Test - void createPortImplementation_throwsUserNotAuthorizedException() throws PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, - InvalidParameterException { - String methodName = "createPort"; - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(portHandler.createPort(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, PROCESS_GUID, - "processGUID", QUALIFIED_NAME, NAME, PortType.INOUT_PORT.getOrdinal(), null, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, - null, false, false, null, methodName)).thenThrow(mockedException); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEnginePortHandler.createPortImplementation(USER, getPortImplementation(), PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void updatePortImplementation() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "updatePort"; - - EntityDetail mockedOriginalPortEntity = Mockito.mock(EntityDetail.class); - when(mockedOriginalPortEntity.getGUID()).thenReturn(PORT_GUID); - - EntityDetail mockedUpdatedPortEntity = Mockito.mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(PORT_GUID, null)).thenReturn(mockedUpdatedPortEntity); - - EntityDetailDifferences mockedDifferences = mock(EntityDetailDifferences.class); - when(mockedDifferences.hasInstancePropertiesDifferences()).thenReturn(Boolean.TRUE); - when(repositoryHelper.getEntityDetailDifferences(mockedOriginalPortEntity, mockedUpdatedPortEntity, true)).thenReturn(mockedDifferences); - - dataEnginePortHandler.updatePortImplementation(USER, mockedOriginalPortEntity, getPortImplementation(), EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - verify(invalidParameterHandler, times(1)).validateName(NAME, OpenMetadataProperty.DISPLAY_NAME.name, methodName); - verify(portHandler, times(1)).updatePort(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, PORT_GUID, - "portGUID", QUALIFIED_NAME, NAME, PortType.INOUT_PORT.getOrdinal(), null, - OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, null, null, null, false, false, null, methodName); - } - - @Test - void updatePortImplementation_throwsUserNotAuthorizedException() throws InvocationTargetException, NoSuchMethodException, InstantiationException, - IllegalAccessException, UserNotAuthorizedException, - PropertyServerException, InvalidParameterException { - - String methodName = "updatePort"; - - EntityDetail mockedOriginalPortEntity = Mockito.mock(EntityDetail.class); - when(mockedOriginalPortEntity.getGUID()).thenReturn(PORT_GUID); - EntityDetail mockedUpdatedPortEntity = Mockito.mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(PORT_GUID, null)).thenReturn(mockedUpdatedPortEntity); - - EntityDetailDifferences mockedDifferences = mock(EntityDetailDifferences.class); - when(mockedDifferences.hasInstancePropertiesDifferences()).thenReturn(Boolean.TRUE); - when(repositoryHelper.getEntityDetailDifferences(mockedOriginalPortEntity, mockedUpdatedPortEntity, true)).thenReturn(mockedDifferences); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(portHandler).updatePort(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, PORT_GUID, - "portGUID", QUALIFIED_NAME, NAME, PortType.INOUT_PORT.getOrdinal(), null, - OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, null, null, null, false, false, null, methodName); - - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEnginePortHandler.updatePortImplementation(USER, mockedOriginalPortEntity, getPortImplementation(), - EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void updatePortImplementation_noChanges() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "updatePort"; - - EntityDetail mockedOriginalPortEntity = Mockito.mock(EntityDetail.class); - when(mockedOriginalPortEntity.getGUID()).thenReturn(PORT_GUID); - - EntityDetail mockedUpdatedPortEntity = Mockito.mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(PORT_GUID, null)).thenReturn(mockedUpdatedPortEntity); - - EntityDetailDifferences mockedDifferences = mock(EntityDetailDifferences.class); - when(mockedDifferences.hasInstancePropertiesDifferences()).thenReturn(Boolean.FALSE); - when(repositoryHelper.getEntityDetailDifferences(mockedOriginalPortEntity, mockedUpdatedPortEntity, true)).thenReturn(mockedDifferences); - - dataEnginePortHandler.updatePortImplementation(USER, mockedOriginalPortEntity, getPortImplementation(), EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } - - @Test - void addPortSchemaRelationship() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - dataEnginePortHandler.addPortSchemaRelationship(USER, GUID, SCHEMA_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(portHandler, times(1)).setupPortSchemaType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, GUID, - "portGUID", SCHEMA_GUID, "schemaTypeGUID", null, null, false, - false, null, "addPortSchemaRelationship"); - } - - @Test - void addPortSchemaRelationship_throwsUserNotAuthorizedException() throws PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, - InvalidParameterException { - String methodName = "addPortSchemaRelationship"; - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(portHandler).setupPortSchemaType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, GUID, - "portGUID", SCHEMA_GUID, "schemaTypeGUID", - null, null, false, false, null, "addPortSchemaRelationship"); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEnginePortHandler.addPortSchemaRelationship(USER, GUID, SCHEMA_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void findSchemaTypeForPort() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - EntityDetail entityDetail = mock(EntityDetail.class); - when(dataEngineCommonHandler.getEntityForRelationship(USER, PORT_GUID, OpenMetadataType.PORT_SCHEMA_RELATIONSHIP_TYPE_NAME, - OpenMetadataType.PORT_TYPE_NAME)).thenReturn(Optional.of(entityDetail)); - - Optional result = dataEnginePortHandler.findSchemaTypeForPort(USER, PORT_GUID); - - assertTrue(result.isPresent()); - assertEquals(entityDetail, result.get()); - } - - @Test - void findSchemaTypeForPort_throwsUserNotAuthorizedException() throws PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, - InvalidParameterException { - String methodName = "findSchemaTypeForPort"; - - mockTypeDef(); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(dataEngineCommonHandler.getEntityForRelationship(USER, PORT_GUID, OpenMetadataType.PORT_SCHEMA_RELATIONSHIP_TYPE_NAME, - OpenMetadataType.PORT_TYPE_NAME)).thenThrow(mockedException); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEnginePortHandler.findSchemaTypeForPort(USER, PORT_GUID)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void findPortImplementation() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(GUID); - Optional optionalOfMockedEntity = Optional.of(entityDetail); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME)).thenReturn(optionalOfMockedEntity); - - Optional result = dataEnginePortHandler.findPortImplementationEntity(USER, QUALIFIED_NAME); - - assertTrue(result.isPresent()); - assertEquals(GUID, result.get().getGUID()); - } - - @Test - void findPortImplementation_throwsUserNotAuthorizedException() throws PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, InvalidParameterException { - String methodName = "findPort"; - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME)).thenThrow(mockedException); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEnginePortHandler.findPortImplementationEntity(USER, QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void removePort() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - - dataEnginePortHandler.removePort(USER, PORT_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - - verify(portHandler, times(1)).removePort(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, PORT_GUID, - "portGUID", false, false, null, "removePort"); - } - - @Test - void removePort_throwsFunctionNotSupportedException() throws FunctionNotSupportedException { - FunctionNotSupportedException mockedException = mock(FunctionNotSupportedException.class); - doThrow(mockedException).when(dataEngineCommonHandler).validateDeleteSemantic(DeleteSemantic.HARD, "removePort"); - - assertThrows(FunctionNotSupportedException.class, () -> - dataEnginePortHandler.removePort(USER, PORT_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.HARD)); - } - - private void mockTypeDef() { - TypeDef entityTypeDef = mock(TypeDef.class); - when(repositoryHelper.getTypeDefByName(USER, OpenMetadataType.PORT_SCHEMA_RELATIONSHIP_TYPE_NAME)).thenReturn(entityTypeDef); - - when(entityTypeDef.getName()).thenReturn(OpenMetadataType.PORT_SCHEMA_RELATIONSHIP_TYPE_NAME); - when(entityTypeDef.getGUID()).thenReturn(OpenMetadataType.PORT_SCHEMA_RELATIONSHIP_TYPE_GUID); - } - - private PortImplementation getPortImplementation() { - PortImplementation portImplementation = new PortImplementation(); - portImplementation.setQualifiedName(QUALIFIED_NAME); - portImplementation.setDisplayName(NAME); - portImplementation.setPortType(PortType.INOUT_PORT); - - return portImplementation; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineProcessHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineProcessHandlerTest.java deleted file mode 100644 index a519b986362..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineProcessHandlerTest.java +++ /dev/null @@ -1,394 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.Spy; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.OwnerType; -import org.odpi.openmetadata.accessservices.dataengine.model.ParentProcess; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessContainmentType; -import org.odpi.openmetadata.accessservices.dataengine.model.UpdateSemantic; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.ProcessPropertiesBuilder; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.metadatasecurity.properties.Asset; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.lang.reflect.InvocationTargetException; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.odpi.openmetadata.accessservices.dataengine.server.util.MockedExceptionUtil.mockException; - - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineProcessHandlerTest { - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String DESCRIPTION = "desc"; - private static final String GUID = "guid"; - private static final String FORMULA = "formula"; - private static final String OWNER = "OWNER"; - private static final String PROCESS_GUID = "processGuid"; - private static final String PORT_IMPL_GUID = "portImplGUID"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - private static final String PARENT_PROCESS_QUALIFIED_NAME = "parentQualifiedName"; - private static final String PARENT_GUID = "parentGUID"; - private static Map extendedProperties = createExtendedPropertiesMap(); - - private static Map createExtendedPropertiesMap() { - extendedProperties = new HashMap<>(); - extendedProperties.put(OpenMetadataProperty.FORMULA.name, FORMULA); - extendedProperties.put(OpenMetadataProperty.DISPLAY_NAME.name, NAME); - - return extendedProperties; - } - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private AssetHandler assetHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private DataEngineRegistrationHandler registrationHandler; - - @Spy - @InjectMocks - private DataEngineProcessHandler processHandler; - - @Test - void createProcess() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "createProcess"; - - Process process = getProcess(); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - when(assetHandler.createAssetInRepository(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - process.getQualifiedName(), process.getName(), null, process.getDescription(), process.getZoneMembership(), process.getOwner(), - process.getOwnerType().getOpenTypeOrdinal(), process.getOriginOrganizationGUID(), - process.getOriginBusinessCapabilityGUID(), process.getOtherOriginValues(), process.getAdditionalProperties(), - OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, extendedProperties, null, null, InstanceStatus.DRAFT, null, methodName)).thenReturn(GUID); - - String result = processHandler.createProcess(USER, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - assertEquals(GUID, result); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } - - @Test - void createProcess_throwsUserNotAuthorizedException() throws UserNotAuthorizedException, PropertyServerException, - InvocationTargetException, NoSuchMethodException, - InstantiationException, - IllegalAccessException, InvalidParameterException { - String methodName = "createProcess"; - Process process = getProcess(); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(EXTERNAL_SOURCE_DE_GUID); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(assetHandler).createAssetInRepository(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - process.getQualifiedName(), process.getName(), null, process.getDescription(), process.getZoneMembership(), process.getOwner(), - process.getOwnerType().getOpenTypeOrdinal(), process.getOriginOrganizationGUID(), - process.getOriginBusinessCapabilityGUID(), process.getOtherOriginValues(), process.getAdditionalProperties(), - OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, extendedProperties, null, null, InstanceStatus.DRAFT, null, methodName); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - processHandler.createProcess(USER, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void updateProcess() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "updateProcess"; - EntityDetail mockedOriginalProcessEntity = Mockito.mock(EntityDetail.class); - ProcessPropertiesBuilder mockedBuilder = Mockito.mock(ProcessPropertiesBuilder.class); - when(mockedOriginalProcessEntity.getGUID()).thenReturn(PROCESS_GUID); - Process process = getProcess(); - doReturn(mockedBuilder).when(processHandler).getProcessPropertiesBuilder(process); - EntityDetail mockedUpdatedProcessEntity = Mockito.mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(PROCESS_GUID, null)).thenReturn(mockedUpdatedProcessEntity); - - EntityDetailDifferences mockedDifferences = mock(EntityDetailDifferences.class); - when(mockedDifferences.hasInstancePropertiesDifferences()).thenReturn(Boolean.TRUE); - when(repositoryHelper.getEntityDetailDifferences(mockedOriginalProcessEntity, mockedUpdatedProcessEntity, true)) - .thenReturn(mockedDifferences); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(EXTERNAL_SOURCE_DE_GUID); - - processHandler.updateProcess(USER, mockedOriginalProcessEntity, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(assetHandler, times(1)).updateAsset(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - PROCESS_GUID, "processGUID", process.getQualifiedName(), process.getName(), null, process.getDescription(), - process.getAdditionalProperties(), OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, extendedProperties, - null, null, true, false, false, null, methodName); - - } - - @Test - void updateProcess_noChanges() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, TypeErrorException { - EntityDetail mockedOriginalProcessEntity = Mockito.mock(EntityDetail.class); - when(mockedOriginalProcessEntity.getGUID()).thenReturn(PROCESS_GUID); - Process process = getProcess(); - - EntityDetail mockedUpdatedProcessEntity = Mockito.mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(PROCESS_GUID, null)).thenReturn(mockedUpdatedProcessEntity); - - EntityDetailDifferences mockedDifferences = mock(EntityDetailDifferences.class); - when(mockedDifferences.hasInstancePropertiesDifferences()).thenReturn(Boolean.FALSE); - when(repositoryHelper.getEntityDetailDifferences(mockedOriginalProcessEntity, mockedUpdatedProcessEntity, true)) - .thenReturn(mockedDifferences); - - Classification classification = new Classification(); - classification.setName("classificationName"); - when(repositoryHelper.getNewClassification(any(), any(), any(), any(), any(), any(), any(), any(), any(), any())) - .thenReturn(classification); - - processHandler.updateProcess(USER, mockedOriginalProcessEntity, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(assetHandler, times(0)).updateAsset(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - PROCESS_GUID, CommonMapper.GUID_PROPERTY_NAME, process.getQualifiedName(), process.getName(), null, process.getDescription(), - process.getAdditionalProperties(), OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, extendedProperties, - null,null, true,false, false, null, "updateProcess"); - } - - @Test - void updateProcess_throwsUserNotAuthorizedException() throws UserNotAuthorizedException, PropertyServerException, InvocationTargetException, - NoSuchMethodException, InstantiationException, IllegalAccessException, - InvalidParameterException { - String methodName = "updateProcess"; - Process process = getProcess(); - - EntityDetail mockedOriginalProcessEntity = Mockito.mock(EntityDetail.class); - when(mockedOriginalProcessEntity.getGUID()).thenReturn(PROCESS_GUID); - - ProcessPropertiesBuilder mockedBuilder = Mockito.mock(ProcessPropertiesBuilder.class); - doReturn(mockedBuilder).when(processHandler).getProcessPropertiesBuilder(process); - - InstanceProperties updatedProcessProperties = new InstanceProperties(); - when(mockedBuilder.getInstanceProperties(methodName)).thenReturn(updatedProcessProperties); - - EntityDetail mockedUpdatedProcessEntity = Mockito.mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(PROCESS_GUID, updatedProcessProperties)).thenReturn(mockedUpdatedProcessEntity); - - EntityDetailDifferences mockedDifferences = mock(EntityDetailDifferences.class); - when(mockedDifferences.hasInstancePropertiesDifferences()).thenReturn(Boolean.TRUE); - when(repositoryHelper.getEntityDetailDifferences(mockedOriginalProcessEntity, mockedUpdatedProcessEntity, true)) - .thenReturn(mockedDifferences); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(EXTERNAL_SOURCE_DE_GUID); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - - doThrow(mockedException).when(assetHandler).updateAsset(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - PROCESS_GUID, "processGUID", process.getQualifiedName(), process.getName(), null, process.getDescription(), - process.getAdditionalProperties(), OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, extendedProperties, null, null, - true,false, false, null, methodName); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> processHandler.updateProcess(USER, - mockedOriginalProcessEntity, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void findProcess() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(GUID); - Optional optionalOfMockedEntity = Optional.of(entityDetail); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.PROCESS.typeName)) - .thenReturn(optionalOfMockedEntity); - - Optional result = processHandler.findProcessEntity(USER, QUALIFIED_NAME); - - assertTrue(result.isPresent()); - assertEquals(GUID, result.get().getGUID()); - } - - @Test - void findProcess_notExisting() throws UserNotAuthorizedException, PropertyServerException, - InvalidParameterException { - - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.PROCESS.typeName)).thenReturn(Optional.empty()); - - Optional result = processHandler.findProcessEntity(USER, QUALIFIED_NAME); - - assertFalse(result.isPresent()); - } - - @Test - void updateProcessStatus() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "updateProcessStatus"; - - mockTypeDef(OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName); - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(EXTERNAL_SOURCE_DE_GUID); - - processHandler.updateProcessStatus(USER, PROCESS_GUID, InstanceStatus.ACTIVE, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateGUID(PROCESS_GUID, "guid", methodName); - - verify(assetHandler, times(1)).updateBeanStatusInRepository(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, PROCESS_GUID, "processGUID", OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, - false, false, InstanceStatus.ACTIVE, - "processStatus", null, methodName); - } - - @Test - void getPortsForProcess() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - mockTypeDef(OpenMetadataType.PROCESS_PORT_TYPE_NAME, OpenMetadataType.PROCESS_PORT_TYPE_GUID); - - EntityDetail portImplementation = mock(EntityDetail.class); - InstanceType mockedTypeImpl = mock(InstanceType.class); - when(mockedTypeImpl.getTypeDefName()).thenReturn(OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - when(portImplementation.getType()).thenReturn(mockedTypeImpl); - when(portImplementation.getGUID()).thenReturn(PORT_IMPL_GUID); - - Set portEntityGUIDs = new HashSet<>(List.of(portImplementation)); - when(dataEngineCommonHandler.getEntitiesForRelationship(USER, PROCESS_GUID, OpenMetadataType.PROCESS_PORT_TYPE_NAME, - OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME, OpenMetadataType.PROCESS.typeName)).thenReturn(portEntityGUIDs); - Set result = processHandler.getPortsForProcess(USER, PROCESS_GUID, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - assertEquals(2, result.size()); - assertTrue(result.contains(portImplementation)); - } - - @Test - void upsertProcessHierarchyRelationship() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ParentProcess parentProcess = new ParentProcess(); - parentProcess.setProcessContainmentType(ProcessContainmentType.OWNED); - parentProcess.setQualifiedName(PARENT_PROCESS_QUALIFIED_NAME); - - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(PARENT_GUID); - Optional optionalOfMockedEntity = Optional.of(entityDetail); - when(dataEngineCommonHandler.findEntity(USER, PARENT_PROCESS_QUALIFIED_NAME, OpenMetadataType.PROCESS.typeName)).thenReturn(optionalOfMockedEntity); - - processHandler.upsertProcessHierarchyRelationship(USER, parentProcess, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, PARENT_GUID, GUID, - OpenMetadataType.PROCESS_HIERARCHY_TYPE_NAME, OpenMetadataType.PROCESS.typeName, OpenMetadataType.PROCESS.typeName, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - null); - } - - @Test - void upsertProcessHierarchyRelationship_parentProcessNotFound() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - ParentProcess parentProcess = new ParentProcess(); - parentProcess.setProcessContainmentType(ProcessContainmentType.OWNED); - parentProcess.setQualifiedName(PARENT_PROCESS_QUALIFIED_NAME); - - when(dataEngineCommonHandler.findEntity(USER, PARENT_PROCESS_QUALIFIED_NAME, OpenMetadataType.PROCESS.typeName)).thenReturn(Optional.empty()); - - processHandler.upsertProcessHierarchyRelationship(USER, parentProcess, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - String methodName = "upsertProcessHierarchyRelationship"; - verify(dataEngineCommonHandler, times(1)).throwInvalidParameterException(DataEngineErrorCode.PROCESS_NOT_FOUND, - methodName, PARENT_PROCESS_QUALIFIED_NAME); - } - - @Test - void removeProcess() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, FunctionNotSupportedException { - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - processHandler.removeProcess(USER, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - - verify(assetHandler, times(1)).deleteBeanInRepository(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - PROCESS_GUID, "processGUID", OpenMetadataType.PROCESS.typeGUID, OpenMetadataType.PROCESS.typeName, null, null, false, false, null, "removeProcess"); - } - - - @Test - void removeProcess_throwsFunctionNotSupportedException() throws FunctionNotSupportedException { - FunctionNotSupportedException mockedException = new FunctionNotSupportedException( - OMRSErrorCode.METHOD_NOT_IMPLEMENTED.getMessageDefinition("removeProcess", this.getClass().getName(), - "server"), this.getClass().getName(), "removeProcess"); - doThrow(mockedException).when(dataEngineCommonHandler).validateDeleteSemantic(DeleteSemantic.HARD, "removeProcess"); - - assertThrows(FunctionNotSupportedException.class, () -> - processHandler.removeProcess(USER, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.HARD)); - } - - private void mockTypeDef(String typeName, String typeGUID) { - TypeDef entityTypeDef = mock(TypeDef.class); - when(repositoryHelper.getTypeDefByName(USER, typeName)).thenReturn(entityTypeDef); - - when(entityTypeDef.getName()).thenReturn(typeName); - when(entityTypeDef.getGUID()).thenReturn(typeGUID); - } - - private Process getProcess() { - Process process = new Process(); - - process.setQualifiedName(QUALIFIED_NAME); - process.setName(NAME); - process.setDisplayName(NAME); - process.setDescription(DESCRIPTION); - process.setFormula(FORMULA); - process.setOwner(OWNER); - process.setOwnerType(OwnerType.USER_ID); - process.setUpdateSemantic(UpdateSemantic.REPLACE); - process.setZoneMembership(Collections.singletonList("default")); - - return process; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRegistrationHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRegistrationHandlerTest.java deleted file mode 100644 index f7894cba4ff..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRegistrationHandlerTest.java +++ /dev/null @@ -1,384 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.Spy; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; -import org.odpi.openmetadata.accessservices.dataengine.server.builders.ExternalDataEnginePropertiesBuilder; -import org.odpi.openmetadata.accessservices.dataengine.server.mappers.CommonMapper; -import org.odpi.openmetadata.accessservices.dataengine.server.service.ClockService; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -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.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.lang.reflect.InvocationTargetException; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRegistrationHandler.SYNC_DATES_BY_KEY; -import static org.odpi.openmetadata.accessservices.dataengine.server.util.MockedExceptionUtil.mockException; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineRegistrationHandlerTest { - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String DESCRIPTION = "desc"; - private static final String TYPE = "type"; - private static final String VERSION = "version"; - private static final String PATCH_LEVEL = "patchLevel"; - private static final String SOURCE = "source"; - private static final String GUID = "guid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceGUID"; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private SoftwareCapabilityHandler softwareServerCapabilityHandler; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private ClockService clockService; - - @InjectMocks - @Spy - private DataEngineRegistrationHandler registrationHandler; - - @BeforeEach - void before() { - mockEntityTypeDef(); - } - - @Test - void upsertExternalDataEngine_createEntity() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertExternalDataEngine"; - - Engine engine = getEngine(); - - when(softwareServerCapabilityHandler.createSoftwareCapability(USER, null, - null, OpenMetadataType.ENGINE.typeName, null, - engine.getQualifiedName(), - engine.getName(), engine.getDescription(), engine.getEngineType(), - engine.getEngineVersion(), engine.getPatchLevel(), engine.getSource(), - engine.getAdditionalProperties(), null, - null, null, null, false, false, null, methodName)).thenReturn(GUID); - - - String response = registrationHandler.upsertExternalDataEngine(USER, engine); - - assertEquals(GUID, response); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } - - @Test - void upsertExternalDataEngine_updateEntity() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertExternalDataEngine"; - - Engine engine = getEngine(); - - EntityDetail entityDetail = Mockito.mock(EntityDetail.class); - - when(softwareServerCapabilityHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID, OpenMetadataType.ENGINE.typeName, - Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), false, - false, null, "getExternalDataEngineByQualifiedName")) - .thenReturn(entityDetail); - - when(entityDetail.getGUID()).thenReturn(GUID); - - doNothing().when(softwareServerCapabilityHandler).updateBeanInRepository(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID, OpenMetadataProperty.GUID.name, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID, - OpenMetadataType.ENGINE.typeName, null, - true, methodName); - - String response = registrationHandler.upsertExternalDataEngine(USER, engine); - - assertEquals(GUID, response); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, - OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } - - @Test - void upsertExternalDataEngine_throwsUserNotAuthorizedException() throws InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, InvalidParameterException, - UserNotAuthorizedException, PropertyServerException { - String methodName = "upsertExternalDataEngine"; - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - - ExternalDataEnginePropertiesBuilder builder = new ExternalDataEnginePropertiesBuilder(QUALIFIED_NAME, NAME, - DESCRIPTION, TYPE, VERSION, PATCH_LEVEL, SOURCE, null, repositoryHelper, - "serviceName", "serverName"); - Engine engine = getEngine(); - - when(softwareServerCapabilityHandler.createSoftwareCapability(USER, null, - null, OpenMetadataType.ENGINE.typeName, null, - engine.getQualifiedName(), engine.getName(), engine.getDescription(), - engine.getEngineType(), engine.getEngineVersion(), engine.getPatchLevel(), - engine.getSource(), engine.getAdditionalProperties(), - null, null, null, null, false, false, - null, methodName)).thenThrow(mockedException); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - registrationHandler.upsertExternalDataEngine(USER, engine)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void getExternalDataEngine() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - String methodName = "getExternalDataEngineByQualifiedName"; - - EntityDetail entityDetail = mock(EntityDetail.class); - - when(softwareServerCapabilityHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID, OpenMetadataType.ENGINE.typeName, - Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), false, - false, null, methodName)).thenReturn(entityDetail); - - when(entityDetail.getGUID()).thenReturn(GUID); - String response = registrationHandler.getExternalDataEngine(USER, QUALIFIED_NAME); - - assertEquals(GUID, response); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, - OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - } - - @Test - void getExternalDataEngine_throwsUserNotAuthorizedException() throws UserNotAuthorizedException, PropertyServerException, - InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvalidParameterException { - String methodName = "getExternalDataEngineByQualifiedName"; - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - - when(softwareServerCapabilityHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID, - OpenMetadataType.ENGINE.typeName, - Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), false, - false, null, methodName)).thenThrow(mockedException); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - registrationHandler.getExternalDataEngine(USER, QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void removeExternalDataEngine_throwsFunctionNotSupportedException() { - FunctionNotSupportedException thrown = assertThrows(FunctionNotSupportedException.class, () -> - registrationHandler.removeExternalDataEngine(USER, QUALIFIED_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT)); - - assertTrue(thrown.getMessage().contains("OMRS-METADATA-COLLECTION-501-001")); - } - - private void mockEntityTypeDef() { - TypeDef entityTypeDef = mock(TypeDef.class); - when(repositoryHelper.getTypeDefByName(USER, OpenMetadataType.ENGINE.typeName)).thenReturn(entityTypeDef); - - when(entityTypeDef.getName()).thenReturn(OpenMetadataType.ENGINE.typeName); - when(entityTypeDef.getGUID()).thenReturn(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID); - } - - @Test - void upsertProcessingStateClassification() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, EntityNotKnownException { - String methodName = "upsertProcessingStateClassification"; - ProcessingState processingState = getProcessingState(); - InstanceProperties properties = new InstanceProperties(); - EntityDetail entityDetail = mock(EntityDetail.class); - - Engine engine = getEngine(); - - doReturn(GUID).when(registrationHandler).getExternalDataEngine(USER, - engine.getQualifiedName()); - - when(repositoryHelper.addLongMapPropertyToInstance(null, properties, SYNC_DATES_BY_KEY, - processingState.getSyncDatesByKey(), methodName)).thenReturn(properties); - - when(softwareServerCapabilityHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID, OpenMetadataType.ENGINE.typeName, - Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), false, - false, null, methodName)).thenReturn(entityDetail); - - when(entityDetail.getClassifications()).thenReturn(null); - - doNothing().when(softwareServerCapabilityHandler).setClassificationInRepository(USER, null, - null, GUID, EXTERNAL_SOURCE_DE_GUID, OpenMetadataType.ENGINE.typeName, OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_NAME, properties, true, false, false, - null, methodName); - - registrationHandler.upsertProcessingStateClassification(USER, processingState, engine.getQualifiedName()); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(repositoryHelper, times(1)).addLongMapPropertyToInstance(null, properties, - SYNC_DATES_BY_KEY, processingState.getSyncDatesByKey(), methodName); - verify(softwareServerCapabilityHandler, times(1)).setClassificationInRepository(USER, null, - null, GUID, EXTERNAL_SOURCE_DE_GUID, OpenMetadataType.ENGINE.typeName, OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_NAME, properties, true, false, false, - null, methodName); - } - - @Test - void upsertProcessingStateClassification_throwsUserNotAuthorizedException() throws UserNotAuthorizedException, - PropertyServerException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, InvalidParameterException { - String methodName = "upsertProcessingStateClassification"; - ProcessingState processingState = getProcessingState(); - InstanceProperties properties = new InstanceProperties(); - EntityDetail entityDetail = mock(EntityDetail.class); - - Engine engine = getEngine(); - - doReturn(GUID).when(registrationHandler).getExternalDataEngine(USER, - engine.getQualifiedName()); - - when(softwareServerCapabilityHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID, OpenMetadataType.ENGINE.typeName, - Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), false, - false, null, methodName)).thenReturn(entityDetail); - - when(entityDetail.getClassifications()).thenReturn(null); - - when(repositoryHelper.addLongMapPropertyToInstance(null, properties, SYNC_DATES_BY_KEY, - processingState.getSyncDatesByKey(), methodName)).thenReturn(properties); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(softwareServerCapabilityHandler).setClassificationInRepository(USER, null, - null, GUID, EXTERNAL_SOURCE_DE_GUID, OpenMetadataType.ENGINE.typeName, - OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_NAME, properties, true, false, false, - null, methodName); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - registrationHandler.upsertProcessingStateClassification(USER, processingState, engine.getQualifiedName())); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void getProcessingStateClassification() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, EntityNotKnownException { - String methodName = "getProcessingStateClassification"; - EntityDetail entityDetail = mock(EntityDetail.class); - - ProcessingState processingState = getProcessingState(); - Map newSyncDatesByKey = processingState.getSyncDatesByKey(); - Classification classification = getClassification(newSyncDatesByKey); - - Engine engine = getEngine(); - - doReturn(GUID).when(registrationHandler).getExternalDataEngine(USER, engine.getQualifiedName()); - - when(softwareServerCapabilityHandler.getEntityByValue(USER, QUALIFIED_NAME, CommonMapper.QUALIFIED_NAME_PROPERTY_NAME, - OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeGUID, OpenMetadataType.ENGINE.typeName, - Collections.singletonList(CommonMapper.QUALIFIED_NAME_PROPERTY_NAME), false, - false, null, methodName)).thenReturn(entityDetail); - - when(entityDetail.getClassifications()).thenReturn(Collections.singletonList(classification)); - - ProcessingState result = registrationHandler.getProcessingStateClassification(USER, QUALIFIED_NAME); - assertEquals(result, processingState); - - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - } - - private Classification getClassification(Map newSyncDatesByKey) { - InstanceProperties resultingProperties = new InstanceProperties(); - for (String mapPropertyName : newSyncDatesByKey.keySet()) - { - Long mapPropertyValue = newSyncDatesByKey.get(mapPropertyName); - - if (mapPropertyValue != null) - { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_LONG); - primitivePropertyValue.setPrimitiveValue(mapPropertyValue); - primitivePropertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_LONG.getName()); - primitivePropertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_LONG.getGUID()); - resultingProperties.setProperty(mapPropertyName, primitivePropertyValue); - } - } - - MapPropertyValue mapPropertyValue = new MapPropertyValue(); - mapPropertyValue.setMapValues(resultingProperties); - InstanceProperties properties = new InstanceProperties(); - properties.setProperty(SYNC_DATES_BY_KEY, mapPropertyValue); - - Classification classification = new Classification(); - classification.setName(OpenMetadataType.PROCESSING_STATE_CLASSIFICATION_TYPE_NAME); - classification.setProperties(properties); - return classification; - } - - private Engine getEngine() { - - Engine engine = new Engine(); - - engine.setQualifiedName(QUALIFIED_NAME); - engine.setName(NAME); - engine.setDescription(DESCRIPTION); - engine.setEngineType(TYPE); - engine.setEngineVersion(VERSION); - engine.setPatchLevel(PATCH_LEVEL); - engine.setSource(SOURCE); - - return engine; - } - - private ProcessingState getProcessingState() { - ProcessingState processingState = new ProcessingState(); - Map syncKeys = new HashMap<>(); - syncKeys.put("key", 100L); - processingState.setSyncDatesByKey(syncKeys); - return processingState; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRelationalDataHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRelationalDataHandlerTest.java deleted file mode 100644 index 5e4cbb0d6e2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRelationalDataHandlerTest.java +++ /dev/null @@ -1,531 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.DataItemSortOrder; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.OwnerType; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalColumn; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.RelationalDataHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -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.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Collections; -import java.util.List; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineRelationalDataHandlerTest { - private static final String DATABASE_SCHEMA_GUID = "databaseSchemaGUID"; - private static final String UPSERT_DATABASE_SCHEMA_METHOD = "upsertDatabaseSchema"; - private static final String UPSERT_RELATIONAL_TABLE_METHOD = "upsertRelationalTable"; - @Mock - private OMRSRepositoryHelper repositoryHelper; - @Mock - private InvalidParameterHandler invalidParameterHandler; - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - @Mock - private DataEngineRegistrationHandler registrationHandler; - @Mock - private RelationalDataHandler relationalDataHandler; - @Mock - private AssetHandler databaseSchemaAssetHandler; - - @Mock - private DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler; - - @InjectMocks - private DataEngineRelationalDataHandler dataEngineRelationalDataHandler; - - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String DESCRIPTION = "desc"; - private static final String OWNER = "OWNER"; - private static final String DATABASE_TYPE = "DB2"; - private static final String DATABASE_VERSION = "10.05.0002"; - private static final String DATABASE_INSTANCE = "db2inst1"; - private static final String DATABASE_IMPORTED_FROM = "DB2Connector 9.1"; - private static final String GUID = "guid"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_NAME = "externalSourceDataEngineQualifiedName"; - private static final List ZONE_MEMBERSHIP = Collections.singletonList("default"); - private static final String DS_QUALIFIED_NAME = "DS_qualifiedName"; - private static final String DS_DISPLAY_NAME = "DS_displayName"; - private static final String DS_DESCRIPTION = "DS_desc"; - private static final String DATABASE_GUID = "database_guid"; - private static final String SCHEMA_GUID = "schema_guid"; - private static final String TABLE_GUID = "table_guid"; - private static final String COLUMN_QUALIFIED_NAME = "column_qualifiedName"; - private static final String COLUMN_NAME = "column_name"; - private static final String COLUMN_DESCRIPTION = "column_desc"; - private static final String COLUMN_DATA_TYPE = "String"; - private static final String COLUMN_FORMULA = "formula"; - private static final String COLUMN_GUID = "column_guid"; - private static final String PROTOCOL = "protocol"; - private static final String NETWORK_ADDRESS = "networkAddress"; - - private void verifyInvalidParameterHandlerInvocations(String methodName) throws - InvalidParameterException { - //verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - //verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, QUALIFIED_NAME_PROPERTY_NAME, methodName); - //verify(invalidParameterHandler, times(1)).validateName(NAME, DISPLAY_NAME_PROPERTY_NAME, methodName); - } - - @Test - void upsertDatabase_create() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertDatabase"; - Database database = getDatabase(); - DatabaseSchema databaseSchema = getDatabaseSchema(); - RelationalTable relationalTable = getRelationalTable(); - database.setDatabaseSchema(databaseSchema); - database.setTables(Collections.singletonList(relationalTable)); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - when(relationalDataHandler.createDatabase(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, database.getQualifiedName(), - database.getDisplayName(), null, database.getDescription(), database.getOwner(), database.getOwnerType().getOpenTypeOrdinal(), - database.getZoneMembership(), database.getOriginOrganizationGUID(), database.getOriginBusinessCapabilityGUID(), - database.getOtherOriginValues(), database.getPathName(), database.getCreateTime(), database.getModifiedTime(), - database.getEncodingType(), database.getEncodingLanguage(), database.getEncodingDescription(), database.getEncodingProperties(), - database.getDatabaseType(), database.getDatabaseVersion(), database.getDatabaseInstance(), database.getDatabaseImportedFrom(), - database.getAdditionalProperties(), OpenMetadataType.DATABASE_TYPE_NAME, null, null, null, null, - false, false, null, methodName)) - .thenReturn(DATABASE_GUID); - - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(DATABASE_SCHEMA_GUID); - Optional optionalOfMockedEntity = Optional.of(entityDetail); - when(dataEngineCommonHandler.findEntity(USER, DS_QUALIFIED_NAME, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME)) - .thenReturn(Optional.empty(), optionalOfMockedEntity); - - int ordinal = OwnerType.USER_ID.getOrdinal(); - when(relationalDataHandler.createDatabaseSchema(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, DATABASE_GUID, - databaseSchema.getQualifiedName(), databaseSchema.getDisplayName(), null, databaseSchema.getDescription(), - databaseSchema.getOwner(), ordinal, databaseSchema.getZoneMembership(), databaseSchema.getOriginOrganizationGUID(), - databaseSchema.getOriginBusinessCapabilityGUID(), databaseSchema.getOtherOriginValues(), - databaseSchema.getAdditionalProperties(), OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, null, - null, null, null, false, false, - null, UPSERT_DATABASE_SCHEMA_METHOD)).thenReturn(SCHEMA_GUID); - - when(relationalDataHandler.createDatabaseTable(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, DATABASE_SCHEMA_GUID, - relationalTable.getQualifiedName(), relationalTable.getDisplayName(), relationalTable.getDescription(), - relationalTable.getIsDeprecated(), relationalTable.getAliases(), relationalTable.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, null, null, null, null, - false, false, null, UPSERT_RELATIONAL_TABLE_METHOD)) - .thenReturn(TABLE_GUID); - String result = dataEngineRelationalDataHandler.upsertDatabase(USER, database, EXTERNAL_SOURCE_DE_NAME); - - assertEquals(DATABASE_GUID, result); - verifyInvalidParameterHandlerInvocations(methodName); - - verify(dataEngineConnectionAndEndpointHandler, times(1)).upsertConnectionAndEndpoint(QUALIFIED_NAME, - DATABASE_GUID, OpenMetadataType.DATABASE_TYPE_NAME, PROTOCOL, NETWORK_ADDRESS, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, USER); - verify(relationalDataHandler, times(1)).createDatabaseSchema(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_NAME, DATABASE_GUID, databaseSchema.getQualifiedName(), databaseSchema.getDisplayName(), - null, databaseSchema.getDescription(), databaseSchema.getOwner(), ordinal, databaseSchema.getZoneMembership(), - databaseSchema.getOriginOrganizationGUID(), databaseSchema.getOriginBusinessCapabilityGUID(), - databaseSchema.getOtherOriginValues(), databaseSchema.getAdditionalProperties(), OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, - null, null, null, null, - false, false, null, UPSERT_DATABASE_SCHEMA_METHOD); - verify(relationalDataHandler, times(1)).createDatabaseTable(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_NAME, DATABASE_SCHEMA_GUID, relationalTable.getQualifiedName(), relationalTable.getDisplayName(), - relationalTable.getDescription(), relationalTable.getIsDeprecated(), relationalTable.getAliases(), - relationalTable.getAdditionalProperties(), OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, null, - null, null, null, false, false, null, UPSERT_RELATIONAL_TABLE_METHOD); - } - - @Test - void upsertDatabase_update() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertDatabase"; - Database database = getDatabase(); - database.setDatabaseSchema(getDatabaseSchema()); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - mockFindEntity(QUALIFIED_NAME, GUID, OpenMetadataType.DATABASE_TYPE_NAME); - mockFindEntity(DS_QUALIFIED_NAME, DATABASE_GUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - - String result = dataEngineRelationalDataHandler.upsertDatabase(USER, database, EXTERNAL_SOURCE_DE_NAME); - - assertEquals(GUID, result); - verifyInvalidParameterHandlerInvocations(methodName); - verify(relationalDataHandler, times(1)).updateDatabase(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, GUID, - database.getQualifiedName(), database.getDisplayName(), database.getDescription(), database.getOwner(), - database.getOwnerType().getOpenTypeOrdinal(), database.getZoneMembership(), database.getOriginOrganizationGUID(), - database.getOriginBusinessCapabilityGUID(), database.getOtherOriginValues(), database.getCreateTime(), database.getModifiedTime(), - database.getEncodingType(), database.getEncodingLanguage(), database.getEncodingDescription(), database.getEncodingProperties(), - database.getDatabaseType(), database.getDatabaseVersion(), database.getDatabaseInstance(), database.getDatabaseImportedFrom(), - database.getAdditionalProperties(), OpenMetadataType.DATABASE_TYPE_NAME, null, null, null, null, - true, false, false, null, methodName); - - verify(dataEngineConnectionAndEndpointHandler, times(1)).upsertConnectionAndEndpoint(QUALIFIED_NAME, - GUID, OpenMetadataType.DATABASE_TYPE_NAME, PROTOCOL, NETWORK_ADDRESS, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, USER); - } - - @Test - void upsertDatabaseSchema_create() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertDatabaseSchema"; - DatabaseSchema databaseSchema = getDatabaseSchema(); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - int ordinal = OwnerType.USER_ID.getOrdinal(); - when(relationalDataHandler.createDatabaseSchema(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, DATABASE_GUID, - databaseSchema.getQualifiedName(), databaseSchema.getDisplayName(), null, databaseSchema.getDescription(), - databaseSchema.getOwner(), ordinal, databaseSchema.getZoneMembership(), databaseSchema.getOriginOrganizationGUID(), - databaseSchema.getOriginBusinessCapabilityGUID(), databaseSchema.getOtherOriginValues(), - databaseSchema.getAdditionalProperties(), OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, null, - null, null, null, - false, false, null, methodName)).thenReturn(SCHEMA_GUID); - - String result = dataEngineRelationalDataHandler.upsertDatabaseSchema(USER, DATABASE_GUID, databaseSchema, - EXTERNAL_SOURCE_DE_NAME); - - assertEquals(SCHEMA_GUID, result); - } - - - @Test - void upsertDatabaseSchema_create_incomplete() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertDatabaseSchema"; - DatabaseSchema databaseSchema = getDatabaseSchema(); - databaseSchema.setIncomplete(true); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - int ordinal = OwnerType.USER_ID.getOrdinal(); - when(relationalDataHandler.createDatabaseSchema(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, DATABASE_GUID, - databaseSchema.getQualifiedName(), databaseSchema.getDisplayName(), null, databaseSchema.getDescription(), - databaseSchema.getOwner(), ordinal, databaseSchema.getZoneMembership(), databaseSchema.getOriginOrganizationGUID(), - databaseSchema.getOriginBusinessCapabilityGUID(), databaseSchema.getOtherOriginValues(), - databaseSchema.getAdditionalProperties(), OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, null, - null, null, null, - false, false, null, methodName)).thenReturn(SCHEMA_GUID); - - doNothing().when(databaseSchemaAssetHandler).setClassificationInRepository(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, SCHEMA_GUID, - DATABASE_SCHEMA_GUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, - null, null, false, false, true,null, - null, methodName); - - String result = dataEngineRelationalDataHandler.upsertDatabaseSchema(USER, DATABASE_GUID, databaseSchema, - EXTERNAL_SOURCE_DE_NAME); - - verify(databaseSchemaAssetHandler, times(1)).setClassificationInRepository(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_NAME, SCHEMA_GUID, DATABASE_SCHEMA_GUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, null, true, false, - false, null, methodName); - assertEquals(SCHEMA_GUID, result); - } - - @Test - void upsertDatabaseSchema_update() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertDatabaseSchema"; - DatabaseSchema databaseSchema = getDatabaseSchema(); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - mockFindEntity(DS_QUALIFIED_NAME, SCHEMA_GUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - - int ordinal = OwnerType.USER_ID.getOrdinal(); - doNothing().when(relationalDataHandler).updateDatabaseSchema(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, - SCHEMA_GUID, databaseSchema.getQualifiedName(), databaseSchema.getDisplayName(), null, databaseSchema.getDescription(), - databaseSchema.getOwner(), ordinal, databaseSchema.getZoneMembership(), databaseSchema.getOriginOrganizationGUID(), - databaseSchema.getOriginBusinessCapabilityGUID(), databaseSchema.getOtherOriginValues(), - databaseSchema.getAdditionalProperties(), OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, - null, null, null, null, true, - false, false, null, methodName); - - String result = dataEngineRelationalDataHandler.upsertDatabaseSchema(USER, DATABASE_GUID, databaseSchema, - EXTERNAL_SOURCE_DE_NAME); - - assertEquals(SCHEMA_GUID, result); - } - - @Test - void upsertRelationalTable_create() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertRelationalTable"; - RelationalTable relationalTable = getRelationalTable(); - RelationalColumn column = getRelationalColumn(); - relationalTable.setColumns(Collections.singletonList(column)); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - mockFindEntity(QUALIFIED_NAME, DATABASE_GUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - - when(relationalDataHandler.createDatabaseTable(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, DATABASE_GUID, - relationalTable.getQualifiedName(), relationalTable.getDisplayName(), relationalTable.getDescription(), - relationalTable.getIsDeprecated(), relationalTable.getAliases(), relationalTable.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, null, null, null, null, - false, false, null, methodName)).thenReturn(TABLE_GUID); - - String result = dataEngineRelationalDataHandler.upsertRelationalTable(USER, QUALIFIED_NAME, relationalTable, - EXTERNAL_SOURCE_DE_NAME); - - assertEquals(TABLE_GUID, result); - verifyInvalidParameterHandlerInvocations(methodName); - verify(relationalDataHandler, times(1)).createDatabaseColumn(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, - TABLE_GUID, column.getQualifiedName(), column.getDisplayName(), column.getDescription(), column.getExternalTypeGUID(), - column.getDataType(), column.getDefaultValue(), column.getFixedValue(), column.getValidValuesSetGUID(), column.getFormula(), - column.getIsDeprecated(), column.getPosition(), column.getMinCardinality(), column.getMaxCardinality(), - column.getAllowsDuplicateValues(), column.getOrderedValues(), column.getDefaultValueOverride(), - column.getSortOrder().getOpenTypeOrdinal(), column.getMinimumLength(), column.getLength(), column.getPrecision(), - column.getIsNullable(), column.getNativeClass(), column.getAliases(), column.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_COLUMN_TYPE_NAME, null, null, null, - null, false, false, null,"upsertRelationalColumns"); - } - - @Test - void upsertRelationalTable_create_incomplete() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertRelationalTable"; - RelationalTable relationalTable = getRelationalTable(); - RelationalColumn column = getRelationalColumn(); - relationalTable.setColumns(Collections.singletonList(column)); - relationalTable.setIncomplete(true); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - mockFindEntity(QUALIFIED_NAME, DATABASE_GUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME); - - when(relationalDataHandler.createDatabaseTable(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, DATABASE_GUID, - relationalTable.getQualifiedName(), relationalTable.getDisplayName(), relationalTable.getDescription(), - relationalTable.getIsDeprecated(), relationalTable.getAliases(), relationalTable.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, null, null, null, null, false, - false, null, methodName)).thenReturn(TABLE_GUID); - - doNothing().when(databaseSchemaAssetHandler).setClassificationInRepository(USER, null, null, - TABLE_GUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_GUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, - null, null, false, false, true,null, null, methodName); - - String result = dataEngineRelationalDataHandler.upsertRelationalTable(USER, QUALIFIED_NAME, relationalTable, - EXTERNAL_SOURCE_DE_NAME); - - assertEquals(TABLE_GUID, result); - verifyInvalidParameterHandlerInvocations(methodName); - verify(relationalDataHandler, times(1)).createDatabaseColumn(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, - TABLE_GUID, column.getQualifiedName(), column.getDisplayName(), column.getDescription(), column.getExternalTypeGUID(), - column.getDataType(), column.getDefaultValue(), column.getFixedValue(), column.getValidValuesSetGUID(), column.getFormula(), - column.getIsDeprecated(), column.getPosition(), column.getMinCardinality(), column.getMaxCardinality(), - column.getAllowsDuplicateValues(), column.getOrderedValues(), column.getDefaultValueOverride(), - column.getSortOrder().getOpenTypeOrdinal(), column.getMinimumLength(), column.getLength(), column.getPrecision(), - column.getIsNullable(), column.getNativeClass(), column.getAliases(), column.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_COLUMN_TYPE_NAME, null, null, null, null, - false, false, null, "upsertRelationalColumns"); - - verify(databaseSchemaAssetHandler, times(1)).setClassificationInRepository(USER,EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, - TABLE_GUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_GUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.INCOMPLETE_CLASSIFICATION_TYPE_NAME, - null, true, false, false, null, methodName); - } - - @Test - void upsertRelationalTable_update() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertRelationalTable"; - RelationalTable relationalTable = getRelationalTable(); - RelationalColumn column = getRelationalColumn(); - relationalTable.setColumns(Collections.singletonList(column)); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - mockFindEntity(QUALIFIED_NAME, TABLE_GUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME); - mockFindEntity(COLUMN_QUALIFIED_NAME, COLUMN_GUID, OpenMetadataType.RELATIONAL_COLUMN_TYPE_NAME); - - String result = dataEngineRelationalDataHandler.upsertRelationalTable(USER, QUALIFIED_NAME, relationalTable, EXTERNAL_SOURCE_DE_NAME); - - assertEquals(TABLE_GUID, result); - verifyInvalidParameterHandlerInvocations(methodName); - verify(relationalDataHandler, times(1)).updateDatabaseTable(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, TABLE_GUID, - relationalTable.getQualifiedName(), relationalTable.getDisplayName(), relationalTable.getDescription(), - relationalTable.getIsDeprecated(), relationalTable.getAliases(), relationalTable.getAdditionalProperties(), - OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME, null, null, null, - null, true, false, false, null, methodName); - verify(relationalDataHandler, times(1)).updateDatabaseColumn(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, - COLUMN_GUID, column.getQualifiedName(), column.getDisplayName(), column.getDescription(), - column.getDataType(), column.getDefaultValue(), column.getFixedValue(), column.getFormula(), column.getIsDeprecated(), - column.getPosition(), column.getMinCardinality(), column.getMaxCardinality(), column.getAllowsDuplicateValues(), - column.getOrderedValues(), column.getDefaultValueOverride(), column.getSortOrder().getOpenTypeOrdinal(), column.getMinimumLength(), - column.getLength(), column.getPrecision(), column.getIsNullable(), column.getNativeClass(), column.getAliases(), - column.getAdditionalProperties(), OpenMetadataType.RELATIONAL_COLUMN_TYPE_NAME, null, null,null, - null, true, false, false, null, "upsertRelationalColumns"); - } - - @Test - void removeDatabase() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - - final String methodName = "removeDatabase"; - - EntityDetail mockedEntity = mockEntityDetail(GUID); - when(dataEngineCommonHandler.getEntityDetails(USER, GUID, OpenMetadataType.DATABASE_TYPE_NAME)) - .thenReturn(Optional.of(mockedEntity)); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineRelationalDataHandler.removeDatabase(USER, GUID, EXTERNAL_SOURCE_DE_NAME, DeleteSemantic.SOFT); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, methodName); - - verify(relationalDataHandler, times(1)).removeDatabase(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, - GUID, QUALIFIED_NAME, false, false, null, methodName); - } - - @Test - void removeDatabase_throwsFunctionNotSupportedException() throws FunctionNotSupportedException { - FunctionNotSupportedException mockedException = mock(FunctionNotSupportedException.class); - doThrow(mockedException).when(dataEngineCommonHandler).validateDeleteSemantic(DeleteSemantic.HARD, "removeDatabase"); - - assertThrows(FunctionNotSupportedException.class, () -> - dataEngineRelationalDataHandler.removeDatabase(USER, GUID, EXTERNAL_SOURCE_DE_NAME, DeleteSemantic.HARD)); - } - - @Test - void removeDatabaseSchema() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - - final String methodName = "removeDatabaseSchema"; - - EntityDetail mockedEntity = mockEntityDetail(SCHEMA_GUID); - when(dataEngineCommonHandler.getEntityDetails(USER, SCHEMA_GUID, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME)) - .thenReturn(Optional.of(mockedEntity)); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineRelationalDataHandler.removeDatabaseSchema(USER, SCHEMA_GUID, EXTERNAL_SOURCE_DE_NAME, DeleteSemantic.SOFT); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, methodName); - - verify(relationalDataHandler, times(1)).removeDatabaseSchema(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_NAME, SCHEMA_GUID, QUALIFIED_NAME, false, false, null, methodName); - } - - @Test - void removeRelationalTable() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - - final String methodName = "removeRelationalTable"; - - EntityDetail mockedEntity = mockEntityDetail(GUID); - when(dataEngineCommonHandler.getEntityDetails(USER, GUID, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME)) - .thenReturn(Optional.of(mockedEntity)); - - when(registrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineRelationalDataHandler.removeRelationalTable(USER, GUID, EXTERNAL_SOURCE_DE_NAME, DeleteSemantic.SOFT); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, methodName); - - verify(relationalDataHandler, times(1)).removeDatabaseTable(USER, - EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_NAME, GUID, GUID, QUALIFIED_NAME, - false, false, null, methodName); - } - - private EntityDetail mockEntityDetail(String guid) { - EntityDetail entityDetail = mock(EntityDetail.class); - - when(entityDetail.getGUID()).thenReturn(guid); - InstanceProperties instanceProperties = mock(InstanceProperties.class); - InstancePropertyValue propertyValue = mock(InstancePropertyValue.class); - when(propertyValue.valueAsString()).thenReturn(QUALIFIED_NAME); - when(instanceProperties.getPropertyValue(OpenMetadataProperty.QUALIFIED_NAME.name)).thenReturn(propertyValue); - when(entityDetail.getProperties()).thenReturn(instanceProperties); - - return entityDetail; - } - - private void mockFindEntity(String qualifiedName, String guid, String entityTypeName) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(guid); - Optional optionalOfMockedEntity = Optional.of(entityDetail); - when(dataEngineCommonHandler.findEntity(USER, qualifiedName, entityTypeName)).thenReturn(optionalOfMockedEntity); - } - - private DatabaseSchema getDatabaseSchema() { - DatabaseSchema databaseSchema = new DatabaseSchema(); - databaseSchema.setQualifiedName(DS_QUALIFIED_NAME); - databaseSchema.setDisplayName(DS_DISPLAY_NAME); - databaseSchema.setDescription(DS_DESCRIPTION); - databaseSchema.setOwnerType(OwnerType.USER_ID); - return databaseSchema; - } - - private Database getDatabase() { - Database database = new Database(); - database.setQualifiedName(QUALIFIED_NAME); - database.setDisplayName(NAME); - database.setDescription(DESCRIPTION); - database.setOwner(OWNER); - database.setOwnerType(OwnerType.USER_ID); - database.setZoneMembership(ZONE_MEMBERSHIP); - database.setDatabaseType(DATABASE_TYPE); - database.setDatabaseVersion(DATABASE_VERSION); - database.setDatabaseInstance(DATABASE_INSTANCE); - database.setDatabaseImportedFrom(DATABASE_IMPORTED_FROM); - database.setProtocol(PROTOCOL); - database.setNetworkAddress(NETWORK_ADDRESS); - - return database; - } - - private RelationalTable getRelationalTable() { - RelationalTable relationalTable = new RelationalTable(); - relationalTable.setQualifiedName(QUALIFIED_NAME); - relationalTable.setDisplayName(NAME); - relationalTable.setDescription(DESCRIPTION); - relationalTable.setIsDeprecated(false); - relationalTable.setAliases(Collections.singletonList("alias")); - - return relationalTable; - } - - private RelationalColumn getRelationalColumn() { - RelationalColumn relationalColumn = new RelationalColumn(); - relationalColumn.setQualifiedName(COLUMN_QUALIFIED_NAME); - relationalColumn.setDisplayName(COLUMN_NAME); - relationalColumn.setDescription(COLUMN_DESCRIPTION); - relationalColumn.setDataType(COLUMN_DATA_TYPE); - relationalColumn.setFormula(COLUMN_FORMULA); - relationalColumn.setSortOrder(DataItemSortOrder.ASCENDING); - relationalColumn.setMaxCardinality(1); - relationalColumn.setMinCardinality(0); - relationalColumn.setLength(50); - relationalColumn.setMinimumLength(0); - - return relationalColumn; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaAttributeHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaAttributeHandlerTest.java deleted file mode 100644 index b0dddb369d5..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaAttributeHandlerTest.java +++ /dev/null @@ -1,113 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Collections; -import java.util.Optional; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.internal.verification.VerificationModeFactory.times; -import static org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaAttributeHandler.SCHEMA_TYPE_GUID_PARAMETER_NAME; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineSchemaAttributeHandlerTest { - private static final String USER = "user"; - private static final String GUID = "guid"; - private static final String ATTRIBUTE_QUALIFIED_NAME = "attributeQualifiedName"; - private static final String ATTRIBUTE_DISPLAY_NAME = "attributeName"; - private static final String ATTRIBUTE_GUID = "attributeGuid"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private SchemaAttributeHandler schemaAttributeHandler; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @InjectMocks - private DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler; - - @Test - void upsertSchemaAttributes_create() throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - when(dataEngineCommonHandler.findEntity(USER, ATTRIBUTE_QUALIFIED_NAME, OpenMetadataType.SCHEMA_ATTRIBUTE.typeName)).thenReturn(Optional.empty()); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - Attribute attribute = getAttribute(); - when(dataEngineCommonHandler.getSortOrder(attribute)).thenReturn(99); - - dataEngineSchemaAttributeHandler.upsertSchemaAttributes(USER, Collections.singletonList(attribute), - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID, GUID); - - verify(schemaAttributeHandler, times(1)).createNestedSchemaAttribute(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, GUID, SCHEMA_TYPE_GUID_PARAMETER_NAME, ATTRIBUTE_QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, - ATTRIBUTE_DISPLAY_NAME, null, null, null, null, null, - null, null, false, 0, 0, 0, false, - false, null, 99, 0, 0, 0, false, null, - null, null, OpenMetadataType.TABULAR_COLUMN_TYPE_NAME, null, null, null, false, - false, null, "createSchemaAttribute"); - } - - @Test - void upsertSchemaAttributes_update() throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String methodName = "updateSchemaAttribute"; - EntityDetail schemaAttributeEntity = mock(EntityDetail.class); - when(schemaAttributeEntity.getGUID()).thenReturn(ATTRIBUTE_GUID); - when(dataEngineCommonHandler.findEntity(USER, ATTRIBUTE_QUALIFIED_NAME, OpenMetadataType.SCHEMA_ATTRIBUTE.typeName)).thenReturn(Optional.of(schemaAttributeEntity)); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - Attribute attribute = getAttribute(); - when(dataEngineCommonHandler.getSortOrder(attribute)).thenReturn(99); - - EntityDetail schemaAttributeUpdatedEntity = mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(ATTRIBUTE_GUID, null)).thenReturn(schemaAttributeUpdatedEntity); - EntityDetailDifferences attributeDifferences = mock(EntityDetailDifferences.class); - when((attributeDifferences.hasInstancePropertiesDifferences())).thenReturn(Boolean.TRUE); - when(repositoryHelper.getEntityDetailDifferences(schemaAttributeEntity, schemaAttributeUpdatedEntity, true)) - .thenReturn(attributeDifferences); - - dataEngineSchemaAttributeHandler.upsertSchemaAttributes(USER, Collections.singletonList(attribute), - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID, GUID); - - verify(schemaAttributeHandler, times(1)).updateSchemaAttribute(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, ATTRIBUTE_GUID, null, false, false, null, methodName); - } - - private Attribute getAttribute() { - Attribute attribute = new Attribute(); - attribute.setQualifiedName(ATTRIBUTE_QUALIFIED_NAME); - attribute.setDisplayName(ATTRIBUTE_DISPLAY_NAME); - - return attribute; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaTypeHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaTypeHandlerTest.java deleted file mode 100644 index d716e537e27..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaTypeHandlerTest.java +++ /dev/null @@ -1,342 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Spy; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeBuilder; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailDifferences; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.lang.reflect.InvocationTargetException; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaTypeHandler.SCHEMA_TYPE_GUID_PARAMETER_NAME; -import static org.odpi.openmetadata.accessservices.dataengine.server.util.MockedExceptionUtil.mockException; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineSchemaTypeHandlerTest { - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String VERSION = "version"; - private static final String GUID = "guid"; - private static final String AUTHOR = "author"; - private static final String USAGE = "usage"; - private static final String ENCODING_STANDARD = "encodingStandard"; - private static final String ATTRIBUTE_QUALIFIED_NAME = "attributeQualifiedName"; - private static final String ATTRIBUTE_DISPLAY_NAME = "attributeName"; - private static final String ATTRIBUTE_GUID = "attributeGuid"; - private static final String SOURCE_GUID = "sourceGuid"; - private static final String SOURCE_QUALIFIED_NAME = "sourceQualifiedName"; - private static final String SOURCE_TYPE = "sourceType"; - private static final String TARGET_TYPE = "targetType"; - private static final String TARGET_GUID = "targetGuid"; - private static final String TARGET_QUALIFIED_NAME = "targetQualifiedName"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - - @Mock - private OMRSRepositoryHelper repositoryHelper; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @Mock - private SchemaTypeHandler schemaTypeHandler; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler; - - @Spy - @InjectMocks - private DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler; - - private final Attribute attribute = getAttribute(); - - private final List attributeList = Collections.singletonList(attribute); - - @BeforeEach - void setup() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - } - - @Test - void createSchemaTypeWithSchemaAttribute() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertSchemaType"; - - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME)).thenReturn(Optional.empty()); - - SchemaType schemaType = getSchemaType(); - SchemaTypeBuilder schemaTypeBuilder = getSchemaTypeBuilder(schemaType); - doReturn(schemaTypeBuilder).when(dataEngineSchemaTypeHandler).getSchemaTypeBuilder(schemaType); - when(schemaTypeHandler.addSchemaType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - schemaTypeBuilder, null, null, false, false, null, - methodName)).thenReturn(GUID); - - mockTypeDef(OpenMetadataType.TYPE_EMBEDDED_ATTRIBUTE_CLASSIFICATION_TYPE_NAME, OpenMetadataType.TYPE_TO_ATTRIBUTE_RELATIONSHIP_TYPE_GUID); - - String result = dataEngineSchemaTypeHandler.upsertSchemaType(USER, schemaType, null, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - assertEquals(GUID, result); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - verify(invalidParameterHandler, times(1)).validateName(NAME, OpenMetadataProperty.DISPLAY_NAME.name, methodName); - verify(dataEngineSchemaAttributeHandler, times(1)).upsertSchemaAttributes(USER, attributeList, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID, GUID); - } - - @Test - void updateSchemaTypeWithSchemaAttribute() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - String methodName = "upsertSchemaType"; - - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - SchemaType schemaType = getSchemaType(); - SchemaTypeBuilder schemaTypeBuilder = getSchemaTypeBuilder(schemaType); - doReturn(schemaTypeBuilder).when(dataEngineSchemaTypeHandler).getSchemaTypeBuilder(schemaType); - - EntityDetail schemaTypeEntity = mockFindEntity(QUALIFIED_NAME, GUID, SOURCE_TYPE, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME); - - EntityDetail schemaTypeUpdatedEntity = mock(EntityDetail.class); - when(dataEngineCommonHandler.buildEntityDetail(GUID, null)).thenReturn(schemaTypeUpdatedEntity); - EntityDetailDifferences schemaTypeDifferences = mock(EntityDetailDifferences.class); - when((schemaTypeDifferences.hasInstancePropertiesDifferences())).thenReturn(Boolean.TRUE); - when(repositoryHelper.getEntityDetailDifferences(schemaTypeEntity, schemaTypeUpdatedEntity, true)) - .thenReturn(schemaTypeDifferences); - - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(EXTERNAL_SOURCE_DE_GUID); - - String result = dataEngineSchemaTypeHandler.upsertSchemaType(USER, schemaType, null, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - assertEquals(GUID, result); - verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); - verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, - OpenMetadataProperty.QUALIFIED_NAME.name, methodName); - verify(invalidParameterHandler, times(1)).validateName(NAME, - OpenMetadataProperty.DISPLAY_NAME.name, methodName); - verify(schemaTypeHandler, times(1)).updateSchemaType(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, GUID, SCHEMA_TYPE_GUID_PARAMETER_NAME, schemaTypeBuilder, true, - false, false, null, methodName); - verify(dataEngineSchemaAttributeHandler, times(1)).upsertSchemaAttributes(USER, attributeList, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID, GUID); - } - - @Test - void createSchemaType_throwsUserNotAuthorizedException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "upsertSchemaType"; - - SchemaType schemaType = getSchemaType(); - SchemaTypeBuilder schemaTypeBuilder = getSchemaTypeBuilder(schemaType); - - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME)).thenReturn(Optional.empty()); - - doReturn(schemaTypeBuilder).when(dataEngineSchemaTypeHandler).getSchemaTypeBuilder(schemaType); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(schemaTypeHandler.addSchemaType(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, schemaTypeBuilder, null, - null, false, false, null, - methodName)).thenThrow(mockedException); - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEngineSchemaTypeHandler.upsertSchemaType(USER, getSchemaType(), null, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void addDataFlowRelationship() throws UserNotAuthorizedException, PropertyServerException, - InvalidParameterException { - mockFindEntity(SOURCE_QUALIFIED_NAME, SOURCE_GUID, SOURCE_TYPE, OpenMetadataType.REFERENCEABLE.typeName); - mockFindEntity(TARGET_QUALIFIED_NAME, TARGET_GUID, TARGET_TYPE, OpenMetadataType.REFERENCEABLE.typeName); - - dataEngineSchemaTypeHandler.addDataFlowRelationship(USER, SOURCE_QUALIFIED_NAME, TARGET_QUALIFIED_NAME, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null, null); - - verify(dataEngineCommonHandler, times(1)).upsertExternalRelationship(USER, SOURCE_GUID, TARGET_GUID, - OpenMetadataType.DATA_FLOW_TYPE_NAME, SOURCE_TYPE, TARGET_TYPE, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null); - } - - @Test - void addDataFlowRelationship_throwsUserNotAuthorizedException() throws UserNotAuthorizedException, - PropertyServerException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException, - InvalidParameterException { - final String methodName = "addDataFlowRelationship"; - - mockFindEntity(SOURCE_QUALIFIED_NAME, SOURCE_GUID, SOURCE_TYPE, OpenMetadataType.REFERENCEABLE.typeName); - mockFindEntity(TARGET_QUALIFIED_NAME, TARGET_GUID, TARGET_TYPE, OpenMetadataType.REFERENCEABLE.typeName); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(dataEngineCommonHandler).upsertExternalRelationship(USER, SOURCE_GUID, TARGET_GUID, - OpenMetadataType.DATA_FLOW_TYPE_NAME, - SOURCE_TYPE, - TARGET_TYPE, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null); - - UserNotAuthorizedException thrown = assertThrows(UserNotAuthorizedException.class, () -> - dataEngineSchemaTypeHandler.addDataFlowRelationship(USER, SOURCE_QUALIFIED_NAME, TARGET_QUALIFIED_NAME, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null, null)); - - assertTrue(thrown.getMessage().contains("OMAS-DATA-ENGINE-404-001 ")); - } - - @Test - void addDataFlowRelationship_throwsInvalidParameterException() throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException { - when(dataEngineCommonHandler.findEntity(USER, TARGET_QUALIFIED_NAME, OpenMetadataType.SCHEMA_ATTRIBUTE.typeName)).thenReturn(Optional.empty()); - - dataEngineSchemaTypeHandler.addDataFlowRelationship(USER, SOURCE_QUALIFIED_NAME, TARGET_QUALIFIED_NAME, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null, null); - - verify(dataEngineCommonHandler, times(1)).throwInvalidParameterException(DataEngineErrorCode.REFERENCEABLE_NOT_FOUND, - "addDataFlowRelationship", SOURCE_QUALIFIED_NAME); - } - - @Test - void removeSchemaType() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, FunctionNotSupportedException { - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - - //mock getSchemaAttributesForSchemaType - mockTypeDef(OpenMetadataType.TYPE_TO_ATTRIBUTE_RELATIONSHIP_TYPE_NAME, - OpenMetadataType.TYPE_TO_ATTRIBUTE_RELATIONSHIP_TYPE_GUID); - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(ATTRIBUTE_GUID); - Set entityDetails = new HashSet<>(); - entityDetails.add(entityDetail); - when(dataEngineCommonHandler.getEntitiesForRelationship(USER, GUID, OpenMetadataType.TYPE_TO_ATTRIBUTE_RELATIONSHIP_TYPE_NAME, - OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME)).thenReturn(entityDetails); - - dataEngineSchemaTypeHandler.removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(dataEngineCommonHandler, times(1)).removeEntity(USER, GUID, - OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(dataEngineCommonHandler, times(1)).removeEntity(USER, ATTRIBUTE_GUID, - OpenMetadataType.TABULAR_COLUMN_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - } - - @Test - void removeSchemaType_throwsFunctionNotSupportedException() throws FunctionNotSupportedException { - FunctionNotSupportedException mockedException = new FunctionNotSupportedException( - OMRSErrorCode.METHOD_NOT_IMPLEMENTED.getMessageDefinition("removeSchemaType", this.getClass().getName(), - "server"), this.getClass().getName(), "removeSchemaType"); - doThrow(mockedException).when(dataEngineCommonHandler).validateDeleteSemantic(DeleteSemantic.HARD, "removeSchemaType"); - - assertThrows(FunctionNotSupportedException.class, () -> - dataEngineSchemaTypeHandler.removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.HARD)); - } - - private EntityDetail mockFindEntity(String qualifiedName, String guid, String entityType, String entityTypeName) - throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - InstanceType type = mock(InstanceType.class); - when(type.getTypeDefName()).thenReturn(entityType); - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(guid); - when(entityDetail.getType()).thenReturn(type); - Optional optionalOfMockedEntity = Optional.of(entityDetail); - when(dataEngineCommonHandler.findEntity(USER, qualifiedName, entityTypeName)).thenReturn(optionalOfMockedEntity); - - return entityDetail; - } - - private void mockTypeDef(String typeName, String typeGUID) { - TypeDef entityTypeDef = mock(TypeDef.class); - when(repositoryHelper.getTypeDefByName(USER, typeName)).thenReturn(entityTypeDef); - - when(entityTypeDef.getName()).thenReturn(typeName); - when(entityTypeDef.getGUID()).thenReturn(typeGUID); - } - - private Attribute getAttribute() { - Attribute attribute = new Attribute(); - attribute.setQualifiedName(ATTRIBUTE_QUALIFIED_NAME); - attribute.setDisplayName(ATTRIBUTE_DISPLAY_NAME); - attribute.setMinCardinality(1); - attribute.setMaxCardinality(1); - attribute.setPosition(1); - - return attribute; - } - - private SchemaType getSchemaType() { - SchemaType schemaType = new SchemaType(); - - schemaType.setQualifiedName(QUALIFIED_NAME); - schemaType.setDisplayName(NAME); - schemaType.setAuthor(AUTHOR); - schemaType.setUsage(USAGE); - schemaType.setEncodingStandard(ENCODING_STANDARD); - schemaType.setVersionNumber(VERSION); - - schemaType.setAttributeList(attributeList); - - return schemaType; - } - - SchemaTypeBuilder getSchemaTypeBuilder(SchemaType schemaType) { - return new SchemaTypeBuilder(schemaType.getQualifiedName(), schemaType.getDisplayName(), null, - schemaType.getVersionNumber(), false, schemaType.getAuthor(), schemaType.getUsage(), - schemaType.getEncodingStandard(), null, null, - OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_GUID, - OpenMetadataType.TABULAR_SCHEMA_TYPE_TYPE_NAME, - null, repositoryHelper, "serviceName", "serverName"); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineTopicHandlerTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineTopicHandlerTest.java deleted file mode 100644 index 7754e0b5db0..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineTopicHandlerTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.handlers; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.HashMap; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.internal.verification.VerificationModeFactory.times; -import static org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineTopicHandler.TOPIC_GUID_PARAMETER_NAME; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineTopicHandlerTest { - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String DISPLAY_NAME = "name"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - private static final String GUID = "guid"; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private AssetHandler topicHandler; - - @Mock - private InvalidParameterHandler invalidParameterHandler; - - @InjectMocks - private DataEngineTopicHandler dataEngineTopicHandler; - - - @Test - void upsertTopic_create() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.TOPIC.typeName)).thenReturn(Optional.empty()); - - Topic topic = getTopic(); - dataEngineTopicHandler.upsertTopic(USER, topic, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(topicHandler, times(1)).createAssetInRepository(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, QUALIFIED_NAME, DISPLAY_NAME, null, null, null, null, - 0, null, null, null, null, - OpenMetadataType.TOPIC.typeGUID, OpenMetadataType.TOPIC.typeName, new HashMap<>(), null, null, InstanceStatus.ACTIVE, null, "upsertTopic"); - } - - @Test - void upsertTopic_update() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - mockFindTopic(); - - Topic topic = getTopic(); - dataEngineTopicHandler.upsertTopic(USER, topic, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(topicHandler, times(1)).updateAsset(USER, EXTERNAL_SOURCE_DE_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, GUID, TOPIC_GUID_PARAMETER_NAME, QUALIFIED_NAME, DISPLAY_NAME, null, - null, null, OpenMetadataType.TOPIC.typeGUID, OpenMetadataType.TOPIC.typeName, new HashMap<>(), null, null, - true, false, false, null, "upsertTopic"); - } - - @Test - void findTopicEntity() throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - EntityDetail entityDetail = mockFindTopic(); - - Optional result = dataEngineTopicHandler.findTopicEntity(USER, QUALIFIED_NAME); - assertTrue(result.isPresent()); - assertEquals(entityDetail, result.get()); - } - - @Test - void removeTopic() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException { - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineTopicHandler.removeTopic(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - - verify(dataEngineCommonHandler, times(1)).validateDeleteSemantic(DeleteSemantic.SOFT, "removeTopic"); - verify(topicHandler, times(1)).deleteBeanInRepository(USER, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - GUID, TOPIC_GUID_PARAMETER_NAME, OpenMetadataType.TOPIC.typeGUID, OpenMetadataType.TOPIC.typeName, null, null, false, false, null,"removeTopic"); - } - - private Topic getTopic() { - Topic topic = new Topic(); - - topic.setQualifiedName(QUALIFIED_NAME); - topic.setDisplayName(DISPLAY_NAME); - - return topic; - } - - private EntityDetail mockFindTopic() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - EntityDetail entityDetail = mock(EntityDetail.class); - when(entityDetail.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.TOPIC.typeName)).thenReturn(Optional.of(entityDetail)); - return entityDetail; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/service/DataEngineRESTServicesTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/service/DataEngineRESTServicesTest.java deleted file mode 100644 index a50164e4105..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/service/DataEngineRESTServicesTest.java +++ /dev/null @@ -1,1622 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.service; - -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.CSVFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Collection; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.DataItemSortOrder; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.DeleteSemantic; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.OwnerType; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.PortType; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.accessservices.dataengine.model.UpdateSemantic; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataEngineRegistrationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFileRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFlowsRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseSchemaRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DeleteRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.EventTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.PortImplementationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessingStateRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.RelationalTableRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.SchemaTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.TopicRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.server.admin.DataEngineInstanceHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCollectionHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCommonHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineConnectionAndEndpointHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineDataFileHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineEventTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineFolderHierarchyHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEnginePortHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineProcessHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRegistrationHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRelationalDataHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaTypeHandler; -import org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineTopicHandler; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.PropertiesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -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.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.springframework.util.ReflectionUtils; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.odpi.openmetadata.accessservices.dataengine.server.util.MockedExceptionUtil.mockException; - - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineRESTServicesTest { - - private static final String SERVER_NAME = "server"; - private static final String USER = "user"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String NAME = "name"; - private static final String DESCRIPTION = "desc"; - private static final String TYPE = "type"; - private static final String VERSION = "version"; - private static final String PATCH_LEVEL = "patchLevel"; - private static final String SOURCE = "source"; - private static final String GUID = "guid"; - private static final String AUTHOR = "author"; - private static final String USAGE = "usage"; - private static final String ENCODING_STANDARD = "encodingStandard"; - private static final String VERSION_NUMBER = "versionNumber"; - private static final String FORMULA = "formula"; - private static final String OWNER = "OWNER"; - private static final String SOURCE_QUALIFIED_NAME = "source"; - private static final String TARGET_QUALIFIED_NAME = "target"; - private static final String PROCESS_GUID = "processGuid"; - private static final String SCHEMA_GUID = "schemaGuid"; - private static final String OLD_SCHEMA_GUID = "oldSchemaTypeGuid"; - private static final String OLD_SCHEMA_QUALIFIED_NAME = "oldSchemaTypeQName"; - private static final String PORT_GUID = "portGuid"; - private static final String EXTERNAL_SOURCE_DE_GUID = "externalSourceDataEngineGuid"; - private static final String EXTERNAL_SOURCE_DE_QUALIFIED_NAME = "externalSourceDataEngineQualifiedName"; - private static final String FILE_TYPE = "fileType"; - private static final String PATH = "/home/path/file.fileType"; - private static final int POSITION = 1; - private static final String NATIVE_CLASS = "nativeClass"; - private static final String PROCESS_QUALIFIED_NAME = "processQName"; - private static final String COLLECTION_GUID = "collectionGUID"; - public static final String DATABASE_QUALIFIED_NAME = "databaseQualifiedName"; - private static final String TOPIC_QUALIFIED_NAME = "topicQualifiedName"; - private static final String TOPIC_GUID = "topicGuid"; - - @Mock - RESTExceptionHandler restExceptionHandler; - - @Mock - DataEngineInstanceHandler instanceHandler; - - @InjectMocks - private DataEngineRESTServices dataEngineRESTServices; - - @Mock - private DataEngineRegistrationHandler dataEngineRegistrationHandler; - - @Mock - private DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler; - - @Mock - private DataEnginePortHandler dataEnginePortHandler; - - @Mock - private DataEngineCollectionHandler dataEngineCollectionHandler; - - @Mock - private DataEngineProcessHandler processHandler; - - @Mock - DataEngineRelationalDataHandler dataEngineRelationalDataHandler; - - @Mock - private DataEngineDataFileHandler dataEngineDataFileHandler; - - @Mock - private DataEngineCommonHandler dataEngineCommonHandler; - - @Mock - private DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler; - - @Mock - private DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler; - - @Mock - private DataEngineTopicHandler dataEngineTopicHandler; - - @Mock - private DataEngineEventTypeHandler dataEngineEventTypeHandler; - - private final PortImplementation portImplementation = getPortImplementation(); - - private final Collection collection = getCollection(); - - private final Process process = getProcess(Collections.singletonList(portImplementation)); - - @Captor - private ArgumentCaptor instanceStatuses; - - @BeforeEach - void before() { - Field instanceHandlerField = ReflectionUtils.findField(DataEngineRESTServices.class, "instanceHandler"); - instanceHandlerField.setAccessible(true); - ReflectionUtils.setField(instanceHandlerField, dataEngineRESTServices, instanceHandler); - instanceHandlerField.setAccessible(false); - - Field restExceptionHandlerField = ReflectionUtils.findField(DataEngineRESTServices.class, - "restExceptionHandler"); - restExceptionHandlerField.setAccessible(true); - ReflectionUtils.setField(restExceptionHandlerField, dataEngineRESTServices, restExceptionHandler); - restExceptionHandlerField.setAccessible(false); - } - - @Test - void createExternalDataEngine() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - mockRegistrationHandler("createExternalDataEngine"); - - when(dataEngineRegistrationHandler.upsertExternalDataEngine(USER, getEngine())).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - DataEngineRegistrationRequestBody requestBody = mockDataEngineRegistrationRequestBody(); - - GUIDResponse response = dataEngineRESTServices.createExternalDataEngine(SERVER_NAME, USER, requestBody); - assertEquals(EXTERNAL_SOURCE_DE_GUID, response.getGUID()); - - } - - @Test - void createExternalDataEngine_ResponseWithCapturedInvalidParameterException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - - String methodName = "createExternalDataEngine"; - mockRegistrationHandler(methodName); - - InvalidParameterException mockedException = mockException(InvalidParameterException.class, methodName); - when(dataEngineRegistrationHandler.upsertExternalDataEngine(USER, getEngine())).thenThrow(mockedException); - - DataEngineRegistrationRequestBody requestBody = mockDataEngineRegistrationRequestBody(); - - GUIDResponse response = dataEngineRESTServices.createExternalDataEngine(SERVER_NAME, USER, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void createExternalDataEngine_ResponseWithCapturedUserNotAuthorizedException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - - String methodName = "createExternalDataEngine"; - mockRegistrationHandler(methodName); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(dataEngineRegistrationHandler.upsertExternalDataEngine(USER, getEngine())).thenThrow(mockedException); - - DataEngineRegistrationRequestBody requestBody = mockDataEngineRegistrationRequestBody(); - - GUIDResponse response = dataEngineRESTServices.createExternalDataEngine(SERVER_NAME, USER, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void getExternalDataEngineByQualifiedName() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - mockRegistrationHandler("getExternalDataEngineByQualifiedName"); - - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - GUIDResponse response = dataEngineRESTServices.getExternalDataEngine(SERVER_NAME, USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - assertEquals(EXTERNAL_SOURCE_DE_GUID, response.getGUID()); - } - - @Test - void getExternalDataEngineByQualifiedName_ResponseWithCapturedUserNotAuthorizedException() throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - - String methodName = "getExternalDataEngineByQualifiedName"; - mockRegistrationHandler(methodName); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenThrow(mockedException); - - - GUIDResponse response = dataEngineRESTServices.getExternalDataEngine(SERVER_NAME, USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void getExternalDataEngineByQualifiedName_ResponseWithCapturedInvalidParameterException() throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - - String methodName = "getExternalDataEngineByQualifiedName"; - mockRegistrationHandler(methodName); - - InvalidParameterException mockedException = mockException(InvalidParameterException.class, methodName); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, QUALIFIED_NAME)).thenThrow(mockedException); - - - GUIDResponse response = dataEngineRESTServices.getExternalDataEngine(SERVER_NAME, USER, QUALIFIED_NAME); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void upsertSchemaType() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockSchemaTypeHandler("upsertSchemaType"); - - when(dataEngineSchemaTypeHandler.upsertSchemaType(USER, getSchemaType(), null, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(GUID); - - SchemaTypeRequestBody requestBody = mockSchemaTypeRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertSchemaType(USER, SERVER_NAME, requestBody); - assertEquals(GUID, response.getGUID()); - } - - @Test - void upsertSchemaType_ResponseWithCapturedInvalidParameterException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "upsertSchemaType"; - - mockSchemaTypeHandler(methodName); - - InvalidParameterException mockedException = mockException(InvalidParameterException.class, methodName); - when(dataEngineSchemaTypeHandler.upsertSchemaType(USER, getSchemaType(), null, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenThrow(mockedException); - - SchemaTypeRequestBody requestBody = mockSchemaTypeRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertSchemaType(USER, SERVER_NAME, requestBody); - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void upsertSchemaType_ResponseWithCapturedUserNotAuthorizedException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "upsertSchemaType"; - - mockSchemaTypeHandler(methodName); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(dataEngineSchemaTypeHandler.upsertSchemaType(USER, getSchemaType(), null, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenThrow(mockedException); - - SchemaTypeRequestBody requestBody = mockSchemaTypeRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertSchemaType(USER, SERVER_NAME, requestBody); - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void createPortImplementation() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - PortImplementationRequestBody requestBody = mockPortImplementationRequestBody(); - - mockPortHandler("upsertPortImplementation"); - mockProcessHandler("updateProcessStatus"); - mockGetProcessGUID(); - mockSchemaTypeHandler("upsertSchemaType"); - mockPortHandler("upsertSchemaType"); - - when(dataEnginePortHandler.createPortImplementation(USER, portImplementation, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenReturn(PORT_GUID); - when(dataEngineSchemaTypeHandler.upsertSchemaType(USER, getSchemaType(), PORT_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn( - SCHEMA_GUID); - - GUIDResponse response = dataEngineRESTServices.upsertPortImplementation(USER, SERVER_NAME, requestBody); - - verify(processHandler, times(1)).updateProcessStatus(USER, PROCESS_GUID, InstanceStatus.DRAFT, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(processHandler, times(1)).updateProcessStatus(USER, PROCESS_GUID, InstanceStatus.ACTIVE, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(dataEnginePortHandler, times(1)).addPortSchemaRelationship(USER, PORT_GUID, SCHEMA_GUID, "upsertSchemaType"); - assertEquals(PORT_GUID, response.getGUID()); - } - - @Test - void createPortImplementation_ResponseWithCapturedUserNotAuthorizedException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "upsertPortImplementation"; - - mockPortHandler(methodName); - mockProcessHandler("updateProcessStatus"); - mockGetProcessGUID(); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(dataEnginePortHandler.createPortImplementation(USER, portImplementation, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenThrow(mockedException); - - PortImplementationRequestBody requestBody = mockPortImplementationRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertPortImplementation(USER, SERVER_NAME, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void createPortImplementation_ResponseWithCapturedInvalidParameterException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "upsertPortImplementation"; - - mockPortHandler(methodName); - mockProcessHandler("updateProcessStatus"); - mockGetProcessGUID(); - - InvalidParameterException mockedException = mockException(InvalidParameterException.class, methodName); - when(dataEnginePortHandler.createPortImplementation(USER, portImplementation, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)) - .thenThrow(mockedException); - - PortImplementationRequestBody requestBody = mockPortImplementationRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertPortImplementation(USER, SERVER_NAME, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void updatePortImplementation() throws InvalidParameterException, PropertyServerException, - UserNotAuthorizedException { - PortImplementationRequestBody requestBody = mockPortImplementationRequestBody(); - - mockPortHandler("upsertPortImplementation"); - mockProcessHandler("updateProcessStatus"); - mockSchemaTypeHandler("upsertSchemaType"); - mockPortHandler("upsertSchemaType"); - mockGetProcessGUID(); - - Optional portEntity = mockEntityDetail(PORT_GUID); - when(dataEnginePortHandler.findPortImplementationEntity(USER, QUALIFIED_NAME)).thenReturn(portEntity); - when(dataEngineSchemaTypeHandler.upsertSchemaType(USER, getSchemaType(), PORT_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn( - SCHEMA_GUID); - GUIDResponse response = dataEngineRESTServices.upsertPortImplementation(USER, SERVER_NAME, requestBody); - - verify(dataEnginePortHandler, times(1)).updatePortImplementation(USER, portEntity.get(), portImplementation, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(dataEnginePortHandler, times(1)).addPortSchemaRelationship(USER, PORT_GUID, SCHEMA_GUID, "upsertSchemaType"); - assertEquals(PORT_GUID, response.getGUID()); - } - - @Test - void updatePortImplementation_removeObsoleteSchema() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockPortHandler("upsertPortImplementation"); - mockProcessHandler("updateProcessStatus"); - mockSchemaTypeHandler("deleteObsoleteSchemaType"); - mockSchemaTypeHandler("removeSchemaType"); - mockSchemaTypeHandler("upsertSchemaType"); - mockSchemaTypeHandler("getSchemaTypeGUID"); - mockPortHandler("upsertSchemaType"); - mockPortHandler("findSchemaTypeForPort"); - mockCommonHandler("getEntityDetails"); - - Optional portEntity = mockEntityDetail(PORT_GUID); - when(dataEnginePortHandler.findPortImplementationEntity(USER, QUALIFIED_NAME)).thenReturn(portEntity); - - EntityDetail mockedSchemaType = mockEntityDetailWithQualifiedName(OLD_SCHEMA_GUID, OLD_SCHEMA_QUALIFIED_NAME); - when(dataEngineSchemaTypeHandler.findSchemaTypeEntity(USER, OLD_SCHEMA_QUALIFIED_NAME)).thenReturn(Optional.of(mockedSchemaType)); - when(dataEngineCommonHandler.findEntity(USER, OLD_SCHEMA_QUALIFIED_NAME, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME)).thenReturn(Optional.of(mockedSchemaType)); - when(dataEnginePortHandler.findSchemaTypeForPort(USER, PORT_GUID)).thenReturn(Optional.of(mockedSchemaType)); - PortImplementationRequestBody requestBody = mockPortImplementationRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertPortImplementation(USER, SERVER_NAME, requestBody); - - verify(dataEnginePortHandler, times(1)).updatePortImplementation(USER, portEntity.get(), portImplementation, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, OLD_SCHEMA_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - DeleteSemantic.SOFT); - assertEquals(PORT_GUID, response.getGUID()); - } - - @Test - void createProcess() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockSchemaTypeHandler("upsertSchemaType"); - mockPortHandler("upsertPortImplementation"); - mockProcessHandler("upsertProcess"); - mockProcessHandler("updateProcessStatus"); - mockCollectionHandler("createCollection"); - mockCollectionHandler("addProcessCollectionRelationship"); - - when(dataEnginePortHandler.createPortImplementation(USER, portImplementation, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn( - PORT_GUID); - - when(processHandler.createProcess(USER, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(PROCESS_GUID); - - when(dataEngineCollectionHandler.createCollection(USER, getCollection(), EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(COLLECTION_GUID); - - ProcessRequestBody requestBody = mockProcessRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertProcess(USER, SERVER_NAME, requestBody); - - verify(dataEngineSchemaTypeHandler, times(1)).upsertSchemaType(USER, getSchemaType(), PORT_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(dataEnginePortHandler, times(1)).createPortImplementation(USER, portImplementation, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(processHandler, times(1)).updateProcessStatus(USER, PROCESS_GUID, InstanceStatus.ACTIVE, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(dataEngineCollectionHandler, times(1)).addCollectionMembershipRelationship(USER, COLLECTION_GUID, PROCESS_GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - assertEquals(PROCESS_GUID, response.getGUID()); - } - - @Test - void createProcess_ResponseWithCapturedInvalidParameterException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "upsertProcess"; - mockProcessHandler("updateProcessStatus"); - mockProcessHandler(methodName); - - InvalidParameterException mockedException = mockException(InvalidParameterException.class, methodName); - - when(processHandler.createProcess(USER, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenThrow(mockedException); - - ProcessRequestBody requestBody = mockProcessRequestBody(); - - dataEngineRESTServices.upsertProcess(USER, SERVER_NAME, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void createProcess_ResponseWithCapturedUserNotAuthorizedException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "upsertProcess"; - mockProcessHandler("updateProcessStatus"); - mockProcessHandler(methodName); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - when(processHandler.createProcess(USER, process, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenThrow(mockedException); - - ProcessRequestBody requestBody = mockProcessRequestBody(); - - dataEngineRESTServices.upsertProcess(USER, SERVER_NAME, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(GUIDResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void updateProcess() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockSchemaTypeHandler("upsertSchemaType"); - mockSchemaTypeHandler("deleteObsoleteSchemaType"); - mockSchemaTypeHandler("getSchemaTypeGUID"); - mockPortHandler("upsertPortImplementation"); - mockPortHandler("upsertSchemaType"); - mockPortHandler("deleteObsoletePorts"); - mockPortHandler("getPortGUID"); - mockProcessHandler("upsertProcess"); - mockProcessHandler("updateProcessStatus"); - mockProcessHandler("addProcessPortRelationships"); - mockProcessHandler("deleteObsoletePorts"); - mockCollectionHandler("createCollection"); - mockCommonHandler("getEntityDetails"); - - Optional portEntity = mockEntityDetail(PORT_GUID); - when(dataEnginePortHandler.findPortImplementationEntity(USER, QUALIFIED_NAME)).thenReturn(portEntity); - - EntityDetail mockedSchemaType = mockEntityDetailWithQualifiedName(OLD_SCHEMA_GUID, OLD_SCHEMA_QUALIFIED_NAME); - when(dataEnginePortHandler.findSchemaTypeForPort(USER, PORT_GUID)).thenReturn(Optional.of(mockedSchemaType)); - when(dataEngineSchemaTypeHandler.upsertSchemaType(USER, getSchemaType(), PORT_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn( - SCHEMA_GUID); - - Optional processEntity = mockEntityDetail(PROCESS_GUID); - when(processHandler.findProcessEntity(USER, PROCESS_QUALIFIED_NAME)).thenReturn(processEntity); - - EntityDetail mockedPort = mockEntityDetailWithQualifiedName(PORT_GUID, QUALIFIED_NAME); - when(processHandler.getPortsForProcess(USER, PROCESS_GUID, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME)) - .thenReturn(new HashSet<>(Collections.singletonList(mockedPort))); - ProcessRequestBody requestBody = mockProcessRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertProcess(USER, SERVER_NAME, requestBody); - - verify(dataEngineSchemaTypeHandler, times(1)).upsertSchemaType(USER, getSchemaType(), PORT_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - verify(dataEnginePortHandler, times(1)).updatePortImplementation(USER, portEntity.get(), portImplementation, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - verify(processHandler, times(2)).updateProcessStatus(any(), any(), instanceStatuses.capture(), any()); - - List allValues = instanceStatuses.getAllValues(); - assertEquals(2, allValues.size()); - assertTrue(allValues.containsAll(Arrays.asList(InstanceStatus.DRAFT, InstanceStatus.ACTIVE))); - assertEquals(PROCESS_GUID, response.getGUID()); - } - - private Optional mockEntityDetail(String guid) { - EntityDetail mockedPortEntity = mock(EntityDetail.class); - when(mockedPortEntity.getGUID()).thenReturn(guid); - return Optional.of(mockedPortEntity); - } - - - private EntityDetail mockEntityDetailWithQualifiedName(String guid, String qualifiedName) { - EntityDetail entityDetail = mock(EntityDetail.class); - - when(entityDetail.getGUID()).thenReturn(guid); - InstanceProperties mockedProperties = mock(InstanceProperties.class); - InstancePropertyValue mockedPropertyValue = mock(InstancePropertyValue.class); - when(mockedPropertyValue.valueAsString()).thenReturn(OLD_SCHEMA_QUALIFIED_NAME); - when(mockedProperties.getPropertyValue(OpenMetadataProperty.QUALIFIED_NAME.name)).thenReturn(mockedPropertyValue); - when(entityDetail.getProperties()).thenReturn(mockedProperties); - - return entityDetail; - } - - @Test - void addDataFlows() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockSchemaTypeHandler("addDataFlows"); - - DataFlowsRequestBody requestBody = mockDataFlowsRequestBody(); - - dataEngineRESTServices.addDataFlows(USER, SERVER_NAME, requestBody); - - verify(dataEngineSchemaTypeHandler, times(1)).addDataFlowRelationship(USER, SOURCE_QUALIFIED_NAME, - TARGET_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null, null); - } - - @Test - void addDataFlows_ResponseWithCapturedInvalidParameterException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "addDataFlows"; - mockSchemaTypeHandler(methodName); - - DataFlowsRequestBody requestBody = mockDataFlowsRequestBody(); - - InvalidParameterException mockedException = mockException(InvalidParameterException.class, methodName); - doThrow(mockedException).when(dataEngineSchemaTypeHandler).addDataFlowRelationship(USER, SOURCE_QUALIFIED_NAME, TARGET_QUALIFIED_NAME, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null, null); - - dataEngineRESTServices.addDataFlows(USER, SERVER_NAME, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(VoidResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void addDataFlows_ResponseWithCapturedUserNotAuthorizedException() throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - InvocationTargetException, - NoSuchMethodException, - InstantiationException, - IllegalAccessException { - String methodName = "addDataFlows"; - mockSchemaTypeHandler(methodName); - - DataFlowsRequestBody requestBody = mockDataFlowsRequestBody(); - - UserNotAuthorizedException mockedException = mockException(UserNotAuthorizedException.class, methodName); - doThrow(mockedException).when(dataEngineSchemaTypeHandler).addDataFlowRelationship(USER, SOURCE_QUALIFIED_NAME, TARGET_QUALIFIED_NAME, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, null, null); - - VoidResponse response = dataEngineRESTServices.addDataFlows(USER, SERVER_NAME, requestBody); - - verify(restExceptionHandler, times(1)).captureExceptions(any(VoidResponse.class), eq(mockedException), eq(methodName)); - } - - @Test - void upsertDatabase() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockRelationalDataHandler("upsertDatabase"); - - when(dataEngineRelationalDataHandler.upsertDatabase(USER, getDatabase(), EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(GUID); - - DatabaseRequestBody requestBody = mockDatabaseRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertDatabase(USER, SERVER_NAME, requestBody); - assertEquals(GUID, response.getGUID()); - } - - @Test - void upsertDatabase_noDatabase() throws InvalidParameterException { - DatabaseRequestBody requestBody = new DatabaseRequestBody(); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - GUIDResponse response = dataEngineRESTServices.upsertDatabase(USER, SERVER_NAME, requestBody); - assertTrue(StringUtils.isEmpty(response.getGUID())); - verify(restExceptionHandler, times(1)).handleMissingValue("database", - "upsertDatabase"); - } - - @Test - void upsertDatabaseSchema() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockRelationalDataHandler("upsertDatabaseSchema"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - - mockCommonHandler("getEntityDetails"); - when(dataEngineCommonHandler.findEntity(USER, DATABASE_QUALIFIED_NAME, OpenMetadataType.DATABASE_TYPE_NAME)) - .thenReturn(Optional.of(mockedEntity)); - - when(dataEngineRelationalDataHandler.upsertDatabaseSchema(USER, GUID, getDatabaseSchema(), - EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(SCHEMA_GUID); - - DatabaseSchemaRequestBody requestBody = mockDatabaseSchemaRequestBody(); - requestBody.setDatabaseQualifiedName(DATABASE_QUALIFIED_NAME); - - GUIDResponse response = dataEngineRESTServices.upsertDatabaseSchema(USER, SERVER_NAME, requestBody); - assertEquals(SCHEMA_GUID, response.getGUID()); - } - - @Test - void upsertDatabaseSchema_noDatabaseSchema() throws InvalidParameterException { - String methodName = "upsertDatabaseSchema"; - DatabaseSchemaRequestBody requestBody = new DatabaseSchemaRequestBody(); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - GUIDResponse response = dataEngineRESTServices.upsertDatabaseSchema(USER, SERVER_NAME, requestBody); - assertTrue(StringUtils.isEmpty(response.getGUID())); - verify(restExceptionHandler, times(1)).handleMissingValue("databaseSchema", - methodName); - } - - @Test - void upsertRelationalTable() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockRelationalDataHandler("upsertRelationalTable"); - RelationalTableRequestBody requestBody = mockRelationalTableRequestBody(); - requestBody.setDatabaseSchemaQualifiedName(QUALIFIED_NAME); - - when(dataEngineRelationalDataHandler.upsertRelationalTable(USER, QUALIFIED_NAME, requestBody.getRelationalTable(), - EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(GUID); - - GUIDResponse response = dataEngineRESTServices.upsertRelationalTable(USER, SERVER_NAME, requestBody); - assertEquals(GUID, response.getGUID()); - } - - @Test - void upsertRelationalTable_noRelationalTable() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - RelationalTableRequestBody requestBody = new RelationalTableRequestBody(); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - String methodName = "upsertRelationalTable"; - mockRelationalDataHandler(methodName); - - GUIDResponse response = dataEngineRESTServices.upsertRelationalTable(USER, SERVER_NAME, requestBody); - assertTrue(StringUtils.isEmpty(response.getGUID())); - verify(restExceptionHandler, times(1)).handleMissingValue("relationalTable", methodName); - } - - @Test - void insertDataFile() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockDataFileHandler("upsertDataFile"); - DataFileRequestBody dataFileRequestBody = mockDataFileRequestBody(getDataFile()); - mockRegistrationHandler("upsertDataFile"); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineRESTServices.upsertDataFile(SERVER_NAME, USER, dataFileRequestBody); - - verify(dataEngineDataFileHandler, times(1)).upsertFileAssetIntoCatalog(OpenMetadataType.DATA_FILE.typeName, - OpenMetadataType.DATA_FILE.typeGUID, dataFileRequestBody.getDataFile(), dataFileRequestBody.getDataFile().getSchema(), - getDataFileExtendedProperties(), EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, USER, "upsertDataFile"); - } - - @Test - void insertCSVFile() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockDataFileHandler("upsertDataFile"); - DataFileRequestBody dataFileRequestBody = mockDataFileRequestBody(getCsvFile()); - mockRegistrationHandler("upsertDataFile"); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineRESTServices.upsertDataFile(SERVER_NAME, USER, dataFileRequestBody); - - verify(dataEngineDataFileHandler, times(1)).upsertFileAssetIntoCatalog(OpenMetadataType.CSV_FILE.typeName, - OpenMetadataType.CSV_FILE.typeGUID, dataFileRequestBody.getDataFile(), dataFileRequestBody.getDataFile().getSchema(), - getCSVFileExtendedProperties(), EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, USER, "upsertDataFile"); - } - - @Test - void deleteSchemaType_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockSchemaTypeHandler("deleteSchemaType"); - mockCommonHandler("getEntityDetails"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.SCHEMA_TYPE_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deleteSchemaType(USER, SERVER_NAME, getDeleteRequestBody()); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteSchemaType_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockSchemaTypeHandler("deleteSchemaType"); - mockSchemaTypeHandler("getSchemaTypeGUID"); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - dataEngineRESTServices.deleteSchemaType(USER, SERVER_NAME, deleteRequestBody); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(dataEngineSchemaTypeHandler, times(0)).findSchemaTypeEntity(USER, QUALIFIED_NAME); - } - - @Test - void deletePort_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockPortHandler("deletePort"); - mockCommonHandler("getEntityDetails"); - mockSchemaTypeHandler("deleteSchemaType"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.PORT_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - when(dataEnginePortHandler.findSchemaTypeForPort(USER, GUID)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deletePort(USER, SERVER_NAME, getDeleteRequestBody(), OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - - verify(dataEnginePortHandler, times(1)).removePort(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deletePort_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockPortHandler("deletePort"); - mockPortHandler("getPortGUID"); - mockSchemaTypeHandler("deleteSchemaType"); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEnginePortHandler.findSchemaTypeForPort(USER, GUID)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deletePort(USER, SERVER_NAME, deleteRequestBody, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - - verify(dataEnginePortHandler, times(1)).removePort(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteProcess_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockPortHandler("deletePort"); - mockSchemaTypeHandler("deleteSchemaType"); - mockProcessHandler("deleteProcess"); - mockCommonHandler("getEntityDetails"); - - EntityDetail mockedProcess = mock(EntityDetail.class); - when(mockedProcess.getGUID()).thenReturn(PROCESS_GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.PROCESS.typeName)).thenReturn(Optional.of(mockedProcess)); - - EntityDetail mockedPort = mock(EntityDetail.class); - when(mockedPort.getGUID()).thenReturn(GUID); - when(processHandler.getPortsForProcess(USER, PROCESS_GUID, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME)) - .thenReturn(new HashSet<>(Collections.singletonList(mockedPort))); - - when(dataEnginePortHandler.findSchemaTypeForPort(USER, GUID)).thenReturn(Optional.of(mockedPort)); - - DeleteRequestBody requestBody = getDeleteRequestBody(); - - dataEngineRESTServices.deleteProcess(USER, SERVER_NAME, requestBody); - - verify(dataEnginePortHandler, times(1)).removePort(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(processHandler, times(1)).removeProcess(USER, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteProcesses_withGuids() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockPortHandler("deletePort"); - mockSchemaTypeHandler("deleteSchemaType"); - mockProcessHandler("deleteProcess"); - mockProcessHandler("getProcessGUID"); - - EntityDetail mockedPort = mock(EntityDetail.class); - when(mockedPort.getGUID()).thenReturn(GUID); - when(processHandler.getPortsForProcess(USER, PROCESS_GUID, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME)) - .thenReturn(new HashSet<>(Collections.singletonList(mockedPort))); - - when(dataEnginePortHandler.findSchemaTypeForPort(USER, GUID)).thenReturn(Optional.of(mockedPort)); - - DeleteRequestBody requestBody = getDeleteRequestBody(); - requestBody.setGuid(PROCESS_GUID); - dataEngineRESTServices.deleteProcess(USER, SERVER_NAME, requestBody); - - verify(dataEnginePortHandler, times(1)).removePort(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(dataEngineSchemaTypeHandler, times(1)).removeSchemaType(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - verify(processHandler, times(1)).removeProcess(USER, PROCESS_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteDatabase_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockRelationalDataHandler("deleteDatabase"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.DATABASE_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deleteDatabase(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineRelationalDataHandler, times(1)).removeDatabase(USER, GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteDatabase_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockRelationalDataHandler("deleteDatabase"); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - dataEngineRESTServices.deleteDatabase(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineRelationalDataHandler, times(1)).removeDatabase(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteRelationalTable_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockRelationalDataHandler("deleteRelationalTable"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.RELATIONAL_TABLE_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deleteRelationalTable(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineRelationalDataHandler, times(1)).removeRelationalTable(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteDatabaseSchema_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockRelationalDataHandler("deleteDatabaseSchema"); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - dataEngineRESTServices.deleteDatabaseSchema(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineRelationalDataHandler, times(1)).removeDatabaseSchema(USER, GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteDatabaseSchema_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockRelationalDataHandler("deleteDatabaseSchema"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(SCHEMA_GUID); - - mockCommonHandler("getEntityDetails"); - - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME)) - .thenReturn(Optional.of(mockedEntity)); - dataEngineRESTServices.deleteDatabaseSchema(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineRelationalDataHandler, times(1)).removeDatabaseSchema(USER, - SCHEMA_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteRelationalTable_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockRelationalDataHandler("deleteRelationalTable"); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - dataEngineRESTServices.deleteRelationalTable(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineRelationalDataHandler, times(1)).removeRelationalTable(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteDataFile_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockDataFileHandler("deleteDataFile"); - mockRegistrationHandler("deleteDataFile"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.DATA_FILE.typeName)).thenReturn(Optional.of(mockedEntity)); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineRESTServices.deleteDataFile(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineDataFileHandler, times(1)).removeDataFile(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - EXTERNAL_SOURCE_DE_GUID, DeleteSemantic.SOFT); - } - - @Test - void deleteDataFile_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockDataFileHandler("deleteDataFile"); - mockRegistrationHandler("deleteDataFile"); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - - dataEngineRESTServices.deleteDataFile(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineDataFileHandler, times(1)).removeDataFile(USER, GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, - EXTERNAL_SOURCE_DE_GUID, DeleteSemantic.SOFT); - } - - @Test - void deleteFolder_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockFolderHierarchyHandler("deleteFolder"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.FILE_FOLDER.typeName)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deleteFolder(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineFolderHierarchyHandler, times(1)).removeFolder(USER, GUID, DeleteSemantic.SOFT, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - } - - @Test - void deleteFolder_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockFolderHierarchyHandler("deleteFolder"); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - dataEngineRESTServices.deleteFolder(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineFolderHierarchyHandler, times(1)).removeFolder(USER, GUID, DeleteSemantic.SOFT, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - } - - @Test - void deleteConnection_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - String deleteConnection = "deleteConnection"; - mockConnectionAndEndpointHandler(deleteConnection); - mockRegistrationHandler(deleteConnection); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.CONNECTION_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - dataEngineRESTServices.deleteConnection(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineConnectionAndEndpointHandler, times(1)).removeConnection(USER, - GUID, DeleteSemantic.SOFT, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID); - } - - @Test - void deleteConnection_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - String deleteConnection = "deleteConnection"; - mockConnectionAndEndpointHandler(deleteConnection); - mockRegistrationHandler(deleteConnection); - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - dataEngineRESTServices.deleteConnection(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineConnectionAndEndpointHandler, times(1)).removeConnection(USER, GUID, - DeleteSemantic.SOFT, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID); - } - - @Test - void deleteEndpoint_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - String deleteEndpoint = "deleteEndpoint"; - mockConnectionAndEndpointHandler(deleteEndpoint); - mockRegistrationHandler(deleteEndpoint); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.ENDPOINT_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - dataEngineRESTServices.deleteEndpoint(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineConnectionAndEndpointHandler, times(1)).removeEndpoint(USER, GUID, DeleteSemantic.SOFT, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID); - } - - @Test - void deleteEndpoint_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - String deleteEndpoint = "deleteEndpoint"; - mockConnectionAndEndpointHandler(deleteEndpoint); - mockRegistrationHandler(deleteEndpoint); - - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - when(dataEngineRegistrationHandler.getExternalDataEngine(USER, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(EXTERNAL_SOURCE_DE_GUID); - dataEngineRESTServices.deleteEndpoint(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineConnectionAndEndpointHandler, times(1)).removeEndpoint(USER, GUID, - DeleteSemantic.SOFT, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, EXTERNAL_SOURCE_DE_GUID); - } - - @Test - void upsertTopic() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockTopicHandler("upsertTopic"); - mockEventTypeHandler("upsertEventType"); - - when(dataEngineTopicHandler.upsertTopic(USER, getTopic(), EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(GUID); - - TopicRequestBody requestBody = mockTopicRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertTopic(USER, SERVER_NAME, requestBody); - assertEquals(GUID, response.getGUID()); - verify(dataEngineEventTypeHandler, times(1)).upsertEventType(USER, getTopic().getEventTypes().get(0), GUID, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - } - - @Test - void upsertEventType() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockTopicHandler("upsertEventType"); - mockEventTypeHandler("upsertEventType"); - - EntityDetail topic = mock(EntityDetail.class); - when(topic.getGUID()).thenReturn(TOPIC_GUID); - when(dataEngineTopicHandler.findTopicEntity(USER, TOPIC_QUALIFIED_NAME)).thenReturn(Optional.of(topic)); - when(dataEngineEventTypeHandler.upsertEventType(USER, getEventType(), TOPIC_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(GUID); - - EventTypeRequestBody requestBody = mockEventTypeRequestBody(); - - GUIDResponse response = dataEngineRESTServices.upsertEventType(USER, SERVER_NAME, requestBody); - assertEquals(GUID, response.getGUID()); - } - - @Test - void deleteTopic_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockTopicHandler("deleteTopic"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.TOPIC.typeName)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deleteTopic(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineTopicHandler, times(1)).removeTopic(USER, - GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteTopic_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockTopicHandler("deleteTopic"); - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - dataEngineRESTServices.deleteTopic(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineTopicHandler, times(1)).removeTopic(USER, - GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteEventType_withQualifiedName() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockEventTypeHandler("deleteEventType"); - - EntityDetail mockedEntity = mock(EntityDetail.class); - when(mockedEntity.getGUID()).thenReturn(GUID); - when(dataEngineCommonHandler.findEntity(USER, QUALIFIED_NAME, OpenMetadataType.EVENT_TYPE_TYPE_NAME)).thenReturn(Optional.of(mockedEntity)); - - dataEngineRESTServices.deleteEventType(USER, SERVER_NAME, getDeleteRequestBody()); - - verify(dataEngineEventTypeHandler, times(1)).removeEventType(USER, - GUID, QUALIFIED_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void deleteEventType_withGuid() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, - FunctionNotSupportedException { - mockCommonHandler("getEntityDetails"); - mockEventTypeHandler("deleteEventType"); - DeleteRequestBody deleteRequestBody = getDeleteRequestBody(); - deleteRequestBody.setGuid(GUID); - - dataEngineRESTServices.deleteEventType(USER, SERVER_NAME, deleteRequestBody); - - verify(dataEngineEventTypeHandler, times(1)).removeEventType(USER, - GUID, QUALIFIED_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, DeleteSemantic.SOFT); - } - - @Test - void upsertProcessingState() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockRegistrationHandler("upsertProcessingState"); - - ProcessingState processingState = new ProcessingState(); - ProcessingStateRequestBody requestBody = mockProcessingStateRequestBody(processingState); - - doNothing().when(dataEngineRegistrationHandler).upsertProcessingStateClassification(USER, processingState, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - dataEngineRESTServices.upsertProcessingState(USER, SERVER_NAME, requestBody); - - verify(dataEngineRegistrationHandler, times(1)).upsertProcessingStateClassification(USER, - processingState, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - } - - @Test - void getProcessingState() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - mockRegistrationHandler("getProcessingState"); - Map responseProperties = new HashMap<>(); - responseProperties.put("key", 100L); - PropertiesResponse propertiesResponse = new PropertiesResponse(); - propertiesResponse.setProperties(responseProperties); - - Map classificationProperties = new HashMap<>(); - classificationProperties.put("key", 100L); - ProcessingState processingState = new ProcessingState(); - processingState.setSyncDatesByKey(classificationProperties); - - when(dataEngineRegistrationHandler.getProcessingStateClassification(USER, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(processingState); - - PropertiesResponse result = dataEngineRESTServices.getProcessingState(USER, SERVER_NAME, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - assertEquals(result, propertiesResponse); - - verify(dataEngineRegistrationHandler, times(1)).getProcessingStateClassification(USER, - EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - } - - private DeleteRequestBody getDeleteRequestBody() { - DeleteRequestBody deleteRequestBody = new DeleteRequestBody(); - deleteRequestBody.setQualifiedName(QUALIFIED_NAME); - deleteRequestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - deleteRequestBody.setDeleteSemantic(DeleteSemantic.SOFT); - return deleteRequestBody; - } - - private DataFlowsRequestBody mockDataFlowsRequestBody() { - DataFlowsRequestBody requestBody = new DataFlowsRequestBody(); - requestBody.setDataFlows(Collections.singletonList(getDataFlow())); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - return requestBody; - } - - private void mockRegistrationHandler(String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - when(instanceHandler.getRegistrationHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineRegistrationHandler); - } - - private void mockSchemaTypeHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getDataEngineSchemaTypeHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineSchemaTypeHandler); - } - - private void mockPortHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getPortHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEnginePortHandler); - } - - private void mockProcessHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getProcessHandler(USER, SERVER_NAME, methodName)).thenReturn(processHandler); - } - - private void mockCollectionHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getCollectionHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineCollectionHandler); - } - - private void mockRelationalDataHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getRelationalDataHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineRelationalDataHandler); - } - - private void mockDataFileHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getDataFileHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineDataFileHandler); - } - - private void mockCommonHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getCommonHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineCommonHandler); - } - - private void mockFolderHierarchyHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getFolderHierarchyHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineFolderHierarchyHandler); - } - - private void mockConnectionAndEndpointHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, - PropertyServerException { - when(instanceHandler.getConnectionAndEndpointHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineConnectionAndEndpointHandler); - } - - private void mockTopicHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getTopicHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineTopicHandler); - } - - private void mockEventTypeHandler(String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - when(instanceHandler.getEventTypeHandler(USER, SERVER_NAME, methodName)).thenReturn(dataEngineEventTypeHandler); - } - - private DataEngineRegistrationRequestBody mockDataEngineRegistrationRequestBody() { - DataEngineRegistrationRequestBody requestBody = new DataEngineRegistrationRequestBody(); - requestBody.setEngine(getEngine()); - return requestBody; - } - - private SchemaTypeRequestBody mockSchemaTypeRequestBody() { - SchemaTypeRequestBody requestBody = new SchemaTypeRequestBody(); - requestBody.setSchemaType(getSchemaType()); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - return requestBody; - } - - private ProcessingStateRequestBody mockProcessingStateRequestBody(ProcessingState processingState) { - ProcessingStateRequestBody requestBody = new ProcessingStateRequestBody(); - requestBody.setProcessingState(processingState); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - return requestBody; - } - - private PortImplementationRequestBody mockPortImplementationRequestBody() { - PortImplementationRequestBody requestBody = new PortImplementationRequestBody(); - requestBody.setPortImplementation(portImplementation); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - requestBody.setProcessQualifiedName(PROCESS_QUALIFIED_NAME); - return requestBody; - } - - private ProcessRequestBody mockProcessRequestBody() { - ProcessRequestBody requestBody = new ProcessRequestBody(); - requestBody.setProcess(process); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - return requestBody; - } - - private DataFileRequestBody mockDataFileRequestBody(DataFile dataFile) { - DataFileRequestBody dataFileRequestBody = new DataFileRequestBody(); - dataFileRequestBody.setDataFile(dataFile); - dataFileRequestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - return dataFileRequestBody; - } - - private Engine getEngine() { - Engine engine = new Engine(); - - engine.setQualifiedName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - engine.setName(NAME); - engine.setDescription(DESCRIPTION); - engine.setEngineType(TYPE); - engine.setEngineVersion(VERSION); - engine.setPatchLevel(PATCH_LEVEL); - engine.setSource(SOURCE); - - return engine; - } - - private DatabaseRequestBody mockDatabaseRequestBody() { - DatabaseRequestBody requestBody = new DatabaseRequestBody(); - requestBody.setDatabase(getDatabase()); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - return requestBody; - } - - private DatabaseSchemaRequestBody mockDatabaseSchemaRequestBody() { - DatabaseSchemaRequestBody requestBody = new DatabaseSchemaRequestBody(); - requestBody.setDatabaseSchema(getDatabaseSchema()); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - return requestBody; - } - - private RelationalTableRequestBody mockRelationalTableRequestBody() { - RelationalTableRequestBody requestBody = new RelationalTableRequestBody(); - requestBody.setRelationalTable(getRelationalTable()); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - - return requestBody; - } - - private TopicRequestBody mockTopicRequestBody() { - TopicRequestBody requestBody = new TopicRequestBody(); - requestBody.setTopic(getTopic()); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - return requestBody; - } - - private EventTypeRequestBody mockEventTypeRequestBody() { - EventTypeRequestBody requestBody = new EventTypeRequestBody(); - requestBody.setEventType(getEventType()); - requestBody.setExternalSourceName(EXTERNAL_SOURCE_DE_QUALIFIED_NAME); - requestBody.setTopicQualifiedName(TOPIC_QUALIFIED_NAME); - return requestBody; - } - - private SchemaType getSchemaType() { - SchemaType schemaType = new SchemaType(); - - schemaType.setQualifiedName(QUALIFIED_NAME); - schemaType.setDisplayName(NAME); - schemaType.setAuthor(AUTHOR); - schemaType.setUsage(USAGE); - schemaType.setEncodingStandard(ENCODING_STANDARD); - schemaType.setVersionNumber(VERSION_NUMBER); - - Attribute schemaAttribute = new Attribute(); - schemaAttribute.setQualifiedName(QUALIFIED_NAME); - - schemaType.setAttributeList(Collections.singletonList(schemaAttribute)); - - return schemaType; - } - - private DataFlow getDataFlow() { - DataFlow dataFlow = new DataFlow(); - - dataFlow.setDataSupplier(SOURCE_QUALIFIED_NAME); - dataFlow.setDataConsumer(TARGET_QUALIFIED_NAME); - - return dataFlow; - } - - private PortImplementation getPortImplementation() { - PortImplementation portImplementation = new PortImplementation(); - portImplementation.setQualifiedName(QUALIFIED_NAME); - portImplementation.setDisplayName(NAME); - portImplementation.setPortType(PortType.INOUT_PORT); - portImplementation.setSchemaType(getSchemaType()); - - return portImplementation; - } - - private Process getProcess(List portImplementations) { - Process process = new Process(); - - process.setQualifiedName(PROCESS_QUALIFIED_NAME); - process.setName(NAME); - process.setDisplayName(NAME); - process.setDescription(DESCRIPTION); - process.setFormula(FORMULA); - process.setOwner(OWNER); - process.setOwnerType(OwnerType.USER_ID); - process.setPortImplementations(portImplementations); - process.setUpdateSemantic(UpdateSemantic.REPLACE); - process.setCollection(collection); - - return process; - } - - private Database getDatabase() { - Database database = new Database(); - - database.setQualifiedName(QUALIFIED_NAME); - database.setDisplayName(NAME); - return database; - } - - private DatabaseSchema getDatabaseSchema() { - DatabaseSchema databaseSchema = new DatabaseSchema(); - - databaseSchema.setQualifiedName(QUALIFIED_NAME); - databaseSchema.setDisplayName(NAME); - return databaseSchema; - } - - private RelationalTable getRelationalTable() { - RelationalTable relationalTable = new RelationalTable(); - - relationalTable.setQualifiedName(QUALIFIED_NAME); - relationalTable.setDisplayName(NAME); - - return relationalTable; - } - - private DataFile getDataFile() { - DataFile dataFile = new DataFile(); - dataFile.setQualifiedName(QUALIFIED_NAME); - dataFile.setDisplayName(NAME); - dataFile.setOwner(OWNER); - dataFile.setFileType(FILE_TYPE); - dataFile.setDescription(DESCRIPTION); - dataFile.setPathName(PATH); - dataFile.setSchema(getSchemaTypeForDataFile()); - - List tabularColumns = new ArrayList<>(); - tabularColumns.add(getTabularColumn()); - dataFile.setColumns(tabularColumns); - - return dataFile; - } - - private CSVFile getCsvFile() { - CSVFile csvFile = new CSVFile(); - csvFile.setQualifiedName(QUALIFIED_NAME); - csvFile.setDisplayName(NAME); - csvFile.setOwner(OWNER); - csvFile.setFileType(FILE_TYPE); - csvFile.setDescription(DESCRIPTION); - csvFile.setPathName(PATH); - csvFile.setSchema(getSchemaTypeForDataFile()); - csvFile.setDelimiterCharacter(","); - csvFile.setQuoteCharacter("'"); - - List tabularColumns = new ArrayList<>(); - tabularColumns.add(getTabularColumn()); - csvFile.setColumns(tabularColumns); - - return csvFile; - } - - private SchemaType getSchemaTypeForDataFile() { - SchemaType schemaType = new SchemaType(); - schemaType.setQualifiedName(QUALIFIED_NAME); - schemaType.setDisplayName(NAME); - schemaType.setAuthor(AUTHOR); - schemaType.setUsage(USAGE); - schemaType.setEncodingStandard(ENCODING_STANDARD); - schemaType.setVersionNumber(VERSION_NUMBER); - return schemaType; - } - - private Attribute getTabularColumn() { - Attribute tabularColumn = new Attribute(); - tabularColumn.setQualifiedName(QUALIFIED_NAME); - tabularColumn.setDisplayName(NAME); - tabularColumn.setDescription(DESCRIPTION); - tabularColumn.setPosition(POSITION); - tabularColumn.setNativeClass(NATIVE_CLASS); - tabularColumn.setSortOrder(DataItemSortOrder.ASCENDING); - return tabularColumn; - } - - private Map getDataFileExtendedProperties() { - Map extendedProperties = new HashMap<>(); - extendedProperties.put(FILE_TYPE, FILE_TYPE); - - return extendedProperties; - } - - private Map getCSVFileExtendedProperties() { - Map extendedProperties = new HashMap<>(); - extendedProperties.put(FILE_TYPE, FILE_TYPE); - extendedProperties.put(OpenMetadataType.DELIMITER_CHARACTER_PROPERTY_NAME, ","); - extendedProperties.put(OpenMetadataType.QUOTE_CHARACTER_PROPERTY_NAME, "'"); - - return extendedProperties; - } - - private Collection getCollection() { - Collection collection = new Collection(); - collection.setName(NAME); - collection.setQualifiedName(QUALIFIED_NAME); - - return collection; - } - - private void mockGetProcessGUID() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - mockCommonHandler("getEntityDetails"); - EntityDetail mockedProcess = mock(EntityDetail.class); - when(mockedProcess.getGUID()).thenReturn(PROCESS_GUID); - when(dataEngineCommonHandler.findEntity(USER, PROCESS_QUALIFIED_NAME, OpenMetadataType.PROCESS.typeName)).thenReturn(Optional.of(mockedProcess)); - } - - private Topic getTopic() { - Topic topic = new Topic(); - - topic.setQualifiedName(QUALIFIED_NAME); - topic.setDisplayName(NAME); - EventType eventType = new EventType(); - topic.setEventTypes(Collections.singletonList(eventType)); - - return topic; - } - - private EventType getEventType() { - EventType eventType = new EventType(); - - eventType.setQualifiedName(QUALIFIED_NAME); - eventType.setDisplayName(NAME); - - return eventType; - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/util/MockedExceptionUtil.java b/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/util/MockedExceptionUtil.java deleted file mode 100644 index e8b76d9c101..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-server/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/util/MockedExceptionUtil.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.util; - -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -public class MockedExceptionUtil { - public static T mockException(Class exceptionClass, String methodName) throws NoSuchMethodException, - IllegalAccessException, - InvocationTargetException, - InstantiationException { - - Constructor constructor = exceptionClass.getConstructor(ExceptionMessageDefinition.class, String.class, - String.class, String.class); - - return constructor.newInstance(DataEngineErrorCode.OMRS_NOT_INITIALIZED.getMessageDefinition(), - exceptionClass.getName(), methodName, ""); - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-spring/README.md b/open-metadata-implementation/access-services/data-engine/data-engine-spring/README.md deleted file mode 100644 index d5f718daba6..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-spring/README.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Data Engine Open Metadata Access Service (OMAS) with Spring - -The Data Engine OMAS spring module uses spring to create the server-side support for the REST services. - ----- -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/data-engine/data-engine-spring/build.gradle b/open-metadata-implementation/access-services/data-engine/data-engine-spring/build.gradle deleted file mode 100644 index fd50edd6cb6..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-spring/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'org.springframework:spring-web' - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-server') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') - implementation 'io.swagger.core.v3:swagger-annotations' - testImplementation 'org.mockito:mockito-core' - testImplementation 'org.mockito:mockito-junit-jupiter' - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') -} - -description = 'Data Engine OMAS with Spring' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/DataEngineResource.java b/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/DataEngineResource.java deleted file mode 100644 index 13ce96aac4d..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/DataEngineResource.java +++ /dev/null @@ -1,638 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataEngineRegistrationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFileRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DatabaseSchemaRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DeleteRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.EventTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFlowsRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.PortImplementationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessHierarchyRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessingStateRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.RelationalTableRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.SchemaTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.TopicRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.server.service.DataEngineRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.PropertiesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.ConnectionResponse; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - - -/** - * The DataEngineResource provides the server-side implementation of the Data Engine Open Metadata Assess Service - * (OMAS). This interface facilitates the creation of processes, ports and schema types, with all the needed - * relationships. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}") - -@Tag(name = "Metadata Access Server: Data Engine OMAS", description = "The Data Engine OMAS provides APIs and events for data movement/processing engines to record the " + - "changes made to the data landscape.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omas/data-engine/overview/")) - -public class DataEngineResource { - private final DataEngineRESTServices restAPI; - - /** - * Default Constructor - */ - public DataEngineResource() { - restAPI = new DataEngineRESTServices(); - } - - /** - * Registers an external data engine as source of metadata by creating an engine entity - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the entity - * @return unique identifier of the engine - */ - @PostMapping(path = "/registration") - @Operation(summary = "createExternalDataEngine", - description = "Registers an external data engine as source of metadata by creating an engine entity.", - externalDocs = @ExternalDocumentation(description = "Engine", - url = "https://egeria-project.org/concepts/software-capability/#engine")) - public GUIDResponse createExternalDataEngine(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestBody DataEngineRegistrationRequestBody requestBody) { - return restAPI.createExternalDataEngine(serverName, userId, requestBody); - } - - /** - * Returns the unique identifier of an external data engine from an engine definition. - * - * @param serverName name of server instance to call - * @param userId identifier of calling user - * @param qualifiedName qualified name of the engine - * @return unique identified of the engine - */ - @GetMapping(path = "/registration/{qualifiedName}") - @Operation(summary = "getExternalDataEngineByQualifiedName", - description = "Returns the unique identifier of an external data engine from an engine definition.", - externalDocs = @ExternalDocumentation(description = "Engine", - url = "https://egeria-project.org/concepts/software-capability/#engine")) - public GUIDResponse getExternalDataEngineByQualifiedName(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String qualifiedName) { - return restAPI.getExternalDataEngine(serverName, userId, qualifiedName); - } - - /** - * Deletes the external data engine - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the data engine - * @return void response - */ - @DeleteMapping(path = "/registration") - @Operation(summary = "deleteExternalDataEngine", - description = "Deletes the external data engine.", - externalDocs = @ExternalDocumentation(description = "Engine", - url = "https://egeria-project.org/concepts/software-capability/#engine")) - public VoidResponse deleteExternalDataEngine(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteExternalDataEngine(userId, serverName, requestBody); - } - - /** - * Creates a SchemaType entity with schema attributes and relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the schema type - * @return unique identifier of the created entity - */ - @PostMapping(path = "/schema-types") - @Operation(summary = "createOrUpdateSchemaType", - description = "Creates a SchemaType entity with schema attributes and relationships.", - externalDocs = @ExternalDocumentation(description = "SchemaType", - url = "https://egeria-project.org/concepts/schema/")) - public GUIDResponse createOrUpdateSchemaType(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody SchemaTypeRequestBody requestBody) { - return restAPI.upsertSchemaType(userId, serverName, requestBody); - } - - /** - * Removes a SchemaType entity with all the needed relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the schema type - * @return void response - */ - @DeleteMapping(path = "/schema-types") - @Operation(summary = "deleteSchemaType", - description = "Removes a SchemaType entity with all the needed relationships.", - externalDocs = @ExternalDocumentation(description = "SchemaType", - url = "https://egeria-project.org/concepts/schema/")) - public VoidResponse deleteSchemaType(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteSchemaType(userId, serverName, requestBody); - } - - /** - * Creates the PortImplementation entity - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param portImplementationRequestBody properties of the port implementation - * @return unique identifier of the created port implementation - */ - @PostMapping(path = "/port-implementations") - @Operation(summary = "createOrUpdatePortImplementation", - description = "Creates the PortImplementation entity.", - externalDocs = @ExternalDocumentation(description = "Port", - url = "https://egeria-project.org/types/2/0217-Ports/")) - public GUIDResponse createOrUpdatePortImplementation(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody PortImplementationRequestBody portImplementationRequestBody) { - return restAPI.upsertPortImplementation(userId, serverName, portImplementationRequestBody); - } - - /** - * Deletes the PortImplementation entity - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the port implementation - * @return void response - */ - @DeleteMapping(path = "/port-implementations") - @Operation(summary = "deletePortImplementation", - description = "Deletes the PortImplementation entity.", - externalDocs = @ExternalDocumentation(description = "Port", - url = "https://egeria-project.org/types/2/0217-Ports/")) - public VoidResponse deletePortImplementation(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deletePort(userId, serverName, requestBody, OpenMetadataType.PORT_IMPLEMENTATION_TYPE_NAME); - } - - /** - * Adds a ProcessHierarchy relationship between Process entities - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param processHierarchyRequestBody properties of the process hierarchy - * @return the unique identifier (guid) of the child of the process hierarchy that was updated - */ - @PostMapping(path = "/process-hierarchies") - @Operation(summary = "addProcessHierarchy", - description = "Adds a ProcessHierarchy relationship between Process entities.", - externalDocs = @ExternalDocumentation(description = "ProcessHierarchy", - url = "https://egeria-project.org/types/2/0215-Software-Components/")) - public GUIDResponse addProcessHierarchy(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody ProcessHierarchyRequestBody processHierarchyRequestBody) { - return restAPI.addProcessHierarchy(userId, serverName, processHierarchyRequestBody); - } - - /** - * Create or update the Process entity with ports, schema types and all needed relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param processRequestBody properties of the process - * @return unique identifier of the created process - */ - @PostMapping(path = "/processes") - @Operation(summary = "createOrUpdateProcess", - description = "Creates or updates the Process entity with ports, schema types and all needed relationships.", - externalDocs = @ExternalDocumentation(description = "Process", - url = "https://egeria-project.org/types/2/0215-Software-Components/")) - public GUIDResponse createOrUpdateProcess(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody ProcessRequestBody processRequestBody) { - return restAPI.upsertProcess(userId, serverName, processRequestBody); - } - - /** - * Deletes the Process - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the process - * @return void response - */ - @DeleteMapping(path = "/processes") - @Operation(summary = "deleteProcess", - description = "Deletes the Process.", - externalDocs = @ExternalDocumentation(description = "Process", - url = "https://egeria-project.org/types/2/0215-Software-Components/")) - public VoidResponse deleteProcess(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteProcess(userId, serverName, requestBody); - } - - /** - * Adds DataFlow relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param dataFlowsRequestBody properties of the data flows - * @return unique identifier of the created entity - */ - @PostMapping(path = "/data-flows") - @Operation(summary = "addDataFlows", - description = "Adds DataFlow relationships", - externalDocs = @ExternalDocumentation(description = "DataFlows", - url = "https://egeria-project.org/types/7/0750-Data-Passing/")) - public VoidResponse addDataFlows(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DataFlowsRequestBody dataFlowsRequestBody) { - return restAPI.addDataFlows(userId, serverName, dataFlowsRequestBody); - } - - - /*** - * Gets the connection details used to access Data Engine OMAS input topic - * - * @param serverName name of server instance to call - * @param userId name of the calling user - * @return OCF API ConnectionResponse object describing the details for the in topic connection used - * or - * * InvalidParameterException one of the parameters is null or invalid or - * * UserNotAuthorizedException user not authorized to issue this request or - * * PropertyServerException problem retrieving the discovery engine definition - * - */ - @GetMapping(path = "/topics/in-topic-connection") - @Operation(summary = "getInTopicConnection", - description = "Gets the connection details used to access Data Engine OMAS input topic.", - externalDocs = @ExternalDocumentation(description = "InTopic", - url = "https://egeria-project.org/concepts/in-topic/")) - public ConnectionResponse getInTopicConnection(@PathVariable String serverName, - @PathVariable String userId) { - return restAPI.getInTopicConnection(serverName, userId); - } - - /** - * Creates a Database entity with all the needed relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the database - * @return unique identifier of the created entity - */ - @PostMapping(path = "/databases") - @Operation(summary = "upsertDatabase", - description = "Creates a Database entity with all the needed relationships.", - externalDocs = @ExternalDocumentation(description = "Database", - url = "https://egeria-project.org/types/2/0224-Databases/")) - public GUIDResponse upsertDatabase(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DatabaseRequestBody requestBody) { - return restAPI.upsertDatabase(userId, serverName, requestBody); - } - - /** - * Deletes the database - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the database - * @return void response - */ - @DeleteMapping(path = "/databases") - @Operation(summary = "deleteDatabase", - description = "Deletes the database.", - externalDocs = @ExternalDocumentation(description = "Database", - url = "https://egeria-project.org/types/2/0224-Databases/")) - public VoidResponse deleteDatabase(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteDatabase(userId, serverName, requestBody); - } - - /** - * Creatse a Database Schema entity with a relationship to a database, if provided and not virtual - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the database - * @return unique identifier of the created entity - */ - @PostMapping(path = "/database-schemas") - @Operation(summary = "upsertDatabaseSchema", - description = "Creates a Database Schema entity with a relationship to a database, if provided and not virtual.", - externalDocs = @ExternalDocumentation(description = "DatabaseSchema", - url = "https://egeria-project.org/types/2/0224-Databases/#deployeddatabaseschema")) - public GUIDResponse upsertDatabaseSchema(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DatabaseSchemaRequestBody requestBody) { - return restAPI.upsertDatabaseSchema(userId, serverName, requestBody); - - } - - /** - * Deletes the database schema - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the database - * @return void response - */ - @DeleteMapping(path = "/database-schemas") - @Operation(summary = "deleteDatabaseSchema", - description = "Deletes the database schema.", - externalDocs = @ExternalDocumentation(description = "DatabaseSchema", - url = "https://egeria-project.org/types/2/0224-Databases/#deployeddatabaseschema")) - public VoidResponse deleteDatabaseSchema(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteDatabaseSchema(userId, serverName, requestBody); - } - - /** - * Creates a RelationalTable entity with all the needed relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the relational table - * @return unique identifier of the created entity - */ - @PostMapping(path = "/relational-tables") - @Operation(summary = "upsertRelationalTable", - description = "Creates a RelationalTable entity with all the needed relationships", - externalDocs = @ExternalDocumentation(description = "RelationalTable", - url = "https://egeria-project.org/types/5/0534-Relational-Schemas/")) - public GUIDResponse upsertRelationalTable(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody RelationalTableRequestBody requestBody) { - return restAPI.upsertRelationalTable(userId, serverName, requestBody); - } - - /** - * Deletes the relational table with columns - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the relational table - * @return void response - */ - @DeleteMapping(path = "/relational-tables") - @Operation(summary = "deleteRelationalTable", - description = "Deletes the relational table with columns.", - externalDocs = @ExternalDocumentation(description = "RelationalTable", - url = "https://egeria-project.org/types/5/0534-Relational-Schemas/")) - public VoidResponse deleteRelationalTable(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteRelationalTable(userId, serverName, requestBody); - } - - /*** - * Adds a DataFile asset or any of its subtype - * - * @param serverName name of server instance to call - * @param userId name of the calling user - * @param dataFileRequestBody properties of data file - * - * @return unique identifier of the created entity - */ - @PostMapping(path = "/data-files") - @Operation(summary = "upsertDataFile", - description = "Adds a DataFile asset or any of its subtype.", - externalDocs = @ExternalDocumentation(description = "DataFile", - url = "https://egeria-project.org/types/2/0220-Files-and-Folders/#datafile")) - public GUIDResponse upsertDataFile(@PathVariable String serverName, @PathVariable String userId, - @RequestBody DataFileRequestBody dataFileRequestBody) { - return restAPI.upsertDataFile(serverName, userId, dataFileRequestBody); - } - - /** - * Deletes the data file with columns - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the data file - * @return void response - */ - @DeleteMapping(path = "/data-files") - @Operation(summary = "deleteDataFile", - description = "Deletes the data file with columns.", - externalDocs = @ExternalDocumentation(description = "DataFile", - url = "https://egeria-project.org/types/2/0220-Files-and-Folders/#datafile")) - public VoidResponse deleteDataFile(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteDataFile(userId, serverName, requestBody); - } - - /** - * Deletes the folder - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the folder - * @return void response - */ - @DeleteMapping(path = "/folders") - @Operation(summary = "deleteFolder", - description = "Deletes the folder.", - externalDocs = @ExternalDocumentation(description = "FileFolder", - url = "https://egeria-project.org/types/2/0220-Files-and-Folders/#filefolder")) - public VoidResponse deleteFolder(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteFolder(userId, serverName, requestBody); - } - - /** - * Deletes the connection - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the connection - * @return void response - */ - @DeleteMapping(path = "/connections") - @Operation(summary = "deleteConnection", - description = "Deletes the connection.", - externalDocs = @ExternalDocumentation(description = "Connection", - url = "https://egeria-project.org/types/2/0201-Connectors-and-Connections/")) - public VoidResponse deleteConnection(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteConnection(userId, serverName, requestBody); - } - - /** - * Deletes the endpoint - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the connection - * @return void response - */ - @DeleteMapping(path = "/endpoints") - @Operation(summary = "deleteEndpoint", - description = "Deletes the endpoint.", - externalDocs = @ExternalDocumentation(description = "Endpoint", - url = "https://egeria-project.org/types/0/0026-Endpoints/")) - public VoidResponse deleteEndpoint(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteEndpoint(userId, serverName, requestBody); - } - - /** - * Find assets - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param findRequestBody properties for the connection - * @return asset if found - */ - @PostMapping(path = "/find") - @Operation(summary = "find", - description = "Find assets.", - externalDocs = @ExternalDocumentation(description = "Asset", - url = "https://egeria-project.org/concepts/asset/")) - public GUIDListResponse search(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody FindRequestBody findRequestBody) { - return restAPI.find(userId, serverName, findRequestBody); - } - - - /** - * Creates or updates a Topic entity with all the needed relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the topic - * @return unique identifier of the created entity - */ - @PostMapping(path = "/topics") - @Operation(summary = "upsertTopic", - description = "Creates or updates a Topic entity with all the needed relationships.", - externalDocs = @ExternalDocumentation(description = "Topic", - url = "https://egeria-project.org/types/2/0223-Events-and-Logs/#topic")) - public GUIDResponse upsertTopic(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody TopicRequestBody requestBody) { - return restAPI.upsertTopic(userId, serverName, requestBody); - } - - /** - * Deletes the topic - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the database - * @return void response - */ - @DeleteMapping(path = "/topics") - @Operation(summary = "deleteTopic", - description = "Deletes the topic.", - externalDocs = @ExternalDocumentation(description = "Topic", - url = "https://egeria-project.org/types/2/0223-Events-and-Logs/#topic")) - public VoidResponse deleteTopic(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteTopic(userId, serverName, requestBody); - } - - /** - * Creates or updates an Event Type entity with all the needed relationships - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the event type - * @return unique identifier of the created entity - */ - @PostMapping(path = "/event-types") - @Operation(summary = "upsertEventType", - description = "Creates or updates an Event Type entity with all the needed relationships.", - externalDocs = @ExternalDocumentation(description = "EventType", - url = "https://egeria-project.org/types/5/0535-Event-Schemas/#eventtype")) - public GUIDResponse upsertEventType(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody EventTypeRequestBody requestBody) { - return restAPI.upsertEventType(userId, serverName, requestBody); - } - - /** - * Deletes the event type - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties for the database - * @return void response - */ - @DeleteMapping(path = "/event-types") - @Operation(summary = "deleteEventType", - description = "Deletes the EventType.", - externalDocs = @ExternalDocumentation(description = "EventType", - url = "https://egeria-project.org/types/5/0535-Event-Schemas/#eventtype")) - public VoidResponse deleteEventType(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody DeleteRequestBody requestBody) { - return restAPI.deleteEventType(userId, serverName, requestBody); - } - - /** - * Creates or updates a data engine's processing state classification with the provided properties - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @param requestBody properties of the processing state - * @return void response - */ - @PostMapping(path = "/processing-state") - @Operation(summary = "upsertProcessingState", - description = "Creates or updates a data engine's processing state classification with the provided properties", - externalDocs = @ExternalDocumentation(description = "ProcessingState", - url = "https://egeria-project.org/patterns/metadata-manager/categories-of-metadata/#metadata-relationships-and-classifications")) - public VoidResponse upsertProcessingState(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestBody ProcessingStateRequestBody requestBody) { - return restAPI.upsertProcessingState(userId, serverName, requestBody); - } - - /** - * Gets the data engine's processing state classification properties - * - * @param serverName name of server instance to call - * @param userId the name of the calling user - * @return PropertiesResponse response - */ - @GetMapping(path = "/processing-state") - @Operation(summary = "upsertProcessingState", - description = "Gets the data engine's processing state classification properties.", - externalDocs = @ExternalDocumentation(description = "ProcessingState", - url = "https://egeria-project.org/patterns/metadata-manager/categories-of-metadata/#metadata-relationships-and-classifications")) - public PropertiesResponse getProcessingState(@PathVariable("userId") String userId, - @PathVariable("serverName") String serverName, - @RequestParam("dataEngine") String externalSourceName) { - return restAPI.getProcessingState(userId, serverName, externalSourceName); - } - -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/package-info.java deleted file mode 100644 index 5b8990c60c9..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - -/** - * REST API operations and Swagger Annotations - * The DataEngineResource has multiple parts to its REST API, each focusing on a different collection of metadata types. - */ -package org.odpi.openmetadata.accessservices.dataengine.server.spring; diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/DataEngineResourceTest.java b/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/DataEngineResourceTest.java deleted file mode 100644 index aeedb15721d..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-spring/src/test/java/org/odpi/openmetadata/accessservices/dataengine/server/spring/DataEngineResourceTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.server.spring; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataEngineRegistrationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DeleteRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.EventTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.DataFlowsRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.PortImplementationRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessHierarchyRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.ProcessingStateRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.SchemaTypeRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.rest.TopicRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.server.service.DataEngineRESTServices; - -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class DataEngineResourceTest { - - private static final String USER = "user"; - private static final String SERVER_NAME = "serverName"; - private static final String DATA_ENGINE = "DataEngine"; - - @Mock - private DataEngineRESTServices dataEngineRestServices; - - @InjectMocks - private DataEngineResource dataEngineResource; - - @Test - void testCreateExternalDataEngine() { - DataEngineRegistrationRequestBody requestBody = new DataEngineRegistrationRequestBody(); - dataEngineResource.createExternalDataEngine(SERVER_NAME, USER, requestBody); - - verify(dataEngineRestServices, times(1)).createExternalDataEngine(SERVER_NAME, USER, requestBody); - } - - @Test - void testGetExternalDataEngine() { - String qualifiedName = "testQualifiedName"; - dataEngineResource.getExternalDataEngineByQualifiedName(SERVER_NAME, USER, qualifiedName); - - verify(dataEngineRestServices, times(1)).getExternalDataEngine(SERVER_NAME, USER, qualifiedName); - } - - @Test - void testCreateSchemaType() { - SchemaTypeRequestBody requestBody = new SchemaTypeRequestBody(); - dataEngineResource.createOrUpdateSchemaType(SERVER_NAME, USER, requestBody); - - verify(dataEngineRestServices, times(1)).upsertSchemaType(SERVER_NAME, USER, requestBody); - } - - @Test - void testCreatePortImplementation() { - PortImplementationRequestBody requestBody = new PortImplementationRequestBody(); - dataEngineResource.createOrUpdatePortImplementation(SERVER_NAME, USER, requestBody); - - verify(dataEngineRestServices, times(1)).upsertPortImplementation(SERVER_NAME, USER, requestBody); - } - - @Test - void testAddProcessHierarchies() { - ProcessHierarchyRequestBody requestBody = new ProcessHierarchyRequestBody(); - dataEngineResource.addProcessHierarchy(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).addProcessHierarchy(USER, SERVER_NAME, requestBody); - } - - @Test - void testCreateProcess() { - ProcessRequestBody requestBody = new ProcessRequestBody(); - dataEngineResource.createOrUpdateProcess(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).upsertProcess(USER, SERVER_NAME, requestBody); - } - - @Test - void testAddDataFlows() { - DataFlowsRequestBody requestBody = new DataFlowsRequestBody(); - dataEngineResource.addDataFlows(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).addDataFlows(USER, SERVER_NAME, requestBody); - } - - @Test - void testUpsertTopic() { - TopicRequestBody requestBody = new TopicRequestBody(); - dataEngineResource.upsertTopic(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).upsertTopic(USER, SERVER_NAME, requestBody); - } - - @Test - void testUpsertEventType() { - EventTypeRequestBody requestBody = new EventTypeRequestBody(); - dataEngineResource.upsertEventType(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).upsertEventType(USER, SERVER_NAME, requestBody); - } - - @Test - void testDeleteTopic() { - DeleteRequestBody requestBody = new DeleteRequestBody(); - dataEngineResource.deleteTopic(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).deleteTopic(USER, SERVER_NAME, requestBody); - } - - @Test - void testDeleteEventTypes() { - DeleteRequestBody requestBody = new DeleteRequestBody(); - dataEngineResource.deleteEventType(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).deleteEventType(USER, SERVER_NAME, requestBody); - } - - @Test - void testUpsertProcessingState() { - ProcessingStateRequestBody requestBody = new ProcessingStateRequestBody(); - dataEngineResource.upsertProcessingState(USER, SERVER_NAME, requestBody); - - verify(dataEngineRestServices, times(1)).upsertProcessingState(USER, SERVER_NAME, requestBody); - } - - @Test - void testGetProcessingState() { - dataEngineResource.getProcessingState(USER, SERVER_NAME, DATA_ENGINE); - - verify(dataEngineRestServices, times(1)).getProcessingState(USER, SERVER_NAME, DATA_ENGINE); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/build.gradle b/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/build.gradle deleted file mode 100644 index c0d7747aba0..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - 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') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-api') - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'org.slf4j:slf4j-api' -} - -description = 'Data Engine OMAS Topic Connectors' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/DataEngineInTopicClientConnector.java b/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/DataEngineInTopicClientConnector.java deleted file mode 100644 index c2b1956c301..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/DataEngineInTopicClientConnector.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.dataengine.connectors.intopic; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import org.odpi.openmetadata.accessservices.dataengine.event.DataEngineEventHeader; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineAuditCode; -import org.odpi.openmetadata.accessservices.dataengine.ffdc.DataEngineErrorCode; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicSenderConnectorBase; - -import java.util.concurrent.CompletionException; - - -/** - * DataEngineInTopicClientConnector is the java implementation of the - * client side connector that send events to the Data Engine OMAS input topic. - */ -public class DataEngineInTopicClientConnector extends OpenMetadataTopicSenderConnectorBase { - - private static final ObjectWriter OBJECT_WRITER = new ObjectMapper().writer(); - - /** - * Send the request to the embedded event bus connector(s). - * - * @param event event object - * @throws InvalidParameterException the event is null - * @throws ConnectorCheckedException there is a problem with the embedded event bus connector(s) - */ - public void sendEvent(DataEngineEventHeader event) throws InvalidParameterException, ConnectorCheckedException { - final String methodName = "sendEvent"; - - try { - - String eventString = OBJECT_WRITER.writeValueAsString(event); - super.sendEvent(eventString).join(); - - if (super.auditLog != null) { - super.auditLog.logMessage(methodName, - DataEngineAuditCode.IN_TOPIC_EVENT_SENT.getMessageDefinition(event.getDataEngineEventType().getEventTypeName()), - eventString); - } - - } catch (CompletionException error) { - if (error.getCause() instanceof ConnectorCheckedException) { - throw (ConnectorCheckedException) error.getCause(); - } else if (error.getCause() instanceof InvalidParameterException) { - throw (InvalidParameterException) error.getCause(); - } - } catch (InvalidParameterException | ConnectorCheckedException error) { - throw error; - } catch (Exception error) { - throw new ConnectorCheckedException(DataEngineErrorCode.UNABLE_TO_SEND_EVENT.getMessageDefinition(connectionName, - event.toString(), - error.getClass().getName(), - error.getMessage()), - this.getClass().getName(), - methodName, - error); - } - } -} diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/DataEngineInTopicClientProvider.java b/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/DataEngineInTopicClientProvider.java deleted file mode 100644 index 16a98163901..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/DataEngineInTopicClientProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.connectors.intopic; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; - -/** - * The DataEngineInTopicClientProvider provides a base class for the connector provider supporting - * DataEngine topic connectors. - * - * It extends ConnectorProviderBase which does the creation of connector instances. The subclasses of - * DataEngineInTopicClientProvider must initialize ConnectorProviderBase with the Java class - * name of their Connector implementation (by calling super.setConnectorClassName(className)). - * Then the connector provider will work. - */ -public class DataEngineInTopicClientProvider extends ConnectorProviderBase -{ - static final String CONNECTOR_TYPE_GUID = "8d9932c4-3cf6-4e5e-aee9-30f14a841981"; - static final String CONNECTOR_TYPE_NAME = "Data Engine In Topic Client Connector"; - static final String CONNECTOR_TYPE_DESCRIPTION = "Connector supports sending events on the Data Engine input topic."; - - /** - * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific - * discovery service implementation. - */ - public DataEngineInTopicClientProvider() - { - Class connectorClass = DataEngineInTopicClientConnector.class; - - super.setConnectorClassName(connectorClass.getName()); - - 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.setConnectorProviderClassName(this.getClass().getName()); - - super.connectorTypeBean = connectorType; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/package-info.java b/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/package-info.java deleted file mode 100644 index f89cc19d0e2..00000000000 --- a/open-metadata-implementation/access-services/data-engine/data-engine-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/dataengine/connectors/intopic/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The data engine topic connectors are the interfaces of the connectors supported by the Data Engine OMAS. - * Currently, there is one connector for the client, that is used to consume events - * over the Data Engine OMAS's out topic. - */ -package org.odpi.openmetadata.accessservices.dataengine.connectors.intopic; diff --git a/open-metadata-implementation/access-services/data-engine/docs/design/README.md b/open-metadata-implementation/access-services/data-engine/docs/design/README.md deleted file mode 100644 index 084906faa7f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/design/README.md +++ /dev/null @@ -1,22 +0,0 @@ - - - -# Data Engine OMAS Design - -The module structure for the Data Engine OMAS is as follows: - -* [data-engine-api](../../data-engine-api) supports the common Java classes that are used both by the client and the server. This includes the Java API, beans and REST API structures. -* [data-engine-client](../../data-engine-client) supports the Java client library that allows applications and tools to call the remote REST APIs. -* [data-engine-server](../../data-engine-server) supports the server side implementation of the access service.This includes the - * interaction with the [administration services](../../../../admin-services) for - registration, configuration, initialization and termination of the access service. - * interaction with the [repository services](../../../../repository-services) to work with open metadata from the - [cohort](../../../../repository-services/docs/open-metadata-repository-cohort.md). - * support for the access service's API and its related event management. -* [data-engine-spring](../../data-engine-spring) supports the REST API using the [Spring](../../../../../developer-resources/Spring.md) libraries. - - - ----- -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/data-engine/docs/samples/collections/Data Engine-minimal_flows_granular_level.postman_collection.json b/open-metadata-implementation/access-services/data-engine/docs/samples/collections/Data Engine-minimal_flows_granular_level.postman_collection.json deleted file mode 100644 index 4269dce5f56..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/Data Engine-minimal_flows_granular_level.postman_collection.json +++ /dev/null @@ -1,2318 +0,0 @@ -{ - "info": { - "_postman_id": "29c516ad-eeae-417c-8554-73f659eefc8a", - "name": "Data Engine - minimal flows example - granular level", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "1. INSTANCE", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [], - "url": { - "raw": "{{base-url}}/open-metadata/admin-services/users/{{user-id}}/servers/{{server-id}}/instance", - "host": [ - "{{base-url}}" - ], - "path": [ - "open-metadata", - "admin-services", - "users", - "{{user-id}}", - "servers", - "{{server-id}}", - "instance" - ] - } - }, - "response": [] - }, - { - "name": "1.1 Register external tool", - "protocolProfileBehavior": { - "strictSSL": false, - "disableUrlEncoding": true, - "followRedirects": false - }, - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataEngine\":\n {\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"displayName\": \"ExternalDataEngine\",\n \"description\": \"Requesting to register external data engine capability\",\n \"engineType\": \"DataEngine\",\n \"engineVersion\": \"1\",\n \"enginePatchLevel\": \"1\",\n \"vendor\": \"Company\",\n \"version\": \"1\",\n \"source\": \"source\"\n }\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/registration", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "registration" - ] - } - }, - "response": [] - }, - { - "name": "2.1 Create Database - MINIMAL", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"database\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL\",\n \"displayName\": \"MINIMAL\",\n \"databaseType\": \"DB2\",\n \"databaseVersion\": \"10.05.0002\",\n \"databaseInstance\": \"db2inst1\",\n \"databaseImportedFrom\": \"DB2Connector 9.1\",\n \"createTime\": \"1588160311000\",\n \"modifiedTime\": \"1588160311000\",\n \"protocol\" : \"ftp\",\n \"networkAddress\" : \"localhost\",\n \"schema\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1\",\n \"displayName\": \"DB2INST1\",\n \"description\": \"DB2INST1\"\n },\n \"zoneMembership\": [\n \"default\"\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/databases", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "databases" - ] - } - }, - "response": [] - }, - { - "name": "2.2 Create Relational Table - EMPLNAME", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchemaQualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1\",\n \"table\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME\",\n \"displayName\": \"EMPLNAME\",\n \"isDeprecated\": false,\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 2,\n \"dataType\": \"STRING\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 3,\n \"dataType\": \"STRING\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 4,\n \"dataType\": \"INTEGER\"\n }\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "2.3 Create Relational Table - WORKPLACE", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchemaQualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1\",\n \"table\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE\",\n \"displayName\": \"WORKPLACE\",\n \"isDeprecated\": false,\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INT32\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 2,\n \"dataType\": \"STRING\"\n }\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "2.4 Create Relational Table - EMPLDIRECTORY", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchemaQualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1\",\n \"table\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY\",\n \"displayName\": \"EMPLDIRECTORY\",\n \"isDeprecated\": false,\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPNAME\",\n \"displayName\": \"EMPNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 100,\n \"allowsDuplicateValues\": true,\n \"position\": 2,\n \"dataType\": \"STRING\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 3,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 4,\n \"dataType\": \"STRING\"\n }\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "2.5 Create CSVFile - names.csv", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"CSVFile\",\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv\",\n \"displayName\": \"names.csv\",\n \"pathName\": \"/data/files/minimal/names.csv\",\n \"protocol\" : \"ftp\",\n \"networkAddress\" : \"localhost\",\n \"additionalProperties\": {\n \"include_for_business_lineage\": true,\n \"path\": \"/data/files/minimal\",\n \"store_type\": \"Local\"\n },\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\",\n \"displayName\": \"Id\",\n \"additionalProperties\": {\n \"odbc_type\": \"BIGINT\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": false,\n \"position\": 1,\n \"minCardinality\": 1,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\",\n \"displayName\": \"First\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": true,\n \"position\": 2,\n \"minCardinality\": 0,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\",\n \"displayName\": \"Last\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": true,\n \"position\": 3,\n \"minCardinality\": 0,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\",\n \"displayName\": \"Location\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": false,\n \"position\": 4,\n \"minCardinality\": 1,\n \"maxCardinality\": 1\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "2.6 Create DataFile - locations.csv", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"DataFile\",\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv\",\n \"displayName\": \"locations.csv\",\n \"pathName\": \"/data/files/minimal/locations.csv\",\n \"protocol\" : \"ftp\",\n \"networkAddress\" : \"localhost\",\n \"additionalProperties\": {\n \"include_for_business_lineage\": true,\n \"path\": \"/data/files/minimal\",\n \"store_type\": \"Local\"\n },\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Id\",\n \"displayName\": \"Id\",\n \"additionalProperties\": {\n \"odbc_type\": \"BIGINT\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": false,\n \"position\": 1,\n \"minCardinality\": 1,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Name\",\n \"displayName\": \"Name\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": true,\n \"position\": 2,\n \"minCardinality\": 0,\n \"maxCardinality\": 1\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "3.1 Create Process - flow1 - File_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input\",\n \"displayName\": \"File_Input\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"File_Input\",\n \"portImplementations\": [\n {\n \"displayName\": \"names\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(schema)=names\",\n \"displayName\": \"names\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\",\n \"displayName\": \"First\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INT64\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\",\n \"displayName\": \"Last\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\",\n \"displayName\": \"Location\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 4,\n \"dataType\": \"INT64\",\n \"defaultValue\": \"\"\n }\n ]\n }\n },\n {\n \"displayName\": \"read_file\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(schema)=read_file\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vdn.1e6d1as.4aghtb.0vb6asntm028oa7jihf64\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Last\",\n \"displayName\": \"Last\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Location\",\n \"displayName\": \"Location\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=First\",\n \"displayName\": \"First\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "3.2 Add Data Flows for FileInput process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Last\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Id\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Location\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=First\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "3.3 Create Process flow1 - Rename", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename\",\n \"displayName\": \"Rename\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"Rename\",\n \"portImplementations\": [\n {\n \"displayName\": \"read_file\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(schema)=read_file\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vdn.1e6d1as.4aghtb.0vb6asntm028oa7jihf64\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Last\",\n \"displayName\": \"Last\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Location\",\n \"displayName\": \"Location\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=First\",\n \"displayName\": \"First\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n },\n {\n \"displayName\": \"write_table\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(schema)=write_table\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vdn.1e6ihfp.h8pvuk.ncql977llcqmms4u7dfq2\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "3.4 Add Data Flows for Rename process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Last\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Location\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=First\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=FNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "3.5 Create Process - flow1 - Database_Output", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output\",\n \"displayName\": \"Database_Output\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"Database_Output\",\n \"portImplementations\": [\n {\n \"displayName\": \"write_table\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(schema)=write_table\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vdn.1e6ihfp.h8pvuk.ncql977llcqmms4u7dfq2\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n },\n {\n \"displayName\": \"EMPLNAME\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(schema)=EMPLNAME\",\n \"displayName\": \"EMPLNAME\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 4,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "3.6 Add Data Flows for Database_Output process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "3.7 Create Process flow1", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1\",\n \"displayName\": \"flow1\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"flow1\",\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "3.8 Add Data Flows for flow1 process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=FNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=write_table::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Last\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Last\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=First\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=First\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Location\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Location\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(link)=read_file::(ds_stage_column)=Id\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "4.1 Create Process - flow2 - File_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input\",\n \"displayName\": \"File_Input\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"File_Input\",\n \"portImplementations\": [\n {\n \"displayName\": \"locations\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(schema)=locations\",\n \"displayName\": \"locations\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INT64\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Name\",\n \"displayName\": \"Name\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n }\n ]\n }\n },\n {\n \"displayName\": \"read_file\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(schema)=read_file\",\n \"displayName\": \"read_file\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Name\",\n \"displayName\": \"Name\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.2 Add Data Flows for File_Input process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Id\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Name\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Name\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Id\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Name\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv::(data_file_record)=locations::(data_file_field)=Name\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "4.3 Create Process - flow2 - Rename", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename\",\n \"displayName\": \"Rename\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"Rename\",\n \"portImplementations\": [\n {\n \"displayName\": \"read_file\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(schema)=read_file\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vgc.0908b7h.j3alhs.djmvq3iv4udlnbepisf2s\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Name\",\n \"displayName\": \"Name\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n },\n {\n \"displayName\": \"write_table\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(schema)=write_table\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vgc.09fqc55.rf112m.dcfg8ao8f4qvk07ang11r\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.4 Add Data Flows for Rename process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Name\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCID\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "4.5 Create Process - flow2 - Database_Output", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output\",\n \"displayName\": \"Database_Output\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"Database_Output\",\n \"portImplementations\": [\n {\n \"displayName\": \"WORKPLACE\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(schema)=WORKPLACE\",\n \"displayName\": \"WORKPLACE\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n }\n ]\n }\n },\n {\n \"displayName\": \"write_table\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(schema)=write_table\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vgc.09fqc55.rf112m.dcfg8ao8f4qvk07ang11r\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.6 Add Data Flows for Database_Output process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "4.7 Create Process flow2", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2\",\n \"displayName\": \"flow2\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"flow2\",\n \"updateSemantic\": \"REPLACE\",\n \"referenceData\": false\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.8 Add Data Flows for flow2 process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Name\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Name\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=write_table::(ds_stage_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Id\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(link)=read_file::(ds_stage_column)=Id\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "5.1 Create Process - flow3 - WORKPLACE_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input\",\n \"displayName\": \"WORKPLACE_Input\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"WORKPLACE_Input\",\n \"portImplementations\": [\n {\n \"displayName\": \"WORKPLACE\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(schema)=WORKPLACE\",\n \"displayName\": \"WORKPLACE\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n }\n ]\n }\n },\n {\n \"displayName\": \"read_WORKPLACE\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(schema)=read_WORKPLACE\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vj6.2lng9c6.i79u9i.eqcloqdmdecg37vlqplas\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.2 Add Data Flows for WORKPLACE_Input process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "5.3 Create Process - flow3 - EMPLNAME_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input\",\n \"displayName\": \"EMPLNAME_Input\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"EMPLNAME_Input\",\n \"portImplementations\": [\n {\n \"displayName\": \"EMPLNAME\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(schema)=EMPLNAME\",\n \"displayName\": \"EMPLNAME\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 4,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n }\n ]\n }\n },\n {\n \"displayName\": \"read_EMPLNAME\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(schema)=read_EMPLNAME\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vj6.2m7u5no.5h7v0v.jdtvk6fmspp6lg8sqflb9\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.4 Add Data Flows for EMPLNAME_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=FNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=SURNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "5.5 Create Process - flow3 - Join", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join\",\n \"displayName\": \"Join\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"Join\",\n \"portImplementations\": [\n {\n \"displayName\": \"read_WORKPLACE\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(schema)=read_WORKPLACE\",\n \"displayName\": \"read_WORKPLACE\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n },\n {\n \"displayName\": \"read_EMPLNAME\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(schema)=read_EMPLNAME\",\n \"displayName\": \"read_EMPLNAME\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n },\n {\n \"displayName\": \"join_output\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(schema)=join_output\",\n \"displayName\": \"join_output\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=leftRec_LOCID\",\n \"displayName\": \"leftRec_LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 4,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.6 Add Data Flows for Join process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=leftRec_LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=FNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "5.7 Create Process - flow3 - Concatenate", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate\",\n \"displayName\": \"Concatenate\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"Concatenate\",\n \"portImplementations\": [\n {\n \"displayName\": \"join_output\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(schema)=join_output\",\n \"displayName\": \"join_output\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=leftRec_LOCID\",\n \"displayName\": \"leftRec_LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 4,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n },\n {\n \"displayName\": \"write_table\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(schema)=write_table\",\n \"displayName\": \"c2e76d84.78bf4d29.0v9nb5vls.4li948p.8eps20.gd5jtq3ed9ada64vhj9a5\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPNAME\",\n \"displayName\": \"EMPNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.8 Add Data Flows for Concatenate process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=leftRec_LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "5.9 Create Process - flow3 - EMPLDIRECTORY", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY\",\n \"displayName\": \"EMPLDIRECTORY\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"EMPLDIRECTORY\",\n \"portImplementations\": [\n {\n \"displayName\": \"write_table\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(schema)=write_table\",\n \"displayName\": \"wirte_table\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPNAME\",\n \"displayName\": \"EMPNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n },\n {\n \"displayName\": \"EMPLDIRECTORY\",\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(schema)=EMPLDIRECTORY\",\n \"displayName\": \"EMPLDIRECTORY\",\n \"author\": \"Egeria Open Metadata\",\n \"columns\": [\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPNAME\",\n \"displayName\": \"EMPNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"INT32\",\n \"defaultValue\": \"\"\n },\n {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCNAME\",\n \"displayName\": \"LOCNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 4,\n \"dataType\": \"STRING\",\n \"defaultValue\": \"\"\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.10 Add Data Flows for EMPLDIRECTORY process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCID\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPID\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPNAME\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCNAME\",\n \"dataConsumer\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "5.11 Create Process flow3", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3\",\n \"displayName\": \"flow3\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"flow3\",\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.12 Add Data Flows for flow3", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=leftRec_LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=leftRec_LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_EMPLNAME::(ds_stage_column)=FNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=FNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=FNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=EMPNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=SURNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=SURNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=read_WORKPLACE::(ds_stage_column)=LOCNAME\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCID\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=write_table::(ds_stage_column)=LOCID\"\n },\n {\n \"dataSupplier\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=LOCNAME\",\n \"dataConsumer\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(link)=join_output::(ds_stage_column)=LOCNAME\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "6.1 Add Process Hirerachy flow1 - FileInput", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=File_Input\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.2 Add Process Hirerachy flow1 - Rename", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Rename\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.3 Add Process Hirerachy flow1 - Database_Output", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow1::(stage)=Database_Output\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.4 Add Process Hirerachy flow2 - File_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=File_Input\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.5 Add Process Hirerachy flow2 - Rename", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Rename\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.6 Add Process Hirerachy flow2 - Database_Output", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow2::(stage)=Database_Output\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.7 Add Process Hirerachy flow3 - WORKPLACE_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=WORKPLACE_Input\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.8 Add Process Hirerachy flow3 - EMPLNAME_Input", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLNAME_Input\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.09 Add Process Hirerachy flow3 - Join", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Join\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.10 Add Process Hirerachy flow3 - Concatenate", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=Concatenate\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "6.11 Add Process Hirerachy flow3 - EMPLDIRECTORY", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3\",\n \"childProcess\": \"_(host)=HOST::(transformation_project)=minimal::(dsjob)=flow3::(stage)=EMPLDIRECTORY\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json b/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json deleted file mode 100644 index 8f2f3b67fbb..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-asset_endpoints.postman_collection.json +++ /dev/null @@ -1,1534 +0,0 @@ -{ - "info": { - "_postman_id": "8e11288b-f38a-4bc2-aacc-7a4b0c675d23", - "name": "DataEngine - asset endpoints", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "1.INSTANCE", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [], - "url": { - "raw": "{{base-url}}/open-metadata/admin-services/users/{{user-id}}/servers/{{server-id}}/instance", - "host": [ - "{{base-url}}" - ], - "path": [ - "open-metadata", - "admin-services", - "users", - "{{user-id}}", - "servers", - "{{server-id}}", - "instance" - ] - } - }, - "response": [] - }, - { - "name": "1.1 Register external tool", - "protocolProfileBehavior": { - "strictSSL": false, - "disableUrlEncoding": true, - "followRedirects": false - }, - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataEngine\":\n {\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"displayName\": \"ExternalDataEngine\",\n \"description\": \"Requesting to register external data engine capability\",\n \"engineType\": \"DataEngine\",\n \"engineVersion\": \"1\",\n \"enginePatchLevel\": \"1\",\n \"vendor\": \"Company\",\n \"version\": \"1\",\n \"source\": \"source\"\n }\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/registration", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "registration" - ] - } - }, - "response": [] - }, - { - "name": "1.2.0 Create Database, Database Schema, Relational Table - all props", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"database\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props\",\n \"displayName\": \"MINIMAL-all-props\",\n \"description\": \"DB2 MINIMAL\",\n \"databaseType\": \"DB2\",\n \"databaseVersion\": \"10.05.0002\",\n \"databaseInstance\": \"db2inst1\",\n \"databaseImportedFrom\": \"DB2Connector 9.1\",\n \"createTime\": \"1588160311000\",\n \"modifiedTime\": \"1588160311000\",\n \"pathName\": \"pathName\",\n \"encodingType\": \"type\",\n \"encodingLanguage\": \"lang\",\n \"encodingDescription\": \"props\",\n \"owner\": \"Administrator IIS\",\n \"ownerType\": \"USER_ID\",\n \"protocol\": \"ftp\",\n \"networkAddress\": \"localhost\",\n \"zoneMembership\": [\n \"default\"\n ],\n \"otherOriginValues\": {\n \"prop\": \"oherOrigin\"\n },\n \"schema\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1-all-props\",\n \"displayName\": \"DB2INST1-all-props\",\n \"description\": \"DB2INST1 database schema\",\n \"owner\": \"Administrator IIS\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"default\"\n ],\n \"otherOriginValues\": {\n \"prop\": \"otherOrigin\"\n }\n },\n \"tables\": [\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME\",\n \"displayName\": \"EMPLNAME\",\n \"description\": \"EMPLNAME desc\",\n \"isDeprecated\": false,\n \"aliases\": [\n \"EMPLNAME2\"\n ],\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"ID\"\n ],\n \"sortOrder\": \"ASCENDING\",\n \"description\": \"id column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"1\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMA-all-propsL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"First\"\n ],\n \"sortOrder\": \"UNSORTED\",\n \"description\": \"first column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"name\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 3,\n \"dataType\": \"STRING\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"Last\"\n ],\n \"sortOrder\": \"UNSORTED\",\n \"description\": \"surname column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"name\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 4,\n \"dataType\": \"INTEGER\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"Location\"\n ],\n \"sortOrder\": \"ASCENDING\",\n \"description\": \"locid column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"1\",\n \"formula\": \"formula\"\n }\n ]\n }\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/databases", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "databases" - ] - } - }, - "response": [] - }, - { - "name": "1.2 Create Database - required props only", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"database\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic\",\n \"displayName\": \"MINIMAL-basic\",\n \"networkAddress\" : \"localhost\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/databases", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "databases" - ] - } - }, - "response": [] - }, - { - "name": "7.2 Create Incomplete Database - all props, only database", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"database\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props\",\n \"displayName\": \"MINIMAL-all-props\",\n \"description\": \"DB2 MINIMAL\",\n \"databaseType\": \"DB2\",\n \"databaseVersion\": \"10.05.0002\",\n \"databaseInstance\": \"db2inst1\",\n \"databaseImportedFrom\": \"DB2Connector 9.1\",\n \"createTime\": \"1588160311000\",\n \"modifiedTime\": \"1588160311000\",\n \"pathName\": \"pathName\",\n \"encodingType\": \"type\",\n \"encodingLanguage\": \"lang\",\n \"encodingDescription\": \"props\",\n \"owner\": \"Administrator IIS\",\n \"ownerType\": \"USER_ID\",\n \"protocol\" : \"ftp\",\n \"networkAddress\" : \"localhost\",\n \"zoneMembership\": [\n \"default\"\n ],\n \"otherOriginValues\":{\n \t\"prop\":\"oherOrigin\"\n }\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/databases", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "databases" - ] - } - }, - "response": [] - }, - { - "name": "1.4 Create Database Schema - required props only", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseQualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic\",\n \"databaseSchema\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1-basic\",\n \"displayName\": \"DB2INST1-basic\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/database-schemas", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "database-schemas" - ] - } - }, - "response": [] - }, - { - "name": "1.5 Create Database Schema - all props", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseQualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props\",\n \"databaseSchema\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1-all-props\",\n \"displayName\": \"DB2INST1-all-props\",\n \"description\": \"DB2INST1 database schema\",\n \"owner\": \"Administrator IIS\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"default\"\n ],\n \"otherOriginValues\":{\n \t\"prop\":\"otherOrigin\"\n }\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"incomplete\": false\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/database-schemas", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "database-schemas" - ] - } - }, - "response": [] - }, - { - "name": "1.6 Create Relational Table - required props only", - "protocolProfileBehavior": { - "followRedirects": false - }, - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchemaQualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1-basic\",\n \"table\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic\",\n \"displayName\": \"EMPLNAME-basic\",\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"dataType\": \"STRING\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"dataType\": \"STRING\"\n }\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "1.7 Create Relational Table - all properties", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchemaQualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1-all-props\",\n \"table\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME\",\n \"displayName\": \"EMPLNAME\",\n \"description\": \"EMPLNAME desc\",\n \"isDeprecated\": false,\n \"aliases\": [\n \"EMPLNAME2\"\n ],\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"ID\"\n ],\n \"sortOrder\": \"ASCENDING\",\n \"description\": \"id column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"1\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMA-all-propsL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"First\"\n ],\n \"sortOrder\": \"UNSORTED\",\n \"description\": \"first column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"name\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 3,\n \"dataType\": \"STRING\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"Last\"\n ],\n \"sortOrder\": \"UNSORTED\",\n \"description\": \"surname column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"name\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 4,\n \"dataType\": \"INTEGER\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"Location\"\n ],\n \"sortOrder\": \"ASCENDING\",\n \"description\": \"locid column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"1\",\n \"formula\": \"formula\"\n }\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"incomplete\": false\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "1.8 Create DataFile - required props only", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"DataFile\",\n \"qualifiedName\": \"(host)=HOST::(data_file)=DATAFILE.DAT\",\n \"displayName\": \"dataFile.dat\",\n \"columns\": [\n {\n \"qualifiedName\": \"(data_file)=DATAFILE.DAT::(data_file_record)=schema::(data_file_field)=COLUMN-A\",\n \"displayName\": \"column-a\"\n },\n {\n \"qualifiedName\": \"(data_file)=DATAFILE.DAT::(data_file_record)=schema::(data_file_field)=COLUMN-B\",\n \"displayName\": \"column-b\"\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "1.9 Create DataFile - all properties", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"DataFile\",\n \"qualifiedName\": \"(file)=DATAFILE.DAT\",\n \"displayName\": \"dataFile.dat\",\n \"pathName\": \"/home/files/dataFile.dat\",\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"createTime\": \"1617095893010\",\n \"modifiedTime\": \"1617095893010\",\n \"description\": \"Data file description.\",\n \"protocol\" : \"ftp\",\n \"networkAddress\" : \"localhost\",\n \"columns\": [\n {\n \"qualifiedName\": \"(file)=DATAFILE.DAT::(column)=COLUMN-A\",\n \"displayName\": \"column-a\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-A DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-A-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-A-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-1\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n },\n {\n \"qualifiedName\": \"(file)=DATAFILE.DAT::(column)=COLUMN-B\",\n \"displayName\": \"column-b\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-B DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-B-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-B-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-2\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "1.10 Create CSVFile - required props only", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"CSVFile\",\n \"qualifiedName\": \"(file)=CSVFILE.CSV\",\n \"displayName\": \"csvFile.csv\",\n \"columns\": [\n {\n \"qualifiedName\": \"(file)=CSVFILE.CSV::(column)=COLUMN-A\",\n \"displayName\": \"column-a\"\n },\n {\n \"qualifiedName\": \"(file)=CSVFILE.CSV::(column)=COLUMN-B\",\n \"displayName\": \"column-b\"\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "1.11 Create CSVFile - all properties", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"CSVFile\",\n \"qualifiedName\": \"(file)=CSVFILE.CSV\",\n \"displayName\": \"csvFile.csv\",\n \"pathName\": \"/home/files/csvFile.csv\",\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"createTime\": \"1617095893010\",\n \"modifiedTime\": \"1617095893010\",\n \"description\": \"Data file description.\",\n \"protocol\" : \"ftp\",\n \"networkAddress\" : \"localhost\",\n \"columns\": [\n {\n \"qualifiedName\": \"(file)=CSVFILE.CSV::(column)=COLUMN-A\",\n \"displayName\": \"column-a\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-A DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-A-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-A-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-1\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n },\n {\n \"qualifiedName\": \"(file)=CSVFILE.CSV::(column)=COLUMN-B\",\n \"displayName\": \"column-b\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-B DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-B-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-B-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-2\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "2.1 Delete Relational Table - EMPLNAME basic", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic::(database_schema)=DB2INST1::(database_table)=EMPLNAME-basic\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"deleteSemantic\":\"SOFT\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "2.2 Delete Database Schema - DB2INST1", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1-basic\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/database-schemas", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "database-schemas" - ] - } - }, - "response": [] - }, - { - "name": "2.3 Delete Database - MINIMAL", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/databases", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "databases" - ] - } - }, - "response": [] - }, - { - "name": "2.4 Delete CSVFile", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "2.5 Delete DataFile", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=locations.csv\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "2.7 Delete folder - files", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform::/data/files\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/folders", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "folders" - ] - } - }, - "response": [] - }, - { - "name": "2.8 Delete folder - data", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform::/data\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/folders", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "folders" - ] - } - }, - "response": [] - }, - { - "name": "2.10 Delete folder - /", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform::/\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/folders", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "folders" - ] - } - }, - "response": [] - }, - { - "name": "2.10 Delete connection for csv file", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"CSVFile:(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv Connection\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/connections", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "connections" - ] - } - }, - "response": [] - }, - { - "name": "2.11 Delete endpoint for csv file", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"CSVFile:(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv Endpoint\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/endpoints", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "endpoints" - ] - } - }, - "response": [] - }, - { - "name": "3.1 Create incomplete Database - required props only", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"database\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic\",\n \"displayName\": \"MINIMAL-basic\",\n \"networkAddress\": \"localhost\",\n \"incomplete\": true\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/databases", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "databases" - ] - } - }, - "response": [] - }, - { - "name": "3.2 Create Incomplete Database - all props", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"database\": {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props\",\n \"displayName\": \"MINIMAL-all-props\",\n \"description\": \"DB2 MINIMAL\",\n \"databaseType\": \"DB2\",\n \"databaseVersion\": \"10.05.0002\",\n \"databaseInstance\": \"db2inst1\",\n \"databaseImportedFrom\": \"DB2Connector 9.1\",\n \"createTime\": \"1588160311000\",\n \"modifiedTime\": \"1588160311000\",\n \"pathName\": \"pathName\",\n \"encodingType\": \"type\",\n \"encodingLanguage\": \"lang\",\n \"encodingDescription\": \"props\",\n \"owner\": \"Administrator IIS\",\n \"ownerType\": \"USER_ID\",\n \"protocol\" : \"ftp\",\n \"networkAddress\" : \"localhost\",\n \"zoneMembership\": [\n \"default\"\n ],\n \"otherOriginValues\":{\n \t\"prop\":\"oherOrigin\"\n },\n \"incomplete\": true\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/databases", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "databases" - ] - } - }, - "response": [] - }, - { - "name": "3.3 Create incomplete Database Schema - required props only", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchema\": {\n \"qualifiedName\": \"(database_schema)=DB2INST1-basic-incomplete\",\n \"displayName\": \"DB2INST1-basic-incomplete\",\n \"incomplete\": true\n },\n \"databaseQualifiedName\": \"(host)=HOST::(database)=MINIMAL-basic\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/database-schemas", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "database-schemas" - ] - } - }, - "response": [] - }, - { - "name": "3.4 Create incomplete Database Schema - all props", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchema\": {\n \"qualifiedName\": \"(database_schema)=DB2INST1-all-props--basic-incomplete\",\n \"displayName\": \"DB2INST1-all-props-incomplete\",\n \"description\": \"DB2INST1 database schema incomplete description\",\n \"owner\": \"Administrator IIS\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"default\"\n ],\n \"otherOriginValues\": {\n \"prop\": \"otherOrigin\"\n },\n \"incomplete\": true\n },\n \"databaseQualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/database-schemas", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "database-schemas" - ] - } - }, - "response": [] - }, - { - "name": "3.5 Create incomplete Relational Table - required props only", - "protocolProfileBehavior": { - "followRedirects": false - }, - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchemaQualifiedName\": \"(database_schema)=DB2INST1-basic-incomplete\",\n \"table\": {\n \"qualifiedName\": \"(database_schema)=DB2INST1-basic-incomplete::(database_table)=EMPLNAME-basic-incomplete\",\n \"displayName\": \"EMPLNAME-basic\",\n \"columns\": [\n {\n \"qualifiedName\": \"(database_schema)=DB2INST1-basic-incomplete::(database_table)=EMPLNAME-basic-incomplete::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(database_schema)=DB2INST1-basic-incomplete::(database_table)=EMPLNAME-basic-incomplete::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"dataType\": \"STRING\"\n },\n {\n \"qualifiedName\": \"(database_schema)=DB2INST1-basic-incomplete::(database_table)=EMPLNAME-basic-incomplete::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(database_schema)=DB2INST1-basic-incomplete::(database_table)=EMPLNAME-basic-incomplete::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"dataType\": \"STRING\"\n }\n ],\n \"incomplete\": true\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "3.6 Create incomplete Relational Table - all properties", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"databaseSchemaQualifiedName\": \"(database_schema)=DB2INST1-all-props-incomplete\",\n \"table\": {\n \"qualifiedName\": \"(database_schema)=DB2INST1-all-props-incomplete::(database_table)=EMPLNAME-all-props-incomplete\",\n \"displayName\": \"EMPLNAME-all-props-incomplete\",\n \"description\": \"EMPLNAME-all-props-incomplete description\",\n \"isDeprecated\": false,\n \"aliases\": [\n \"EMPLNAME2\"\n ],\n \"columns\": [\n {\n \"qualifiedName\": \"(database_schema)=DB2INST1-all-props-incomplete::(database_table)=EMPLNAME-all-props-incomplete::(database_column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"ID\"\n ],\n \"sortOrder\": \"ASCENDING\",\n \"description\": \"id column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"1\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(database_schema)=DB2INST1-all-props-incomplete::(database_table)=EMPLNAME-all-props-incomplete::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 2,\n \"dataType\": \"STRING\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"First\"\n ],\n \"sortOrder\": \"UNSORTED\",\n \"description\": \"first column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"name\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(host)=HOST::(database)=MINIMAL-all-props-incomplete::(database_schema)=DB2INST1::(database_table)=EMPLNAME-all-props-incomplete::(database_column)=SURNAME\",\n \"displayName\": \"SURNAME\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"minimuumLength\": 0,\n \"length\": 50,\n \"allowsDuplicateValues\": true,\n \"position\": 3,\n \"dataType\": \"STRING\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"Last\"\n ],\n \"sortOrder\": \"UNSORTED\",\n \"description\": \"surname column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"name\",\n \"formula\": \"formula\"\n },\n {\n \"qualifiedName\": \"(database_schema)=DB2INST1-all-props-incomplete::(database_table)=EMPLNAME-all-props-incomplete::(database_column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 4,\n \"dataType\": \"INTEGER\",\n \"orderedValues\": true,\n \"defaultValueOverride\": \"defaultOverride\",\n \"defaltValue\": \"defaultValue\",\n \"nativeClass\": \"nativeClass\",\n \"aliases\": [\n \"Location\"\n ],\n \"sortOrder\": \"ASCENDING\",\n \"description\": \"locid column\",\n \"significantDigits\": 0,\n \"precision\": 0,\n \"fixedValue\": \"1\",\n \"formula\": \"formula\"\n }\n ],\n \"incomplete\": true\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/relational-tables", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "relational-tables" - ] - } - }, - "response": [] - }, - { - "name": "3.7 Create incomplete DataFile - required props only", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"DataFile\",\n \"qualifiedName\": \"(host)=HOST::(data_file)=DATAFILE-incomplete.DAT\",\n \"displayName\": \"dataFile-incomplete.dat\",\n \"pathName\": \"/home/files/dataFile-incomplete.dat\",\n \"networkAddress\": \"localhost\",\n \"columns\": [\n {\n \"qualifiedName\": \"(data_file)=DATAFILE-incomplete.DAT::(data_file_record)=schema::(data_file_field)=COLUMN-A\",\n \"displayName\": \"column-a\"\n },\n {\n \"qualifiedName\": \"(data_file)=DATAFILE-incomplete.DAT::(data_file_record)=schema::(data_file_field)=COLUMN-B\",\n \"displayName\": \"column-b\"\n }\n ],\n \"incomplete\": true\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "3.8 Create incomplete DataFile - all properties", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"DataFile\",\n \"qualifiedName\": \"(file)=DATAFILE2-incomplete.DAT\",\n \"displayName\": \"dataFile2-incomplete.dat\",\n \"pathName\": \"/home/files/dataFile2-incomplete.dat\",\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"createTime\": \"1617095893010\",\n \"modifiedTime\": \"1617095893010\",\n \"description\": \"Data file description.\",\n \"protocol\": \"ftp\",\n \"networkAddress\": \"localhost\",\n \"columns\": [\n {\n \"qualifiedName\": \"(file)=DATAFILE2-incomplete.DAT::(column)=COLUMN-A\",\n \"displayName\": \"column-a\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-A DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-A-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-A-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-1\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n },\n {\n \"qualifiedName\": \"(file)=DATAFILE2-incomplete.DAT::(column)=COLUMN-B\",\n \"displayName\": \"column-b\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-B DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-B-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-B-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-2\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n }\n ],\n \"incomplete\": true\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "3.9 Create incomplete CSVFile - required props only", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"CSVFile\",\n \"qualifiedName\": \"(file)=CSVFILE-incomplete.CSV\",\n \"displayName\": \"csvFile-incomplete.csv\",\n \"pathName\": \"/home/files/csvFile-incomplete.csv\",\n \"networkAddress\" : \"localhost\",\n \"columns\": [\n {\n \"qualifiedName\": \"(file)=CSVFILE-incomplete.CSV::(column)=COLUMN-A\",\n \"displayName\": \"column-a\"\n },\n {\n \"qualifiedName\": \"(file)=CSVFILE-incomplete.CSV::(column)=COLUMN-B\",\n \"displayName\": \"column-b\"\n }\n ],\n \"incomplete\": true\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "3.10 Create incomplete CSVFile - all properties", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"CSVFile\",\n \"qualifiedName\": \"(file)=CSVFILE2-incomplete.CSV\",\n \"displayName\": \"csvFile2-incomplete.csv\",\n \"pathName\": \"/home/files/csvFile2-incomplete.csv\",\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"createTime\": \"1617095893010\",\n \"modifiedTime\": \"1617095893010\",\n \"description\": \"Data file description.\",\n \"protocol\": \"ftp\",\n \"networkAddress\": \"localhost\",\n \"columns\": [\n {\n \"qualifiedName\": \"(file)=CSVFILE2-incomplete.CSV::(column)=COLUMN-A\",\n \"displayName\": \"column-a\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-A DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-A-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-A-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-1\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n },\n {\n \"qualifiedName\": \"(file)=CSVFILE2-incomplete.CSV::(column)=COLUMN-B\",\n \"displayName\": \"column-b\",\n \"additionalProperties\": {\n \"key-1\": \"value-1\",\n \"key-2\": \"value-2\"\n },\n \"description\": \"COLUMN-B DESCRIPTION\",\n \"position\": 0,\n \"minCardinality\": 0,\n \"maxCardinality\": 1,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"defaultValueOverride\": \"COLUMN-B-DEFAULT-VALUE\",\n \"nativeClass\": \"COLUMN-B-NATIVE-CLSAS\",\n \"aliases\": [\n \"COLUMN-2\"\n ],\n \"dataItemSortOrder\": \"UNKNOWN\"\n }\n ],\n \"incomplete\": true\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "4.1 Find entity - all props", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"identifiers\" : {\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform::/data\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"type\": \"Referenceable\"\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/find", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "find" - ] - } - }, - "response": [] - }, - { - "name": "4.2 Find entity - required props", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"identifiers\" : {\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform::/data\"\n }\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/find", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "find" - ] - } - }, - "response": [] - }, - { - "name": "5.1 Create topic required props", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topic\": {\n \"qualifiedName\": \"(topic)=test-topic-basic\",\n \"displayName\": \"test-topic-basic\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/topics", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "topics" - ] - } - }, - "response": [] - }, - { - "name": "5.2 Create topic all props", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topic\": {\n \"qualifiedName\": \"(topic)=test-topic\",\n \"displayName\": \"test-topic\",\n \"topicType\": \"topic-type\",\n \"description\": \"topic description\",\n \"otherOriginValues\": {\n \"prop\": \"oherOrigin\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"eventTypes\": [\n {\n \"qualifiedName\": \"(topic)=test-topic::(eventType)=test-event\",\n \"displayName\": \"test-event\",\n \"author\": \"author\",\n \"usage\": \"usage\",\n \"encodingStandard\": \"encoding\",\n \"versionNumber\": \"versionNumber\",\n \"isDeprecated\": false,\n \"description\": \"event type description\",\n \"eventSchemaAttributes\": [\n {\n \"qualifiedName\": \"(topic)=test-topic::(eventType)=test-event::(eventAttribute)=test-event-attribute\",\n \"displayName\": \"test-event-attribute\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/topics", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "topics" - ] - } - }, - "response": [] - }, - { - "name": "5.3 Create event type required props", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topicQualifiedName\": \"(topic)=test-topic-basic\",\n \"eventType\": {\n \"qualifiedName\": \"(topic)=test-topic-basic::(eventType)=test-event-basic\",\n \"displayName\": \"test-event-basic\",\n \"eventSchemaAttributes\": [\n {\n \"qualifiedName\": \"(topic)=test-topic-basic::(eventType)=test-event-basic::(eventAttribute)=test-event-attribute-basic\",\n \"displayName\": \"test-event-attribute-basic\"\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/event-types", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "event-types" - ] - } - }, - "response": [] - }, - { - "name": "5.4 Create event type all props", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topicQualifiedName\": \"(topic)=test-topic\",\n \"eventType\": {\n \"qualifiedName\": \"(topic)=test-topic::(eventType)=test-event-2\",\n \"displayName\": \"test-event-2\",\n \"author\": \"author\",\n \"usage\": \"usage\",\n \"encodingStandard\": \"encoding\",\n \"versionNumber\": \"versionNumber\",\n \"isDeprecated\": false,\n \"description\": \"event type description\",\n \"eventSchemaAttributes\": [\n {\n \"qualifiedName\": \"(topic)=test-topic::(eventType)=test-event-2::(eventAttribute)=test-event-attribute-2\",\n \"displayName\": \"test-event-attribute-2\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/event-types", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "event-types" - ] - } - }, - "response": [] - }, - { - "name": "5.5. Delete topic", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(topic)=test-topic\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/topics", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "topics" - ] - } - }, - "response": [] - }, - { - "name": "5.6 Delete event type", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(topic)=test-topic::(eventType)=test-event\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/event-types", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "event-types" - ] - } - }, - "response": [] - }, - { - "name": "6.1 Upsert Processing State Classification", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"processingState\": {\n \"syncDatesByKey\" : {\n \"{{criticalElement}}\" : \"{{criticalElementLastSyncTimestampLong}}\"\n }\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processing-state", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processing-state" - ] - } - }, - "response": [] - }, - { - "name": "6.2 Get Processing State Classification", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processing-state?dataEngine=(organization)=Company::(project)=ExternalDataPlatform", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processing-state" - ], - "query": [ - { - "key": "dataEngine", - "value": "(organization)=Company::(project)=ExternalDataPlatform" - } - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-process_endpoints.postman_collection.json b/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-process_endpoints.postman_collection.json deleted file mode 100644 index 925cdf96343..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-process_endpoints.postman_collection.json +++ /dev/null @@ -1,1151 +0,0 @@ -{ - "info": { - "_postman_id": "32b3ebd2-9e9b-4fd7-b5f1-aeafa574972b", - "name": "DataEngine - process endpoints", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "1.1 Register external tool", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataEngine\":\n {\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"displayName\": \"ExternalDataEngine\",\n \"description\": \"Requesting to register external data engine capability\",\n \"engineType\": \"DataEngine\",\n \"engineVersion\": \"1\",\n \"enginePatchLevel\": \"1\",\n \"vendor\": \"Companny\",\n \"version\": \"1\",\n \"source\": \"source\"\n }\n}\n" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/registration", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "registration" - ] - } - }, - "response": [] - }, - { - "name": "1.2 Delete external tool - function not supported", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/registration", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "registration" - ] - } - }, - "response": [] - }, - { - "name": "1.3 Create CSVFile - names.csv", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"CSVFile\",\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv\",\n \"displayName\": \"names.csv\",\n \"networkAddress\": \"localhost\",\n \"pathName\": \"/data/files/minimal/names.csv\",\n \"additionalProperties\": {\n \"include_for_business_lineage\": true,\n \"path\": \"/data/files/minimal\",\n \"store_type\": \"Local\"\n },\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\",\n \"displayName\": \"Id\",\n \"additionalProperties\": {\n \"odbc_type\": \"BIGINT\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": false,\n \"position\": 1,\n \"minCardinality\": 1,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\",\n \"displayName\": \"First\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": true,\n \"position\": 2,\n \"minCardinality\": 0,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\",\n \"displayName\": \"Last\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": true,\n \"position\": 3,\n \"minCardinality\": 0,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\",\n \"displayName\": \"Location\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": false,\n \"position\": 4,\n \"minCardinality\": 1,\n \"maxCardinality\": 1\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "1.4 Create CSVFile - emplname.csv", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"file\": {\n \"fileType\": \"CSVFile\",\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv\",\n \"displayName\": \"emplname.csv\",\n \"networkAddress\": \"localhost\",\n \"pathName\": \"/data/files/minimal/emplname.csv\",\n \"additionalProperties\": {\n \"include_for_business_lineage\": true,\n \"path\": \"/data/files/minimal\",\n \"store_type\": \"Local\"\n },\n \"columns\": [\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=EMPID\",\n \"displayName\": \"EMPID\",\n \"additionalProperties\": {\n \"odbc_type\": \"BIGINT\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": false,\n \"position\": 1,\n \"minCardinality\": 1,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=FNAME\",\n \"displayName\": \"FNAME\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": true,\n \"position\": 2,\n \"minCardinality\": 0,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LNAME\",\n \"displayName\": \"LNAME\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": true,\n \"position\": 3,\n \"minCardinality\": 0,\n \"maxCardinality\": 1\n },\n {\n \"qualifiedName\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LOCID\",\n \"displayName\": \"LOCID\",\n \"additionalProperties\": {\n \"odbc_type\": \"VARCHAR\"\n },\n \"allowDuplicates\": true,\n \"deprecated\": false,\n \"nullable\": false,\n \"position\": 4,\n \"minCardinality\": 1,\n \"maxCardinality\": 1\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-files", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-files" - ] - } - }, - "response": [] - }, - { - "name": "2.1. Create schema type - virtual asset", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schema\": {\n \"qualifiedName\": \"extern:fr:6c18e03b7e4f44089462e858538bd5d2\",\n \"displayName\": \"EMPLOYEE\",\n \"columns\": [\n {\n \"qualifiedName\": \"source-schema-attribute-qualified-name\",\n \"displayName\": \"DEPT\",\n \"elementPosition\": 0\n },\n {\n \"qualifiedName\": \"(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=EMPSTATUS\",\n \"displayName\": \"EMPSTATUS\",\n \"elementPosition\": 0\n },\n {\n \"qualifiedName\": \"(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"elementPosition\": 0\n },\n {\n \"qualifiedName\": \"(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=LNAME\",\n \"displayName\": \"LNAME\",\n \"elementPosition\": 0\n },\n {\n \"qualifiedName\": \"(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=LOCCODE\",\n \"displayName\": \"LOCCODE\",\n \"elementPosition\": 0\n },\n {\n \"qualifiedName\": \"(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=LVL\",\n \"displayName\": \"LVL\",\n \"elementPosition\": 0\n },\n {\n \"qualifiedName\": \"(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=PNUM\",\n \"displayName\": \"PNUM\",\n \"elementPosition\": 0\n },\n {\n \"qualifiedName\": \"(host_(engine))=engine::(data_connection)=EMPLOYEE_extern:fr:16feb06d8fde48eca2851815b6de99dd::(database_schema)=public::(database_table)=EMPLOYEE::(database_column)=ROLE\",\n \"displayName\": \"ROLE\",\n \"elementPosition\": 0\n }\n ]\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/schema-types", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "schema-types" - ] - } - }, - "response": [] - }, - { - "name": "2.2 Delete schema type - virtual asset", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"extern:fr:6c18e03b7e4f44089462e858538bd5d2\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/schema-types", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "schema-types" - ] - } - }, - "response": [] - }, - { - "name": "3.1. Create Process CopyColumns", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"displayName\": \"CopyColumns\",\n \"name\": \"CopyColumns\",\n \"description\": \"CopyColumns is (sub)process that describes the low level implementation activities performed by a platform or tool.\",\n \"owner\": \"Platform User\",\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "3.2. Create PortImplementation NamesFileInputPort", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processQualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"portImplementation\": {\n \"displayName\": \"NamesFileInputPort\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputPort\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"displayName\": \"NamesFileInputSchema\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema\",\n \"author\": \"Platform User\",\n \"columns\": [\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last\",\n \"displayName\": \"Last\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First\",\n \"displayName\": \"First\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location\",\n \"displayName\": \"Location\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/port-implementations", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "port-implementations" - ] - } - }, - "response": [] - }, - { - "name": "3.3. Create PortImplementation EmplnameFileOutputPort", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processQualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"portImplementation\": {\n \"displayName\": \"EmplnameFileOutputPort\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputPort\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"displayName\": \"EmplnameFileOutputSchema\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema\",\n \"author\": \"Platform User\",\n \"columns\": [\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME\",\n \"displayName\": \"LNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n }\n ]\n }\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/port-implementations", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "port-implementations" - ] - } - }, - "response": [] - }, - { - "name": "3.4. Add Data Flows for CopyColumns process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=EMPID\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=FNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LOCID\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "3.5. Create Process CopyColumnsFlow", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"(process)=CopyColumnsFlow\",\n \"displayName\": \"CopyColumnsFlow\",\n \"name\": \"CopyColumnsFlow\",\n \"description\": \"CopyColumnsFlow describes high level process input and output and mappings between (sub)processes (if any).\",\n \"owner\": \"Platform User\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "3.6. Add process hierarchy relationship", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"(process)=CopyColumnsFlow\",\n \"childProcess\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "3.7. Delete Process CopyColumnsFlow", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(process)=CopyColumnsFlow\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "3.8. Delete PortImplementation NamesFileInputPort", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputPort\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/port-implementations", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "port-implementations" - ] - } - }, - "response": [] - }, - { - "name": "3.9. Delete Process CopyColumns", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.1. Create Process - CopyColumns", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"displayName\": \"CopyColumns\",\n \"name\": \"CopyColumns\",\n \"description\": \"CopyColumns is (sub)process that describes the low level implementation activities performed by a platform or tool.\",\n \"owner\": \"Platform User\",\n \"portImplementations\": [\n {\n \"displayName\": \"NamesFileInputPort\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputPort\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"displayName\": \"NamesFileInputSchema\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema\",\n \"author\": \"Platform User\",\n \"columns\": [\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last\",\n \"displayName\": \"Last\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First\",\n \"displayName\": \"First\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 1,\n \"dataType\": \"VARCHAR\"\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id\",\n \"displayName\": \"Id\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 2,\n \"dataType\": \"INTEGER\"\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location\",\n \"displayName\": \"Location\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 3,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n },\n {\n \"displayName\": \"EmplnameFileOutputPort\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputPort\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"displayName\": \"EmplnameFileOutputSchema\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema\",\n \"author\": \"Platform User\",\n \"columns\": [\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID\",\n \"displayName\": \"EMPID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME\",\n \"displayName\": \"FNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID\",\n \"displayName\": \"LOCID\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n },\n {\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME\",\n \"displayName\": \"LNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.2 Add Data Flows for CopyColumns", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last\"\n },\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=EMPID\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=FNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LNAME\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LOCID\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "4.3. Create Process - CopyColumnFlow", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"(process)=CopyColumnsFlow\",\n \"displayName\": \"CopyColumnsFlow\",\n \"name\": \"CopyColumnsFlow\",\n \"description\": \"CopyColumnsFlow describes high level process input and output and mappings between (sub)processes (if any).\",\n \"owner\": \"Platform User\",\n \"portAliases\": [\n {\n \"displayName\": \"ReadInputFilePortAlias\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(port)=ReadInputFilePortAlias\",\n \"updateSemantic\": \"REPLACE\",\n \"delegatesTo\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputPort\",\n \"type\": \"INPUT_PORT\"\n },\n {\n \"displayName\": \"WriteOutputFilePortAlias\",\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(port)=WriteOutputFilePortAlias\",\n \"updateSemantic\": \"REPLACE\",\n \"delegatesTo\": \"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputPort\",\n \"type\": \"OUTPUT_PORT\"\n }\n ],\n \"dataFlows\": [],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.4. Add prcess hierarchy relationship", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"processHierarchy\": {\n \"parentProcess\": \"(process)=CopyColumnsFlow\",\n \"childProcess\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"containmentType\": \"OWNED\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/process-hierarchies", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "process-hierarchies" - ] - } - }, - "response": [] - }, - { - "name": "4.5. Delete Process CopyColumns", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(process)=CopyColumnsFlow::(process)=CopyColumns\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "4.6. Delete Process CopyColumnsFlow", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(process)=CopyColumnsFlow\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.1 Create Process - CopyColumnsFlow-high-level lineage", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"(process)=CopyColumnsFlow-high-level\",\n \"displayName\": \"CopyColumnsFlow-high-level\",\n \"name\": \"CopyColumnsFlow-high level\",\n \"description\": \"CopyColumnsFlow describes high level process input and output and mappings between (sub)processes (if any).\",\n \"owner\": \"Platform User\",\n \"collection\": {\n \"qualifiedName\": \"(transformation-project)=Transformation_Project\",\n \"name\": \"CopyColumnsFlow-transformation-project\"\n },\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "5.2 Add Data Flows for CopyColumnsFlow-high-level process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::schema\",\n \"dataConsumer\": \"(process)=CopyColumnsFlow-high-level\"\n },\n {\n \"dataSupplier\": \"(process)=CopyColumnsFlow-high-level\",\n \"dataConsumer\": \"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::schema\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "5.2. Delete Process CopyColumnsFlow-high-level", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "username", - "value": "demo", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"qualifiedName\": \"(process)=CopyColumnsFlow-high-level\",\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-topics-lineage_examples.postman_collection.json b/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-topics-lineage_examples.postman_collection.json deleted file mode 100644 index 48ae85647f7..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/DataEngine-topics-lineage_examples.postman_collection.json +++ /dev/null @@ -1,454 +0,0 @@ -{ - "info": { - "_postman_id": "489e39b7-720b-4c6e-9a0d-0dcbfebde4ad", - "name": "Data Engine - Topics lineage examples", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "1.INSTANCE", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [], - "url": { - "raw": "{{base-url}}/open-metadata/admin-services/users/{{user-id}}/servers/{{server-id}}/instance", - "host": [ - "{{base-url}}" - ], - "path": [ - "open-metadata", - "admin-services", - "users", - "{{user-id}}", - "servers", - "{{server-id}}", - "instance" - ] - } - }, - "response": [] - }, - { - "name": "1.1 Register external tool", - "protocolProfileBehavior": { - "strictSSL": false, - "disableUrlEncoding": true, - "followRedirects": false - }, - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataEngine\":\n {\n \"qualifiedName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"displayName\": \"ExternalDataEngine\",\n \"description\": \"Requesting to register external data engine capability\",\n \"engineType\": \"DataEngine\",\n \"engineVersion\": \"1\",\n \"enginePatchLevel\": \"1\",\n \"vendor\": \"Company\",\n \"version\": \"1\",\n \"source\": \"source\"\n }\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/registration", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "registration" - ] - } - }, - "response": [] - }, - { - "name": "1.2 Create first topic high level", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topic\": {\n \"qualifiedName\": \"(topic)=first-topic-high-level\",\n \"displayName\": \"first-topic-high-level\",\n \"topicType\": \"topic-type\",\n \"description\": \"topic description\",\n \"otherOriginValues\": {\n \"prop\": \"oherOrigin\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"eventTypes\": [\n {\n \"qualifiedName\": \"(topic)=first-topic-high-level::(eventType)=first-event-high-level\",\n \"displayName\": \"first-event-high-level\",\n \"author\": \"author\",\n \"usage\": \"usage\",\n \"encodingStandard\": \"encoding\",\n \"versionNumber\": \"versionNumber\",\n \"isDeprecated\": false,\n \"description\": \"event type description\",\n \"eventSchemaAttributes\": [\n {\n \"qualifiedName\": \"(topic)=first-topic-high-level::(eventType)=first-event-high-level::(eventAttribute)=first-event-attribute\",\n \"displayName\": \"first-event-attribute\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/topics", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "topics" - ] - } - }, - "response": [] - }, - { - "name": "1.3 Create second topic high level", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topic\": {\n \"qualifiedName\": \"(topic)=second-topic-high-level\",\n \"displayName\": \"second-topic-high-level\",\n \"topicType\": \"topic-type\",\n \"description\": \"topic description\",\n \"otherOriginValues\": {\n \"prop\": \"oherOrigin\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/topics", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "topics" - ] - } - }, - "response": [] - }, - { - "name": "1.4 Create first topic low level", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topic\": {\n \"qualifiedName\": \"(topic)=first-topic-low-level\",\n \"displayName\": \"first-topic-low-level\",\n \"topicType\": \"topic-type\",\n \"description\": \"topic description\",\n \"otherOriginValues\": {\n \"prop\": \"oherOrigin\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"eventTypes\": [\n {\n \"qualifiedName\": \"(topic)=first-topic-low-level::(eventType)=first-event-low-level\",\n \"displayName\": \"first-event-low-level\",\n \"author\": \"author\",\n \"usage\": \"usage\",\n \"encodingStandard\": \"encoding\",\n \"versionNumber\": \"versionNumber\",\n \"isDeprecated\": false,\n \"description\": \"event type description\",\n \"eventSchemaAttributes\": [\n {\n \"qualifiedName\": \"(topic)=first-topic-low-level::(eventType)=first-event-low-level::(eventAttribute)=first-event-attribute\",\n \"displayName\": \"first-event-attribute\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/topics", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "topics" - ] - } - }, - "response": [] - }, - { - "name": "1.5 Create second topic low level", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\",\n \"topic\": {\n \"qualifiedName\": \"(topic)=second-topic-low-level\",\n \"displayName\": \"second-topic-low-level\",\n \"topicType\": \"topic-type\",\n \"description\": \"topic description\",\n \"otherOriginValues\": {\n \"prop\": \"oherOrigin\"\n },\n \"owner\": \"owner\",\n \"ownerType\": \"USER_ID\",\n \"zoneMembership\": [\n \"ZONE_1\"\n ],\n \"additionalProperties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"eventTypes\": [\n {\n \"qualifiedName\": \"(topic)=second-topic-low-level::(eventType)=second-event-low-level\",\n \"displayName\": \"second-event-low-level\",\n \"author\": \"author\",\n \"usage\": \"usage\",\n \"encodingStandard\": \"encoding\",\n \"versionNumber\": \"versionNumber\",\n \"isDeprecated\": false,\n \"description\": \"event type description\",\n \"eventSchemaAttributes\": [\n {\n \"qualifiedName\": \"(topic)=second-topic-low-level::(eventType)=second-event-low-level::(eventAttribute)=second-event-attribute\",\n \"displayName\": \"second-event-attribute\",\n \"minCardinality\": 1,\n \"maxCardinality\": 1,\n \"isDeprecated\": false,\n \"isNullable\": false,\n \"allowsDuplicateValues\": true,\n \"position\": 1,\n \"dataType\": \"INTEGER\"\n }\n ]\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/topics", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "topics" - ] - } - }, - "response": [] - }, - { - "name": "2.1 Create high level process", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"headerVersion\": 0,\n \"qualifiedName\": \"(process)=high-level-process\",\n \"displayName\": \"high-level-process\",\n \"description\": \"\",\n \"owner\": \"Egeria Open Metadata\",\n \"name\": \"flow1\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "2.2 Add data flows high level", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"(topic)=first-topic-high-level\",\n \"dataConsumer\": \"(process)=high-level-process\"\n },\n {\n \"dataSupplier\": \"(process)=high-level-process\",\n \"dataConsumer\": \"(topic)=second-topic-high-level\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "2.3 Create low level process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"(process)=low-level-parent-process::(process)=low-level-process\",\n \"displayName\": \"low-level-process\",\n \"name\": \"low-level-process\",\n \"description\": \"low-level-process is (sub)process that describes the low level implementation activities performed by a platform or tool.\",\n \"owner\": \"Platform User\",\n \"portImplementations\": [\n {\n \"displayName\": \"InputPort\",\n \"qualifiedName\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=InputPort\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"INPUT_PORT\",\n \"schema\": {\n \"displayName\": \"InputPortSchema\",\n \"qualifiedName\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=InputPort::(schema)=InputPortSchema\",\n \"author\": \"Platform User\",\n \"columns\": [\n {\n \"qualifiedName\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=InputPort::(schema)=InputPortSchema::(attribute)=event-schema-attribute\",\n \"displayName\": \"Last\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0,\n \"dataType\": \"VARCHAR\"\n }\n ]\n }\n },\n {\n \"displayName\": \"OutputPort\",\n \"qualifiedName\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=OutputPort\",\n \"updateSemantic\": \"REPLACE\",\n \"type\": \"OUTPUT_PORT\",\n \"schema\": {\n \"displayName\": \"OutputPortSchema\",\n \"qualifiedName\": \"(process)=CopySchemaAttributesFlow::(process)=CopySchemaAttributes::(port)=OutputPortSchema\",\n \"author\": \"Platform User\",\n \"columns\": [\n {\n \"qualifiedName\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=OutputPort::(schema)=OutputPortSchema::(attribute)=event-schema-attribute\",\n \"displayName\": \"LNAME\",\n \"minCardinality\": 0,\n \"maxCardinality\": 0,\n \"allowsDuplicateValues\": false,\n \"orderedValues\": false,\n \"position\": 0\n }\n ]\n }\n }\n ],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - }, - { - "name": "2.4 Add data flows low level", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"dataFlows\": [\n {\n \"dataSupplier\": \"(topic)=first-topic-low-level::(eventType)=first-event-low-level::(eventAttribute)=first-event-attribute\",\n \"dataConsumer\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=InputPort::(schema)=InputPortSchema::(attribute)=event-schema-attribute\"\n },\n {\n \"dataSupplier\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=InputPort::(schema)=InputPortSchema::(attribute)=event-schema-attribute\",\n \"dataConsumer\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=OutputPort::(schema)=OutputPortSchema::(attribute)=event-schema-attribute\"\n },\n {\n \"dataSupplier\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=OutputPort::(schema)=OutputPortSchema::(attribute)=event-schema-attribute\",\n \"dataConsumer\": \"(topic)=second-topic-low-level::(eventType)=second-event-low-level::(eventAttribute)=second-event-attribute\"\n }\n ],\n \"externalSourceName\": \"(organization)=Company::(project)=ExternalDataPlatform\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/data-flows", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "data-flows" - ] - } - }, - "response": [] - }, - { - "name": "2.5 Create low level parent process", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "demo", - "type": "string" - }, - { - "key": "password", - "value": "demo", - "type": "string" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"process\": {\n \"qualifiedName\": \"(process)=low-level-parent-process\",\n \"displayName\": \"low-level-parent-process\",\n \"name\": \"low-level-parent-process\",\n \"description\": \"low-level-process describes high level process input and output and mappings between (sub)processes (if any).\",\n \"owner\": \"Platform User\",\n \"portAliases\": [\n {\n \"displayName\": \"ReadInputPortAlias\",\n \"qualifiedName\": \"(process)=low-level-parent-process::(port)=ReadInputPortAlias\",\n \"updateSemantic\": \"REPLACE\",\n \"delegatesTo\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=InputPort\",\n \"type\": \"INPUT_PORT\"\n },\n {\n \"displayName\": \"WriteOutputPortAlias\",\n \"qualifiedName\": \"(process)=low-level-process::(port)=WriteOutpuPortAlias\",\n \"updateSemantic\": \"REPLACE\",\n \"delegatesTo\": \"(process)=low-level-parent-process::(process)=low-level-process::(port)=OutputPort\",\n \"type\": \"OUTPUT_PORT\"\n }\n ],\n \"dataFlows\": [],\n \"updateSemantic\": \"REPLACE\"\n },\n \"externalSourceName\": \"(organization)=ING::(project)=ExternalDataPlatform\"\n}" - }, - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/data-engine/users/{{user-id}}/processes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "data-engine", - "users", - "{{user-id}}", - "processes" - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/README.md b/open-metadata-implementation/access-services/data-engine/docs/samples/collections/README.md deleted file mode 100644 index fa248ffb757..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/README.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# Samples - -### [DataEngine-asset-endpoints.postman_collection.json](DataEngine-asset_endpoints.postman_collection.json) -This sample Postman collection illustrates DataEngine OMAS endpoints for creating/updating/deleting assets - -### [DataEngine-process-endpoints.postman_collection.json](DataEngine-process_endpoints.postman_collection.json) -This sample Postman collection illustrates DataEngine OMAS endpoints for creating/updating/deleting processes - -### [DataEngine-topics.postman_collection.json](DataEngine-topics-lineage_examples.postman_collection.json) -This sample Postman collection illustrates DataEngine OMAS endpoints for creating/updating/deleting topics - - -### [DataEngineOMAS-minimal-flows.postman_collection.json](Data%20Engine-minimal_flows_granular_level.postman_collection.json) -This sample Postman collection illustrates DataEngine OMAS endpoints used for creating column level lineage. It showcases the minimal flows example, composed of three lineage flows tht are connected. - -Prerequisites: - -- [local-integration-tests.postman_environment.json](local-integration-tests.postman_environment.json) - the environment used for running the tests locally - -- Egeria by default uses https:// requests with a self-signed certificate. Any PostMan users therefore will need to - go into settings->general and turn off 'SSL certificate verification' or requests will fail. - -Each step is sequentially numbered so that they can be executed in-order as part of a Postman "Runner", if desired. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/local-integration-tests.postman_environment.json b/open-metadata-implementation/access-services/data-engine/docs/samples/collections/local-integration-tests.postman_environment.json deleted file mode 100644 index 4f45b10d49a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/collections/local-integration-tests.postman_environment.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "id": "813c70fa-e34f-495f-a569-fdbbecb51e67", - "name": "local - integration tests", - "values": [ - { - "key": "user-id", - "value": "demo", - "enabled": true - }, - { - "key": "server-id", - "value": "omas", - "enabled": true - }, - { - "key": "base-url", - "value": "http://localhost:5500", - "enabled": true - }, - { - "key": "kafka-url", - "value": "localhost:9092", - "enabled": true - }, - { - "key": "data-engine-qualified-name", - "value": "dataEngine", - "enabled": true - }, - { - "key": "port-impl-qualified-name", - "value": "port-impl-qualified-name", - "enabled": true - }, - { - "key": "port-alias-qualified-name", - "value": "port-alias-qualified-name", - "enabled": true - }, - { - "key": "simple-process-qualified-name", - "value": "simple-process-qualified-name", - "enabled": true - }, - { - "key": "simple-port-impl-qualified-name", - "value": "simple-port-impl-qualified-name", - "enabled": true - }, - { - "key": "simple-schema-type-qualified-name", - "value": "simple-schema-type-qualified-name", - "enabled": true - }, - { - "key": "simple-column-1-qualified-name", - "value": "simple-column-1-qualified-name", - "enabled": true - }, - { - "key": "simple-column-2-qualified-name", - "value": "simple-column-2-qualified-name", - "enabled": true - }, - { - "key": "processGuid", - "value": "0db28547-ab9e-4b2e-b4f1-da2c72c579f5", - "enabled": true - }, - { - "key": "rid_data_connection_db", - "value": "database_table@60934c9f-3ee4-44e9-94b5-298ff54112bd:b1c497ce.54bd3a08.0v9mgsb23.pa2bef1.34r7co.tgr5b7dgjjrm6tesftbr5", - "enabled": true - }, - { - "key": "rid_database_schema", - "value": "term@60934c9f-3ee4-44e9-94b5-298ff54112bd:6662c0f2.e1b1ec6c.00263pfrb.66t5p8c.jk5353.69k7s3u2do49odaavci58", - "enabled": true - } - ], - "_postman_variable_scope": "environment", - "_postman_exported_at": "2019-12-05T09:27:57.148Z", - "_postman_exported_using": "Postman/7.12.0" -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/events/DataEngine_delete_events.txt b/open-metadata-implementation/access-services/data-engine/docs/samples/events/DataEngine_delete_events.txt deleted file mode 100644 index a0611b6350d..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/events/DataEngine_delete_events.txt +++ /dev/null @@ -1,19 +0,0 @@ -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_SCHEMA_TYPE_EVENT","userId":"OMAGServer","qualifiedName":"extern:virtual:asset","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_PROCESS_EVENT","userId":"OMAGServer","qualifiedName":"(process)=CopyColumnsFlow","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_PORT_IMPLEMENTATION_EVENT","userId":"OMAGServer","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputPort","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_PROCESS_EVENT","userId":"OMAGServer","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_RELATIONAL_TABLE_EVENT","userId":"OMAGServer","qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_DATABASE_SCHEMA_EVENT","userId":"OMAGServer","qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_DATABASE_EVENT","userId":"OMAGServer","qualifiedName":"(host)=HOST::(database)=MINIMAL","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_CONNECTION_EVENT","userId":"OMAGServer","qualifiedName":"CSVFile:(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv Connection","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_CONNECTION_EVENT","userId":"OMAGServer","qualifiedName":"CSVFile:(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv Connection","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_ENDPOINT_EVENT","userId":"OMAGServer","qualifiedName":"CSVFile:(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv Endpoint","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_ENDPOINT_EVENT","userId":"OMAGServer","qualifiedName":"CSVFile:(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv Endpoint","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_DATA_FILE_EVENT","userId":"OMAGServer","qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_DATA_FILE_EVENT","userId":"OMAGServer","qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_FOLDER_EVENT","userId":"OMAGServer","qualifiedName":"(organization)=Company::(project)=ExternalDataPlatform::/data/files/minimal","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_FOLDER_EVENT","userId":"OMAGServer","qualifiedName":"(organization)=Company::(project)=ExternalDataPlatform::/data/files","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_FOLDER_EVENT","userId":"OMAGServer","qualifiedName":"(organization)=Company::(project)=ExternalDataPlatform::/data","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_FOLDER_EVENT","userId":"OMAGServer","qualifiedName":"(organization)=Company::(project)=ExternalDataPlatform::/","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_EVENT_TYPE_EVENT","userId":"OMAGServer","qualifiedName":"(topic)=test-topic::(eventType)=test-event-2","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} -{"class":"DeleteEvent","eventVersionId":1,"dataEngineEventType":"DELETE_TOPIC_EVENT","userId":"OMAGServer","qualifiedName":"(topic)=test-topic","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform"} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/events/DataEngine_upsert_events.txt b/open-metadata-implementation/access-services/data-engine/docs/samples/events/DataEngine_upsert_events.txt deleted file mode 100644 index 5928b9b30fa..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/events/DataEngine_upsert_events.txt +++ /dev/null @@ -1,20 +0,0 @@ -{"class":"DataEngineRegistrationEvent","eventVersionId":1,"dataEngineEventType":"DATA_ENGINE_REGISTRATION_EVENT","userId":"OMAGServer","engine":{"qualifiedName":"(organization)=Company::(project)=ExternalDataPlatform","displayName":"ExternalDataEngine","description":"Requesting to register external data engine capability","engineType":"DataEngine","engineVersion":"1","enginePatchLevel":"1","vendor":"Company","version":"1","source":"source"}} -{"class":"SchemaTypeEvent","eventVersionId":1,"dataEngineEventType":"SCHEMA_TYPE_EVENT","userId":"OMAGServer","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","schema":{"qualifiedName":"extern:virtual:asset","displayName":"EMPLOYEE","columns":[{"qualifiedName":"extern:virtual:asset:schema-attribute-1","displayName":"DEPT","elementPosition":0},{"qualifiedName":"extern:virtual:asset:schema-attribute-2","displayName":"EMPSTATUS","elementPosition":0}]}} -{"class":"DataFileEvent","eventVersionId":1,"dataEngineEventType":"DATA_FILE_EVENT","userId":"OMAGServer","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","file":{"fileType":"CSVFile","qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv","displayName":"names.csv","pathName":"/data/files/minimal/names.csv","networkAddress":"localhost","additionalProperties":{"include_for_business_lineage":true,"path":"/data/files/minimal","store_type":"Local"},"columns":[{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id","displayName":"Id","additionalProperties":{"odbc_type":"BIGINT"},"allowDuplicates":true,"deprecated":false,"nullable":false,"position":1,"minCardinality":1,"maxCardinality":1},{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First","displayName":"First","additionalProperties":{"odbc_type":"VARCHAR"},"allowDuplicates":true,"deprecated":false,"nullable":true,"position":2,"minCardinality":0,"maxCardinality":1},{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last","displayName":"Last","additionalProperties":{"odbc_type":"VARCHAR"},"allowDuplicates":true,"deprecated":false,"nullable":true,"position":3,"minCardinality":0,"maxCardinality":1},{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location","displayName":"Location","additionalProperties":{"odbc_type":"VARCHAR"},"allowDuplicates":true,"deprecated":false,"nullable":false,"position":4,"minCardinality":1,"maxCardinality":1}]}} -{"class":"DataFileEvent","eventVersionId":1,"dataEngineEventType":"DATA_FILE_EVENT","userId":"OMAGServer","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","file":{"fileType":"CSVFile","qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv","displayName":"emplname.csv","pathName":"/data/files/minimal/emplname.csv","networkAddress":"localhost","additionalProperties":{"include_for_business_lineage":true,"path":"/data/files/minimal","store_type":"Local"},"columns":[{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=EMPID","displayName":"EMPID","additionalProperties":{"odbc_type":"BIGINT"},"allowDuplicates":true,"deprecated":false,"nullable":false,"position":1,"minCardinality":1,"maxCardinality":1},{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=FNAME","displayName":"FNAME","additionalProperties":{"odbc_type":"VARCHAR"},"allowDuplicates":true,"deprecated":false,"nullable":true,"position":2,"minCardinality":0,"maxCardinality":1},{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LNAME","displayName":"LNAME","additionalProperties":{"odbc_type":"VARCHAR"},"allowDuplicates":true,"deprecated":false,"nullable":true,"position":3,"minCardinality":0,"maxCardinality":1},{"qualifiedName":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LOCID","displayName":"LOCID","additionalProperties":{"odbc_type":"VARCHAR"},"allowDuplicates":true,"deprecated":false,"nullable":false,"position":4,"minCardinality":1,"maxCardinality":1}]}} -{"class":"ProcessEvent","eventVersionId":1,"dataEngineEventType":"PROCESS_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","process":{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns","displayName":"CopyColumns","name":"CopyColumns","description":"CopyColumns is (sub)process that describes the low level implementation activities performed by a platform or tool.","owner":"Platform User","updateSemantic":"REPLACE"}} -{"class":"PortImplementationEvent","eventVersionId":1,"dataEngineEventType":"PORT_IMPLEMENTATION_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","processQualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns","portImplementation":{"displayName":"NamesFileInputPort","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputPort","updateSemantic":"REPLACE","type":"INPUT_PORT","schema":{"displayName":"NamesFileInputSchema","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema","author":"Platform User","columns":[{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last","displayName":"Last","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0,"dataType":"VARCHAR"},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First","displayName":"First","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":1,"dataType":"VARCHAR"},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id","displayName":"Id","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":2,"dataType":"INTEGER"},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location","displayName":"Location","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":3,"dataType":"INTEGER"}]}}} -{"class":"PortImplementationEvent","eventVersionId":1,"dataEngineEventType":"PORT_IMPLEMENTATION_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","processQualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns","portImplementation":{"displayName":"EmplnameFileOutputPort","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputPort","updateSemantic":"REPLACE","type":"OUTPUT_PORT","schema":{"displayName":"EmplnameFileOutputSchema","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema","author":"Platform User","columns":[{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID","displayName":"EMPID","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME","displayName":"FNAME","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID","displayName":"LOCID","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME","displayName":"LNAME","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0}]}}} -{"class":"DataFlowsEvent","eventVersionId":1,"dataEngineEventType":"DATA_FLOWS_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","dataFlows":[{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id"},{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First"},{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last"},{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=EMPID"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=FNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LOCID"}]} -{"class":"ProcessEvent","eventVersionId":1,"dataEngineEventType":"PROCESS_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","process":{"qualifiedName":"(process)=CopyColumnsFlow","displayName":"CopyColumnsFlow","name":"CopyColumnsFlow","description":"CopyColumnsFlow\ndescribes high level process input and output and mappings between (sub)processes (if any).","owner":"Platform User"}} -{"class":"ProcessHierarchyEvent","eventVersionId":1,"dataEngineEventType":"PROCESS_HIERARCHY_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","processHierarchy":{"parentProcess":"(process)=CopyColumnsFlow","childProcess":"(process)=CopyColumnsFlow::(process)=CopyColumns","containmentType":"OWNED"}} -{"class":"ProcessEvent","eventVersionId":1,"dataEngineEventType":"PROCESS_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","process":{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns","displayName":"CopyColumns","name":"CopyColumns","description":"CopyColumns is (sub)process that describes the low level implementation activities performed by a platform or tool.","owner":"Platform User","portImplementations":[{"displayName":"NamesFileInputPort","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputPort","updateSemantic":"REPLACE","type":"INPUT_PORT","schema":{"displayName":"NamesFileInputSchema","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema","author":"Platform User","columns":[{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last","displayName":"Last","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0,"dataType":"VARCHAR"},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First","displayName":"First","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":1,"dataType":"VARCHAR"},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id","displayName":"Id","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":2,"dataType":"INTEGER"},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location","displayName":"Location","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":3,"dataType":"INTEGER"}]}},{"displayName":"EmplnameFileOutputPort","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputPort","updateSemantic":"REPLACE","type":"OUTPUT_PORT","schema":{"displayName":"EmplnameFileOutputSchema","qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema","author":"Platform User","columns":[{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID","displayName":"EMPID","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME","displayName":"FNAME","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID","displayName":"LOCID","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0},{"qualifiedName":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME","displayName":"LNAME","minCardinality":0,"maxCardinality":0,"allowsDuplicateValues":false,"orderedValues":false,"position":0}]}}],"updateSemantic":"REPLACE","parentProcesses":[{"qualifiedName":"(process)=CopyColumnsFlow","containmentType":"OWNED"}]}} -{"class":"DataFlowsEvent","eventVersionId":1,"dataEngineEventType":"DATA_FLOWS_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","dataFlows":[{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Id","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id"},{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=First","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First"},{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Last","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last"},{"dataSupplier":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=names.csv::(data_file_record)=names::(data_file_field)=Location","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Id","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=First","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Last","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=NamesFileInputSchema::(column)=Location","dataConsumer":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=EMPID","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=EMPID"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=FNAME","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=FNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LNAME","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LNAME"},{"dataSupplier":"(process)=CopyColumnsFlow::(process)=CopyColumns::(port)=EmplnameFileOutputSchema::(column)=LOCID","dataConsumer":"(host)=HOST::(data_file_folder)=/::(data_file_folder)=data::(data_file_folder)=files::(data_file_folder)=minimal::(data_file)=emplname.csv::(data_file_record)=emplname::(data_file_field)=LOCID"}]} -{"class":"ProcessEvent","eventVersionId":1,"dataEngineEventType":"PROCESS_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","process":{"qualifiedName":"(process)=CopyColumnsFlow","displayName":"CopyColumnsFlow","name":"CopyColumnsFlow","description":"CopyColumnsFlow describes high level process input and output and mappings between (sub)processes (if any).","owner":"Platform User","updateSemantic":"REPLACE"}} -{"class":"DatabaseEvent","eventVersionId":1,"dataEngineEventType":"DATABASE_EVENT","userId":"OMAGServer","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","database":{"qualifiedName":"(host)=HOST::(database)=MINIMAL","displayName":"MINIMAL","databaseType":"DB2","databaseVersion":"10.05.0002","databaseInstance":"db2inst1","databaseImportedFrom":"DB2Connector 9.1","createTime":"1588160311000","modifiedTime":"1588160311000","protocol":"ftp","networkAddress":"localhost","schema":{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1","displayName":"DB2INST1","description":"DB2INST1"},"zoneMembership":["default"]}} -{"class":"DatabaseSchemaEvent","eventVersionId":1,"dataEngineEventType":"DATABASE_SCHEMA_EVENT","userId":"OMAGServer","databaseQualifiedName":"(host)=HOST::(database)=MINIMAL","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","databaseSchema":{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1","displayName":"DB2INST1","description":"DB2INST1 database schema description","owner":"Administrator IIS","ownerType":"USER_ID","zoneMembership":["default"],"otherOriginValues":{"prop":"otherOrigin"}}} -{"class":"RelationalTableEvent","eventVersionId":1,"dataEngineEventType":"RELATIONAL_TABLE_EVENT","userId":"OMAGServer","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","databaseSchemaQualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1","table":{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME","displayName":"EMPLNAME","isDeprecated":false,"columns":[{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=EMPID","displayName":"EMPID","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"allowsDuplicateValues":true,"position":1,"dataType":"INTEGER"},{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=FNAME","displayName":"FNAME","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"minimuumLength":0,"length":50,"allowsDuplicateValues":true,"position":2,"dataType":"STRING"},{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=SURNAME","displayName":"SURNAME","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"minimuumLength":0,"length":50,"allowsDuplicateValues":true,"position":3,"dataType":"STRING"},{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLNAME::(database_column)=LOCID","displayName":"LOCID","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"allowsDuplicateValues":true,"position":4,"dataType":"INTEGER"}]}} -{"class":"RelationalTableEvent","eventVersionId":1,"dataEngineEventType":"RELATIONAL_TABLE_EVENT","userId":"OMAGServer","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","databaseSchemaQualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1","table":{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE","displayName":"WORKPLACE","isDeprecated":false,"columns":[{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCID","displayName":"LOCID","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"allowsDuplicateValues":true,"position":1,"dataType":"INT32"},{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=WORKPLACE::(database_column)=LOCNAME","displayName":"LOCNAME","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"minimuumLength":0,"length":50,"allowsDuplicateValues":true,"position":2,"dataType":"STRING"}]}} -{"class":"RelationalTableEvent","eventVersionId":1,"dataEngineEventType":"RELATIONAL_TABLE_EVENT","userId":"OMAGServer","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","databaseSchemaQualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1","table":{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY","displayName":"EMPLDIRECTORY","isDeprecated":false,"columns":[{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPID","displayName":"EMPID","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"allowsDuplicateValues":true,"position":1,"dataType":"INTEGER"},{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=EMPNAME","displayName":"EMPNAME","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"minimuumLength":0,"length":100,"allowsDuplicateValues":true,"position":2,"dataType":"STRING"},{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCID","displayName":"LOCID","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"allowsDuplicateValues":true,"position":3,"dataType":"INTEGER"},{"qualifiedName":"(host)=HOST::(database)=MINIMAL::(database_schema)=DB2INST1::(database_table)=EMPLDIRECTORY::(database_column)=LOCNAME","displayName":"LOCNAME","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"minimuumLength":0,"length":50,"allowsDuplicateValues":true,"position":4,"dataType":"STRING"}]}} -{"class":"TopicEvent","eventVersionId":1,"dataEngineEventType":"TOPIC_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","topic":{"qualifiedName":"(topic)=test-topic","displayName":"test-topic","topicType":"topic-type","description":"topic description","otherOriginValues":{"prop":"otherOrigin"},"owner":"owner","ownerType":"USER_ID","zoneMembership":["ZONE_1"],"additionalProperties":{"key1":"value1","key2":"value2"},"eventTypes":[{"qualifiedName":"(topic)=test-topic::(eventType)=test-event","displayName":"test-event","author":"author","usage":"usage","encodingStandard":"encoding","versionNumber":"versionNumber","isDeprecated":false,"description":"event type description","eventSchemaAttributes":[{"qualifiedName":"(topic)=test-topic::(eventType)=test-event::(eventAttribute)=test-event-attribute","displayName":"test-event-attribute","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"allowsDuplicateValues":true,"position":1,"dataType":"INTEGER"}]}]}} -{"class":"EventTypeEvent","eventVersionId":1,"dataEngineEventType":"EVENT_TYPE_EVENT","externalSourceName":"(organization)=Company::(project)=ExternalDataPlatform","userId":"OMAGServer","topicQualifiedName":"(topic)=test-topic","eventType":{"qualifiedName":"(topic)=test-topic::(eventType)=test-event-2","displayName":"test-event-2","author":"author","usage":"usage","encodingStandard":"encoding","versionNumber":"versionNumber","isDeprecated":false,"description":"event type description","eventSchemaAttributes":[{"qualifiedName":"(topic)=test-topic::(eventType)=test-event-2::(eventAttribute)=test-event-attribute-2","displayName":"test-event-attribute-2","minCardinality":1,"maxCardinality":1,"isDeprecated":false,"isNullable":false,"allowsDuplicateValues":true,"position":1,"dataType":"INTEGER"}]}} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/events/README.md b/open-metadata-implementation/access-services/data-engine/docs/samples/events/README.md deleted file mode 100644 index 193728aa57b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/samples/events/README.md +++ /dev/null @@ -1,12 +0,0 @@ - - - -# Samples - -### [DataEngine_upsert_events.txt](DataEngine_upsert_events.txt) - file with sample event types for upserting entities in Data Engine OMAS - -### [DataEngine_delete_events.txt](DataEngine_upsert_events.txt) - file with sample event types for deleting entities in Data Engine OMAS - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/LineageObjects-Conceptual.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/LineageObjects-Conceptual.png deleted file mode 100644 index 20e1a5aa432..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/LineageObjects-Conceptual.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/file_to_table.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/file_to_table.png deleted file mode 100644 index fb8cc7510a3..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/file_to_table.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/initial_load.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/initial_load.png deleted file mode 100644 index f592ca55f8e..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-engine/model/initial_load.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/01_sequence.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/01_sequence.png deleted file mode 100644 index ab30465f51c..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/01_sequence.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobA.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobA.png deleted file mode 100644 index bd761e132c1..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobA.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobB.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobB.png deleted file mode 100644 index cf0d6734b0c..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobB.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobC.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobC.png deleted file mode 100644 index 427899c9918..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/02_jobC.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/LineageObjects-Screenshots.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/LineageObjects-Screenshots.png deleted file mode 100644 index 896f4de6d25..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/LineageObjects-Screenshots.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/LineageObjects-eg DataStage.png b/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/LineageObjects-eg DataStage.png deleted file mode 100644 index 4e198fcf43e..00000000000 Binary files a/open-metadata-implementation/access-services/data-engine/docs/samples/initial-load/data-stage/LineageObjects-eg DataStage.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/data-engine/docs/scenarios/README.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/README.md deleted file mode 100644 index 73b08a40381..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/README.md +++ /dev/null @@ -1,66 +0,0 @@ - - - - -# Using the Data Engine OMAS - -Below is the list of tasks supported by Data Engine OMAS. - -#### [External Tool registration](register-external-tool.md) -Typically, the first action to take for an external tool is to register as an -[engine](https://egeria-project.org/concepts/software-capability/#engine). - -#### [External Tool lookup](lookup-registration-tool.md) - -#### [Create Schema Type](create-schema-types.md) - -#### [Create Port Implementation with schema type](create-port-implementations.md) - -#### [Create Process, with corresponding Port Implementations and Schema Types](create-processes.md) - -#### [Add data flows to processes](add-data-flows.md) - -#### [Delete Schema Type](delete-schema-types.md) - -#### [Delete Port Implementation](delete-port-implementations.md) - -#### [Delete Process](delete-processes.md) - -#### [Create Database](create-databases.md) - -#### [Create Database Schema](create-database-schemas.md) - -#### [Create Relational Tables](create-relational-tables.md) - -#### [Create Data Files](create-data-files.md) - -#### [Delete Database](delete-databases.md) - -#### [Delete Database Schema](delete-database-schemas.md) - -#### [Delete Relational Tables](delete-relational-tables.md) - -#### [Delete Data Files](delete-data-files.md) - -#### [Delete Connections](delete-connections.md) - -#### [Delete Endpoint](delete-endpoints.md) - -#### [Create Topic](create-topics.md) - -#### [Create EventType](create-event-types.md) - -#### [Delete Topic](delete-topics.md) - -#### [Delete EventType](delete-event-types.md) - -#### [Find Entities](find-entities.md) - -# Sample use case - -[Initial load](initial-load-igc-data-stage.md) use case illustrates the integration between -Data Engine OMAS and IBM's DataStage ETL tool. - ----- -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/data-engine/docs/scenarios/add-data-flows.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/add-data-flows.md deleted file mode 100644 index d550b63a73f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/add-data-flows.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Add data flows - -[Add data flows](../../data-engine-server/docs/scenarios/add-data-flows.md) -between schema types involved in an ETL transformation. - ----- -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/data-engine/docs/scenarios/create-data-files.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-data-files.md deleted file mode 100644 index 5e3fcdcdbbe..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-data-files.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Create data files - -[Create a data file](../../data-engine-server/docs/scenarios/create-data-file.md) -with the associated schema, columns and folder hierarchy. - ----- -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/data-engine/docs/scenarios/create-database-schemas.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-database-schemas.md deleted file mode 100644 index 4c334c78705..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-database-schemas.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Create database schemas - -[Create a database schema](../../data-engine-server/docs/scenarios/create-database-schema.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-implementation/access-services/data-engine/docs/scenarios/create-databases.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-databases.md deleted file mode 100644 index 0338cdc879a..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-databases.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Create databases - -[Create a database](../../data-engine-server/docs/scenarios/create-database.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-implementation/access-services/data-engine/docs/scenarios/create-event-types.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-event-types.md deleted file mode 100644 index 9352fdde186..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-event-types.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Create event types - -[Create an event type](../../data-engine-server/docs/scenarios/create-event-type.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-implementation/access-services/data-engine/docs/scenarios/create-port-implementations.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-port-implementations.md deleted file mode 100644 index 1dc18650970..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-port-implementations.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Create port implementations - -[Create a port implementation](../../data-engine-server/docs/scenarios/create-port-implementation.md) -with the associated schema type and port schema relationship. - ----- -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/data-engine/docs/scenarios/create-processes.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-processes.md deleted file mode 100644 index ccc353ae3a4..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-processes.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Create processes - -[Create a process](../../data-engine-server/docs/scenarios/create-process.md) -with the associated ports and process port relationships. - ----- -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/data-engine/docs/scenarios/create-relational-tables.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-relational-tables.md deleted file mode 100644 index 1001f55b5df..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-relational-tables.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Create relational tables - -[Create a relational table](../../data-engine-server/docs/scenarios/create-relational-table.md) -with the associated ports and process port relationships. - ----- -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/data-engine/docs/scenarios/create-schema-types.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-schema-types.md deleted file mode 100644 index a7baab1a864..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-schema-types.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Create schema types - -[Create a schema type](../../data-engine-server/docs/scenarios/create-schema-type.md) -with all the schema attributes and relationships describing the columns involved in a transformation. - ----- -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/data-engine/docs/scenarios/create-topics.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-topics.md deleted file mode 100644 index fc03a7ecc5c..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/create-topics.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Create topics - -[Create a topic](../../data-engine-server/docs/scenarios/create-topic.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-implementation/access-services/data-engine/docs/scenarios/delete-connections.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-connections.md deleted file mode 100644 index b3fab524c09..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-connections.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Delete connections - -[Delete a connection](../../data-engine-server/docs/scenarios/delete-connection.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-implementation/access-services/data-engine/docs/scenarios/delete-data-files.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-data-files.md deleted file mode 100644 index 5a4b7a3430e..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-data-files.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete data files - -[Delete a data file](../../data-engine-server/docs/scenarios/delete-data-file.md) -with all the schema attributes and relationships describing the columns. - ----- -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/data-engine/docs/scenarios/delete-database-schemas.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-database-schemas.md deleted file mode 100644 index d97143fe3a9..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-database-schemas.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Delete database schemas - -[Delete a database schema](../../data-engine-server/docs/scenarios/delete-database-schema.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-implementation/access-services/data-engine/docs/scenarios/delete-databases.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-databases.md deleted file mode 100644 index c8595adcfd0..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-databases.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete databases - -[Delete a database](../../data-engine-server/docs/scenarios/delete-database.md) -with all the tables attached - ----- -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/data-engine/docs/scenarios/delete-endpoints.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-endpoints.md deleted file mode 100644 index 56b5393855b..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-endpoints.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Delete endpoints - -[Delete an endpoint](../../data-engine-server/docs/scenarios/delete-endpoint.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-implementation/access-services/data-engine/docs/scenarios/delete-event-types.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-event-types.md deleted file mode 100644 index cd1386c4a40..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-event-types.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete event types - -[Delete an event type](../../data-engine-server/docs/scenarios/delete-event-type.md) -with all the event schema attributes attached - ----- -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/data-engine/docs/scenarios/delete-port-implementations.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-port-implementations.md deleted file mode 100644 index 04a09ccf26f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-port-implementations.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete port implementations - -[Delete a port implementation](../../data-engine-server/docs/scenarios/delete-port-implementation.md) -with the associated schema type and port schema relationship. - ----- -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/data-engine/docs/scenarios/delete-processes.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-processes.md deleted file mode 100644 index c5630e80b48..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-processes.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete processes - -[Delete a process](../../data-engine-server/docs/scenarios/delete-process.md) -with the associated ports and process port relationships. - ----- -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/data-engine/docs/scenarios/delete-relational-tables.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-relational-tables.md deleted file mode 100644 index 9ca918de1a3..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-relational-tables.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete relational tables - -[Delete a relational table](../../data-engine-server/docs/scenarios/delete-relational-tables.md) -with all the schema attributes and relationships describing the columns. - ----- -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/data-engine/docs/scenarios/delete-schema-types.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-schema-types.md deleted file mode 100644 index c5ba535a241..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-schema-types.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete schema types - -[Delete a schema type](../../data-engine-server/docs/scenarios/delete-schema-type.md) -with all the schema attributes and relationships describing the columns. - ----- -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/data-engine/docs/scenarios/delete-topics.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-topics.md deleted file mode 100644 index b9921bb8b84..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/delete-topics.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Delete topics - -[Delete a topic](../../data-engine-server/docs/scenarios/delete-topic.md) -with all the event types attached - ----- -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/data-engine/docs/scenarios/find-entities.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/find-entities.md deleted file mode 100644 index 4df0a8c9afa..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/find-entities.md +++ /dev/null @@ -1,10 +0,0 @@ - - - -# Find entities - -[Find an entity](../../data-engine-server/docs/scenarios/find-entity.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-implementation/access-services/data-engine/docs/scenarios/initial-load-igc-data-stage.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/initial-load-igc-data-stage.md deleted file mode 100644 index 676b03457d0..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/initial-load-igc-data-stage.md +++ /dev/null @@ -1,18 +0,0 @@ - - - -# Initial load use case - -[Initial load](../samples/initial-load/data-stage) use case shows the integration between -Data Engine OMAS and IBM Data Stage. - -The calls from [minimal_flows collection](../samples/collections/Data%20Engine-minimal_flows_granular_level.postman_collection.json) -describe the operations needed for creating the open metadata entities corresponding to the Data Stage ETL job. - ->Note: Data Engine OMAS must have access to the IGC entities. -Check [egeria-connector-ibm-information-server](https://github.com/odpi/egeria-connector-ibm-information-server#ibm-infosphere-information-server-connectors) -for more details. - ----- -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/data-engine/docs/scenarios/lookup-registration-tool.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/lookup-registration-tool.md deleted file mode 100644 index a3fbd9dcdbd..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/lookup-registration-tool.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Lookup an external tool - -An external tool can lookup for the engine entity created at registration step. - -Request to use is: [lookup-external-tool](../../data-engine-server/docs/scenarios/lookup-registration.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-implementation/access-services/data-engine/docs/scenarios/register-external-tool.md b/open-metadata-implementation/access-services/data-engine/docs/scenarios/register-external-tool.md deleted file mode 100644 index 534946c4c0f..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/scenarios/register-external-tool.md +++ /dev/null @@ -1,15 +0,0 @@ - - - -# Registering an external tool - -For an external tool to submit metadata to Data Engine OMAS it needs to first register. - -This implies creating an Engine entity with the properties defining the external tool. - -Request to use is: [register-external-tool](../../data-engine-server/docs/scenarios/register-data-engine-tool.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-implementation/access-services/data-engine/docs/user/README.md b/open-metadata-implementation/access-services/data-engine/docs/user/README.md deleted file mode 100644 index 7db6a30d103..00000000000 --- a/open-metadata-implementation/access-services/data-engine/docs/user/README.md +++ /dev/null @@ -1,23 +0,0 @@ - - - - -# Data Engine OMAS User Documentation - - -The Data Engine OMAS manages the creation of open metadata types for all the assets and jobs that are involved in ETL transformation. - -Data Engine OMAS offers a [Java client](../../data-engine-client/docs/user/java-client) and -[REST API](../../data-engine-client/docs/user) for creating the job metadata. - - - -To understand more see: - -* [Configuring the Data Engine OMAS](../../data-engine-server/docs/configuration) -* [Using the Data Engine OMAS](../scenarios) - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),ky -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/glossary-view/README.md b/open-metadata-implementation/access-services/glossary-view/README.md deleted file mode 100644 index 514e7feaaa6..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/README.md +++ /dev/null @@ -1,27 +0,0 @@ - - - -![Deprecated](../../../images/egeria-content-status-deprecated.png#pagewidth) - -# Glossary View Open Metadata Access Service (OMAS) - -The Glossary View OMAS provides an API to browse a glossary. - -* [Documentation](https://egeria-project.org/services/omas/glossary-view/overview) - -## Design Information - -The module structure for the Glossary View OMAS is as follows: - -* [glossary-view-client](glossary-view-client) supports the client library. -* [glossary-view-api](glossary-view-api) supports the common Java classes that are used both by the client and the server. -* [glossary-view-server](glossary-view-server) supports in implementation of the access service and its related event management. -* [glossary-view-spring](glossary-view-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - ----- -Return to the [access-services](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/glossary-view/docs/samples/collections/GlossaryView-endpoints.postman_collection.json b/open-metadata-implementation/access-services/glossary-view/docs/samples/collections/GlossaryView-endpoints.postman_collection.json deleted file mode 100644 index 4544b7cdbe5..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/docs/samples/collections/GlossaryView-endpoints.postman_collection.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "info": { - "_postman_id": "a76a5a86-529b-4995-97ff-9963dd4b53aa", - "name": "Glossary View endpoints", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "1.1 Get glossaries", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/glossaries", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "glossaries" - ] - } - }, - "response": [] - }, - { - "name": "1.2 Get glossary", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/glossaries/{{glossary-guid}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "glossaries", - "{{glossary-guid}}" - ], - "query": [ - { - "key": "", - "value": "", - "disabled": true - } - ] - } - }, - "response": [] - }, - { - "name": "1.3 Get home glossary of a term", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/home-glossary", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "home-glossary" - ] - } - }, - "response": [] - }, - { - "name": "1.4 Get home glossary of a category", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/categories/{{category-guid}}/home-glossary", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "categories", - "{{category-guid}}", - "home-glossary" - ] - } - }, - "response": [] - }, - { - "name": "1.5 Get external glossary links of glossary", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/glossaries/{{glossary-guid}}/external-glossary-links?from=0&size=5", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "glossaries", - "{{glossary-guid}}", - "external-glossary-links" - ], - "query": [ - { - "key": "from", - "value": "0" - }, - { - "key": "size", - "value": "5" - } - ] - } - }, - "response": [] - }, - { - "name": "2.1 Get categories", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/categories/?from=0&size=5", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "categories", - "" - ], - "query": [ - { - "key": "from", - "value": "0" - }, - { - "key": "size", - "value": "5" - } - ] - } - }, - "response": [] - }, - { - "name": "2.2 Get category", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/categories/{{category-guid}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "categories", - "{{category-guid}}" - ] - } - }, - "response": [] - }, - { - "name": "2.3 Get glossary's categories", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/glossaries/{{glossary-guid}}/categories?from=0&size=5", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "glossaries", - "{{glossary-guid}}", - "categories" - ], - "query": [ - { - "key": "from", - "value": "0" - }, - { - "key": "size", - "value": "5" - } - ] - } - }, - "response": [] - }, - { - "name": "2.4 Get subcategories of category", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/categories/{{category-guid}}/subcategories", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "categories", - "{{category-guid}}", - "subcategories" - ] - } - }, - "response": [] - }, - { - "name": "2.5 Get external glossary links of category", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/categories/{{category-guid}}/external-glossary-links", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "categories", - "{{category-guid}}", - "external-glossary-links" - ] - } - }, - "response": [] - }, - { - "name": "3.1 Get terms", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms?from=0&size=5", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms" - ], - "query": [ - { - "key": "from", - "value": "0" - }, - { - "key": "size", - "value": "5" - } - ] - } - }, - "response": [] - }, - { - "name": "3.2 Get term", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}" - ] - } - }, - "response": [] - }, - { - "name": "3.3 Get glossary's terms", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/glossaries/{{glossary-guid}}/terms", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "glossaries", - "{{glossary-guid}}", - "terms" - ], - "query": [ - { - "key": "", - "value": "", - "disabled": true - } - ] - } - }, - "response": [] - }, - { - "name": "3.4 Get category's terms", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/categories/{{category-guid}}/terms", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "categories", - "{{category-guid}}", - "terms" - ], - "query": [ - { - "key": "", - "value": "", - "disabled": true - } - ] - } - }, - "response": [] - }, - { - "name": "3.5 Get external glossaries links of term", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/see-also", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "see-also" - ] - } - }, - "response": [] - }, - { - "name": "3.6 Get related terms", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/see-also", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "see-also" - ] - } - }, - "response": [] - }, - { - "name": "3.7 Get term synonyms", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/synonyms", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "synonyms" - ] - } - }, - "response": [] - }, - { - "name": "3.8 Get term antonyms", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/antonyms", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "antonyms" - ] - } - }, - "response": [] - }, - { - "name": "3.9 Get term preferred", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/preferred-terms", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "preferred-terms" - ] - } - }, - "response": [] - }, - { - "name": "3.10 Get term replacements", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/replacement-terms", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "replacement-terms" - ] - } - }, - "response": [] - }, - { - "name": "3.11 Get term translations", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/translations", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "translations" - ] - } - }, - "response": [] - }, - { - "name": "3.12 Get term is a", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/is-a", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "is-a" - ] - } - }, - "response": [] - }, - { - "name": "3.13 Get term valid values", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/valid-values", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "valid-values" - ] - } - }, - "response": [] - }, - { - "name": "3.14 Get term used in context", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/used-in-contexts", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "used-in-contexts" - ] - } - }, - "response": [] - }, - { - "name": "3.15 Get term assigned elements", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/assigned-elements", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "assigned-elements" - ] - } - }, - "response": [] - }, - { - "name": "3.16 Get term attributes", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/attributes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "attributes" - ] - } - }, - "response": [] - }, - { - "name": "3.17 Get term subtypes", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/subtypes", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "subtypes" - ] - } - }, - "response": [] - }, - { - "name": "3.18 Get term types", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base-url}}/servers/{{server-id}}/open-metadata/access-services/glossary-view/users/{{userId}}/terms/{{term-guid}}/types", - "host": [ - "{{base-url}}" - ], - "path": [ - "servers", - "{{server-id}}", - "open-metadata", - "access-services", - "glossary-view", - "users", - "{{userId}}", - "terms", - "{{term-guid}}", - "types" - ] - } - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "serverName", - "value": "omas" - }, - { - "key": "userId", - "value": "demo" - }, - { - "key": "omas-url", - "value": "" - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/README.md b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/README.md deleted file mode 100644 index 189d1be721b..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Glossary View Open Metadata Access Service (OMAS) API - - - -The Glossary View OMAS API provides the shared Java classes between the -server and client. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/build.gradle b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/build.gradle deleted file mode 100644 index 0db19fb222c..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id "io.freefair.lombok" -} - -dependencies { - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') -} - -description = 'Glossary View OMAS API' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/ClassificationToGlossaryViewClassification.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/ClassificationToGlossaryViewClassification.java deleted file mode 100644 index 8d8b2daf84c..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/ClassificationToGlossaryViewClassification.java +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.converters; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewClassification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - -import java.util.function.Function; - -/** - * Converts an OMRS {@code Classification} into this OMAS's {@code GlossaryViewClassification} - */ -class ClassificationToGlossaryViewClassification implements Function { - - @Override - public GlossaryViewClassification apply(Classification classification) { - GlossaryViewClassification glossaryViewClassification = new GlossaryViewClassification(); - glossaryViewClassification.setName(classification.getName()); - glossaryViewClassification.setClassificationType(classification.getType().getTypeDefName()); - glossaryViewClassification.setCreatedBy(classification.getCreatedBy()); - glossaryViewClassification.setUpdatedBy(classification.getUpdatedBy()); - glossaryViewClassification.setCreateTime(classification.getCreateTime()); - glossaryViewClassification.setUpdateTime(classification.getUpdateTime()); - glossaryViewClassification.setStatus(classification.getStatus().getName()); - - InstanceProperties properties = classification.getProperties(); - if(properties != null && properties.getInstanceProperties() != null) { - properties.getInstanceProperties().forEach( - (key, value) -> glossaryViewClassification.addProperty(key, value.valueAsString())); - } - - return glossaryViewClassification; - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/EntityDetailToGlossaryViewEntityDetail.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/EntityDetailToGlossaryViewEntityDetail.java deleted file mode 100644 index 2be0d4418a6..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/EntityDetailToGlossaryViewEntityDetail.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.converters; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - -import java.util.Optional; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * Converts an OMRS {@code EntityDetail} into this OMAS's {@code GlossaryViewEntityDetail} - */ -public class EntityDetailToGlossaryViewEntityDetail implements Function { - - @Override - public GlossaryViewEntityDetail apply(EntityDetail entityDetail) { - Optional optionalProperties = Optional.ofNullable(entityDetail.getProperties()); - - GlossaryViewEntityDetail glossaryViewEntityDetail = GlossaryViewEntityDetailFactory.build(entityDetail.getType().getTypeDefName()) - .setTypeDefName(entityDetail.getType().getTypeDefName()) - .setCreatedBy(entityDetail.getCreatedBy()) - .setUpdatedBy(entityDetail.getUpdatedBy()) - .setCreateTime(entityDetail.getCreateTime()) - .setUpdateTime(entityDetail.getUpdateTime()) - .setVersion(entityDetail.getVersion()) - .setGuid(entityDetail.getGUID()) - .setStatus(entityDetail.getStatus() == null ? null : entityDetail.getStatus().getName()); - - /*Encountered a case where an entity did not have properties. However, this should not be possible in non-dev envs*/ - if(optionalProperties.isPresent()){ - glossaryViewEntityDetail.setEffectiveFromTime(optionalProperties.get().getEffectiveFromTime()); - glossaryViewEntityDetail.setEffectiveToTime(optionalProperties.get().getEffectiveToTime()); - - optionalProperties.get().getInstanceProperties() - .forEach((key, value) -> glossaryViewEntityDetail.putProperty(key, value.valueAsString())); - } - - if(entityDetail.getClassifications() != null) { - glossaryViewEntityDetail.addClassifications(entityDetail.getClassifications().stream() - .map(new ClassificationToGlossaryViewClassification()).collect(Collectors.toList())); - } - return glossaryViewEntityDetail; - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/GlossaryViewEntityDetailFactory.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/GlossaryViewEntityDetailFactory.java deleted file mode 100644 index ce102236cd7..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/converters/GlossaryViewEntityDetailFactory.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.converters; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.ControlledGlossaryTerm; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryCategory; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryTerm; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; - -import java.util.HashMap; -import java.util.Map; -import java.util.function.Supplier; - -class GlossaryViewEntityDetailFactory { - - private static final String DEFAULT = "Default"; - private static final String GLOSSARY = "Glossary"; - private static final String CATEGORY = "GlossaryCategory"; - private static final String TERM = "GlossaryTerm"; - private static final String CONTROLLED_TERM = "ControlledGlossaryTerm"; - private static final String EXTERNAL_GLOSSARY_LINK = "ExternalGlossaryLink"; - - private static final Map> workers = new HashMap<>(); - static { - workers.put(DEFAULT, GlossaryViewEntityDetail::new); - workers.put(GLOSSARY, Glossary::new); - workers.put(CATEGORY, GlossaryCategory::new); - workers.put(TERM, GlossaryTerm::new); - workers.put(CONTROLLED_TERM, ControlledGlossaryTerm::new); - workers.put(EXTERNAL_GLOSSARY_LINK, ExternalGlossaryLink::new); - } - - private GlossaryViewEntityDetailFactory() {} - - public static GlossaryViewEntityDetail build(String entityType){ - if(!workers.containsKey(entityType)){ - return workers.get(DEFAULT).get(); - } - return workers.get(entityType).get(); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/exception/GlossaryViewOmasException.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/exception/GlossaryViewOmasException.java deleted file mode 100644 index acf18ea6fca..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/exception/GlossaryViewOmasException.java +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.exception; - -import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSCheckedExceptionBase; - -/** - * Generic exception used when unknown exceptions are coming from the omrs layer. Made to be used only by {@code OMRSClient} - */ -public class GlossaryViewOmasException extends OMRSCheckedExceptionBase { - - public GlossaryViewOmasException(int httpCode, String className, String actionDescription, String errorMessage, - String systemAction, String userAction) { - super(httpCode, className, actionDescription, errorMessage, null, null, - systemAction, userAction, null, null); - } - - public GlossaryViewOmasException(OMRSCheckedExceptionBase omrsCheckedExceptionBase){ - this(omrsCheckedExceptionBase.getReportedHTTPCode(), omrsCheckedExceptionBase.getReportingClassName(), - omrsCheckedExceptionBase.getReportingActionDescription(), omrsCheckedExceptionBase.getReportedErrorMessage(), - omrsCheckedExceptionBase.getReportedSystemAction(), omrsCheckedExceptionBase.getReportedUserAction()); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/ControlledGlossaryTerm.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/ControlledGlossaryTerm.java deleted file mode 100644 index 94723a8da49..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/ControlledGlossaryTerm.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Simple POJO that represents a Controlled Term - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ControlledGlossaryTerm extends GlossaryTerm { - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/ExternalGlossaryLink.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/ExternalGlossaryLink.java deleted file mode 100644 index 1268556f047..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/ExternalGlossaryLink.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Simple POJO that represents an External Glossary Link - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ExternalGlossaryLink extends GlossaryViewEntityDetail { - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/Glossary.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/Glossary.java deleted file mode 100644 index cab826399c6..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/Glossary.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Simple POJO that represents a Glossary - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Glossary extends GlossaryViewEntityDetail { - - private static final String DISPLAY_NAME = "displayName"; - private static final String USAGE = "usage"; - private static final String DESCRIPTION = "description"; - private static final String LANGUAGE = "language"; - - public String getDisplayName(){ - return getProperties().get(DISPLAY_NAME); - } - - public String getUsage(){ - return getProperties().get(USAGE); - } - - public String getDescription(){ - return getProperties().get(DESCRIPTION); - } - - public String getLanguage(){ - return getProperties().get(LANGUAGE); - } - - public void setDisplayName(String displayName) { - getProperties().put(DISPLAY_NAME, displayName); - } - - public void setUsage(String usage) { - getProperties().put(USAGE, usage); - } - - public void setDescription(String description) { - getProperties().put(DESCRIPTION, description); - } - - public void setLanguage(String language) { - getProperties().put(LANGUAGE, language); - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryCategory.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryCategory.java deleted file mode 100644 index 945731855b6..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryCategory.java +++ /dev/null @@ -1,39 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Simple POJO that represents a Category - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class GlossaryCategory extends GlossaryViewEntityDetail { - - private static final String DISPLAY_NAME = "displayName"; - private static final String DESCRIPTION = "description"; - - public String getDisplayName(){ - return getProperties().get(DISPLAY_NAME); - } - - public String getDescription(){ - return getProperties().get(DESCRIPTION); - } - - public void setDisplayName(String displayName) { - getProperties().put(DISPLAY_NAME, displayName); - } - - public void setDescription(String description) { - getProperties().put(DESCRIPTION, description); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryTerm.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryTerm.java deleted file mode 100644 index 426a5ec39a4..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryTerm.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Simple POJO that represents a Term - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class GlossaryTerm extends GlossaryViewEntityDetail { - - private static final String DISPLAY_NAME = "displayName"; - private static final String DESCRIPTION = "description"; - private static final String SUMMARY = "summary"; - private static final String EXAMPLES = "examples"; - private static final String ABBREVIATION = "abbreviation"; - private static final String USAGE = "usage"; - - public String getDisplayName(){ - return getProperties().get(DISPLAY_NAME); - } - - public String getDescription(){ - return getProperties().get(DESCRIPTION); - } - - public String getSummary(){ - return getProperties().get(SUMMARY); - } - - public String getExamples(){ - return getProperties().get(EXAMPLES); - } - - public String getAbbreviation(){ - return getProperties().get(ABBREVIATION); - } - - public String getUsage(){ - return getProperties().get(USAGE); - } - - public void setDisplayName(String displayName) { - getProperties().put(DISPLAY_NAME, displayName); - } - - public void setDescription(String description) { - getProperties().put(DESCRIPTION, description); - } - - public void setSummary(String summary) { - getProperties().put(SUMMARY, summary); - } - - public void setExamples(String examples) { - getProperties().put(EXAMPLES, examples); - } - - public void setAbbreviation(String abbreviation) { - getProperties().put(ABBREVIATION, abbreviation); - } - - public void setUsage(String usage) { - getProperties().put(USAGE, usage); - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewClassification.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewClassification.java deleted file mode 100644 index 27588e49a10..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewClassification.java +++ /dev/null @@ -1,120 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Simple POJO that represents a Classification - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class GlossaryViewClassification { - - private String name; - private String classificationType; - private String createdBy; - private String updatedBy; - private Date createTime; - private Date updateTime; - private String status; - private Map properties = new HashMap<>(); - - public String getName() { - return name; - } - - public String getClassificationType() { - return classificationType; - } - - public String getCreatedBy() { - return createdBy; - } - - public String getUpdatedBy() { - return updatedBy; - } - - public Date getCreateTime() { - return createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public String getStatus() { - return status; - } - - public Map getProperties() { - return properties; - } - - public void setName(String name) { - this.name = name; - } - - public GlossaryViewClassification setClassificationType(String classificationType) { - this.classificationType = classificationType; - return this; - } - - public GlossaryViewClassification setCreatedBy(String createdBy) { - this.createdBy = createdBy; - return this; - } - - public GlossaryViewClassification setUpdatedBy(String updatedBy) { - this.updatedBy = updatedBy; - return this; - } - - public GlossaryViewClassification setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public GlossaryViewClassification setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - return this; - } - - public GlossaryViewClassification setStatus(String status) { - this.status = status; - return this; - } - - public GlossaryViewClassification setProperties(Map properties) { - this.properties = properties; - return this; - } - - public GlossaryViewClassification addProperties(Map properties) { - if(this.properties == null){ - this.properties = new HashMap<>(); - } - this.properties.putAll(properties); - return this; - } - - public GlossaryViewClassification addProperty(String key, String value) { - if(this.properties == null){ - this.properties = new HashMap<>(); - } - this.properties.put(key, value); - return this; - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewEntityDetail.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewEntityDetail.java deleted file mode 100644 index 44856af0325..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewEntityDetail.java +++ /dev/null @@ -1,206 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Simple POJO that represents any entity queried from the OMRS, and needs to be returned to the client - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = Glossary.class, name = "Glossary"), - @JsonSubTypes.Type(value = GlossaryCategory.class, name = "GlossaryCategory"), - @JsonSubTypes.Type(value = GlossaryTerm.class, name = "GlossaryTerm"), - @JsonSubTypes.Type(value = ControlledGlossaryTerm.class, name = "ControlledGlossaryTerm"), - @JsonSubTypes.Type(value = ExternalGlossaryLink.class, name = "ExternalGlossaryLink") - }) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "typeDefName", - include = JsonTypeInfo.As.EXISTING_PROPERTY, - visible = true) -public class GlossaryViewEntityDetail{ - - private static final String QUALIFIED_NAME = "qualifiedName"; - - private String typeDefName; - private String createdBy; - private String updatedBy; - private Date createTime; - private Date updateTime; - private long version; - private String guid; - private String status; - private Date effectiveFromTime; - private Date effectiveToTime; - - private Map properties = new HashMap<>(); - - private List classifications; - - public String getTypeDefName(){ return typeDefName; } - - public String getCreatedBy() { - return createdBy; - } - - public String getUpdatedBy() { - return updatedBy; - } - - public Date getCreateTime() { - return createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public long getVersion() { - return version; - } - - public String getGuid() { - return guid; - } - - public String getStatus() { - return status; - } - - public Date getEffectiveFromTime() { - return effectiveFromTime; - } - - public Date getEffectiveToTime() { - return effectiveToTime; - } - - protected Map getProperties() { - return properties; - } - - public Map allProperties() { - return properties; - } - - public String getQualifiedName(){ - return properties.get(QUALIFIED_NAME); - } - - public void setQualifiedName(String qualifiedName){ - properties.put(QUALIFIED_NAME, qualifiedName); - } - - public List getClassifications() { - return classifications; - } - - public GlossaryViewEntityDetail setTypeDefName(String typeDefName) { - this.typeDefName = typeDefName; - return this; - } - public GlossaryViewEntityDetail setCreatedBy(String createdBy) { - this.createdBy = createdBy; - return this; - } - - public GlossaryViewEntityDetail setUpdatedBy(String updatedBy) { - this.updatedBy = updatedBy; - return this; - } - - public GlossaryViewEntityDetail setCreateTime(Date createTime) { - this.createTime = createTime; - return this; - } - - public GlossaryViewEntityDetail setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - return this; - } - - public GlossaryViewEntityDetail setVersion(long version) { - this.version = version; - return this; - } - - public GlossaryViewEntityDetail setGuid(String guid) { - this.guid = guid; - return this; - } - - public GlossaryViewEntityDetail setStatus(String status) { - this.status = status; - return this; - } - - public GlossaryViewEntityDetail setEffectiveFromTime(Date effectiveFromTime) { - this.effectiveFromTime = effectiveFromTime; - return this; - } - - public GlossaryViewEntityDetail setEffectiveToTime(Date effectiveToTime) { - this.effectiveToTime = effectiveToTime; - return this; - } - - public GlossaryViewEntityDetail setProperties(Map properties){ - this.properties = properties; - return this; - } - - public GlossaryViewEntityDetail putProperties(Map properties){ - if (this.properties == null) { - this.properties = new HashMap<>(); - } - this.properties.putAll(properties); - return this; - } - - public GlossaryViewEntityDetail putProperty(String key, String value){ - if (this.properties == null) { - this.properties = new HashMap<>(); - } - this.properties.put(key, value); - return this; - } - - public GlossaryViewEntityDetail setClassifications(List classifications) { - this.classifications = classifications; - return this; - } - - public GlossaryViewEntityDetail addClassifications(List classifications) { - if(this.classifications == null){ - this.classifications = new ArrayList<>(); - } - this.classifications.addAll(classifications); - return this; - } - - public GlossaryViewEntityDetail addClassification(GlossaryViewClassification classification) { - if(this.classifications == null){ - this.classifications = new ArrayList<>(); - } - this.classifications.add(classification); - return this; - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewEntityDetailResponse.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewEntityDetailResponse.java deleted file mode 100644 index 4c39f157b74..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-api/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/rest/GlossaryViewEntityDetailResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.EqualsAndHashCode; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.ArrayList; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Actual response that is sent to the client. It contains the entities queried from the OMRS - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@EqualsAndHashCode -public class GlossaryViewEntityDetailResponse extends FFDCResponseBase { - - private List result = new ArrayList<>(); - private String actionDescription; - - public List getResult() { - return result; - } - - public void addEntityDetails(List glossaryViewEntityDetails) { - if(this.result == null){ - this.result = new ArrayList<>(); - } - this.result.addAll(glossaryViewEntityDetails); - } - - public void addEntityDetail(GlossaryViewEntityDetail glossaryViewEntityDetail){ - if(this.result == null){ - this.result = new ArrayList<>(); - } - this.result.add(glossaryViewEntityDetail); - } - - @Override - public String getActionDescription() { - return actionDescription; - } - - @Override - public void setActionDescription(String actionDescription) { - this.actionDescription = actionDescription; - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/README.md b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/README.md deleted file mode 100644 index 6e45f8ca4e8..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Glossary View Open Metadata Access Service (OMAS) client - - - -This client package provides language-specific client packages to make it easier -for data tools and applications to call the interface. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/build.gradle b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/build.gradle deleted file mode 100644 index b2fdd3a84e4..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-api') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:open-integration-framework') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-connectors-api') - implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-api') - implementation 'org.springframework:spring-core' - testImplementation 'org.mockito:mockito-core' - testImplementation 'junit:junit' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -description = 'Glossary View OMAS Client' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/ConnectedAssetClient.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/ConnectedAssetClient.java deleted file mode 100644 index 2c5d77f05e4..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/ConnectedAssetClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.client; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase; - -/** - * ConnectedAssetClient manages the retrieval of connections, and the creation of resource connectors used to access the - * content of data sources and services. - */ -public class ConnectedAssetClient extends ConnectedAssetClientBase -{ - private final static String serviceURLMarker = "community-profile"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's userId embedded in all HTTP requests - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker, serverUserId, serverPassword); - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClient.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClient.java deleted file mode 100644 index 301d0fc7724..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClient.java +++ /dev/null @@ -1,738 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.client; - -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryCategory; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryTerm; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * The Glossary View Open Metadata Access Service (OMAS) provides an interface to query for glossaries, categories and terms. - * Regarding the paged requests, one can pass null to 'from' and 'size' params in order to use their default values - */ -public class GlossaryViewClient extends OmasClient { - - private static final String PATH_ROOT = "/servers/{0}/open-metadata/access-services/glossary-view/users/{1}"; - private static final String PARAM_DELIMITER = "?"; - private static final String PAGINATION = "from={3}&size={4}"; - - private static final String GET_GLOSSARY = PATH_ROOT + "/glossaries/{2}"; - - private static final String GET_GLOSSARIES = PATH_ROOT + "/glossaries" + PARAM_DELIMITER + "from={2}&size={3}"; - private static final String GET_TERM_HOME_GLOSSARY = PATH_ROOT + "/terms/{2}/home-glossary"; - private static final String GET_CATEGORY_HOME_GLOSSARY = PATH_ROOT + "/categories/{2}/home-glossary"; - private static final String GET_GLOSSARY_EXTERNAL_GLOSSARY_LINKS = PATH_ROOT + "/glossaries/{2}/external-glossary-links" + PARAM_DELIMITER + PAGINATION; - - private static final String GET_CATEGORIES = PATH_ROOT + "/categories"; - private static final String GET_CATEGORY = PATH_ROOT + "/categories/{2}"; - private static final String GET_CATEGORIES_OF_GLOSSARY = PATH_ROOT + "/glossaries/{2}/categories"; - private static final String GET_SUBCATEGORIES = PATH_ROOT + "/categories/{2}/subcategories"; - private static final String GET_CATEGORY_EXTERNAL_GLOSSARY_LINKS = PATH_ROOT + "/categories/{2}/external-glossary-links" + PARAM_DELIMITER + PAGINATION; - - private static final String GET_TERMS = PATH_ROOT + "/terms" + PARAM_DELIMITER + "from={2}&size={3}"; - private static final String GET_TERM = PATH_ROOT + "/terms/{2}"; - private static final String GET_TERMS_OF_GLOSSARY = PATH_ROOT + "/glossaries/{2}/terms"; - private static final String GET_TERMS_OF_CATEGORY = PATH_ROOT + "/categories/{2}/terms"; - private static final String GET_TERM_EXTERNAL_GLOSSARY_LINKS = PATH_ROOT + "/terms/{2}/external-glossary-links" + PARAM_DELIMITER + PAGINATION; - private static final String GET_RELATED_TERMS = PATH_ROOT + "/terms/{2}/see-also" + PARAM_DELIMITER + PAGINATION; - private static final String GET_SYNONYMS = PATH_ROOT + "/terms/{2}/synonyms" + PARAM_DELIMITER + PAGINATION; - private static final String GET_ANTONYMS = PATH_ROOT + "/terms/{2}/antonyms" + PARAM_DELIMITER + PAGINATION; - private static final String GET_PREFERRED_TERMS = PATH_ROOT + "/terms/{2}/preferred-terms" + PARAM_DELIMITER + PAGINATION; - private static final String GET_REPLACEMENT_TERMS = PATH_ROOT + "/terms/{2}/replacement-terms" + PARAM_DELIMITER + PAGINATION; - private static final String GET_TRANSLATIONS = PATH_ROOT + "/terms/{2}/translations-terms" + PARAM_DELIMITER + PAGINATION; - private static final String GET_IS_A = PATH_ROOT + "/terms/{2}/is-a" + PARAM_DELIMITER + PAGINATION; - private static final String GET_VALID_VALUES = PATH_ROOT + "/terms/{2}/valid-values" + PARAM_DELIMITER + PAGINATION; - private static final String GET_USED_IN_CONTEXTS = PATH_ROOT + "/terms/{2}/used-in-contexts" + PARAM_DELIMITER + PAGINATION; - private static final String GET_ASSIGNED_ELEMENTS = PATH_ROOT + "/terms/{2}/assigned-elements" + PARAM_DELIMITER + PAGINATION; - private static final String GET_ATTRIBUTES = PATH_ROOT + "/terms/{2}/attributes" + PARAM_DELIMITER + PAGINATION; - private static final String GET_SUBTYPES = PATH_ROOT + "/terms/{2}/subtypes" + PARAM_DELIMITER + PAGINATION; - private static final String GET_TYPES = PATH_ROOT + "/terms/{2}/types" + PARAM_DELIMITER + PAGINATION; - - /** - * Create a new client - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * - * @throws InvalidParameterException null URL or server name - */ - public GlossaryViewClient(String serverName, String serverPlatformRootURL) throws - org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - super(serverName, serverPlatformRootURL); - } - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * @param userId caller's userId embedded in all HTTP requests - * @param password caller's userId embedded in all HTTP requests - * - * @throws InvalidParameterException null URL or server name - */ - public GlossaryViewClient(String serverName, String serverPlatformRootURL, String userId, String password) throws - org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - super(serverName, serverPlatformRootURL, userId, password); - } - - /** - * Extract all glossary definitions - * - * @param userId calling user - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse glossaries - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getAllGlossaries(String userId, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleEntitiesPagedResponse("getAllGlossaries", - GET_GLOSSARIES, serverName, userId, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract all glossaryTerms definitions - * - * @param userId calling user - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse glossaries - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getAllGlossaryTerms(String userId, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleEntitiesPagedResponse("getAllGlossaryTerms", - GET_TERMS, serverName, userId, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract all categories definitions - * - * @param userId calling user - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse glossaries - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getAllCategories(String userId, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleEntitiesPagedResponse("getAllCategories", - GET_CATEGORIES, serverName, userId, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract a glossary definition - * - * @param userId calling user - * @param glossaryGUID glossary GUID - * - * @return EntityDetailResponse glossary - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public Glossary getGlossary(String userId, String glossaryGUID) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getSingleEntityResponse("getGlossary", GET_GLOSSARY, - serverName, userId, glossaryGUID); - - return firstEntity(castOmasResult(response.getResult())); - } - - /** - * Extract a term's home glossary - * - * @param userId calling user - * @param termGUID term GUID - * - * @return EntityDetailResponse glossary - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public Glossary getTermHomeGlossary(String userId, String termGUID) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getSingleEntityResponse("getTermHomeGlossary", - GET_TERM_HOME_GLOSSARY, serverName, userId, termGUID); - - return firstEntity(castOmasResult(response.getResult())); - } - - /** - * Extract a category's home glossary - * - * @param userId calling user - * @param categoryGUID category GUID - * - * @return EntityDetailResponse glossary - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public Glossary getCategoryHomeGlossary(String userId, String categoryGUID) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getSingleEntityResponse("getCategoryHomeGlossary", - GET_CATEGORY_HOME_GLOSSARY, serverName, userId, categoryGUID); - - - return firstEntity(castOmasResult(response.getResult())); - } - - /** - * Extract a glossaries's external glossary links - * - * @param userId calling user - * @param glossaryGUID glossary GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse external glossary links - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getExternalGlossaryLinksOfGlossary(String userId, String glossaryGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getExternalGlossaryLinksOfGlossary", - GET_GLOSSARY_EXTERNAL_GLOSSARY_LINKS, serverName, userId, glossaryGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract a category definition - * - * @param userId calling user - * @param categoryGUID category GUID - * - * @return EntityDetailResponse category - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public GlossaryCategory getCategory(String userId, String categoryGUID) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getSingleEntityResponse("getCategory", GET_CATEGORY, - serverName, userId, categoryGUID); - - return firstEntity(castOmasResult(response.getResult())); - } - - /** - * Extract categories within a glossary - * - * @param userId calling user - * @param glossaryGUID glossary GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse categories - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getCategories(String userId, String glossaryGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getCategories", - GET_CATEGORIES_OF_GLOSSARY, serverName, userId, glossaryGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract subcategories of a category - * - * @param userId calling user - * @param categoryGUID category GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse subcategories - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getSubcategories(String userId, String categoryGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getSubcategories", - GET_SUBCATEGORIES, serverName, userId, categoryGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract a category's external glossary links - * - * @param userId calling user - * @param categoryGUID category GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse external glossary links - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getExternalGlossaryLinksOfCategory(String userId, String categoryGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getExternalGlossaryLinksOfCategory", - GET_CATEGORY_EXTERNAL_GLOSSARY_LINKS, serverName, userId, categoryGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract a term definition - * - * @param userId calling user - * @param termGUID term GUID - * - * @return EntityDetailResponse term - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public GlossaryTerm getTerm(String userId, String termGUID) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getSingleEntityResponse("getTerm", GET_TERM, serverName, - userId, termGUID); - List glossaryViewEntityDetails = castOmasResult(response.getResult()); - return (GlossaryTerm) firstEntity(glossaryViewEntityDetails); - } - - /** - * Extract terms within a glossary - * - * @param userId calling user - * @param glossaryGUID glossary GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getTermsOfGlossary(String userId, String glossaryGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getTermsOfGlossary", - GET_TERMS_OF_GLOSSARY, serverName, userId, glossaryGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract terms within a category - * - * @param userId calling user - * @param categoryGUID category GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getTermsOfCategory(String userId, String categoryGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getTermsOfCategory", - GET_TERMS_OF_CATEGORY, serverName, userId, categoryGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract a term's external glossary links - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse external glossary links - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getExternalGlossaryLinksOfTerm(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getExternalGlossaryLinksOfTerm", - GET_TERM_EXTERNAL_GLOSSARY_LINKS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract related terms - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getRelatedTerms(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getRelatedTerms", - GET_RELATED_TERMS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract synonyms - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getSynonyms(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getSynonyms", - GET_SYNONYMS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract antonyms - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getAntonyms(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getAntonyms", - GET_ANTONYMS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract preferred terms - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getPreferredTerms(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getPreferredTerms", - GET_PREFERRED_TERMS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract replacement terms - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getReplacementTerms(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getReplacementTerms", - GET_REPLACEMENT_TERMS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract translations - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getTranslations(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getTranslations", - GET_TRANSLATIONS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract "is-a" terms - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getIsA(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getIsA", GET_IS_A, - serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract valid values - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getValidValues(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getValidValues", - GET_VALID_VALUES, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract "used-in-contexts" terms - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getUsedInContexts(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getUsedInContexts", - GET_USED_IN_CONTEXTS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract assigned elements - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getAssignedElements(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getAssignedElements", - GET_ASSIGNED_ELEMENTS, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract attributes - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getAttributes(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getAttributes", - GET_ATTRIBUTES, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract subtypes - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getSubtypes(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getSubtypes", - GET_SUBTYPES, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /** - * Extract types - * - * @param userId calling user - * @param termGUID term GUID - * @param from starting index - * @param size max number of returned entities - * - * @return EntityDetailResponse terms - * - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - public List getTypes(String userId, String termGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getTypes", - GET_TYPES, serverName, userId, termGUID, from, size); - - return castOmasResult(response.getResult()); - } - - /* - * In order to have meaning, extracted into a separate method the 'casting' instructions - */ - private List castOmasResult(List omasResult){ - return omasResult.stream().map(e -> (T)e).collect(Collectors.toList()); - } - - private T firstEntity(List entities){ - if(entities == null){ - return null; - } - if(entities.size() == 1){ - return entities.get(0); - } - return null; - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClientExceptionHandler.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClientExceptionHandler.java deleted file mode 100644 index e87bf354a84..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClientExceptionHandler.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.client; - -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; - -public class GlossaryViewClientExceptionHandler extends RESTExceptionHandler { - - /** - * Throw an InvalidParameterException if it is encoded in the REST response. - * - * @param methodName name of the method called - * @param restResult response from the rest call - * - * @throws GlossaryViewOmasException encoded exception from the server - */ - public void detectAndThrowGlossaryViewOmasException(String methodName, GlossaryViewEntityDetailResponse restResult) throws GlossaryViewOmasException { - final String exceptionClassName = GlossaryViewOmasException.class.getName(); - - if ((restResult != null) && (exceptionClassName.equals(restResult.getExceptionClassName()))) - { - throw new GlossaryViewOmasException(restResult.getRelatedHTTPCode(), this.getClass().getName(), restResult.getActionDescription(), - restResult.getExceptionErrorMessage(), restResult.getExceptionSystemAction(), restResult.getExceptionUserAction() ); - } - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/OmasClient.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/OmasClient.java deleted file mode 100644 index 64bef620a2b..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/OmasClient.java +++ /dev/null @@ -1,84 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.client; - -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; - -/** - * Responsible to provide some functionality to requests, like paging and error handling - * Actual request is handled higher in the hierarchy - */ -class OmasClient extends FFDCRESTClient { - - private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - private final GlossaryViewClientExceptionHandler glossaryViewClientExceptionHandler = new GlossaryViewClientExceptionHandler(); - - protected OmasClient(String serverName, String serverPlatformRootURL) throws - org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException{ - super(serverName, serverPlatformRootURL); - } - - protected OmasClient(String serverName, String serverPlatformRootURL, String userId, String password) throws - org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException{ - super(serverName, serverPlatformRootURL, userId, password); - } - - /* - * Meant to send a request to Glossary View Omas that returns a single entity in the response - */ - protected GlossaryViewEntityDetailResponse getSingleEntityResponse(String methodName, String path, String serverName, - String userId, String entityGUID) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(entityGUID, "entityGUID", methodName); - - GlossaryViewEntityDetailResponse response = callGetRESTCall(methodName, GlossaryViewEntityDetailResponse.class, - serverPlatformURLRoot + path, serverName, userId, entityGUID); - - glossaryViewClientExceptionHandler.detectAndThrowGlossaryViewOmasException(methodName, response); - - return response; - } - - /* - * Meant to send a request to Glossary View Omas that returns multiple related entities in the response. Supports pagination - */ - protected GlossaryViewEntityDetailResponse getMultipleRelatedEntitiesPagedResponse(String methodName, String path, String serverName, - String userId, String entityGUID, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException{ - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateGUID(entityGUID, "entityGUID", methodName); - - GlossaryViewEntityDetailResponse response = callGetRESTCall(methodName, GlossaryViewEntityDetailResponse.class, - serverPlatformURLRoot + path, serverName, userId, entityGUID, from, size); - - glossaryViewClientExceptionHandler.detectAndThrowGlossaryViewOmasException(methodName, response); - - return response; - } - - /* - * Meant to send a request to Glossary View Omas that returns multiple entities in the response. Supports pagination - */ - protected GlossaryViewEntityDetailResponse getMultipleEntitiesPagedResponse(String methodName, String path, String serverName, - String userId, Integer from, Integer size) - throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException{ - - invalidParameterHandler.validateUserId(userId, methodName); - - GlossaryViewEntityDetailResponse response = callGetRESTCall(methodName, GlossaryViewEntityDetailResponse.class, - serverPlatformURLRoot + path, serverName, userId, from, size); - - glossaryViewClientExceptionHandler.detectAndThrowGlossaryViewOmasException(methodName, response); - - return response; - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/OpenMetadataStoreClient.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/OpenMetadataStoreClient.java deleted file mode 100644 index ceecf0e7a07..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/client/OpenMetadataStoreClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.client; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.gaf.client.OpenMetadataClientBase; - -/** - * OpenMetadataClientBase provides an interface to the open metadata store. This is part of the Governance Action Framework (GAF) - * and provides a comprehensive interface for working with all types of metadata, subject to the user's (and this OMAS's) security permissions. - * The interface supports search, maintenance of metadata elements, classifications and relationships plus the ability to raise incident reports - * and todos along with the ability to work with metadata valid values and translations. - */ -public class OpenMetadataStoreClient extends OpenMetadataClientBase -{ - private final static String serviceURLMarker = "glossary-view"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, maxPageSize); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's password embedded in all HTTP requests - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, serverUserId, serverPassword, maxPageSize); - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClientTest.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClientTest.java deleted file mode 100644 index 2b326878df2..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-client/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/client/GlossaryViewClientTest.java +++ /dev/null @@ -1,310 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.client; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryCategory; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryTerm; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.adapters.connectors.restclients.RESTClientConnector; -import org.springframework.util.ReflectionUtils; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.anyInt; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.ArgumentMatchers.isNull; -import static org.mockito.Mockito.when; - -public class GlossaryViewClientTest { - - private static final String GLOSSARY = "Glossary"; - private static final String CATEGORY = "GlossaryCategory"; - private static final String TERM = "GlossaryTerm"; - private static final String EXTERNAL_GLOSSARY_LINK = "ExternalGlossaryLink"; - - private static final String SERVER_NAME = "omas"; - private static final String SERVER_PLATFORM_URL = "test://test.glossary.view.client"; - private static final String USER_ID = "test"; - private static final String USER_PASSWORD = "password"; - - private GlossaryViewEntityDetailResponse response; - private List glossaries = new ArrayList<>(); - private List categories = new ArrayList<>(); - private List terms = new ArrayList<>(); - private GlossaryViewEntityDetail externalGlossaryLink; - - private GlossaryViewClient underTest; - - @Mock - private RESTClientConnector connector; - - @Before - public void before() throws Exception{ - MockitoAnnotations.openMocks(this); - - underTest = new GlossaryViewClient(SERVER_NAME, SERVER_PLATFORM_URL, USER_ID, USER_PASSWORD); - - Field connectorField = ReflectionUtils.findField(GlossaryViewClient.class, "clientConnector"); - connectorField.setAccessible(true); - ReflectionUtils.setField(connectorField, underTest, connector); - connectorField.setAccessible(false); - - response = new GlossaryViewEntityDetailResponse(); - - glossaries.add(createGlossaryViewEntityDetail(GLOSSARY, "glossary-01")); - glossaries.add(createGlossaryViewEntityDetail(GLOSSARY, "glossary-02")); - glossaries.add(createGlossaryViewEntityDetail(GLOSSARY, "glossary-03")); - - categories.add(createGlossaryViewEntityDetail(CATEGORY, "category-01")); - categories.add(createGlossaryViewEntityDetail(CATEGORY, "category-02")); - categories.add(createGlossaryViewEntityDetail(CATEGORY, "category-03")); - categories.add(createGlossaryViewEntityDetail(CATEGORY, "category-04")); - categories.add(createGlossaryViewEntityDetail(CATEGORY, "category-05")); - - terms.add(createGlossaryViewEntityDetail(TERM, "term-01")); - terms.add(createGlossaryViewEntityDetail(TERM, "term-02")); - terms.add(createGlossaryViewEntityDetail(TERM, "term-03")); - terms.add(createGlossaryViewEntityDetail(TERM, "term-04")); - terms.add(createGlossaryViewEntityDetail(TERM, "term-05")); - terms.add(createGlossaryViewEntityDetail(TERM, "term-06")); - terms.add(createGlossaryViewEntityDetail(TERM, "term-07")); - - externalGlossaryLink = createGlossaryViewEntityDetail(EXTERNAL_GLOSSARY_LINK, "external-glossary-link-01"); - } - - private GlossaryViewEntityDetail createGlossaryViewEntityDetail(String typeDefName, String guid){ - GlossaryViewEntityDetail glossaryViewEntityDetail = createConcreteObject(typeDefName); - glossaryViewEntityDetail.setTypeDefName(typeDefName); - glossaryViewEntityDetail.setGuid(guid); - glossaryViewEntityDetail.setStatus("ACTIVE"); - - return glossaryViewEntityDetail; - } - - private GlossaryViewEntityDetail createConcreteObject(String typeDefName){ - GlossaryViewEntityDetail glossaryViewEntityDetail; - switch (typeDefName) { - case GLOSSARY: - glossaryViewEntityDetail = new Glossary(); - break; - case CATEGORY: - glossaryViewEntityDetail = new GlossaryCategory(); - break; - case TERM: - glossaryViewEntityDetail = new GlossaryTerm(); - break; - case EXTERNAL_GLOSSARY_LINK: - glossaryViewEntityDetail = new ExternalGlossaryLink(); - break; - default: - glossaryViewEntityDetail = new GlossaryViewEntityDetail(); - } - return glossaryViewEntityDetail; - - } - - @Test - public void getGlossary() throws Exception{ - response.addEntityDetail(glossaries.get(0)); - - when(connector.callGetRESTCall(eq("getGlossary"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID), eq(glossaries.get(0).getGuid()))).thenReturn(response); - - Glossary glossary = underTest.getGlossary(USER_ID, glossaries.get(0).getGuid()); - - assertEquals(glossaries.get(0).getGuid(), glossary.getGuid()); - } - - @Test - public void getCategory() throws Exception{ - response.addEntityDetail(categories.get(0)); - - when(connector.callGetRESTCall(eq("getCategory"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID), eq(categories.get(0).getGuid()))).thenReturn(response); - - GlossaryCategory category = underTest.getCategory(USER_ID, categories.get(0).getGuid()); - - assertEquals(categories.get(0).getGuid(), category.getGuid()); - } - - @Test - public void getCategories() throws Exception{ - response.addEntityDetails(Arrays.asList(categories.get(0), categories.get(1), categories.get(2))); - - when(connector.callGetRESTCall(eq("getCategories"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(glossaries.get(0).getGuid()), anyInt(), anyInt())).thenReturn(response); - - List categories = underTest.getCategories(USER_ID, glossaries.get(0).getGuid(), 0, 10); - - assertEquals(3, categories.size()); - assertEquals(this.categories.get(0).getGuid(), categories.get(0).getGuid()); - assertEquals(this.categories.get(1).getGuid(), categories.get(1).getGuid()); - assertEquals(this.categories.get(2).getGuid(), categories.get(2).getGuid()); - } - - @Test - public void getAllCategories() throws Exception{ - response.addEntityDetails(Arrays.asList(categories.get(0), categories.get(1), categories.get(2))); - - when(connector.callGetRESTCall(eq("getAllCategories"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID), anyInt(), anyInt())).thenReturn(response); - - List categories = underTest.getAllCategories(USER_ID, 0, 10); - - assertEquals(3, categories.size()); - } - - @Test - public void getAllGlossaries() throws Exception{ - response.addEntityDetails(glossaries); - - when(connector.callGetRESTCall(eq("getAllGlossaries"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID), anyInt(), anyInt())).thenReturn(response); - - List glossaries = underTest.getAllGlossaries(USER_ID,0, 10); - - assertEquals(3, glossaries.size()); - assertEquals(this.glossaries.get(0).getGuid(), glossaries.get(0).getGuid()); - assertEquals(this.glossaries.get(1).getGuid(), glossaries.get(1).getGuid()); - assertEquals(this.glossaries.get(2).getGuid(), glossaries.get(2).getGuid()); - } - - @Test - public void getAllTerms() throws Exception{ - response.addEntityDetails(terms); - - when(connector.callGetRESTCall(eq("getAllGlossaryTerms"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID), anyInt(), anyInt())).thenReturn(response); - - List terms = underTest.getAllGlossaryTerms(USER_ID,0, 10); - - assertEquals(7, terms.size()); - } - - @Test - public void getCategoryHomeGlossary() throws Exception{ - response.addEntityDetail(glossaries.get(0)); - - when(connector.callGetRESTCall(eq("getCategoryHomeGlossary"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(categories.get(0).getGuid()))).thenReturn(response); - - Glossary glossary = underTest.getCategoryHomeGlossary(USER_ID, categories.get(0).getGuid()); - - assertEquals(glossaries.get(0).getGuid(), glossary.getGuid()); - } - - @Test - public void getTermHomeGlossary() throws Exception{ - response.addEntityDetail(glossaries.get(1)); - - when(connector.callGetRESTCall(eq("getTermHomeGlossary"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(terms.get(3).getGuid()))).thenReturn(response); - - Glossary glossary = underTest.getTermHomeGlossary(USER_ID, terms.get(3).getGuid()); - - assertEquals(glossaries.get(1).getGuid(), glossary.getGuid()); - } - - @Test - public void getExternalGlossaryLinksOfGlossary() throws Exception{ - response.addEntityDetail(externalGlossaryLink); - - when(connector.callGetRESTCall(eq("getExternalGlossaryLinksOfGlossary"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(glossaries.get(0).getGuid()), isNull(), isNull())).thenReturn(response); - - List externalGlossaryLinks = underTest.getExternalGlossaryLinksOfGlossary(USER_ID, glossaries.get(0).getGuid(), null, null); - - assertEquals(1, externalGlossaryLinks.size()); - assertEquals(externalGlossaryLink.getGuid(), externalGlossaryLinks.get(0).getGuid()); - } - - @Test - public void getExternalGlossaryLinksOfCategory() throws Exception{ - response.addEntityDetail(externalGlossaryLink); - - when(connector.callGetRESTCall(eq("getExternalGlossaryLinksOfCategory"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(categories.get(0).getGuid()), isNull(), isNull())).thenReturn(response); - - List externalGlossaryLinks = underTest.getExternalGlossaryLinksOfCategory(USER_ID, categories.get(0).getGuid(), null, null); - - assertEquals(1, externalGlossaryLinks.size()); - assertEquals(externalGlossaryLink.getGuid(), externalGlossaryLinks.get(0).getGuid()); - } - - @Test - public void getExternalGlossaryLinksOfTerm() throws Exception{ - response.addEntityDetail(externalGlossaryLink); - - when(connector.callGetRESTCall(eq("getExternalGlossaryLinksOfTerm"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(terms.get(0).getGuid()), isNull(), isNull())).thenReturn(response); - - List externalGlossaryLinks = underTest.getExternalGlossaryLinksOfTerm(USER_ID, terms.get(0).getGuid(), null, null); - - assertEquals(1, externalGlossaryLinks.size()); - assertEquals(externalGlossaryLink.getGuid(), externalGlossaryLinks.get(0).getGuid()); - } - - @Test - public void getSubcategories() throws Exception{ - response.addEntityDetails(Arrays.asList(categories.get(3), categories.get(4))); - - when(connector.callGetRESTCall(eq("getSubcategories"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(categories.get(0).getGuid()), isNull(), isNull())).thenReturn(response); - - List subcategories = underTest.getSubcategories(USER_ID, categories.get(0).getGuid(), null, null); - - assertEquals(2, subcategories.size()); - assertEquals(categories.get(3).getGuid(), subcategories.get(0).getGuid()); - assertEquals(categories.get(4).getGuid(), subcategories.get(1).getGuid()); - } - - @Test(expected = GlossaryViewOmasException.class) - public void getTermsOfGlossary_throwException() throws Exception{ - response.setRelatedHTTPCode(501); - response.setActionDescription("Action description"); - response.setExceptionSystemAction("Exception system action"); - response.setExceptionErrorMessage("Exception error message"); - response.setExceptionUserAction("Exception user action"); - response.setExceptionClassName(GlossaryViewOmasException.class.getName()); - - when(connector.callGetRESTCall(eq("getTermsOfGlossary"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(glossaries.get(0).getGuid()), isNull(), isNull())).thenReturn(response); - - underTest.getTermsOfGlossary(USER_ID, glossaries.get(0).getGuid(), null, null); - } - - @Test(expected = GlossaryViewOmasException.class) - public void getRelatedTerms_throwExceptionWithParameterName() throws Exception{ - response.setRelatedHTTPCode(501); - response.setActionDescription("Action description"); - response.setExceptionSystemAction("Exception system action"); - response.setExceptionErrorMessage("Exception error message"); - response.setExceptionUserAction("Exception user action"); - response.setExceptionClassName(GlossaryViewOmasException.class.getName()); - - Map exceptionProperties = new HashMap<>(); - exceptionProperties.put("parameterName", "CocoPharm"); - response.setExceptionProperties(exceptionProperties); - - when(connector.callGetRESTCall(eq("getRelatedTerms"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), - eq(USER_ID),eq(terms.get(0).getGuid()), isNull(), isNull())).thenReturn(response); - - underTest.getRelatedTerms(USER_ID, terms.get(0).getGuid(), null, null); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/README.md b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/README.md deleted file mode 100644 index ac45d7c6e95..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/README.md +++ /dev/null @@ -1,12 +0,0 @@ - - - -# Glossary View Open Metadata Access Service (OMAS) server-side implementation - - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/build.gradle b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/build.gradle deleted file mode 100644 index 42ac99b9141..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/build.gradle +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:common-services:generic-handlers') - implementation project(':open-metadata-implementation:common-services:repository-handler') - implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-server') - implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-apis') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-api') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - testImplementation 'org.springframework:spring-core' - testImplementation 'org.mockito:mockito-core' - testImplementation 'junit:junit' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Glossary View OMAS Server-side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewAdmin.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewAdmin.java deleted file mode 100644 index e67b765d7c0..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewAdmin.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.admin; - -import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; -import org.odpi.openmetadata.adminservices.registration.AccessServiceAdmin; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - -/** - * Called by the OMAG Server to initialize and terminate the Glossary View OMAS. - * The initialization call provides this OMAS with resources from the Open Metadata Repository Services. - */ -public class GlossaryViewAdmin extends AccessServiceAdmin -{ - - private AuditLog auditLog; - private GlossaryViewServiceInstance instance; - private String serverName; - - /** - * Initialize the access service. - * - * @param accessServiceConfig specific configuration properties for this access service. - * @param enterpriseOMRSTopicConnector connector for receiving OMRS Events from the cohorts - * @param repositoryConnector connector for querying the cohort repositories - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use on OMRS calls where there is no end user. - */ - @Override - public void initialize(AccessServiceConfig accessServiceConfig, OMRSTopicConnector enterpriseOMRSTopicConnector, - OMRSRepositoryConnector repositoryConnector, AuditLog auditLog, String serverUserName) { - final String actionDescription = "initialize Glossary View OMAS"; - this.auditLog = auditLog; - - GlossaryViewAuditCode auditCode; - try { - auditCode = GlossaryViewAuditCode.SERVICE_INITIALIZING; - AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(auditCode.getLogMessageId(), - auditCode.getSeverity(), auditCode.getFormattedLogMessage(serverName), auditCode.getSystemAction(), - auditCode.getUserAction()); - auditLog.logMessage(actionDescription, messageDefinition); - - instance = new GlossaryViewServiceInstance(repositoryConnector, auditLog, serverUserName, repositoryConnector.getMaxPageSize()); - serverName = instance.getServerName(); - - auditCode = GlossaryViewAuditCode.SERVICE_INITIALIZED; - messageDefinition = new AuditLogMessageDefinition(auditCode.getLogMessageId(), - auditCode.getSeverity(), auditCode.getFormattedLogMessage(serverName), auditCode.getSystemAction(), - auditCode.getUserAction()); - auditLog.logMessage(actionDescription, messageDefinition); - - } catch (Exception error) { - auditCode = GlossaryViewAuditCode.SERVICE_INSTANCE_FAILURE; - - AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(auditCode.getLogMessageId(), - auditCode.getSeverity(), auditCode.getFormattedLogMessage(error.getMessage()), auditCode.getSystemAction(), - auditCode.getUserAction()); - auditLog.logException(actionDescription, messageDefinition, error); - } - } - - /** - * Shutdown the access service. - */ - @Override - public void shutdown() { - - if (instance != null) { - instance.shutdown(); - } - - if (auditLog != null) { - final String actionDescription = "shutdown"; - GlossaryViewAuditCode auditCode = GlossaryViewAuditCode.SERVICE_SHUTDOWN; - AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(auditCode.getLogMessageId(), - auditCode.getSeverity(), auditCode.getFormattedLogMessage(serverName), auditCode.getSystemAction(), - auditCode.getUserAction()); - auditLog.logMessage(actionDescription, messageDefinition); - } - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewAuditCode.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewAuditCode.java deleted file mode 100644 index e3adb9e7033..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewAuditCode.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.admin; - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.text.MessageFormat; -import java.util.Arrays; - -/** - * Defines the message content for the OMRS Audit Log. - *

- * The 5 fields in the enum are: - *

    - *
  • Log Message Id - 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
  • - *
  • SystemAction - describes the result of the situation
  • - *
  • UserAction - describes how a user should correct the situation
  • - *
- */ -public enum GlossaryViewAuditCode { - - SERVICE_INITIALIZING("OMAS-GLOSSARY-VIEW-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The Glossary View Open Metadata Access Service (OMAS) is initializing a new server instance", - "The local server has started up a new instance of the Glossary View OMAS.", - Constants.NORMAL_OPERATION_OF_THE_SERVICE), - - SERVICE_INITIALIZED("OMAS-GLOSSARY-VIEW-0002", - AuditLogRecordSeverityLevel.STARTUP, - "The Glossary View Open Metadata Access Service (OMAS) has initialized a new instance for server {0}", - "The Glossary View OMAS has completed initialization of a new instance.", - Constants.NORMAL_OPERATION_OF_THE_SERVICE), - - SERVICE_SHUTDOWN("OMAS-GLOSSARY-VIEW-0003", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Glossary View Open Metadata Access Service (OMAS) is shutting down its instance for server {0}", - "The local server has requested shut down of an Glossary View OMAS instance.", - Constants.NORMAL_OPERATION_OF_THE_SERVICE), - - SERVICE_INSTANCE_FAILURE("OMAS-GLOSSARY-VIEW-0004", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Glossary View Open Metadata Access Service (OMAS) is unable to initialize a new instance; error message is {0}", - "The access service detected an error during the start up of a specific server instance. " + - "Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. " + - " Once this is resolved, restart the server."); - - private String logMessageId; - private AuditLogRecordSeverityLevel severity; - private String logMessage; - private String systemAction; - private String userAction; - - private static final Logger log = LoggerFactory.getLogger(GlossaryViewAuditCode.class); - - /** - * @param messageId unique Id of message - * @param severity severity of message - * @param message text of message - * @param systemAction description of action taken by the system when the condition happened - * @param userAction instructions for resolving the situation, if any - */ - GlossaryViewAuditCode(String messageId, AuditLogRecordSeverityLevel severity, String message, String systemAction, - String userAction) { - this.logMessageId = messageId; - this.severity = severity; - this.logMessage = message; - this.systemAction = systemAction; - this.userAction = userAction; - } - - /** - * Returns the unique identifier for the error message. - * - * @return logMessageId - */ - public String getLogMessageId() { - return logMessageId; - } - - /** - * Return the severity of the audit log record. - * - * @return severity - */ - public AuditLogRecordSeverityLevel getSeverity() { - return severity; - } - - /** - * Returns a description of the action taken by the system when the condition that caused this exception was - * detected. - * - * @return systemAction - */ - public String getSystemAction() { - return systemAction; - } - - /** - * Returns instructions of how to resolve the issue reported in this exception. - * - * @return userAction - */ - public String getUserAction() { - return userAction; - } - - /** - * Returns the log message with the placeholders filled out with the supplied parameters. - * - * @param params strings that plug into the placeholders in the logMessage - * - * @return logMessage (formatted with supplied parameters) - */ - public String getFormattedLogMessage(String... params) { - log.debug("<== GlossaryView Audit Code.getMessage({})", Arrays.toString(params)); - - MessageFormat mf = new MessageFormat(logMessage); - String result = mf.format(params); - - log.debug("==> GlossaryView Audit Code.getMessage({}): {}", Arrays.toString(params), result); - - return result; - } - - private static class Constants { - public static final String NORMAL_OPERATION_OF_THE_SERVICE = "No action is required. This is part of the normal operation of the service."; - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewEntityDetailConverter.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewEntityDetailConverter.java deleted file mode 100644 index d37a2e93d0f..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewEntityDetailConverter.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.admin; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -public class GlossaryViewEntityDetailConverter extends OpenMetadataAPIGenericConverter { - - public GlossaryViewEntityDetailConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, - String serverName) { - super(repositoryHelper, serviceName, serverName); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewRegistration.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewRegistration.java deleted file mode 100644 index 18b51e76723..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewRegistration.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.admin; - -import org.odpi.openmetadata.adminservices.registration.OMAGAccessServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceRegistrationEntry; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; - -public class GlossaryViewRegistration { - - private GlossaryViewRegistration() {} - - /* - * Registers this OMAS in the access service registry - */ - public static void registerAccessService() { - AccessServiceDescription myDescription = AccessServiceDescription.GLOSSARY_VIEW_OMAS; - - AccessServiceRegistrationEntry myRegistration = new AccessServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - GlossaryViewAdmin.class.getName()); - - OMAGAccessServiceRegistration.registerAccessService(myRegistration); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewServiceInstance.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewServiceInstance.java deleted file mode 100644 index 9f686f9a493..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/GlossaryViewServiceInstance.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.admin; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; -import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - -/** - * Stores references to OMRS objects for a specific server. It is also responsible for registering this OMAS in the - * Access Service Registry, and itself in the instance map - */ -public class GlossaryViewServiceInstance extends OMASServiceInstance -{ - - private final OpenMetadataAPIGenericHandler entitiesHandler; - - /** - * Set up the local repository connector that will service the REST Calls, registers this OMAS in the - * Access Service Registry and in the instance map - * - * @param omrsRepositoryConnector responsible for servicing the REST calls - * @param auditLog audit log - * @param localServerUserId userId for server requests - * @param maxPageSize maximum values to return on any single call - * @throws NewInstanceException if a problem occurred during initialization - */ - public GlossaryViewServiceInstance(OMRSRepositoryConnector omrsRepositoryConnector, - AuditLog auditLog, - String localServerUserId, - int maxPageSize) throws NewInstanceException { - - super(AccessServiceDescription.GLOSSARY_VIEW_OMAS.getAccessServiceFullName(), - omrsRepositoryConnector, null, null, null, auditLog, localServerUserId, maxPageSize); - - entitiesHandler = new OpenMetadataAPIGenericHandler<>( - new GlossaryViewEntityDetailConverter<>(repositoryHelper, serviceName, serverName), - GlossaryViewEntityDetail.class, serviceName, serverName, invalidParameterHandler, repositoryHandler, - repositoryHelper, localServerUserId, securityVerifier, supportedZones, defaultZones, publishZones, auditLog); - - } - - public OpenMetadataAPIGenericHandler getEntitiesHandler() { - return entitiesHandler; - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/package-info.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/package-info.java deleted file mode 100644 index 62c2f1f25cc..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/admin/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Contains classes necessary to an OMAS setup. At the moment, the way to do it, is to copy this package and its contents - * to a new module/directory structure and perform the necessary renaming operations - */ -package org.odpi.openmetadata.accessservices.glossaryview.server.admin; diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/CategoryService.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/CategoryService.java deleted file mode 100644 index a7cf1d27cc1..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/CategoryService.java +++ /dev/null @@ -1,98 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; - -/** - * Server-side implementation of the Glossary View Open Metadata Access Service (OMAS). - * Deals in extracting categories - */ -public class CategoryService extends GlossaryViewOMAS { - - private static final String CATEGORY_TYPE_NAME = "GlossaryCategory"; - private static final String GLOSSARY_TYPE_NAME = "Glossary"; - - private static final String CATEGORY_ANCHOR_RELATIONSHIP_NAME = "CategoryAnchor"; - private static final String CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME ="CategoryHierarchyLink"; - private static final String LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_NAME = "LibraryCategoryReference"; - - /** - * Extract the category definition for the given GUID - * - * @param userId calling user - * @param serverName instance to call - * @param categoryGUID category GUID - * - * @return EntityDetailResponse category - */ - public GlossaryViewEntityDetailResponse getCategory(String userId, String serverName, String categoryGUID){ - return getEntityDetailResponse(userId, serverName, categoryGUID, CATEGORY_TYPE_NAME, "getCategory"); - } - - /** - * Extract category definitions for the given glossary GUID via the 'CategoryAnchor' type relationships - * - * @param userId calling user - * @param serverName instance to call - * @param glossaryGUID glossary GUID - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse all external glossaries - */ - public GlossaryViewEntityDetailResponse getCategoriesViaCategoryAnchorRelationships(String userId, String serverName, - String glossaryGUID, Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, glossaryGUID, GLOSSARY_TYPE_NAME, - CATEGORY_ANCHOR_RELATIONSHIP_NAME, from, size, "getCategoriesViaCategoryAnchorRelationships"); - } - - /** - * Extract subcategory definitions for the given category - * - * @param userId calling user - * @param serverName instance to call - * @param categoryGUID category GUID - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse subcategories - */ - public GlossaryViewEntityDetailResponse getSubcategories(String userId, String serverName, String categoryGUID, - Integer from, Integer size){ - return getSubEntitiesResponse(userId, serverName, categoryGUID, CATEGORY_TYPE_NAME, - CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME, from, size,"getSubcategories"); - } - - /** - * Extract external glossary definitions for the given category - * - * @param userId calling user - * @param serverName instance to call - * @param categoryGUID glossary GUID - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse all external glossaries - */ - public GlossaryViewEntityDetailResponse getExternalGlossaryLinks(String userId, String serverName, String categoryGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, categoryGUID, CATEGORY_TYPE_NAME, - LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_NAME, from, size,"getExternalGlossaryLinks"); - } - - /** - * Extract all categories definitions - * - * @param userId calling user - * @param serverName instance to call - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse all glossaries - */ - public GlossaryViewEntityDetailResponse getAllCategories(String userId, String serverName, Integer from, Integer size) { - return getAllEntityDetailsResponse(userId, serverName, CATEGORY_TYPE_NAME, from, size, "getAllCategories"); - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryService.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryService.java deleted file mode 100644 index ca4de4a671f..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryService.java +++ /dev/null @@ -1,94 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; - -/** - * Server-side implementation of the Glossary View Open Metadata Access Service (OMAS). - * Deals in extracting glossaries - */ -public class GlossaryService extends GlossaryViewOMAS { - - private static final String GLOSSARY_TYPE_NAME = "Glossary"; - private static final String CATEGORY_TYPE_NAME = "GlossaryCategory"; - private static final String TERM_TYPE_NAME = "GlossaryTerm"; - - private static final String EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_NAME = "ExternallySourcedGlossary"; - private static final String TERM_ANCHOR_RELATIONSHIP_NAME = "TermAnchor"; - private static final String CATEGORY_ANCHOR_RELATIONSHIP_NAME = "CategoryAnchor"; - - /** - * Extract the glossary definition for the given GUID - * - * @param userId calling user - * @param serverName instance to call - * @param glossaryGUID glossary GUID - * - * @return EntityDetailResponse glossary - */ - public GlossaryViewEntityDetailResponse getGlossary(String userId, String serverName, String glossaryGUID){ - return getEntityDetailResponse(userId, serverName, glossaryGUID, GLOSSARY_TYPE_NAME, "getGlossary"); - } - - /** - * Extract all glossary definitions - * - * @param userId calling user - * @param serverName instance to call - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse all glossaries - */ - public GlossaryViewEntityDetailResponse getAllGlossaries(String userId, String serverName, Integer from, Integer size){ - return getAllEntityDetailsResponse(userId, serverName, GLOSSARY_TYPE_NAME, from, size, "getAllGlossaries"); - } - - /** - * Extract a term's home glossary - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * - * @return glossary - */ - public GlossaryViewEntityDetailResponse getTermHomeGlossary(String userId, String serverName, String termGUID){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, - TERM_ANCHOR_RELATIONSHIP_NAME,0, 0, "getTermHomeGlossary"); - } - - /** - * Extract a category's home glossary - * - * @param userId calling user - * @param serverName instance to call - * @param categoryGUID term GUID - * - * @return glossary - */ - public GlossaryViewEntityDetailResponse getCategoryHomeGlossary(String userId, String serverName, String categoryGUID){ - return getRelatedEntitiesResponse(userId, serverName, categoryGUID, CATEGORY_TYPE_NAME, - CATEGORY_ANCHOR_RELATIONSHIP_NAME, 0, 0, "getCategoryHomeGlossary"); - } - - /** - * Extract external glossary link definitions - * - * @param userId calling user - * @param serverName instance to call - * @param glossaryGUID glossary GUID - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse all external glossary links - */ - public GlossaryViewEntityDetailResponse getExternalGlossaryLinks(String userId, String serverName, String glossaryGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, glossaryGUID, GLOSSARY_TYPE_NAME, - EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_NAME, from, size, "getExternalGlossaryLinks"); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewInstanceHandler.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewInstanceHandler.java deleted file mode 100644 index c4a22c5e90d..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewInstanceHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.accessservices.glossaryview.server.admin.GlossaryViewServiceInstance; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * GlossaryViewInstanceHandler provides the bridge between the REST call and the server instance. - */ -public class GlossaryViewInstanceHandler extends OMASServiceInstanceHandler { - - public GlossaryViewInstanceHandler() { - super(AccessServiceDescription.GLOSSARY_VIEW_OMAS.getAccessServiceFullName()); - } - - public OpenMetadataAPIGenericHandler getEntitiesHandler(String userId, String serverName, - String serviceOperationName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - GlossaryViewServiceInstance instance = (GlossaryViewServiceInstance) getServerServiceInstance(userId, serverName, - serviceOperationName); - return instance.getEntitiesHandler(); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewOMAS.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewOMAS.java deleted file mode 100644 index cb59ce94704..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewOMAS.java +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.odpi.openmetadata.accessservices.glossaryview.converters.EntityDetailToGlossaryViewEntityDetail; -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Calendar; -import java.util.Date; -import java.util.List; -import java.util.Optional; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -/** - * Composes OMRS calls into needed operations, handles the exceptions specific to this OMAS, converts result to needed - * format - */ -public class GlossaryViewOMAS extends OMRSClient { - - private static final String GLOSSARY_VIEW_OMAS = "Glossary View OMAS"; - - /** - * Predicate to test the current time between effectiveFrom and effectiveTo properties of an entity detail. Will return - * false if now is outside the interval given by effectiveFromTime and effectiveToTime, true otherwise - */ - private final Predicate effectiveTimePredicate = entityDetail -> { - if (entityDetail.getProperties() == null) { - return true; - } - Date effectiveFromTime = entityDetail.getProperties().getEffectiveFromTime(); - Date effectiveToTime = entityDetail.getProperties().getEffectiveToTime(); - - if (effectiveFromTime == null || effectiveToTime == null) { - return true; - } - - long now = Calendar.getInstance().getTimeInMillis(); - return effectiveFromTime.getTime() <= now && now <= effectiveToTime.getTime(); - }; - - private final Function entityDetailConverter = new EntityDetailToGlossaryViewEntityDetail(); - - /** - * Extract an entity based on provided GUID and convert it to this omas's type - * - * @param userId calling user - * @param serverName instance to call - * @param entityGUID guid to search for - * @param entityTypeName entity type - * @param methodName calling method - * - * @return entity - */ - protected GlossaryViewEntityDetailResponse getEntityDetailResponse(String userId, String serverName, String entityGUID, - String entityTypeName, String methodName) { - GlossaryViewEntityDetailResponse response = new GlossaryViewEntityDetailResponse(); - - try { - Optional entityDetail = getEntityDetail(userId, serverName, entityGUID, entityTypeName, methodName); - entityDetail.ifPresent(detail -> response.addEntityDetail(entityDetailConverter.apply(detail))); - - } catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException | GlossaryViewOmasException e) { - prepare(response, e); - } - return response; - } - - /** - * Extract related entities to the given one and convert them to this omas's type - * - * @param userId calling user - * @param serverName instance to call - * @param entityGUID target entity - * @param entityTypeName target entity relationship type - * @param relationshipTypeName relationship type name - * @param from offset start for the return values - * @param size maximum number of results - * @param methodName calling method - * - * @return related entities - */ - protected GlossaryViewEntityDetailResponse getRelatedEntitiesResponse(String userId, String serverName, String entityGUID, - String entityTypeName, String relationshipTypeName, - Integer from, Integer size, String methodName){ - GlossaryViewEntityDetailResponse response = new GlossaryViewEntityDetailResponse(); - - try { - String relationshipTypeGUID = getTypeDefGUID(relationshipTypeName, userId, serverName); - List entities = getRelatedEntities(userId, serverName, entityGUID, entityTypeName, - relationshipTypeGUID, relationshipTypeName, from, size, methodName); - if (entities == null) { - return response; - } - - response.addEntityDetails(entities.stream() - .filter(entity -> !entity.getGUID().equals(entityGUID)) - .filter(effectiveTimePredicate) - .map(entityDetailConverter) - .collect(Collectors.toList())); - } catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException | GlossaryViewOmasException e) { - prepare(response, e); - } - - return response; - } - - - /** - * Extract related entities to the given one and convert them to this omas's type - only taking form one end - * - * @param userId calling user - * @param serverName instance to call - * @param entityGUID target entity - * @param entityTypeName target entity relationship type - * @param relationshipTypeName relationship type name - * @param from offset start for the return values - * @param size maximum number of results - * @param methodName calling method - * - * @return related entities - */ - protected GlossaryViewEntityDetailResponse getSubEntitiesResponse(String userId, String serverName, String entityGUID, - String entityTypeName, - String relationshipTypeName, - Integer from, Integer size, String methodName){ - GlossaryViewEntityDetailResponse response = new GlossaryViewEntityDetailResponse(); - - try { - String relationshipTypeGUID = getTypeDefGUID(relationshipTypeName, userId, serverName); - List entities = getSubEntities(userId, serverName, entityGUID, entityTypeName, - relationshipTypeGUID, relationshipTypeName, from, size, methodName); - if (entities == null) { - return response; - } - - response.addEntityDetails(entities.stream() - .filter(entity -> !entity.getGUID().equals(entityGUID)) - .filter(effectiveTimePredicate) - .map(entityDetailConverter) - .collect(Collectors.toList())); - } catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException | GlossaryViewOmasException e) { - prepare(response, e); - } - - return response; - } - - /** - * Extract all entities of specified type and convert them to this omas's type - * - * @param userId calling user - * @param serverName instance to call - * @param entityTypeName entity type name - * @param from offset start for the return values - * @param size maximum number of results - * @param methodName calling method - * - * @return all entities - */ - protected GlossaryViewEntityDetailResponse getAllEntityDetailsResponse(String userId, String serverName, String entityTypeName, - Integer from, Integer size, String methodName){ - GlossaryViewEntityDetailResponse response = new GlossaryViewEntityDetailResponse(); - - try { - String entityTypeGUID = getTypeDefGUID(entityTypeName, userId, serverName); - List entities = getAllEntityDetails(userId, serverName, entityTypeName, entityTypeGUID, from, - size, methodName); - if (entities == null) { - return response; - } - - response.addEntityDetails(entities.stream() - .filter(effectiveTimePredicate) - .map(entityDetailConverter) - .collect(Collectors.toList())); - } catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException | GlossaryViewOmasException e) { - prepare(response, e); - } - - return response; - } - - /** - * Prepares the response with information from caught exception - * - * @param response response structure to add results into - * @param e a checked exception for reporting errors found when using OCF connectors - */ - private void prepare(GlossaryViewEntityDetailResponse response, OCFCheckedExceptionBase e){ - response.setRelatedHTTPCode(e.getReportedHTTPCode()); - response.setExceptionClassName(e.getReportingClassName()); - response.setActionDescription(e.getReportingActionDescription()); - response.setExceptionUserAction(e.getReportedUserAction()); - response.setExceptionErrorMessage(e.getReportedErrorMessage()); - response.setExceptionSystemAction(e.getReportedSystemAction()); - response.setExceptionProperties(e.getRelatedProperties()); - } - - /** - * Extract the guid of a type def - * - * @param typeDefName name of the type - * @param userId calling user - * @param serverName requested server - * - * @return guid of type or an exception - */ - private String getTypeDefGUID(String typeDefName, String userId, String serverName) throws GlossaryViewOmasException { - final String methodName = "getTypeDefGUID"; - - try { - OMRSRepositoryHelper helper = instanceHandler.getRepositoryConnector(userId, serverName, methodName).getRepositoryHelper(); - if (helper != null) - { - return helper.getTypeDefByName(GLOSSARY_VIEW_OMAS, typeDefName).getGUID(); - } - } - catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException e) - { - throw new GlossaryViewOmasException(e.getReportedHTTPCode(), e.getReportingClassName(), e.getReportingActionDescription(), e.getReportedErrorMessage(), - e.getReportedSystemAction(), e.getReportedUserAction()); - } - - throw new GlossaryViewOmasException(500, GlossaryViewOmasException.class.getSimpleName(), methodName, "GLOSSARY-VIEW-OMAS-001 Unable to " + - "retrieve repository helper", "Reached a line of code that should never be reached.", "This is logic error - raise an issue"); - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/OMRSClient.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/OMRSClient.java deleted file mode 100644 index 90b6be7637d..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/OMRSClient.java +++ /dev/null @@ -1,186 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import java.util.List; -import java.util.Optional; - -/** - * Queries OMRS layer. Incoming known exceptions are thrown as they are or a {@code GlossaryViewOmasException} is built and thrown. - */ -public class OMRSClient { - - private static final String DEFAULT_ACTION_DESCRIPTION_PREFIX = "Internal server error thrown by OMRS when executing"; - private static final String DEFAULT_SYSTEM_ACTION = "No known system actions performed"; - private static final String DEFAULT_USER_ACTION = "Possible user actions: retry or check logs"; - - protected GlossaryViewInstanceHandler instanceHandler = new GlossaryViewInstanceHandler(); - - /** - * Extract an entity detail for the given GUID - * - * @param userId calling user - * @param serverName instance to call - * @param guid entity to extract - * @param entityTypeName entity type name - * @param methodName calling method - * - * @return optional with entity details if found, empty optional if not - * - * @throws GlossaryViewOmasException if any exception is thrown from repository level, other than InvalidParameterException, - * UserNotAuthorizedException or PropertyServerException - */ - protected Optional getEntityDetail(String userId, String serverName, String guid, String entityTypeName, String methodName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryViewOmasException { - - Optional entityDetail; - try { - - OpenMetadataAPIGenericHandler entitiesHandler = instanceHandler.getEntitiesHandler(userId, - serverName, methodName); - entityDetail = Optional.ofNullable(entitiesHandler.getEntityFromRepository(userId, guid, - OpenMetadataProperty.GUID.name, entityTypeName, null, null, - false, false, null, null, methodName)); - } catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException e){ - throw e; - } catch (Exception e){ - throw new GlossaryViewOmasException(500, this.getClass().getName(), - DEFAULT_ACTION_DESCRIPTION_PREFIX + " getEntityFromRepository: guid " + guid + " entityTypeName" + entityTypeName, - e.getClass() + " - " + e.getMessage(), DEFAULT_SYSTEM_ACTION, DEFAULT_USER_ACTION); - } - return entityDetail; - } - - /** - * Extract entities related to provided guid - * - * @param userId calling user - * @param serverName instance to call - * @param entityGUID target entity - * @param entityTypeName entity type name - * @param relationshipTypeGUID relationship type guid to navigate - * @param relationshipTypeName relationship type name to navigate - * @param from from - * @param size size - * @param methodName calling method - * - * @return entities if found - * - * @throws GlossaryViewOmasException if any exception is thrown from repository level, other than InvalidParameterException, - * UserNotAuthorizedException or PropertyServerException - */ - protected List getRelatedEntities(String userId, String serverName, String entityGUID, String entityTypeName, - String relationshipTypeGUID, String relationshipTypeName, Integer from, Integer size, - String methodName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryViewOmasException { - List entityDetails; - try { - - OpenMetadataAPIGenericHandler entitiesHandler = instanceHandler.getEntitiesHandler(userId, - serverName, methodName); - entityDetails = entitiesHandler.getAttachedEntities(userId, entityGUID, OpenMetadataProperty.GUID.name, - entityTypeName, relationshipTypeGUID, relationshipTypeName, null, - null, null, 0, false, false, from, size, null, methodName); - } catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException e){ - throw e; - } catch (Exception e){ - throw new GlossaryViewOmasException(500, this.getClass().getName(), DEFAULT_ACTION_DESCRIPTION_PREFIX + - " getAttachedEntities: entityGUID " + entityGUID + " entityTypeName " + entityTypeName + - " relationshipTypeGUID " + relationshipTypeGUID + " relationshipTypeName " + relationshipTypeName, - e.getClass() + " - " + e.getMessage(), DEFAULT_SYSTEM_ACTION, DEFAULT_USER_ACTION); - } - return entityDetails; - } - - - /** - * Extract entities related to provided guid - * - * @param userId calling user - * @param serverName instance to call - * @param entityGUID target entity - * @param entityTypeName entity type name - * @param relationshipTypeGUID relationship type guid to navigate - * @param relationshipTypeName relationship type name to navigate - * @param from from - * @param size size - * @param methodName calling method - * - * @return entities if found - * - * @throws GlossaryViewOmasException if any exception is thrown from repository level, other than InvalidParameterException, - * UserNotAuthorizedException or PropertyServerException - */ - protected List getSubEntities(String userId, String serverName, String entityGUID, String entityTypeName, - String relationshipTypeGUID, String relationshipTypeName, - Integer from, Integer size, String methodName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryViewOmasException { - - List entityDetails; - try { - OpenMetadataAPIGenericHandler entitiesHandler = instanceHandler.getEntitiesHandler(userId, - serverName, methodName); - entityDetails = entitiesHandler.getAttachedEntities(userId, entityGUID, OpenMetadataProperty.GUID.name, - entityTypeName, relationshipTypeGUID, relationshipTypeName, null, - null, null, 2, false, - false, null, from, size, null, methodName); - }catch(InvalidParameterException | UserNotAuthorizedException | PropertyServerException e){ - throw e; - }catch (Exception e){ - throw new GlossaryViewOmasException(500, this.getClass().getName(), DEFAULT_ACTION_DESCRIPTION_PREFIX + - " getAttachedEntities: guid " + entityGUID + " entityTypeName " + entityTypeName + - " relationshipTypeGUID " + relationshipTypeGUID + " relationshipTypeName " + relationshipTypeName, - e.getClass() + " - " + e.getMessage(), DEFAULT_SYSTEM_ACTION, DEFAULT_USER_ACTION); - } - return entityDetails; - } - - - /** - * Extract all entity definitions - * - * @param userId calling user - * @param serverName instance to call - * @param entityTypeName entity type name - * @param entityTypeGUID entity type guid - * @param from from - * @param size size - * @param methodName calling method - * - * @return entities if found - * - * @throws GlossaryViewOmasException if any exception is thrown from repository level, other than InvalidParameterException, - * UserNotAuthorizedException or PropertyServerException - */ - protected List getAllEntityDetails(String userId, String serverName, String entityTypeName, - String entityTypeGUID, Integer from, Integer size, - String methodName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryViewOmasException { - List entities; - try { - OpenMetadataAPIGenericHandler entitiesHandler = instanceHandler.getEntitiesHandler(userId, - serverName, methodName); - entities = entitiesHandler.getEntitiesByType(userId, entityTypeGUID, entityTypeName, null, - false, false, null, from, size, null, - methodName); - }catch(InvalidParameterException | UserNotAuthorizedException | PropertyServerException e){ - throw e; - }catch (Exception e){ - throw new GlossaryViewOmasException(500, this.getClass().getName(), DEFAULT_ACTION_DESCRIPTION_PREFIX + - " getEntitiesByType: entityTypeGUID " + entityTypeGUID, e.getClass() + " - " + e.getMessage(), - DEFAULT_SYSTEM_ACTION, DEFAULT_USER_ACTION); - } - - return entities; - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/TermService.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/TermService.java deleted file mode 100644 index ad91e45b689..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/TermService.java +++ /dev/null @@ -1,348 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; - -/** - * Server-side implementation of the Glossary View Open Metadata Access Service (OMAS). - * Deals in extracting terms. - */ -public class TermService extends GlossaryViewOMAS { - - private static final String TERM_TYPE_NAME = "GlossaryTerm"; - private static final String GLOSSARY_TYPE_NAME = "Glossary"; - private static final String CATEGORY_TYPE_NAME = "GlossaryCategory"; - - private static final String TERM_CATEGORIZATION_RELATIONSHIP_NAME = "TermCategorization"; - private static final String LIBRARY_TERM_REFERENCE_RELATIONSHIP_NAME = "LibraryTermReference"; - private static final String TERM_ANCHOR_RELATIONSHIP_NAME = "TermAnchor"; - private static final String RELATED_TERM_RELATIONSHIP_NAME = "RelatedTerm"; - private static final String SYNONYM_RELATIONSHIP_NAME = "Synonym"; - private static final String ANTONYM_RELATIONSHIP_NAME = "Antonym"; - private static final String PREFERRED_TERM_RELATIONSHIP_NAME = "PreferredTerm"; - private static final String REPLACEMENT_TERM_RELATIONSHIP_NAME = "ReplacementTerm"; - private static final String TRANSLATION_RELATIONSHIP_NAME = "Translation"; - private static final String IS_A_RELATIONSHIP_NAME = "ISARelationship"; - private static final String VALID_VALUE_RELATIONSHIP_NAME = "ValidValue"; - private static final String USED_IN_CONTEXT_RELATIONSHIP_NAME = "UsedInContext"; - private static final String SEMANTIC_ASSIGNMENT_RELATIONSHIP_NAME = "SemanticAssignment"; - private static final String TERM_HAS_A_RELATIONSHIP_NAME = "TermHASARelationship"; - private static final String TERM_IS_A_TYPE_OF_RELATIONSHIP_NAME = "TermISATypeOfRelationship"; - private static final String TERM_TYPED_BY_RELATIONSHIP_NAME = "TermTYPEDBYRelationship"; - - /** - * Extract the term definition for the given GUID - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * - * @return EntityDetailResponse term - */ - public GlossaryViewEntityDetailResponse getTerm(String userId, String serverName, String termGUID){ - return getEntityDetailResponse(userId, serverName, termGUID, TERM_TYPE_NAME, "getTerm"); - } - - /** - * Extract all terms definitions - * - * @param userId calling user - * @param serverName instance to call - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse all terms - */ - public GlossaryViewEntityDetailResponse getAllGlossaryTerms(String userId, String serverName, Integer from, Integer size){ - return getAllEntityDetailsResponse(userId, serverName, TERM_TYPE_NAME, from, size, "getAllGlossaries"); - } - - /** - * Extract term definitions for the given glossary GUID via the 'TermAnchor' type relationships - * - * @param userId calling user - * @param serverName instance to call - * @param glossaryGUID glossary GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse all external glossaries - */ - public GlossaryViewEntityDetailResponse getTermsViaTermAnchorRelationships(String userId, String serverName, - String glossaryGUID, Integer from, Integer size) { - return getRelatedEntitiesResponse(userId, serverName, glossaryGUID, GLOSSARY_TYPE_NAME, - TERM_ANCHOR_RELATIONSHIP_NAME, from, size, "getTermsViaTermAnchorRelationships"); - } - - /** - * Extract term definitions for the given GUID via the 'TermCategorization' type relationships - * - * @param userId calling user - * @param serverName instance to call - * @param categoryGUID category GUID - * @param from from - * @param size size - * - * @return terms - */ - public GlossaryViewEntityDetailResponse getTermsViaTermCategorizationRelationships(String userId, String serverName, - String categoryGUID, - Integer from, Integer size) { - return getRelatedEntitiesResponse(userId, serverName, categoryGUID, CATEGORY_TYPE_NAME, - TERM_CATEGORIZATION_RELATIONSHIP_NAME, from, size, "getTermsViaTermCategorizationRelationships"); - } - - /** - * Extract external glossary definitions for the given term - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse all external glossaries - */ - public GlossaryViewEntityDetailResponse getExternalGlossaryLinks(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, - LIBRARY_TERM_REFERENCE_RELATIONSHIP_NAME, from, size,"getExternalGlossaryLinks"); - } - - /** - * Extract related terms - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse related terms - */ - public GlossaryViewEntityDetailResponse getRelatedTerms(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, RELATED_TERM_RELATIONSHIP_NAME, - from, size, "getRelatedTerms"); - } - - /** - * Extract synonyms - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse synonyms - */ - public GlossaryViewEntityDetailResponse getSynonyms(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, SYNONYM_RELATIONSHIP_NAME, - from, size, "getSynonyms"); - } - - /** - * Extract antonyms - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse antonyms - */ - public GlossaryViewEntityDetailResponse getAntonyms(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, ANTONYM_RELATIONSHIP_NAME, - from, size,"getAntonyms"); - } - - /** - * Extract preferred terms - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse preferred terms - */ - public GlossaryViewEntityDetailResponse getPreferredTerms(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, PREFERRED_TERM_RELATIONSHIP_NAME, - from, size,"getPreferredTerms"); - } - - /** - * Extract replacement terms - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse replacement terms - */ - public GlossaryViewEntityDetailResponse getReplacementTerms(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, REPLACEMENT_TERM_RELATIONSHIP_NAME, - from, size,"getReplacementTerms"); - } - - /** - * Extract translations - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse translations - */ - public GlossaryViewEntityDetailResponse getTranslations(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, TRANSLATION_RELATIONSHIP_NAME, - from, size, "getTranslations"); - } - - /** - * Extract "is a" - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse "is a" - */ - public GlossaryViewEntityDetailResponse getIsA(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, IS_A_RELATIONSHIP_NAME, - from, size, "getIsA"); - } - - /** - * Extract valid values - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse valid values - */ - public GlossaryViewEntityDetailResponse getValidValues(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, VALID_VALUE_RELATIONSHIP_NAME, - from, size, "getValidValues"); - } - - /** - * Extract "used in contexts" - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse "used in contexts" - */ - public GlossaryViewEntityDetailResponse getUsedInContexts(String userId, String serverName, String termGUID, Integer from, - Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, USED_IN_CONTEXT_RELATIONSHIP_NAME, - from, size, "getUsedInContexts"); - } - - /** - * Extract assigned elements - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse semantic assignments - */ - public GlossaryViewEntityDetailResponse getAssignedElements(String userId, String serverName, String termGUID, - Integer from, Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, SEMANTIC_ASSIGNMENT_RELATIONSHIP_NAME, - from, size, "getAssignedElements"); - } - - /** - * Extract attributes - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse semantic assignments - */ - public GlossaryViewEntityDetailResponse getAttributes(String userId, String serverName, String termGUID, Integer from, - Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, TERM_HAS_A_RELATIONSHIP_NAME, - from, size, "getAttributes"); - } - - /** - * Extract subtypes - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse semantic assignments - */ - public GlossaryViewEntityDetailResponse getSubtypes(String userId, String serverName, String termGUID, Integer from, - Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, TERM_IS_A_TYPE_OF_RELATIONSHIP_NAME, - from, size, "getSubtypes"); - } - - /** - * Extract types - * - * @param userId calling user - * @param serverName instance to call - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return EntityDetailResponse semantic assignments - */ - public GlossaryViewEntityDetailResponse getTypes(String userId, String serverName, String termGUID, Integer from, - Integer size){ - return getRelatedEntitiesResponse(userId, serverName, termGUID, TERM_TYPE_NAME, TERM_TYPED_BY_RELATIONSHIP_NAME, - from, size, "getTypes"); - } - - /** - * Extract all terms definitions - * - * @param userId calling user - * @param serverName instance to call - * @param from offset start for the return values - * @param size maximum number of results - * - * @return EntityDetailResponse all glossaries - */ - public GlossaryViewEntityDetailResponse getAllTerms(String userId, String serverName, Integer from, Integer size) { - return getAllEntityDetailsResponse(userId, serverName, TERM_TYPE_NAME, from, size, "getAllTerms"); - } -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryCategoryServiceTest.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryCategoryServiceTest.java deleted file mode 100644 index fb2e4c5d899..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryCategoryServiceTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.junit.Before; -import org.junit.Test; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryCategory; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import java.util.Arrays; -import java.util.Collections; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; - -import static org.mockito.Mockito.when; - -public class GlossaryCategoryServiceTest extends GlossaryViewOmasBase { - - private final CategoryService underTest = new CategoryService(); - - @Before - public void before() throws Exception{ - super.before(underTest); - } - - @Test - public void getCategory() throws Exception{ - when(entitiesHandler.getEntityFromRepository(USER_ID, categories.get(0).getGUID(), - OpenMetadataProperty.GUID.name, CATEGORY_TYPE_NAME, null, - null, false, false, null, - null, "getCategory")).thenReturn(categories.get(0)); - - GlossaryViewEntityDetailResponse response = underTest.getCategory(USER_ID, SERVER_NAME, categories.get(0).getGUID()); - - assertEquals(1, response.getResult().size()); - assertGlossaryCategoryProperties(categories.get(0), (GlossaryCategory) response.getResult().get(0)); - } - - @Test - public void getAllCategories() throws Exception{ - when(entitiesHandler.getEntitiesByType(USER_ID, CATEGORY_TYPE_GUID, CATEGORY_TYPE_NAME, null, - false, false, null, 0, 10, null, - "getAllCategories")).thenReturn(categories); - - GlossaryViewEntityDetailResponse response = underTest.getAllCategories(USER_ID, SERVER_NAME, 0, 10); - - assertEquals(3, response.getResult().size()); - - assertGlossaryCategoryProperties(categories.get(0), (GlossaryCategory)response.getResult().get(0)); - assertGlossaryCategoryProperties(categories.get(1), (GlossaryCategory)response.getResult().get(1)); - assertGlossaryCategoryProperties(categories.get(2), (GlossaryCategory)response.getResult().get(2)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - assertTrue(isEffective.test(response.getResult().get(2))); - - } - - @Test - public void getCategoriesViaCategoryAnchorRelationships() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, glossaries.get(0).getGUID(), OpenMetadataProperty.GUID.name, - GLOSSARY_TYPE_NAME, CATEGORY_ANCHOR_RELATIONSHIP_GUID, CATEGORY_ANCHOR_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10000, null, "getCategoriesViaCategoryAnchorRelationships")).thenReturn(categories); - - GlossaryViewEntityDetailResponse response = underTest.getCategoriesViaCategoryAnchorRelationships(USER_ID, SERVER_NAME, - glossaries.get(0).getGUID(), 0, 10000); - - assertEquals(3, response.getResult().size()); - - assertGlossaryCategoryProperties(categories.get(0), (GlossaryCategory) response.getResult().get(0)); - assertGlossaryCategoryProperties(categories.get(1), (GlossaryCategory) response.getResult().get(1)); - assertGlossaryCategoryProperties(categories.get(2), (GlossaryCategory) response.getResult().get(2)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - assertTrue(isEffective.test(response.getResult().get(2))); - } - - @Test - public void getSubcategories() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, categories.get(0).getGUID(), OpenMetadataProperty.GUID.name, - CATEGORY_TYPE_NAME, CATEGORY_HIERARCHY_LINK_RELATIONSHIP_GUID, CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME, - null, null, null, 2, - false, false, null, 0, 10000, - null, "getSubcategories")).thenReturn(Arrays.asList(categories.get(1), categories.get(2))); - - GlossaryViewEntityDetailResponse response = underTest.getSubcategories(USER_ID, SERVER_NAME, - categories.get(0).getGUID(), 0, 10000); - - assertEquals(2, response.getResult().size()); - - assertGlossaryCategoryProperties(categories.get(1), (GlossaryCategory) response.getResult().get(0)); - assertGlossaryCategoryProperties(categories.get(2), (GlossaryCategory) response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getExternalGlossaryLinks() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, categories.get(0).getGUID(), OpenMetadataProperty.GUID.name, - CATEGORY_TYPE_NAME, LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_GUID, LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_NAME, - null, null, null, 0, false, false, 0, 10, null, "getExternalGlossaryLinks")) - .thenReturn(Collections.singletonList(externalGlossaryLink)); - - GlossaryViewEntityDetailResponse response = underTest.getExternalGlossaryLinks(USER_ID, SERVER_NAME, - categories.get(0).getGUID(),0, 10); - - assertEquals(1, response.getResult().size()); - assertExternalGlossaryLinkProperties(externalGlossaryLink, (ExternalGlossaryLink) response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - private void assertGlossaryCategoryProperties(EntityDetail expected, GlossaryCategory actual){ - assertEquals(expected.getGUID(), actual.getGuid()); - assertEquals(expected.getProperties().getPropertyValue("qualifiedName").valueAsString(), actual.getQualifiedName()); - assertEquals(expected.getProperties().getPropertyValue("displayName").valueAsString(), actual.getDisplayName()); - assertEquals(expected.getProperties().getPropertyValue("description").valueAsString(), actual.getDescription()); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryServiceTest.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryServiceTest.java deleted file mode 100644 index 78c9dbcc0a9..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryServiceTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.junit.Before; -import org.junit.Test; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import java.util.Collections; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; - -public class GlossaryServiceTest extends GlossaryViewOmasBase { - - private final GlossaryService underTest = new GlossaryService(); - private static final String GUID = "guid"; - - @Before - public void before() throws Exception{ - super.before(underTest); - } - - @Test - public void getGlossary() throws Exception{ - when(entitiesHandler.getEntityFromRepository(USER_ID, glossaries.get(0).getGUID(), - OpenMetadataProperty.GUID.name, GLOSSARY_TYPE_NAME, null, - null, false, false, null, - null, "getGlossary")).thenReturn(glossaries.get(0)); - - GlossaryViewEntityDetailResponse response = underTest.getGlossary(USER_ID, SERVER_NAME, glossaries.get(0).getGUID()); - - assertEquals(1, response.getResult().size()); - assertGlossaryProperties(glossaries.get(0), (Glossary)response.getResult().get(0)); - } - - @Test - public void getAllGlossaries() throws Exception{ - when(entitiesHandler.getEntitiesByType(USER_ID, GLOSSARY_TYPE_GUID, GLOSSARY_TYPE_NAME, null, - false, false, null, 0, 10, null, - "getAllGlossaries")).thenReturn(glossaries); - - GlossaryViewEntityDetailResponse response = underTest.getAllGlossaries(USER_ID, SERVER_NAME, 0, 10); - - assertEquals(3, response.getResult().size()); - - assertGlossaryProperties(glossaries.get(0), (Glossary)response.getResult().get(0)); - assertGlossaryProperties(glossaries.get(1), (Glossary)response.getResult().get(1)); - assertGlossaryProperties(glossaries.get(2), (Glossary)response.getResult().get(2)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - assertTrue(isEffective.test(response.getResult().get(2))); - - } - - @Test - public void getTermHomeGlossary() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, TERM_ANCHOR_RELATIONSHIP_GUID, TERM_ANCHOR_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 0, null, "getTermHomeGlossary")) - .thenReturn(Collections.singletonList(glossaries.get(0))); - - GlossaryViewEntityDetailResponse response = underTest.getTermHomeGlossary(USER_ID, SERVER_NAME, terms.get(0).getGUID()); - - assertEquals(1, response.getResult().size()); - assertGlossaryProperties(glossaries.get(0), (Glossary)response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void getCategoryHomeGlossary() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, categories.get(0).getGUID(), OpenMetadataProperty.GUID.name, - CATEGORY_TYPE_NAME, CATEGORY_ANCHOR_RELATIONSHIP_GUID, CATEGORY_ANCHOR_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 0, null, "getCategoryHomeGlossary")) - .thenReturn(Collections.singletonList(glossaries.get(0))); - - GlossaryViewEntityDetailResponse response = underTest.getCategoryHomeGlossary(USER_ID, SERVER_NAME, categories.get(0).getGUID()); - - assertEquals(1, response.getResult().size()); - assertGlossaryProperties(glossaries.get(0), (Glossary)response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void getExternalGlossaryLinks() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, glossaries.get(0).getGUID(), OpenMetadataProperty.GUID.name, - GLOSSARY_TYPE_NAME, EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_GUID, EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_NAME, - null, - null, null, 0, false, false, - 0, 10, null, "getExternalGlossaryLinks")) - .thenReturn(Collections.singletonList(externalGlossaryLink)); - - GlossaryViewEntityDetailResponse response = underTest.getExternalGlossaryLinks(USER_ID, SERVER_NAME, - glossaries.get(0).getGUID(),0, 10); - - assertEquals(1, response.getResult().size()); - assertExternalGlossaryLinkProperties(externalGlossaryLink, (ExternalGlossaryLink) response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void throwOmrsExceptionOnGetEntityByGUID() throws Exception{ - PropertyServerException exception = new PropertyServerException(501, "className-getEntityFromRepository", - "actionDescription-getEntityByGUID", "errorMessage-getEntityByGUID", null, null, - "systemAction-getEntityByGUID", "userAction-getEntityByGUID", null, null); - - when(entitiesHandler.getEntityFromRepository(USER_ID, glossaries.get(0).getGUID(), OpenMetadataProperty.GUID.name, - GLOSSARY_TYPE_NAME, null, null, false, - false, null, null, "getGlossary")) - .thenThrow(exception); - - GlossaryViewEntityDetailResponse response = underTest.getGlossary(USER_ID, SERVER_NAME, glossaries.get(0).getGUID()); - - assertExceptionDataInResponse(exception, response); - } - - @Test - public void throwOmrsExceptionOnGetEntitiesForRelationshipType() throws Exception{ - PropertyServerException exception = new PropertyServerException(501, "className-getAttachedEntities", - "actionDescription--getEntitiesForRelationshipType", "errorMessage--getEntitiesForRelationshipType", null, null, - "systemAction--getEntitiesForRelationshipType", "userAction--getEntitiesForRelationshipType", null, null); - when(entitiesHandler.getAttachedEntities(USER_ID, glossaries.get(0).getGUID(), OpenMetadataProperty.GUID.name, - GLOSSARY_TYPE_NAME, EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_GUID, EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_NAME, - null, - null, null, 0, false, false, - 0, 10, null, "getExternalGlossaryLinks")).thenThrow(exception); - - GlossaryViewEntityDetailResponse response = underTest.getExternalGlossaryLinks(USER_ID, SERVER_NAME, - glossaries.get(0).getGUID(),0, 10); - - assertExceptionDataInResponse(exception, response); - } - - private void assertGlossaryProperties(EntityDetail expected, Glossary actual){ - assertEquals(expected.getGUID(), actual.getGuid()); - assertEquals(expected.getProperties().getPropertyValue("qualifiedName").valueAsString(), actual.getQualifiedName()); - assertEquals(expected.getProperties().getPropertyValue("displayName").valueAsString(), actual.getDisplayName()); - assertEquals(expected.getProperties().getPropertyValue("language").valueAsString(), actual.getLanguage()); - assertEquals(expected.getProperties().getPropertyValue("description").valueAsString(), actual.getDescription()); - assertEquals(expected.getProperties().getPropertyValue("usage").valueAsString(), actual.getUsage()); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryTermServiceTest.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryTermServiceTest.java deleted file mode 100644 index 84b106f3e88..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryTermServiceTest.java +++ /dev/null @@ -1,383 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.junit.Before; -import org.junit.Test; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryTerm; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import java.util.Arrays; -import java.util.Collections; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; - -public class GlossaryTermServiceTest extends GlossaryViewOmasBase { - - private final TermService underTest = new TermService(); - - @Before - public void before() throws Exception{ - super.before(underTest); - } - - @Test - public void successfullyGetTerm() throws Exception{ - when(entitiesHandler.getEntityFromRepository(USER_ID, terms.get(0).getGUID(), - OpenMetadataProperty.GUID.name, TERM_TYPE_NAME, null, null, - false, false, null, null, "getTerm")) - .thenReturn(terms.get(0)); - - GlossaryViewEntityDetailResponse response = underTest.getTerm(USER_ID, SERVER_NAME, terms.get(0).getGUID()); - - assertEquals(1, response.getResult().size()); - assertGlossaryTermProperties(terms.get(0), (GlossaryTerm)response.getResult().get(0)); - } - - @Test - public void findNoTerm() throws Exception{ - when(entitiesHandler.getEntityFromRepository(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, null, null, false, false, - null, null, "getTerm")).thenReturn(terms.get(0)); - - GlossaryViewEntityDetailResponse response = underTest.getTerm(USER_ID, SERVER_NAME,"no-term-at-this-guid"); - - assertEquals(0, response.getResult().size()); - } - - @Test - public void getAllTerms() throws Exception{ - when(entitiesHandler.getEntitiesByType(USER_ID, TERM_TYPE_GUID, TERM_TYPE_NAME, null, - false, false, null, 0, 10, null, - "getAllTerms")).thenReturn(terms); - - GlossaryViewEntityDetailResponse response = underTest.getAllTerms(USER_ID, SERVER_NAME, 0, 10); - - assertEquals(5, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(0), (GlossaryTerm) response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm) response.getResult().get(1)); - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm) response.getResult().get(2)); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm) response.getResult().get(3)); - assertGlossaryTermProperties(terms.get(4), (GlossaryTerm) response.getResult().get(4)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - assertTrue(isEffective.test(response.getResult().get(2))); - assertTrue(isEffective.test(response.getResult().get(3))); - assertTrue(isEffective.test(response.getResult().get(4))); - - } - - @Test - public void getTermsViaTermAnchorRelationships() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, glossaries.get(0).getGUID(), OpenMetadataProperty.GUID.name, - GLOSSARY_TYPE_NAME, TERM_ANCHOR_RELATIONSHIP_GUID, TERM_ANCHOR_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10000, null, "getTermsViaTermAnchorRelationships")).thenReturn(terms); - - GlossaryViewEntityDetailResponse response = underTest.getTermsViaTermAnchorRelationships(USER_ID, SERVER_NAME, - glossaries.get(0).getGUID(), 0, 10000); - - assertEquals(5, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(0), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm)response.getResult().get(1)); - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(2)); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(3)); - assertGlossaryTermProperties(terms.get(4), (GlossaryTerm)response.getResult().get(4)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - assertTrue(isEffective.test(response.getResult().get(2))); - assertTrue(isEffective.test(response.getResult().get(3))); - assertTrue(isEffective.test(response.getResult().get(4))); - } - - @Test - public void getTermsViaTermCategorizationRelationships() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, categories.get(0).getGUID(), OpenMetadataProperty.GUID.name, - CATEGORY_TYPE_NAME, TERM_CATEGORIZATION_RELATIONSHIP_GUID, TERM_CATEGORIZATION_RELATIONSHIP_NAME, - null, - null, null, 0, false, false, - 0, 10000, null, "getTermsViaTermCategorizationRelationships")) - .thenReturn(Arrays.asList(terms.get(0), terms.get(1), terms.get(2))); - - GlossaryViewEntityDetailResponse response = underTest.getTermsViaTermCategorizationRelationships(USER_ID, SERVER_NAME, - categories.get(0).getGUID(), 0, 10000); - - assertEquals(3, response.getResult().size() ); - - assertGlossaryTermProperties(terms.get(0), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm)response.getResult().get(1)); - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(2)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - assertTrue(isEffective.test(response.getResult().get(2))); - } - - @Test - public void getExternalGlossaries() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, LIBRARY_TERM_REFERENCE_RELATIONSHIP_GUID, LIBRARY_TERM_REFERENCE_RELATIONSHIP_NAME, - null, - null, null, 0, false, false, - 0, 10, null, "getExternalGlossaryLinks")) - .thenReturn(Collections.singletonList(externalGlossaryLink)); - - GlossaryViewEntityDetailResponse response = underTest.getExternalGlossaryLinks(USER_ID, SERVER_NAME, terms.get(0).getGUID(),0, 10); - - assertEquals(1, response.getResult().size()); - assertExternalGlossaryLinkProperties(externalGlossaryLink, (ExternalGlossaryLink) response.getResult().get(0) ); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void getRelatedTerms() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, RELATED_TERM_RELATIONSHIP_GUID, RELATED_TERM_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getRelatedTerms")).thenReturn(Arrays.asList(terms.get(1), terms.get(2))); - - GlossaryViewEntityDetailResponse response = underTest.getRelatedTerms(USER_ID, SERVER_NAME, terms.get(0).getGUID(), - 0, 10); - - assertEquals(2, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getSynonyms() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, SYNONYM_RELATIONSHIP_GUID, SYNONYM_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getSynonyms")).thenReturn(Arrays.asList(terms.get(2), terms.get(3))); - - GlossaryViewEntityDetailResponse response = underTest.getSynonyms(USER_ID, SERVER_NAME, terms.get(0).getGUID(),0, 10); - - assertEquals(2, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getAntonyms() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, ANTONYM_RELATIONSHIP_GUID, ANTONYM_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getAntonyms")).thenReturn(Arrays.asList(terms.get(1), terms.get(4))); - - GlossaryViewEntityDetailResponse response = underTest.getAntonyms(USER_ID, SERVER_NAME, terms.get(0).getGUID(), - 0, 10); - - assertEquals(2, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(4), (GlossaryTerm)response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getPreferredTerms() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, PREFERRED_TERM_RELATIONSHIP_GUID, PREFERRED_TERM_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getPreferredTerms")).thenReturn(Arrays.asList(terms.get(2), terms.get(3))); - - GlossaryViewEntityDetailResponse response = underTest.getPreferredTerms(USER_ID, SERVER_NAME, terms.get(0).getGUID(),0, 10); - - assertEquals(2, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getReplacementTerms() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, REPLACEMENT_TERM_RELATIONSHIP_GUID, REPLACEMENT_TERM_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getReplacementTerms")) - .thenReturn(Arrays.asList(terms.get(2), terms.get(3))); - - GlossaryViewEntityDetailResponse response = underTest.getReplacementTerms(USER_ID, SERVER_NAME, - terms.get(0).getGUID(),0, 10); - - assertEquals(2, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getTranslations() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, TRANSLATION_RELATIONSHIP_GUID, TRANSLATION_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getTranslations")).thenReturn(Collections.singletonList(terms.get(2))); - - GlossaryViewEntityDetailResponse response = underTest.getTranslations(USER_ID, SERVER_NAME, terms.get(0).getGUID(),0, 10); - - assertEquals(1, response.getResult().size()); - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void getIsA() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, IS_A_RELATIONSHIP_GUID, IS_A_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getIsA")).thenReturn(Collections.singletonList(terms.get(3))); - - GlossaryViewEntityDetailResponse response = underTest.getIsA(USER_ID, SERVER_NAME, terms.get(0).getGUID(),0, 10); - - assertEquals(1, response.getResult().size()); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void getValidValues() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, VALID_VALUE_RELATIONSHIP_GUID, VALID_VALUE_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getValidValues")).thenReturn(Arrays.asList(terms.get(1), terms.get(2))); - - GlossaryViewEntityDetailResponse response = underTest.getValidValues(USER_ID, SERVER_NAME, terms.get(0).getGUID(), - 0, 10); - - assertEquals(2, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getUsedInContexts() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, USED_IN_CONTEXT_RELATIONSHIP_GUID, USED_IN_CONTEXT_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getUsedInContexts")) - .thenReturn(Arrays.asList(terms.get(1), terms.get(2), terms.get(3), terms.get(4))); - - GlossaryViewEntityDetailResponse response = underTest.getUsedInContexts(USER_ID, SERVER_NAME, terms.get(0).getGUID(), - 0, 10); - - assertEquals(4, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(1)); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(2)); - assertGlossaryTermProperties(terms.get(4), (GlossaryTerm)response.getResult().get(3)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - assertTrue(isEffective.test(response.getResult().get(2))); - assertTrue(isEffective.test(response.getResult().get(3))); - } - - @Test - public void getAssignedElements() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, SEMANTIC_ASSIGNMENT_RELATIONSHIP_GUID, SEMANTIC_ASSIGNMENT_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getAssignedElements")) - .thenReturn(Arrays.asList(terms.get(2), terms.get(3))); - - GlossaryViewEntityDetailResponse response = underTest.getAssignedElements(USER_ID, SERVER_NAME, terms.get(0).getGUID(),0, 10); - - assertEquals(2, response.getResult().size()); - - assertGlossaryTermProperties(terms.get(2), (GlossaryTerm)response.getResult().get(0)); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(1)); - - assertTrue(isEffective.test(response.getResult().get(0))); - assertTrue(isEffective.test(response.getResult().get(1))); - } - - @Test - public void getAttributes() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, TERM_HAS_A_RELATIONSHIP_GUID, TERM_HAS_A_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getAttributes")).thenReturn(Collections.singletonList(terms.get(3))); - - GlossaryViewEntityDetailResponse response = underTest.getAttributes(USER_ID, SERVER_NAME, terms.get(0).getGUID(), - 0, 10); - - assertEquals(1, response.getResult().size()); - assertGlossaryTermProperties(terms.get(3), (GlossaryTerm)response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void getSubtypes() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, TERM_IS_A_TYPE_OF_RELATIONSHIP_GUID, TERM_IS_A_TYPE_OF_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getSubtypes")).thenReturn(Collections.singletonList(terms.get(4))); - - GlossaryViewEntityDetailResponse response = underTest.getSubtypes(USER_ID, SERVER_NAME, terms.get(0).getGUID(),0, 10); - - assertEquals(1, response.getResult().size()); - assertGlossaryTermProperties(terms.get(4), (GlossaryTerm)response.getResult().get(0)); - assertTrue(isEffective.test(response.getResult().get(0))); - } - - @Test - public void getTypes() throws Exception{ - when(entitiesHandler.getAttachedEntities(USER_ID, terms.get(0).getGUID(), OpenMetadataProperty.GUID.name, - TERM_TYPE_NAME, TERM_TYPED_BY_RELATIONSHIP_GUID, TERM_TYPED_BY_RELATIONSHIP_NAME, null, - null, null, 0, false, false, - 0, 10, null, "getTypes")).thenReturn(Collections.singletonList(terms.get(1))); - - GlossaryViewEntityDetailResponse response = underTest.getTypes(USER_ID, SERVER_NAME, terms.get(0).getGUID(), - 0, 10); - - assertEquals(1, response.getResult().size()); - assertGlossaryTermProperties(terms.get(1), (GlossaryTerm)response.getResult().get(0)); - - assertTrue(isEffective.test(response.getResult().get(0))); - } - - private void assertGlossaryTermProperties(EntityDetail expected, GlossaryTerm actual){ - assertEquals(expected.getGUID(), actual.getGuid()); - assertEquals(expected.getProperties().getPropertyValue("qualifiedName").valueAsString(), actual.getQualifiedName()); - assertEquals(expected.getProperties().getPropertyValue("displayName").valueAsString(), actual.getDisplayName()); - assertEquals(expected.getProperties().getPropertyValue("summary").valueAsString(), actual.getSummary()); - assertEquals(expected.getProperties().getPropertyValue("description").valueAsString(), actual.getDescription()); - assertEquals(expected.getProperties().getPropertyValue("examples").valueAsString(), actual.getExamples()); - assertEquals(expected.getProperties().getPropertyValue("abbreviation").valueAsString(), actual.getAbbreviation()); - assertEquals(expected.getProperties().getPropertyValue("usage").valueAsString(), actual.getUsage()); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewOmasBase.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewOmasBase.java deleted file mode 100644 index 305bdd48dc2..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-server/src/test/java/org/odpi/openmetadata/accessservices/glossaryview/server/service/GlossaryViewOmasBase.java +++ /dev/null @@ -1,457 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.service; - -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetail; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -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.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.springframework.util.ReflectionUtils; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; -import java.util.function.Predicate; - -import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; - -public class GlossaryViewOmasBase { - - protected static final String USER_ID = "test"; - protected static final String SERVER_NAME = "omas"; - protected static final String GUID_PARAM_NAME = "guid"; - - protected static final String GLOSSARY_TYPE_NAME = "Glossary"; - protected static final String GLOSSARY_TYPE_GUID = "glossary-type-guid"; - protected static final String CATEGORY_TYPE_NAME = "GlossaryCategory"; - protected static final String CATEGORY_TYPE_GUID = "category-type-guid"; - protected static final String TERM_TYPE_NAME = "GlossaryTerm"; - protected static final String TERM_TYPE_GUID = "term-type-guid"; - protected static final String EXTERNAL_GLOSSARY_LINK_TYPE_NAME = "ExternalGlossaryLink"; - protected static final String EXTERNAL_GLOSSARY_LINK_TYPE_GUID = "external-glossary-link-type-guid"; - - protected static final String CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME = "CategoryHierarchyLink"; - protected static final String CATEGORY_HIERARCHY_LINK_RELATIONSHIP_GUID = "category-hierarchy-link-relationship-type-guid"; - protected static final String EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_NAME = "ExternallySourcedGlossary"; - protected static final String EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_GUID = "externally-sourced-glossary-relationship-type-guid"; - protected static final String CATEGORY_ANCHOR_RELATIONSHIP_NAME = "CategoryAnchor"; - protected static final String CATEGORY_ANCHOR_RELATIONSHIP_GUID = "category-anchor-relationship-type-guid"; - protected static final String TERM_ANCHOR_RELATIONSHIP_NAME = "TermAnchor"; - protected static final String TERM_ANCHOR_RELATIONSHIP_GUID = "term-anchor-relationship-type-guid"; - protected static final String TERM_CATEGORIZATION_RELATIONSHIP_NAME = "TermCategorization"; - protected static final String TERM_CATEGORIZATION_RELATIONSHIP_GUID = "term-categorization-relationship-type-guid"; - protected static final String LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_NAME = "LibraryCategoryReference"; - protected static final String LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_GUID = "library-category-reference-relationship-guid"; - protected static final String LIBRARY_TERM_REFERENCE_RELATIONSHIP_NAME = "LibraryTermReference"; - protected static final String LIBRARY_TERM_REFERENCE_RELATIONSHIP_GUID = "library-term-reference-relationship-guid"; - protected static final String RELATED_TERM_RELATIONSHIP_NAME = "RelatedTerm"; - protected static final String RELATED_TERM_RELATIONSHIP_GUID = "related-term-relationship-guid"; - protected static final String SYNONYM_RELATIONSHIP_NAME = "Synonym"; - protected static final String SYNONYM_RELATIONSHIP_GUID = "synonym-relationship-guid"; - protected static final String ANTONYM_RELATIONSHIP_NAME = "Antonym"; - protected static final String ANTONYM_RELATIONSHIP_GUID = "antonym-relationship-guid"; - protected static final String PREFERRED_TERM_RELATIONSHIP_NAME = "PreferredTerm"; - protected static final String PREFERRED_TERM_RELATIONSHIP_GUID = "preferred-term-relationship-guid"; - protected static final String REPLACEMENT_TERM_RELATIONSHIP_NAME = "ReplacementTerm"; - protected static final String REPLACEMENT_TERM_RELATIONSHIP_GUID = "replacement-term-relationship-guid"; - protected static final String TRANSLATION_RELATIONSHIP_NAME = "Translation"; - protected static final String TRANSLATION_RELATIONSHIP_GUID = "translation-relationship-guid"; - protected static final String IS_A_RELATIONSHIP_NAME = "ISARelationship"; - protected static final String IS_A_RELATIONSHIP_GUID = "is-a-relationship-guid"; - protected static final String VALID_VALUE_RELATIONSHIP_NAME = "ValidValue"; - protected static final String VALID_VALUE_RELATIONSHIP_GUID = "valid-value-relationship-guid"; - protected static final String USED_IN_CONTEXT_RELATIONSHIP_NAME = "UsedInContext"; - protected static final String USED_IN_CONTEXT_RELATIONSHIP_GUID = "used-in-context-relationship-guid"; - protected static final String SEMANTIC_ASSIGNMENT_RELATIONSHIP_NAME = "SemanticAssignment"; - protected static final String SEMANTIC_ASSIGNMENT_RELATIONSHIP_GUID = "semantic-assignment-relationship-guid"; - protected static final String TERM_HAS_A_RELATIONSHIP_NAME = "TermHASARelationship"; - protected static final String TERM_HAS_A_RELATIONSHIP_GUID = "term-has-a-relationship-guid"; - protected static final String TERM_IS_A_TYPE_OF_RELATIONSHIP_NAME = "TermISATypeOfRelationship"; - protected static final String TERM_IS_A_TYPE_OF_RELATIONSHIP_GUID = "term-is-a-type-of-relationship-guid"; - protected static final String TERM_TYPED_BY_RELATIONSHIP_NAME = "TermTYPEDBYRelationship"; - protected static final String TERM_TYPED_BY_RELATIONSHIP_GUID = "term-typed-by-relationship-guid"; - - protected Predicate isEffective = e -> { - if(e.getEffectiveFromTime() == null || e.getEffectiveToTime() == null){ - return true; - } - long effectiveFromTime = e.getEffectiveFromTime().getTime(); - long effectiveToTime = e.getEffectiveToTime().getTime(); - long now = Calendar.getInstance().getTimeInMillis(); - return effectiveFromTime <= now && now <= effectiveToTime; - }; - - protected List glossaries = new ArrayList<>(); - protected List categories = new ArrayList<>(); - protected List terms = new ArrayList<>(); - protected EntityDetail externalGlossaryLink; - - @Mock - protected GlossaryViewInstanceHandler instanceHandler; - @Mock - protected OpenMetadataAPIGenericHandler entitiesHandler; - @Mock - protected OMRSRepositoryConnector repositoryConnector; - @Mock - protected OMRSRepositoryHelper repositoryHelper; - - @Mock - protected TypeDef glossaryTypeDef; - @Mock - protected TypeDef categoryTypeDef; - @Mock - protected TypeDef termTypeDef; - - @Mock - protected TypeDef categoryHierarchyLinkRelationshipTypeDef; - @Mock - protected TypeDef externallySourcedGlossaryRelationshipTypeDef; - @Mock - protected TypeDef categoryAnchorRelationshipTypeDef; - @Mock - protected TypeDef termAnchorRelationshipTypeDef; - @Mock - protected TypeDef termCategorizationRelationshipTypeDef; - @Mock - protected TypeDef libraryCategoryReferenceRelationshipTypeDef; - @Mock - protected TypeDef libraryTermReferenceRelationshipTypeDef; - @Mock - protected TypeDef relatedTermRelationshipTypeDef; - @Mock - protected TypeDef synonymRelationshipTypeDef; - @Mock - protected TypeDef antonymRelationshipTypeDef; - @Mock - protected TypeDef preferredTermRelationshipTypeDef; - @Mock - protected TypeDef replacementTermRelationshipTypeDef; - @Mock - protected TypeDef translationRelationshipTypeDef; - @Mock - protected TypeDef isARelationshipTypeDef; - @Mock - protected TypeDef validValueRelationshipTypeDef; - @Mock - protected TypeDef usedInContextRelationshipTypeDef; - @Mock - protected TypeDef semanticAssignmentRelationshipTypeDef; - @Mock - protected TypeDef termHasARelationshipTypeDef; - @Mock - protected TypeDef termIsATypeOfRelationshipTypeDef; - @Mock - protected TypeDef termTypedByRelationshipTypeDef; - - public void before(GlossaryViewOMAS underTest) throws Exception{ - MockitoAnnotations.openMocks(this); - when(instanceHandler.getRepositoryConnector(eq(USER_ID), eq(SERVER_NAME), anyString())).thenReturn(repositoryConnector); - when(instanceHandler.getEntitiesHandler(eq(USER_ID), eq(SERVER_NAME), anyString())).thenReturn(entitiesHandler); - when(repositoryConnector.getRepositoryHelper()).thenReturn(repositoryHelper); - - when(repositoryHelper.getTypeDefByName(anyString(), eq(GLOSSARY_TYPE_NAME))).thenReturn(glossaryTypeDef); - when(glossaryTypeDef.getGUID()).thenReturn(GLOSSARY_TYPE_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(CATEGORY_TYPE_NAME))).thenReturn(categoryTypeDef); - when(categoryTypeDef.getGUID()).thenReturn(CATEGORY_TYPE_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(TERM_TYPE_NAME))).thenReturn(termTypeDef); - when(termTypeDef.getGUID()).thenReturn(TERM_TYPE_GUID); - - when(repositoryHelper.getTypeDefByName(anyString(), eq(CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME))).thenReturn(categoryHierarchyLinkRelationshipTypeDef); - when(categoryHierarchyLinkRelationshipTypeDef.getGUID()).thenReturn(CATEGORY_HIERARCHY_LINK_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_NAME))).thenReturn(externallySourcedGlossaryRelationshipTypeDef); - when(externallySourcedGlossaryRelationshipTypeDef.getGUID()).thenReturn(EXTERNALLY_SOURCED_GLOSSARY_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(CATEGORY_ANCHOR_RELATIONSHIP_NAME))).thenReturn(categoryAnchorRelationshipTypeDef); - when(categoryAnchorRelationshipTypeDef.getGUID()).thenReturn(CATEGORY_ANCHOR_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(TERM_ANCHOR_RELATIONSHIP_NAME))).thenReturn(termAnchorRelationshipTypeDef); - when(termAnchorRelationshipTypeDef.getGUID()).thenReturn(TERM_ANCHOR_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(TERM_CATEGORIZATION_RELATIONSHIP_NAME))).thenReturn(termCategorizationRelationshipTypeDef); - when(termCategorizationRelationshipTypeDef.getGUID()).thenReturn(TERM_CATEGORIZATION_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_NAME))).thenReturn(libraryCategoryReferenceRelationshipTypeDef); - when(libraryCategoryReferenceRelationshipTypeDef.getGUID()).thenReturn(LIBRARY_CATEGORY_REFERENCE_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(LIBRARY_TERM_REFERENCE_RELATIONSHIP_NAME))).thenReturn(libraryTermReferenceRelationshipTypeDef); - when(libraryTermReferenceRelationshipTypeDef.getGUID()).thenReturn(LIBRARY_TERM_REFERENCE_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(RELATED_TERM_RELATIONSHIP_NAME))).thenReturn(relatedTermRelationshipTypeDef); - when(relatedTermRelationshipTypeDef.getGUID()).thenReturn(RELATED_TERM_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(SYNONYM_RELATIONSHIP_NAME))).thenReturn(synonymRelationshipTypeDef); - when(synonymRelationshipTypeDef.getGUID()).thenReturn(SYNONYM_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(ANTONYM_RELATIONSHIP_NAME))).thenReturn(antonymRelationshipTypeDef); - when(antonymRelationshipTypeDef.getGUID()).thenReturn(ANTONYM_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(PREFERRED_TERM_RELATIONSHIP_NAME))).thenReturn(preferredTermRelationshipTypeDef); - when(preferredTermRelationshipTypeDef.getGUID()).thenReturn(PREFERRED_TERM_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(REPLACEMENT_TERM_RELATIONSHIP_NAME))).thenReturn(replacementTermRelationshipTypeDef); - when(replacementTermRelationshipTypeDef.getGUID()).thenReturn(REPLACEMENT_TERM_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(TRANSLATION_RELATIONSHIP_NAME))).thenReturn(translationRelationshipTypeDef); - when(translationRelationshipTypeDef.getGUID()).thenReturn(TRANSLATION_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(IS_A_RELATIONSHIP_NAME))).thenReturn(isARelationshipTypeDef); - when(isARelationshipTypeDef.getGUID()).thenReturn(IS_A_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(VALID_VALUE_RELATIONSHIP_NAME))).thenReturn(validValueRelationshipTypeDef); - when(validValueRelationshipTypeDef.getGUID()).thenReturn(VALID_VALUE_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(USED_IN_CONTEXT_RELATIONSHIP_NAME))).thenReturn(usedInContextRelationshipTypeDef); - when(usedInContextRelationshipTypeDef.getGUID()).thenReturn(USED_IN_CONTEXT_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(SEMANTIC_ASSIGNMENT_RELATIONSHIP_NAME))).thenReturn(semanticAssignmentRelationshipTypeDef); - when(semanticAssignmentRelationshipTypeDef.getGUID()).thenReturn(SEMANTIC_ASSIGNMENT_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(TERM_HAS_A_RELATIONSHIP_NAME))).thenReturn(termHasARelationshipTypeDef); - when(termHasARelationshipTypeDef.getGUID()).thenReturn(TERM_HAS_A_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(TERM_IS_A_TYPE_OF_RELATIONSHIP_NAME))).thenReturn(termIsATypeOfRelationshipTypeDef); - when(termIsATypeOfRelationshipTypeDef.getGUID()).thenReturn(TERM_IS_A_TYPE_OF_RELATIONSHIP_GUID); - when(repositoryHelper.getTypeDefByName(anyString(), eq(TERM_TYPED_BY_RELATIONSHIP_NAME))).thenReturn(termTypedByRelationshipTypeDef); - when(termTypedByRelationshipTypeDef.getGUID()).thenReturn(TERM_TYPED_BY_RELATIONSHIP_GUID); - - Field instanceHandlerField = ReflectionUtils.findField(OMRSClient.class, "instanceHandler"); - instanceHandlerField.setAccessible(true); - ReflectionUtils.setField(instanceHandlerField, underTest, instanceHandler); - instanceHandlerField.setAccessible(false); - - glossaries.add(createGlossary("glossary-1")); - glossaries.add(createGlossary("glossary-2")); - glossaries.add(createGlossary("glossary-3")); - - categories.add(createCategory("category-1")); - categories.add(createCategory("category-2")); - categories.add(createCategory("category-3")); - - terms.add(createTerm("term-1")); - terms.add(createTerm("term-2")); - terms.add(createTerm("term-3")); - terms.add(createTerm("term-4")); - terms.add(createTerm("term-5")); - - externalGlossaryLink = createExternalGlossaryLink("external-glossary-link-1"); - } - - - private EntityDetail createGlossary(String guid){ - return createEntityDetail(guid, createGlossaryType(), createGlossaryProperties(guid), createGlossaryClassifications()); - } - - private EntityDetail createCategory(String guid){ - return createEntityDetail(guid, createCategoryType(), createCategoryProperties(guid), createCategoryClassifications()); - } - - private EntityDetail createTerm(String guid){ - return createEntityDetail(guid, createTermType(), createTermProperties(guid), null); - } - - private EntityDetail createExternalGlossaryLink(String guid){ - return createEntityDetail(guid, createExternalGlossaryLinkType(), createExternalGlossaryLinkProperties(guid), null); - } - - private EntityDetail createEntityDetail(String guid, InstanceType instanceType, InstanceProperties instanceProperties, - List classifications){ - EntityDetail entityDetail = new EntityDetail(); - entityDetail.setCreatedBy("odpi-egeria"); - entityDetail.setGUID(guid); - entityDetail.setType(instanceType); - entityDetail.setStatus(InstanceStatus.ACTIVE); - entityDetail.setProperties(instanceProperties); - entityDetail.setClassifications(classifications); - - return entityDetail; - } - - private InstanceType createGlossaryType(){ - InstanceType type = new InstanceType(); - type.setTypeDefName(GLOSSARY_TYPE_NAME); - type.setTypeDefGUID(GLOSSARY_TYPE_GUID); - - return type; - } - - private InstanceType createCategoryType(){ - InstanceType type = new InstanceType(); - type.setTypeDefName(CATEGORY_TYPE_NAME); - type.setTypeDefGUID(CATEGORY_TYPE_GUID); - - return type; - } - - private InstanceType createTermType(){ - InstanceType type = new InstanceType(); - type.setTypeDefName(TERM_TYPE_NAME); - type.setTypeDefGUID(TERM_TYPE_GUID); - - return type; - } - - private InstanceType createExternalGlossaryLinkType(){ - InstanceType type = new InstanceType(); - type.setTypeDefName(EXTERNAL_GLOSSARY_LINK_TYPE_NAME); - type.setTypeDefGUID(EXTERNAL_GLOSSARY_LINK_TYPE_GUID); - - return type; - } - - private InstanceProperties createGlossaryProperties(String guid){ - Calendar from = Calendar.getInstance(); - from.set(Calendar.HOUR_OF_DAY, from.get(Calendar.HOUR_OF_DAY) - 1); - Date effectiveFromTime = from.getTime(); - - Calendar to = Calendar.getInstance(); - to.set(Calendar.HOUR_OF_DAY, to.get(Calendar.HOUR_OF_DAY) + 1); - Date effectiveToTime = to.getTime(); - - InstanceProperties properties = new InstanceProperties(); - properties.setEffectiveFromTime(effectiveFromTime); - properties.setEffectiveToTime(effectiveToTime); - properties.setProperty("qualifiedName", createPrimitiveStringPropertyValue("Qualified Name of " + guid)); - properties.setProperty("displayName", createPrimitiveStringPropertyValue("Display Name of " + guid)); - properties.setProperty("language", createPrimitiveStringPropertyValue("Language of " + guid)); - properties.setProperty("description", createPrimitiveStringPropertyValue("Description of " + guid)); - properties.setProperty("usage", createPrimitiveStringPropertyValue("Usage of " + guid)); - - return properties; - } - - private InstanceProperties createCategoryProperties(String guid){ - Calendar from = Calendar.getInstance(); - from.set(Calendar.HOUR_OF_DAY, from.get(Calendar.HOUR_OF_DAY) - 1); - Date effectiveFromTime = from.getTime(); - - Calendar to = Calendar.getInstance(); - to.set(Calendar.HOUR_OF_DAY, to.get(Calendar.HOUR_OF_DAY) + 1); - Date effectiveToTime = to.getTime(); - - InstanceProperties properties = new InstanceProperties(); - properties.setEffectiveFromTime(effectiveFromTime); - properties.setEffectiveToTime(effectiveToTime); - properties.setProperty("qualifiedName", createPrimitiveStringPropertyValue("Qualified Name of " + guid)); - properties.setProperty("displayName", createPrimitiveStringPropertyValue("Display Name of " + guid)); - properties.setProperty("description", createPrimitiveStringPropertyValue("Description of " + guid)); - - return properties; - } - - private InstanceProperties createTermProperties(String guid){ - Calendar from = Calendar.getInstance(); - from.set(Calendar.HOUR_OF_DAY, from.get(Calendar.HOUR_OF_DAY) - 1); - Date effectiveFromTime = from.getTime(); - - Calendar to = Calendar.getInstance(); - to.set(Calendar.HOUR_OF_DAY, to.get(Calendar.HOUR_OF_DAY) + 1); - Date effectiveToTime = to.getTime(); - - if(guid.equalsIgnoreCase("term-5")){ - from.set(Calendar.HOUR_OF_DAY, from.get(Calendar.HOUR_OF_DAY) + 2); - to.set(Calendar.HOUR_OF_DAY, to.get(Calendar.HOUR_OF_DAY) + 4); - } - - InstanceProperties properties = new InstanceProperties(); - properties.setEffectiveFromTime(effectiveFromTime); - properties.setEffectiveToTime(effectiveToTime); - properties.setProperty("qualifiedName", createPrimitiveStringPropertyValue("Qualified Name of " + guid)); - properties.setProperty("displayName", createPrimitiveStringPropertyValue("Display Name of " + guid)); - properties.setProperty("summary", createPrimitiveStringPropertyValue("Summary of " + guid)); - properties.setProperty("description", createPrimitiveStringPropertyValue("Description of " + guid)); - properties.setProperty("examples", createPrimitiveStringPropertyValue("Examples of " + guid)); - properties.setProperty("abbreviation", createPrimitiveStringPropertyValue("Abbreviation of " + guid)); - properties.setProperty("usage", createPrimitiveStringPropertyValue("Usage of " + guid)); - - return properties; - } - - private InstanceProperties createExternalGlossaryLinkProperties(String guid){ - Calendar from = Calendar.getInstance(); - from.set(Calendar.HOUR_OF_DAY, from.get(Calendar.HOUR_OF_DAY) - 1); - Date effectiveFromTime = from.getTime(); - - Calendar to = Calendar.getInstance(); - to.set(Calendar.HOUR_OF_DAY, to.get(Calendar.HOUR_OF_DAY) + 1); - Date effectiveToTime = to.getTime(); - - InstanceProperties properties = new InstanceProperties(); - properties.setEffectiveFromTime(effectiveFromTime); - properties.setEffectiveToTime(effectiveToTime); - properties.setProperty("qualifiedName", createPrimitiveStringPropertyValue("Qualified Name of " + guid)); - - return properties; - } - - private List createGlossaryClassifications(){ - List classifications = new ArrayList<>(); - InstanceType type = new InstanceType(); - type.setTypeDefName(GLOSSARY_TYPE_NAME); - - InstanceProperties properties = new InstanceProperties(); - properties.setProperty("organizingPrinciple", createPrimitiveStringPropertyValue("Organizing Principle")); - Classification classification = new Classification(); - classification.setName("Taxonomy"); - classification.setProperties(properties); - classification.setType(type); - classification.setStatus(InstanceStatus.ACTIVE); - - classifications.add(classification); - - properties = new InstanceProperties(); - properties.setProperty("scope", createPrimitiveStringPropertyValue("Scope")); - classification = new Classification(); - classification.setName("CanonicalVocabulary"); - classification.setProperties(properties); - classification.setType(type); - classification.setStatus(InstanceStatus.ACTIVE); - - classifications.add(classification); - - return classifications; - } - - private List createCategoryClassifications(){ - List classifications = new ArrayList<>(); - InstanceType type = new InstanceType(); - type.setTypeDefName(CATEGORY_TYPE_NAME); - - InstanceProperties properties = new InstanceProperties(); - properties.setProperty("name", createPrimitiveStringPropertyValue("Name")); - Classification classification = new Classification(); - classification.setName("SubjectArea"); - classification.setProperties(properties); - classification.setType(type); - classification.setStatus(InstanceStatus.ACTIVE); - - classifications.add(classification); - - return classifications; - } - - private PrimitivePropertyValue createPrimitiveStringPropertyValue(String value) { - PrimitivePropertyValue propertyValue = new PrimitivePropertyValue(); - propertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - propertyValue.setPrimitiveValue(value); - propertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getGUID()); - propertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getName()); - - return propertyValue; - } - - protected void assertExternalGlossaryLinkProperties(EntityDetail expected, ExternalGlossaryLink actual){ - assertEquals(expected.getGUID(), actual.getGuid()); - assertEquals(expected.getProperties().getPropertyValue("qualifiedName").valueAsString(), actual.getQualifiedName()); - } - - protected void assertExceptionDataInResponse(PropertyServerException expected, GlossaryViewEntityDetailResponse actual){ - assertEquals(expected.getReportedHTTPCode(), actual.getRelatedHTTPCode()); - assertEquals(expected.getReportingClassName(), actual.getExceptionClassName()); - assertEquals(expected.getReportingActionDescription(), actual.getActionDescription()); - assertEquals(expected.getReportedErrorMessage(), actual.getExceptionErrorMessage()); - assertEquals(expected.getReportedSystemAction(), actual.getExceptionSystemAction()); - assertEquals(expected.getReportedUserAction(), actual.getExceptionUserAction()); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/README.md b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/README.md deleted file mode 100644 index 1c40457bfb0..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Glossary View Open Metadata Access Service (OMAS) with Spring - -The Glossary View OMAS spring module uses spring to create the server-side support for the REST services. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/build.gradle b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/build.gradle deleted file mode 100644 index 11372c464b9..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-server') - implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-api') - implementation 'org.springframework:spring-web' - implementation 'jakarta.validation:jakarta.validation-api' - implementation 'org.springframework:spring-context' - implementation 'io.swagger.core.v3:swagger-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Glossary View OMAS with Spring' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java deleted file mode 100644 index b2f31a83ce6..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java +++ /dev/null @@ -1,140 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.PositiveOrZero; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.accessservices.glossaryview.server.service.CategoryService; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE; -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE; -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_MAX_VALUE; - -/** - * Spring Rest Controller defining 'GlossaryCategory' oriented endpoints - */ -@RestController -@Validated -@RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}") - -@Tag(name="Metadata Access Server: Glossary View OMAS", - description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omas/glossary-view/overview/")) -@Deprecated -public class CategoryResource { - - private final CategoryService categoryService; - - /** - * Called by Spring - */ - public CategoryResource() { - categoryService = new CategoryService(); - } - - /** - * Extract all categories - * - * @param serverName instance to call - * @param userId calling user - * @param from from - * @param size size - * - * @return categories - */ - @GetMapping( path = "/categories") - public GlossaryViewEntityDetailResponse getAllCategories(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return categoryService.getAllCategories(userId, serverName, from, size); - } - - /** - * Extract the category definition for the given GUID - * - * @param serverName instance to call - * @param userId calling user - * @param categoryGUID category GUID - * - * @return a category - */ - @GetMapping( path = "/categories/{categoryGUID}") - public GlossaryViewEntityDetailResponse getCategory(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("categoryGUID") @NotBlank String categoryGUID) { - return categoryService.getCategory(userId, serverName, categoryGUID); - } - - /** - * Extract category definitions for the given glossary GUID via the 'CategoryAnchor' type relationships - * - * @param serverName instance to call - * @param userId calling user - * @param glossaryGUID glossary GUID - * @param from from - * @param size size - * - * @return categories - */ - @GetMapping( path = "/glossaries/{glossaryGUID}/categories") - public GlossaryViewEntityDetailResponse getCategoriesViaCategoryAnchorRelationships(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("glossaryGUID") @NotBlank String glossaryGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return categoryService.getCategoriesViaCategoryAnchorRelationships(userId, serverName, glossaryGUID, from, size); - } - - /** - * Extract subcategory definitions for the given GUID - * - * @param serverName instance to call - * @param userId calling user - * @param categoryGUID category GUID - * @param from from - * @param size size - * - * @return subcategories - */ - @GetMapping( path = "/categories/{categoryGUID}/subcategories") - public GlossaryViewEntityDetailResponse getSubcategories(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("categoryGUID") @NotBlank String categoryGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return categoryService.getSubcategories(userId, serverName, categoryGUID, from, size); - } - - /** - * Extract external glossary link definitions for the given category - * - * @param serverName instance to call - * @param userId calling user - * @param categoryGUID category GUID - * @param from from - * @param size size - * - * @return external glossary links - */ - @GetMapping( path = "/categories/{categoryGUID}/external-glossary-links") - public GlossaryViewEntityDetailResponse getExternalGlossaryLinks(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("categoryGUID") @NotBlank String categoryGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return categoryService.getExternalGlossaryLinks(userId, serverName, categoryGUID, from, size); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java deleted file mode 100644 index b55e8c4f8e7..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java +++ /dev/null @@ -1,133 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.PositiveOrZero; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.accessservices.glossaryview.server.service.GlossaryService; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - - -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE; -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE; -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_MAX_VALUE; - -/** - * Spring Rest Controller defining 'Glossary' oriented endpoints - */ -@RestController -@Validated -@RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}") - -@Tag(name="Metadata Access Server: Glossary View OMAS", - description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omas/glossary-view/overview/")) -@Deprecated -public class GlossaryResource { - - private final GlossaryService glossaryService; - - /** - * Called by Spring - */ - public GlossaryResource() { - glossaryService = new GlossaryService(); - } - - /** - * Extract all glossary definitions - * - * @param serverName instance to call - * @param userId calling user - * @param from from - * @param size size - * - * @return glossaries - */ - @GetMapping( path = "/glossaries") - public GlossaryViewEntityDetailResponse getAllGlossaries(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return glossaryService.getAllGlossaries(userId, serverName, from, size); - } - - /** - * Extract a glossary definition - * - * @param serverName instance to call - * @param userId calling user - * @param glossaryGUID glossary GUID - * - * @return a glossary - */ - @GetMapping( path = "/glossaries/{glossaryGUID}") - public GlossaryViewEntityDetailResponse getGlossary(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("glossaryGUID") @NotBlank String glossaryGUID) { - return glossaryService.getGlossary(userId, serverName, glossaryGUID); - } - - /** - * Extract a term's home glossary - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * - * @return glossaries - */ - @GetMapping( path = "/terms/{termGUID}/home-glossary") - public GlossaryViewEntityDetailResponse getTermHomeGlossary(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID) { - return glossaryService.getTermHomeGlossary(userId, serverName, termGUID); - } - - /** - * Extract a category's home glossary - * - * @param serverName instance to call - * @param userId calling user - * @param categoryGUID category GUID - * - * @return glossaries - */ - @GetMapping( path = "/categories/{categoryGUID}/home-glossary") - public GlossaryViewEntityDetailResponse getCategoryHomeGlossary(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("categoryGUID") @NotBlank String categoryGUID) { - return glossaryService.getCategoryHomeGlossary(userId, serverName, categoryGUID); - } - - /** - * Extract the external glossary link definitions - * - * @param serverName instance to call - * @param userId calling user - * @param glossaryGUID glossary GUID - * @param from from - * @param size size - * - * @return external glossary links - */ - @GetMapping( path = "/glossaries/{glossaryGUID}/external-glossary-links") - public GlossaryViewEntityDetailResponse getExternalGlossaryLinks(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("glossaryGUID") @NotBlank String glossaryGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return glossaryService.getExternalGlossaryLinks(userId, serverName, glossaryGUID, from, size); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/OmasRegistration.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/OmasRegistration.java deleted file mode 100644 index 1c53f8a082d..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/OmasRegistration.java +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.glossaryview.server.spring; - -import org.odpi.openmetadata.accessservices.glossaryview.server.admin.GlossaryViewRegistration; -import org.springframework.web.bind.annotation.RestController; - -/** - * Triggers the registration of this OMAS. No endpoints must be defined in this rest controller - * TODO: find a better way to do it. Big doubts that registration on spring controller init is correct - */ -@RestController -public class OmasRegistration { - - static final String PAGE_FROM_DEFAULT_VALUE = "0"; - static final String PAGE_SIZE_DEFAULT_VALUE = "100"; - static final int PAGE_SIZE_MAX_VALUE = 1000; - - public OmasRegistration(){ - GlossaryViewRegistration.registerAccessService(); - } - -} diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java deleted file mode 100644 index 27249b10d14..00000000000 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java +++ /dev/null @@ -1,402 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.glossaryview.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.PositiveOrZero; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; -import org.odpi.openmetadata.accessservices.glossaryview.server.service.TermService; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE; -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE; -import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_MAX_VALUE; - -/** - * Spring Rest Controller defining 'GlossaryTerm' oriented endpoints - */ -@RestController -@Validated -@RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}") - -@Tag(name="Metadata Access Server: Glossary View OMAS", - description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", - externalDocs=@ExternalDocumentation( - description="Further Information", - url="https://egeria-project.org/services/omas/glossary-view/overview/")) -@Deprecated -public class TermResource { - - private final TermService termService; - - /** - * Called by Spring - */ - public TermResource() { - termService = new TermService(); - } - - /** - * Extract all terms definitions - * - * @param serverName instance to call - * @param userId calling user - * @param from from - * @param size size - * - * @return all terms - */ - @GetMapping( path = "/terms") - public GlossaryViewEntityDetailResponse getAllTerms(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getAllTerms(userId, serverName, from, size); - } - - /** - * Extract a term definition for the given GUID - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID category GUID - * - * @return term - */ - @GetMapping( path = "/terms/{termGUID}") - public GlossaryViewEntityDetailResponse getTerm(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID) { - return termService.getTerm(userId, serverName, termGUID); - } - - - /** - * Extract term definitions for the given glossary GUID via the 'TermAnchor' type relationships - * - * @param serverName instance to call - * @param userId calling user - * @param glossaryGUID glossary GUID - * @param from from - * @param size size - * - * @return terms - */ - @GetMapping( path = "/glossaries/{glossaryGUID}/terms") - public GlossaryViewEntityDetailResponse getTermsViaTermAnchorRelationships(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("glossaryGUID") @NotBlank String glossaryGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getTermsViaTermAnchorRelationships(userId, serverName, glossaryGUID, from, size); - } - - /** - * Extract term definitions for the given GUID via the 'TermCategorization' type relationships - * - * @param serverName instance to call - * @param userId calling user - * @param categoryGUID category GUID - * @param from from - * @param size size - * - * @return subcategories - */ - @GetMapping( path = "/categories/{categoryGUID}/terms") - public GlossaryViewEntityDetailResponse getTermsViaTermCategorizationRelationships(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("categoryGUID") @NotBlank String categoryGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getTermsViaTermCategorizationRelationships(userId, serverName, categoryGUID, from, size); - } - - /** - * Extract external glossary link definitions for the given term - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return external glossary links - */ - @GetMapping( path = "/terms/{termGUID}/external-glossary-links") - public GlossaryViewEntityDetailResponse getExternalGlossaryLinks(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getExternalGlossaryLinks(userId, serverName, termGUID, from, size); - } - - /** - * Extract related terms - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return related terms - */ - @GetMapping( path = "/terms/{termGUID}/see-also") - public GlossaryViewEntityDetailResponse getRelatedTerms(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getRelatedTerms(userId, serverName, termGUID, from, size); - } - - /** - * Extract synonyms - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return synonyms - */ - @GetMapping( path = "/terms/{termGUID}/synonyms") - public GlossaryViewEntityDetailResponse getSynonyms(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getSynonyms(userId, serverName, termGUID, from, size); - } - - /** - * Extract antonyms - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return antonyms - */ - @GetMapping( path = "/terms/{termGUID}/antonyms") - public GlossaryViewEntityDetailResponse getAntonyms(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getAntonyms(userId, serverName, termGUID, from, size); - } - - /** - * Extract preferred terms - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return preferred terms - */ - @GetMapping( path = "/terms/{termGUID}/preferred-terms") - public GlossaryViewEntityDetailResponse getPreferredTerms(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getPreferredTerms(userId, serverName, termGUID, from, size); - } - - /** - * Extract replacement terms - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return replacement terms - */ - @GetMapping( path = "/terms/{termGUID}/replacement-terms") - public GlossaryViewEntityDetailResponse getReplacementTerms(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getReplacementTerms(userId, serverName, termGUID, from, size); - } - - /** - * Extract translations - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return translations - */ - @GetMapping( path = "/terms/{termGUID}/translations") - public GlossaryViewEntityDetailResponse getTranslations(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getTranslations(userId, serverName, termGUID, from, size); - } - - /** - * Extract "is a" - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return "is a" - */ - @GetMapping( path = "/terms/{termGUID}/is-a") - public GlossaryViewEntityDetailResponse getIsA(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getIsA(userId, serverName, termGUID, from, size); - } - - /** - * Extract valid values - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return valid values - */ - @GetMapping( path = "/terms/{termGUID}/valid-values") - public GlossaryViewEntityDetailResponse getValidValues(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getValidValues(userId, serverName, termGUID, from, size); - } - - /** - * Extract "used in contexts" - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return "used in contexts" - */ - @GetMapping( path = "/terms/{termGUID}/used-in-contexts") - public GlossaryViewEntityDetailResponse getUsedInContexts(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getUsedInContexts(userId, serverName, termGUID, from, size); - } - - /** - * Extract assigned elements - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return assigned elements - */ - @GetMapping( path = "/terms/{termGUID}/assigned-elements") - public GlossaryViewEntityDetailResponse getAssignedElements(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getAssignedElements(userId, serverName, termGUID, from, size); - } - - /** - * Extract attributes - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return attributes - */ - @GetMapping( path = "/terms/{termGUID}/attributes") - public GlossaryViewEntityDetailResponse getAttributes(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getAttributes(userId, serverName, termGUID, from, size); - } - - /** - * Extract subtypes - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return subtypes - */ - @GetMapping( path = "/terms/{termGUID}/subtypes") - public GlossaryViewEntityDetailResponse getSubtypes(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getSubtypes(userId, serverName, termGUID, from, size); - } - - /** - * Extract types - * - * @param serverName instance to call - * @param userId calling user - * @param termGUID term GUID - * @param from from - * @param size size - * - * @return types - */ - @GetMapping( path = "/terms/{termGUID}/types") - public GlossaryViewEntityDetailResponse getTypes(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("termGUID") @NotBlank String termGUID, - @RequestParam(name="from", defaultValue=PAGE_FROM_DEFAULT_VALUE) @PositiveOrZero Integer from, - @RequestParam(name="size", defaultValue=PAGE_SIZE_DEFAULT_VALUE) @PositiveOrZero @Max(PAGE_SIZE_MAX_VALUE) Integer size) { - return termService.getTypes(userId, serverName, termGUID, from, size); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/Egeria-subject-area-omas.http b/open-metadata-implementation/access-services/subject-area/Egeria-subject-area-omas.http deleted file mode 100644 index 799a7b1b928..00000000000 --- a/open-metadata-implementation/access-services/subject-area/Egeria-subject-area-omas.http +++ /dev/null @@ -1,43 +0,0 @@ -# Egeria-subject-area-omas - -### -# @name Create Glossary -POST {{baseURL}}/servers/{{server}}/open-metadata/access-services/subject-area/users/{{user}}/glossaries -Content-Type: application/json - -{ - "class" : "Glossary", - "qualifiedName" : "glossaryTime", - "name" : "XY", - "effectiveFromTime" : 77777777, - "effectiveToTime" : 88888888 -} - -### -# @name Update Glossary -PUT {{baseURL}}/servers/{{server}}/open-metadata/access-services/subject-area/users/{{user}}/glossaries/{{glossaryGUID}} -Content-Type: application/json - -{ - "class" : "Glossary", - "qualifiedName" : "glossaryTime", - "name" : "XY", - "effectiveFromTime" : 77777777, - "effectiveToTime" : 9999999999 -} - -### -# @name Create Term -POST {{baseURL}}/servers/{{server}}/open-metadata/access-services/subject-area/users/{{user}}/terms -Content-Type: application/json - -{ - "class" : "Term", - "qualifiedName" : "termXXXX2", - "name" : "X", - "glossary" : - { - "class" : "GlossarySummary", - "guid" : "01723297-dfc0-4ca6-a81b-29e6e385252e" - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/Egeria-subject-area-omas.postman_collection.json b/open-metadata-implementation/access-services/subject-area/Egeria-subject-area-omas.postman_collection.json deleted file mode 100644 index fc9c85a8118..00000000000 --- a/open-metadata-implementation/access-services/subject-area/Egeria-subject-area-omas.postman_collection.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "info": { - "_postman_id": "9187aded-af08-4687-9d8f-99bcb9dd3621", - "name": "Egeria-subject-area-omas", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "28623075" - }, - "item": [ - { - "name": "Create Glossary", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"class\" : \"Glossary\",\n \"qualifiedName\" : \"glossaryTime\",\n \"name\" : \"XY\",\n \"effectiveFromTime\" : 77777777,\n \"effectiveToTime\" : 88888888\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/servers/{{server}}/open-metadata/access-services/subject-area/users/{{user}}/glossaries", - "host": [ - "{{baseURL}}" - ], - "path": [ - "servers", - "{{server}}", - "open-metadata", - "access-services", - "subject-area", - "users", - "{{user}}", - "glossaries" - ] - } - }, - "response": [] - }, - { - "name": "Update Glossary", - "request": { - "method": "PUT", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"class\" : \"Glossary\",\n \"qualifiedName\" : \"glossaryTime\",\n \"name\" : \"XY\",\n \"effectiveFromTime\" : 77777777,\n \"effectiveToTime\" : 9999999999\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/servers/{{server}}/open-metadata/access-services/subject-area/users/{{user}}/glossaries/{{glossaryGUID}}", - "host": [ - "{{baseURL}}" - ], - "path": [ - "servers", - "{{server}}", - "open-metadata", - "access-services", - "subject-area", - "users", - "{{user}}", - "glossaries", - "{{glossaryGUID}}" - ] - } - }, - "response": [] - }, - { - "name": "Create Term", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"class\" : \"Term\",\n \"qualifiedName\" : \"termXXXX2\",\n \"name\" : \"X\",\n \"glossary\" : \n {\n \"class\" : \"GlossarySummary\",\n \"guid\" : \"01723297-dfc0-4ca6-a81b-29e6e385252e\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/servers/{{server}}/open-metadata/access-services/subject-area/users/{{user}}/terms", - "host": [ - "{{baseURL}}" - ], - "path": [ - "servers", - "{{server}}", - "open-metadata", - "access-services", - "subject-area", - "users", - "{{user}}", - "terms" - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/README.md b/open-metadata-implementation/access-services/subject-area/README.md deleted file mode 100644 index cb61a26405a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/README.md +++ /dev/null @@ -1,140 +0,0 @@ - - - -![TechPreview](../../../images/egeria-content-status-tech-preview.png#pagewidth) - -# Subject Area Open Metadata Access Service (OMAS) - -The Subject Area OMAS supports subject-matter experts who are documenting -their knowledge about a particular in a glossary. - -* [Documentation](https://egeria-project.org/services/omas/security-manager/overview) - -## Design Information - -The module structure for the Subject Area OMAS is as follows: - -* [subject-area-client](subject-area-client) supports the client library. -* [subject-area-api](subject-area-api) supports the common Java classes that are used both by the client and the server. -* [subject-area-server](subject-area-server) supports an implementation of the access service and its related event management. -* [subject-area-spring](subject-area-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - -The implementation is not complete. The following has been implemented : - -* Java and REST API for create, get and update for Glossary, Category, Term , SubjectAreaDefinition. -* Java and REST API for the Term to Term relationships HAS-A, RelatedTerm, Synonym, Antonym, Translations, used in context, - preferred terms, valid values, replacement terms, typed by, is a, is a type of. -* Java and REST API for the Term to Category relationships TermCategorization. -* TermAnchor and CategoryAnchor relationships can be created , deleted, purged and restored. As there are no properties, there are no update or replace operations. -* getTermRelationships, get GlossaryRelationships and getCategoryRelationships -* findTerm, findCategory and findGlossary - -This has been verified by running the [Subject Area samples](../../../open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples) and - [Subject Area FVT](../../../open-metadata-test/open-metadata-fvt/access-services-fvt/README.md) against an in-memory repository - - -## Example REST calls: -### Create Glossary instance - -POST url: `localhost:9443/servers/{serverName}/open-metadata/access-services/subject-area/users/{user}/glossaries` - -JSON body: - -```json -{ - "name": "Test glossary 1", - "description": "This is a Glossary for testing.", - "usage": "for test" -} -``` - -### Get Glossary instance - Get Glossary instance (where {serverName} is the name of the server, {guid} is the guid in the Glossary create response and {user} is the userid ) - - -GET url: `localhost:9443/servers/{serverName}/open-metadata/access-services/subject-area/users/{user}/glossaries/{guid}` - -(where `{guid}` is the GUID in the Glossary create response) - -### Delete Glossary instance - -Delete Glossary instance (where {guid} is the guid in the Glossary create response and {user} is the userid ) -DELETE url : localhost:9443/open-metadata/access-services/subject-area/users/{user}/glossaries/{guid} - -## The Subject Area OMAS philosophy - -The Subject area OMAS is the access service that subject area experts should use. The intent is that the APIs that are exposed are natural for the -tasks that a subject area expert is performing. At this time the Subject area OMAS exposes APIs around the task of Glossary authoring, -focusing on Glossary, Category and Term objects. - -## The Subject Area OMAS architecture -The Subject Area main objects are the Glossary, Category and Terms. There map onto the OMRS types Glossary, GlossaryCategory and GlossaryTerm. The mapping is -not one to one, because the OMAS API is looking to emphasise certain content and hide some of the OMRS details that the subject area expert is not concerned with. - -Subject Area OMAS mapping to OMRS entities considerations: -* Glossary, Category and Term objects have associated icons, these are embedded objects rather than relationships. In this way icon content is shown as important to -the subject area expert as they are like to be working with the glossary content visually -* The icon embedded object is an IconSummary object. This is an example of other object in the OMAS API whose names end with "Summary". These objects represent - a summary of the entity at the end of a certain type of OMRS relationships. Note the icon function has not been implemented in the OMAS yet. -* Categories and Terms have a GlossarySummary , this is there associated Glossary. Good practice is to have Terms and Categories within a Glossary, so the Subject -area API Term and Category create and update APIs expect a glossary to be supplied. See effective date considerations. -* OMRS relationships can be managed via the Subject Area relationships API. Some of these relationships may appear as summary objects. - - -## The Subject Area OMAS API overview. - -There are a number of types of APIs associated with the Subject Area OMAS. -* Create, update, replace, get, delete (hard and soft) and restore for Glossary, Category, Term and relationships. -* get relationships associated with a Term - implemented -* Find APIs allow content to be found - findTerm, findCategory and findGlossary implemented -* Collaboration APIs allow comments and TODO and the like to be associate with glossary content -* A report API, allows glossary content to be analysed, the API response highlights areas that the subject Area Expert might want to amend. - not implemented yet -* Node orientated APIs - - -## How the Subject Area OMAS deals with effective dates - - The OMRS entities, relationships and classifications have optional effective From and To dates. These dates are exposed in the Term, Category and Glossary -objects as attributes. -* create, update and replace calls to the subject Area for Term, Category, glossary and relationships omas can specify an effective date range in the request, allowing the subject area -OMAS to manage effective dates. The null value or when it is not specified To date means there is no limit in the future for the objects effectivity. - A null or unspecified from date means that this no starting restriction for effectivity. The date must not be in the past. The From date should be prior to the To Date. -* create, update, replace, restore, soft delete responses may return Summary objects that are not in the effective date range of the associated Term, -Category or Glossary object. This is to allow glossaries content to be 'messy' and allow the subject area expert to fix it up. -* A get of a Term, Glossary or Category that has potentially associated Summary objects. Because the Subject Area OMAS is an authoring interface, the user needs to -see all content irrespective of the effectivity date. So associated summary objects are exposed even if they are not effective. The summary objects contain the effectivity dates of the relationship -and the connected object. The Subject Area user can see these dates and maker a decision as to whether they want to amend them. -* create, update, delete restore and replace operations are exposed for relationships that appear as summary objects - so that their effectivity ranges can be managed -by the subject area expert. - -## How the Subject Area OMAS deals with finds - - The find APIs in the Subject Area do not accept input from the user that will be interpreted as a regex. Instead 2 flags are supplied, - with the searchCriteria: exactValue and mixedCase. The search criteria from API is a literal and is then extended appropriately - to form a regex expression - implementing the requested exactValue and mixedCase. - ----- -Return to [access-services](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - - - - - - - - - - - - - diff --git a/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area OMAS API proposal.docx b/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area OMAS API proposal.docx deleted file mode 100644 index 741817f5cdd..00000000000 Binary files a/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area OMAS API proposal.docx and /dev/null differ diff --git a/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area use cases.png b/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area use cases.png deleted file mode 100644 index c0c2b4fbf5b..00000000000 Binary files a/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area use cases.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area use cases.xml b/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area use cases.xml deleted file mode 100644 index d3a4c44480c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/docs/design/Subject Area use cases.xml +++ /dev/null @@ -1 +0,0 @@ -zVjLcpswFP0als0AMmCWjpOmnTYzmXE7bZcCLqBGICqLGPr1lYwwL3uSOHZcLzzS0b16nHMfTgy0zKo7jov0nkVADduMKgPdGLbtO6b8VkDdAI7vNUDCSdRAVgesyF/QoPZLShLBemAoGKOCFEMwZHkOoRhgmHO2GZrFjA5PLXACE2AVYjpFf5BIpA06b5+l8E9AkrQ92TL1SoDDx4SzMtfnGTaKt59mOcPtXtp+neKIbXoQujXQkjMmmlFWLYEqalvaGr+PB1Z39+aQi5c4/Ln7vF5uPFQTf7X6chuhu++zD3qXJ0xLzceqDH4rnm3zHgsBXA6gKoAL/QpRt8zJBxVqWGZ0EQrGDXT9JO2I5PYrDoA+sDURhOXSJGBCsEwaULVwvWNuyajyu+m46/ZYUJIoX8EKiaYio3JiySErBSU5LHcBYUpQv0P6QnWQIGtHu4xmYBkIXksT7YA8rZSOZNvV800XF0hDaS8kWjOsIzHZ7dypIQdakFeIYzsTdRalSJnS5BvwbD2RRG4q80ZOrjcpEbAqcKhWNjJzhxwe0CFnuXKOCaVDaewwlPhacPYIvZXIDVzHPRH99pB+y57Sv8P6/M/Pxr874X/KeB4tVBXqyOuxDBURP1WAXjl69qu3clPp2N1O6kEgQzSpWiMe5S1YyUN4Nn6mhPcIdfbw2WIcKBbkaXiPfSTrEx4YyUVPT+QM08ka6dTcX3v1C9d4o/koL53RRgLzBMRko63mu2cfHwYITYskZDiXVUrVedUQSZ4cn4ujbIswzOO92eaGcwji02SbMxuR6l0629BsSrPgZShKjuk5iI5jcA+UNc8PzBN1FQv9d0RPy9o3XLGcZfU5aAYrcsDbR7PvegifrHsMq80MXZxm7yzdw3yv7tGEycW6hz9Km+O7xzAw0Ht3j/kbw+CUkqLLSjpK0dmRks5GJRWZ7yyp/9bMzuUFVGpbV6bltcA2u69mttMCXYpvZ3V/9gCcyHcAf3XiN+Q824gvFiXuM+K+OEpGv3DQuIIcHSVy2v3Z3ph3/xpBt/8A \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/docs/design/brain storming terms.png b/open-metadata-implementation/access-services/subject-area/docs/design/brain storming terms.png deleted file mode 100644 index 7090629a7ea..00000000000 Binary files a/open-metadata-implementation/access-services/subject-area/docs/design/brain storming terms.png and /dev/null differ diff --git a/open-metadata-implementation/access-services/subject-area/docs/design/brain storming terms.xml b/open-metadata-implementation/access-services/subject-area/docs/design/brain storming terms.xml deleted file mode 100644 index db9bf34b37a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/docs/design/brain storming terms.xml +++ /dev/null @@ -1 +0,0 @@ -3Vffb5swEP5reKzEjyZtHkvSdprWPSwPk/ZmsAErxmbGaZL99bvDhkBI2kVpVGmJFOC78935uwO+eNG83D5rUhUvijLhhT7detHCC8PZxIdfBHYWmMzuLJBrTi0U7IEl/8Mc6Nbla05ZPXA0SgnDqyGYKilZagYY0Vpthm6ZEsOsFcnZCFimRIzRn5yawqL37bYQ/8J4XrSZA99ZStI6O6AuCFWbHhQ9etFcK2XsWbmdM4HctbzYdU8nrF1hmknzLwt+rVi8W/74+kw1XbzkUgeL8iayUV6JWLsNe+FUQLzYkAQ4gLLNznEx/b3GWuNEacr0TaqEIFUNtoeGf3cFVUQx/BaOFTQ2pEw608YS2be0sffWXsIjTinsrSKUcpkPXG8HXrbSYay+wzR3R7vjRMGUHoL6OAckXeVarSVFHpS2u/HCiNyls9uw2+rQmDWfztiW1xBRbTGREtCuxnd2n2ThW9UWOOGC53JQmGCZGS/6TkrWLkz0YSiYGYx2QfwFq1PNK8OVvGYaOJKygpPjV+fkRXDkearZF/WJHiLHKxy5fcxCy5BM6uq9ZWcxcmr8GclCGn3QhHclPnFdwzj474/xG2S0QeCJiQeF96Ep8IFVMV0rSfBhKS/JcObCTxjBb+RyHl2Mq9L4X0ztp9zvFw8ggsdehIhbSdDi4YDk0LAt4oUpBQABnNZGqxWbW6rBJUp9/IIl40L0cPdejGL1ynQmGpWELoA07WIoYfwuKThBspMyKOjEFYhSpkpmNOzGdws6PeYE6cxd7mUHyDuHFX1lN3UgcYoy70LvRRecON11hga7HWmwWBMua6N0ifoG7i+my/pswqWS7IBrB7Xv2xQ4w0GPkVEOovfBGUpOKaaJNwU3bFmRFHNuQOFfpSXTYUsm45YE0ZGWhOd3BC73irux9f62RI9/AQ== \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/build.gradle b/open-metadata-implementation/access-services/subject-area/subject-area-api/build.gradle deleted file mode 100644 index 1539f68a14f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation 'org.apache.commons:commons-collections4' - testImplementation 'org.testng:testng' - testImplementation project(':open-metadata-test:open-metadata-ut') -} - -description = 'Subject Area OMAS api' - -java { - withJavadocJar() -} - -test { - useTestNG() - // This will default to standard search pattern - see https://docs.gradle.org/current/userguide/java_testing.html#sec:test_detection - scanForTestClasses = false -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/out/production/classes/META-INF/egeria.open-metadata-implementation.access-services.subject-area.subject-area-api.main.kotlin_module b/open-metadata-implementation/access-services/subject-area/subject-area-api/out/production/classes/META-INF/egeria.open-metadata-implementation.access-services.subject-area.subject-area-api.main.kotlin_module deleted file mode 100644 index 8fb60192d37..00000000000 Binary files a/open-metadata-implementation/access-services/subject-area/subject-area-api/out/production/classes/META-INF/egeria.open-metadata-implementation.access-services.subject-area.subject-area-api.main.kotlin_module and /dev/null differ diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/GlossaryArtifactsRelatedEntityType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/GlossaryArtifactsRelatedEntityType.java deleted file mode 100644 index 9f59a59a26b..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/GlossaryArtifactsRelatedEntityType.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GlossaryArtifactsRelatedEntityType describes the different types of entity that can change related to Glossaries , Glossary Categories and Glossary Terms. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GlossaryArtifactsRelatedEntityType implements Serializable -{ - UNKNOWN (0, "Unknown", "Unknown related entity has changed."), - - COLLECTION (1, "Collection", "Collection changed."), - TODO (2, "Todo", "Todo changed."), - MEETING (3, "Meeting", "Meeting changed."), - INFORMAL_TAG (4, "InformalTag", "Informal Tag changed."), - COMMENT (5, "Comment", "Comment changed."), - NOTE (6, "Note", "Note changed."), - // only applicable to Term Node - ASSET (7, "Asset", "Asset changed."); - - - private static final long serialVersionUID = 1L; - - private int eventTypeCode; - private String eventTypeName; - private String eventTypeDescription; - - - /** - * Default Constructor - sets up the specific values for this instance of the enum. - * - * @param eventTypeCode - int identifier used for indexing based on the enum. - * @param eventTypeName - string name used for messages that include the enum. - * @param eventTypeDescription - default description for the enum value - used when natural resource - * bundle is not available. - */ - GlossaryArtifactsRelatedEntityType(int eventTypeCode, String eventTypeName, String eventTypeDescription) - { - this.eventTypeCode = eventTypeCode; - this.eventTypeName = eventTypeName; - this.eventTypeDescription = eventTypeDescription; - } - - - /** - * Return the int identifier used for indexing based on the enum. - * - * @return int identifier code - */ - public int getEventTypeCode() - { - return eventTypeCode; - } - - - /** - * Return the string name used for messages that include the enum. - * - * @return String name - */ - public String getEventTypeName() - { - return eventTypeName; - } - - - /** - * Return the default description for the enum value - used when natural resource - * bundle is not available. - * - * @return String default description - */ - public String getEventTypeDescription() - { - return eventTypeDescription; - } -} - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/GlossaryArtifactsType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/GlossaryArtifactsType.java deleted file mode 100644 index 128c69b2f73..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/GlossaryArtifactsType.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GlossaryArtifactsType describes the different types of glossary artifacts - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GlossaryArtifactsType implements Serializable -{ - UNKNOWN (0, "Unknown", "Unknown."), - - GLOSSARY (1, "Glossary", "Glossary."), - GLOSSARYCATEGORY(2, "GlossaryCategory", "GlossaryCategory."), - GLOSSARYTERM (3, "Node", "Node."); - - - private static final long serialVersionUID = 1L; - - private int eventTypeCode; - private String eventTypeName; - private String eventTypeDescription; - - - /** - * Default Constructor - sets up the specific values for this instance of the enum. - * - * @param eventTypeCode - int identifier used for indexing based on the enum. - * @param eventTypeName - string name used for messages that include the enum. - * @param eventTypeDescription - default description for the enum value - used when natural resource - * bundle is not available. - */ - GlossaryArtifactsType(int eventTypeCode, String eventTypeName, String eventTypeDescription) - { - this.eventTypeCode = eventTypeCode; - this.eventTypeName = eventTypeName; - this.eventTypeDescription = eventTypeDescription; - } - - - /** - * Return the int identifier used for indexing based on the enum. - * - * @return int identifier code - */ - public int getEventTypeCode() - { - return eventTypeCode; - } - - - /** - * Return the string name used for messages that include the enum. - * - * @return String name - */ - public String getEventTypeName() - { - return eventTypeName; - } - - - /** - * Return the default description for the enum value - used when natural resource - * bundle is not available. - * - * @return String default description - */ - public String getEventTypeDescription() - { - return eventTypeDescription; - } -} - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/SubjectAreaEvent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/SubjectAreaEvent.java deleted file mode 100644 index f9f9099b6f6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/SubjectAreaEvent.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.events.content.SubjectAreaEventContent; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SubjectAreaEvent describes the structure of the org.odpi.openmetadata.accessservices.subjectarea.common.events emitted by the Subject Area OMAS. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SubjectAreaEvent implements Serializable -{ - SubjectAreaEventType eventType = SubjectAreaEventType.UNKNOWN_SUBJECTAREA_EVENT; - - SubjectAreaEventContent subjectAreaEventContent = null; - - - private static final long serialVersionUID = 1L; - - /** - * Default constructor - */ - public SubjectAreaEvent() - { - } - - - /** - * Return the type of event. - * - * @return event type enum - */ - public SubjectAreaEventType getEventType() - { - return eventType; - } - - - /** - * Set up the type of event. - * - * @param eventType - event type enum - */ - public void setEventType(SubjectAreaEventType eventType) - { - this.eventType = eventType; - } - - public SubjectAreaEventContent getSubjectAreaEventContent() { - return subjectAreaEventContent; - } - - public void setSubjectAreaEventContent(SubjectAreaEventContent subjectAreaEventContent) { - this.subjectAreaEventContent = subjectAreaEventContent; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/SubjectAreaEventType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/SubjectAreaEventType.java deleted file mode 100644 index 395078c3509..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/SubjectAreaEventType.java +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events; - - import com.fasterxml.jackson.annotation.JsonAutoDetect; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - import com.fasterxml.jackson.annotation.JsonInclude; - - import java.io.Serializable; - - import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; - import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SubjectAreaEventType describes the different types of org.odpi.openmetadata.accessservices.subjectarea.common.events produced by the Subject Area OMAS. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum SubjectAreaEventType implements Serializable -{ - UNKNOWN_SUBJECTAREA_EVENT (0, "UnknownSubjectAreaEvent", "A Subject Area event that is not recognized by the local org.odpi.openmetadata.accessservices.subjectarea.server."), - - // Glossary terms - NEW_GLOSSARYTERM_EVENT (1, "NewGlossaryTerm", "A new Node has been defined."), - UPDATED_GLOSSARYYERM_EVENT (2, "UpdatedGlossaryTerm", "An existing Node has been updated."), - DELETED_GLOSSARYTERM_EVENT (3, "DeletedGlossaryTerm", "An existing has been deleted."), - CREATED_RELATIONSHIP_FOR_GLOSSARYTERM_EVENT (4, "CreatedRelationshipForGlossaryTerm","Created Relationship for Node."), - UPDATED_RELATIONSHIP_FOR_GLOSSARYTERM_EVENT (5, "UpdatedelationshipForGlossaryTerm", "Updated relationship for Node."), - DELETED_RELATIONSHIP_FOR_GLOSSARYTERM_EVENT (6, "DeletedRelationshipForGlossaryTerm","Deleted relationship for Node."), - CLASSIFICATION_CHANGE_GLOSSARYTERM_EVENT (7, "ClassifiedGlossaryTerm", "The classification associated with a Node has been changed."), - COMMENT_CHANGED_RELATING_TO_TERM (8, "CommentChangedRelatingToGlossaryTerm", "A comment has been changed relating to a glossary term."), - RATING_CHANGED_RELATING_TO_TERM (9, "RatingChangedRelatingToGlossaryTerm", "A rating has been changed relating to a glossary term."), - TAG_CHANGED_RELATING_TO_TERM (10, "TagChangedRelatingToGlossaryTerm", "An informal tag has been changed relating to a glossary term."), - TODO_CHANGED_RELATING_TO_TERM (11, "ToDoChangedRelatingToGlossaryTerm", "A ToDo has been changed relating to a glossary term."), - NOTE_CHANGED_RELATING_TO_TERM (12, "NoteChangedRelatingToGlossaryTerm", "A note has been changed relating to a glossary term."), - MEETING_CHANGED_RELATING_TO_TERM (13, "MeetingChangedRelatingToGlossaryTerm", "A meeting has been changed relating to a glossary term."), - COLLECTION_CHANGED_RELATING_TO_TERM (14, "CollectionChangedRelatingToGlossaryTerm", "A collection has been changed relating to aglossary term."), - ASSET_CHANGED_RELATING_TO_TERM (15, "AssetChangedRelatingToGlossaryTerm", "An asset has been changed relating to a glossary term."), - - // Glossary Categories - NEW_GLOSSARYCATEGORY_EVENT (16, "NewGlossaryCategory", "A new Glossary Category has been defined."), - UPDATED_GLOSSARYCATEGORY_EVENT (17, "UpdatedGlossaryCategory", "An existing Glossary Category has been updated."), - DELETED_GLOSSARYCATEGORY_EVENT (18, "DeletedGlossaryCategory", "An existing Glossary Category has been deleted."), - CREATED_RELATIONSHIP_FOR_GLOSSARYCATEGORY_EVENT (19, "CreatedRelationshipForGlossaryCategory","Created Relationship for Glossary Category."), - UPDATED_RELATIONSHIP_FOR_GLOSSARYCATEGORY_EVENT (20, "UpdatedelationshipForGlossaryCategory", "Updated relationship for Glossary Category."), - DELETED_RELATIONSHIP_FOR_GLOSSARYCATEGORY_EVENT (21, "DeletedRelationshipForGlossaryCategory","Deleted relationship for Glossary Category."), - CLASSIFICATION_CHANGE_GLOSSARYCATERGORY_EVENT (22, "ClassifiedGlossaryCategory", "The classification associated with a Glossary Category has been changed."), - COMMENT_CHANGED_RELATING_TO_CATEGORY (23, "CommentChangedRelatingToGlossaryCategory", "A comment has been changed relating to a glossary category."), - RATING_CHANGED_RELATING_TO_CATEGORY (24, "RatingChangedRelatingToGlossaryCategory", "A rating has been changed relating to a glossary category."), - TAG_CHANGED_RELATING_TO_CATEGORY (25, "TagChangedRelatingToGlossaryCategory", "An informal tag has been changed relating to a glossary category."), - TODO_CHANGED_RELATING_TO_CATEGORY (26, "ToDoChangedRelatingToGlossaryCategory", "A ToDo has been changed relating to a glossary category."), - NOTE_CHANGED_RELATING_TO_CATEGORY (27, "NoteChangedRelatingToGlossaryCategory", "A note has been changed relating to a glossary category."), - MEETING_CHANGED_RELATING_TO_CATEGORY (28, "MeetingChangedRelatingToGlossaryCategory", "A meeting has been changed relating to a glossary category."), - COLLECTION_CHANGED_RELATING_TO_CATEGORY (29, "CollectionChangedRelatingToGlossaryCategory", "A collection has been changed relating to a glossary category."), - - // Glossary - NEW_GLOSSARY_EVENT (30, "NewGlossary", "A new Glossary has been defined."), - UPDATED_GLOSSARY_EVENT (31, "UpdatedGlossary", "An existing Glossary has been updated."), - DELETED_GLOSSARY_EVENT (32, "DeletedGlossary", "An existing Glossary has been deleted."), - CREATED_RELATIONSHIP_FOR_GLOSSARY_EVENT (33, "CreatedRelationshipForGlossary","Created Relationship for Glossary."), - UPDATED_RELATIONSHIP_FOR_GLOSSARY_EVENT (34, "UpdatedelationshipForGlossary", "Updated relationship for Glossary."), - DELETED_RELATIONSHIP_FOR_GLOSSARY_EVENT (35, "DeletedRelationshipForGlossary","Deleted relationship for Glossary."), - CLASSIFICATION_CHANGE_GLOSSARY_EVENT (36, "ClassifiedGlossaryCategory", "The classification associated with a Glossary has been changed."), - COMMENT_CHANGED_RELATING_TO_GLOSSARY (37, "CommentChangedRelatingToGlossary", "A comment has been changed relating to a glossary."), - RATING_CHANGED_RELATING_TO_GLOSSARY (38, "RatingChangedRelatingToGlossary", "A rating has been changed relating to a glossary."), - TAG_CHANGED_RELATING_TO_GLOSSARY (39, "TagChangedRelatingToGlossary", "An informal tag has been changed relating to a glossary."), - TODO_CHANGED_RELATING_TO_GLOSSARY (40, "ToDoChangedRelatingToGlossary", "A ToDo has been changed relating to a glossary."), - NOTE_CHANGED_RELATING_TO_GLOSSARY (41, "NoteChangedRelatingToGlossary", "A note has been changed relating to a glossary."), - MEETING_CHANGED_RELATING_TO_GLOSSARY (42, "MeetingChangedRelatingToGlossary", "A meeting has been changed relating to a glossary."), - COLLECTION_CHANGED_RELATING_TO_GLOSSARY (43, "CollectionChangedRelatingToGlossary","A collection has been changed relating to a glossary."); - - - //Assumption is that we do not need to listen out for relevant type updates or deletes. - private static final long serialVersionUID = 1L; - - private int eventTypeCode; - private String eventTypeName; - private String eventTypeDescription; - - - /** - * Default Constructor - sets up the specific values for this instance of the enum. - * - * @param eventTypeCode - int identifier used for indexing based on the enum. - * @param eventTypeName - string name used for messages that include the enum. - * @param eventTypeDescription - default description for the enum value - used when natural resource - * bundle is not available. - */ - SubjectAreaEventType(int eventTypeCode, String eventTypeName, String eventTypeDescription) - { - this.eventTypeCode = eventTypeCode; - this.eventTypeName = eventTypeName; - this.eventTypeDescription = eventTypeDescription; - } - - - /** - * Return the int identifier used for indexing based on the enum. - * - * @return int identifier code - */ - public int getEventTypeCode() - { - return eventTypeCode; - } - - - /** - * Return the string name used for messages that include the enum. - * - * @return String name - */ - public String getEventTypeName() - { - return eventTypeName; - } - - - /** - * Return the default description for the enum value - used when natural resource - * bundle is not available. - * - * @return String default description - */ - public String getEventTypeDescription() - { - return eventTypeDescription; - } -} - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaAssetEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaAssetEventContent.java deleted file mode 100644 index 7d2b49ff395..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaAssetEventContent.java +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - -import org.odpi.openmetadata.accessservices.subjectarea.events.GlossaryArtifactsType; -import org.odpi.openmetadata.accessservices.subjectarea.events.GlossaryArtifactsType; - -public class SubjectAreaAssetEventContent extends SubjectAreaEventContent{ - private GlossaryArtifactsType glossaryArtifactsType=null; - - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaCategoryEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaCategoryEventContent.java deleted file mode 100644 index 91a7bcfdbca..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaCategoryEventContent.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; - -public class SubjectAreaCategoryEventContent extends SubjectAreaEventContent{ - public Category getCategory() { - return this.category; - } - - public void setCategory(Category category) { - this.category = category; - } - - Category category = null; - - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaCommentEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaCommentEventContent.java deleted file mode 100644 index a0c21649831..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaCommentEventContent.java +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - -import org.odpi.openmetadata.accessservices.subjectarea.events.GlossaryArtifactsType; -import org.odpi.openmetadata.accessservices.subjectarea.events.GlossaryArtifactsType; - - -public class SubjectAreaCommentEventContent extends SubjectAreaEventContent{ - private GlossaryArtifactsType glossaryArtifactsType=null; - - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaEventContent.java deleted file mode 100644 index ad9e8566a8f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaEventContent.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - -public class SubjectAreaEventContent { - public String getGlossaryGuid() { - return glossaryGuid; - } - - public void setGlossaryGuid(String glossaryGuid) { - this.glossaryGuid = glossaryGuid; - } - - String glossaryGuid =null; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaGlossaryEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaGlossaryEventContent.java deleted file mode 100644 index dccf93d9c89..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaGlossaryEventContent.java +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; - -public class SubjectAreaGlossaryEventContent extends SubjectAreaEventContent{ - Glossary glossary = null; - - public Glossary getGlossary() { - return glossary; - } - - public void setGlossary(Glossary glossary) { - this.glossary = glossary; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaNoteEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaNoteEventContent.java deleted file mode 100644 index c9da2181d7a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaNoteEventContent.java +++ /dev/null @@ -1,39 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - - -import org.odpi.openmetadata.accessservices.subjectarea.events.GlossaryArtifactsType; -import org.odpi.openmetadata.accessservices.subjectarea.events.GlossaryArtifactsType; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Note; - - -public class SubjectAreaNoteEventContent extends SubjectAreaEventContent{ - private GlossaryArtifactsType glossaryArtifactsType=null; - private String glossaryArtifactGuid = null; - private Note note = null; - - public GlossaryArtifactsType getGlossaryArtifactsType() { - return glossaryArtifactsType; - } - - public void setGlossaryArtifactsType(GlossaryArtifactsType glossaryArtifactsType) { - this.glossaryArtifactsType = glossaryArtifactsType; - } - - public String getGlossaryArtifactGuid() { - return glossaryArtifactGuid; - } - - public void setGlossaryArtifactGuid(String glossaryArtifactGuid) { - this.glossaryArtifactGuid = glossaryArtifactGuid; - } - - public Note getNote() { - return note; - } - - public void setNote(Note note) { - this.note = note; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaRatingEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaRatingEventContent.java deleted file mode 100644 index 911196980ca..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaRatingEventContent.java +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - -import org.odpi.openmetadata.accessservices.subjectarea.events.GlossaryArtifactsType; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Rating; - -public class SubjectAreaRatingEventContent extends SubjectAreaEventContent{ - private GlossaryArtifactsType glossaryArtifactsType=null; - private String glossaryArtifactGuid = null; - private Rating rating =null; - - public GlossaryArtifactsType getGlossaryArtifactsType() { - return glossaryArtifactsType; - } - - public void setGlossaryArtifactsType(GlossaryArtifactsType glossaryArtifactsType) { - this.glossaryArtifactsType = glossaryArtifactsType; - } - - public String getGlossaryArtifactGuid() { - return glossaryArtifactGuid; - } - - public void setGlossaryArtifactGuid(String glossaryArtifactGuid) { - this.glossaryArtifactGuid = glossaryArtifactGuid; - } - - public Rating getRating() { - return rating; - } - - public void setRating(Rating rating) { - this.rating = rating; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaTermEventContent.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaTermEventContent.java deleted file mode 100644 index e4caed8fa35..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/events/content/SubjectAreaTermEventContent.java +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.events.content; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; - -public class SubjectAreaTermEventContent extends SubjectAreaEventContent{ - - Term term = null; - public Term getTerm() { - return term; - } - - public void setTerm(Term glossaryTerm) { - this.term = glossaryTerm; - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/README.md b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/README.md deleted file mode 100644 index 94ea3566998..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/README.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# SubjectArea OMAS FFDC - -Package org.odpi.openmetadata.accessservices.subjectarea.common.ffdc provides the -first failure data capture support for the SubjectArea OMAS module. -This includes an error code enum, -a runtime exception, a base class for checked exceptions plus -implementation of each specific checked exception. - -The error code enum (SubjectAreaErrorCode) has an entry for each unique situation -where an exception is returned. Each entry defines: - -* A unique id for the error -* An HTTP error code for rest calls -* A unique message Id -* Message text with place holders for specific values -* A description of the cause of the error and system action as a result. -* A description of how to correct the error (if known) - -Each exception (whether a checked or runtime exception) has two constructors. - -* The first constructor is used when a new error has been detected. - -* The second constructor is used when another exception has been caught. -This caught exception is passed on the constructor so it is effectively -embedded in the Subject Area OMAS exception. - -Both constructors take the values from the SubjectAreaErrorCode -enum to define the cause and resolution. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/SubjectAreaAuditCode.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/SubjectAreaAuditCode.java deleted file mode 100644 index dfe78030f09..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/SubjectAreaAuditCode.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - -/** - * The SubjectAreaAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *
    - *
  • Log Message Id - 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 SubjectAreaAuditCode implements AuditLogMessageSet -{ - /** - * The Subject Area Open Metadata Access Service (OMAS) is initializing a new server instance - */ - SERVICE_INITIALIZING("OMAS-SUBJECT_AREA-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The Subject Area Open Metadata Access Service (OMAS) is initializing a new server instance", - "The local server has started up a new instance of the Subject Area OMAS. " + - "This service enables tools to locate assets in the catalog, retrieve information about them" + - "and create open connectors to access the content of the assets. It also sends " + - "events on its out topic each time a new asset is created or updated.", - "No action is required as long as this service is expected to be started for this server. " + - "If it is not required, then remove the configuration for this service " + - "from the access service list in this server's configuration document."), - /** - * The Subject Area Open Metadata Access Service (OMAS) has initialized a new instance for a server. - */ - SERVICE_INITIALIZED("OMAS-SUBJECT_AREA-0003", - AuditLogRecordSeverityLevel.STARTUP, - "The Subject Area Open Metadata Access Service (OMAS) has initialized a new instance for server {0}", - "The access service has completed initialization of a new instance.", - "Verify that this service has initialized successfully. " + - "Investigate any reported errors. Also ensure that the enterprise repository " + - "services and the OCF metadata management services are initialized."), - /** - * The Subject Area Open Metadata Access Service (OMAS) is shutting down its instance for a server. - */ - SERVICE_SHUTDOWN("OMAS-SUBJECT_AREA-0004", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Subject Area Open Metadata Access Service (OMAS) is shutting down its instance for server {0}", - "The local administrator has requested shut down of an Subject Area OMAS instance.", - "No action is required if the server shutdown was intentional."), - /** - * The Subject Area Open Metadata Access Service (OMAS) is unable to initialize a new instance on a server. - */ - SERVICE_INSTANCE_FAILURE("OMAS-SUBJECT_AREA-0005", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Subject Area Open Metadata Access Service (OMAS) is unable to initialize a new instance in server {0}; the {1} exception " + - "occurred with error message: {2}", - "The access service detected an error during the start up of a specific server instance. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - /** - * The Open Metadata Service has generated an unexpected exception. - */ - UNEXPECTED_EXCEPTION("OMAS-SUBJECT_AREA-0006", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2}", - "The request returns a SubjectAreaCheckedException.", - "This is probably a logic error. Review the stack trace to identify where the error " + - "occurred and work to resolve the cause.") - - - ; - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor for SubjectAreaAuditCode expects to be passed one of the enumeration rows defined in - * SubjectAreaAuditCode above. For example: - * SubjectAreaAuditCode auditCode = SubjectAreaAuditCode.SERVER_NOT_AVAILABLE; - * This will expand out to the 5 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 - */ - SubjectAreaAuditCode(String messageId, - AuditLogRecordSeverityLevel 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 "AuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/SubjectAreaErrorCode.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/SubjectAreaErrorCode.java deleted file mode 100644 index 87f4533fedb..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/SubjectAreaErrorCode.java +++ /dev/null @@ -1,386 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The SubjectAreaErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with - * the Subject Area OMAS 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:
  • - *
    • - *
    • 500 - internal error
    • - *
    • 400 - invalid parameters
    • - *
    • 404 - not found
    • - *
    • 409 - data conflict errors - eg item already defined
    • - *
  • - *
  • Error Message Id - 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 SubjectAreaInterface should correct the error
  • - *
- */ -public enum SubjectAreaErrorCode implements ExceptionMessageSet { - SERVER_URL_NOT_SPECIFIED(400, "OMAS-SUBJECT-AREA-400-001", - "The OMAG Server Platform root URL is null", - "The system is unable to connect to the OMAG Server to retrieve metadata properties as the server url was not specified.", - "Ensure a valid OMAG Server Platform root URL is passed to the Subject Area OMAS when it is created."), - NULL_USER_ID(400, "OMAS-SUBJECT-AREA-400-002", - "The user identifier (user id) passed on the {0} operation is null", - "The system is unable to process the request without a user id.", - "Correct the code in the caller to provide the user id."), - NULL_GUID(400, "OMAS-SUBJECT-AREA-400-003", - "The unique identifier (userId) passed on the {0} parameter of the {1} operation is null", - "The system is unable to process the request without a userId.", - "Correct the code in the caller to provide the userId."), - NULL_NAME(400, "OMAS-SUBJECT-AREA-400-004", - "The name passed on the {0} parameter of the {1} operation is null", - "The system is unable to process the request without a name.", - "Correct the code in the caller to provide the name."), - GUID_DOES_NOT_EXIST(400, "OMAS-SUBJECT-AREA-400-005", - "The unique identifier (userId) {0} passed on the {1} operation does not exist in the metadata repository", - "The system is unable to process the request without a userId that exists.", - "Correct the code in the caller to provide a userId that exists on the metadata server."), - USER_NOT_AUTHORIZED(400, "OMAS-SUBJECT-AREA-400-006", - "User {0} is not authorized to issue the {1} request for open metadata access service {2} on org.odpi.openmetadata.accessservices.subjectarea.server {3}", - "The system is unable to process the request.", - "Verify the access rights of the user."), - METADATA_SERVER_UNCONTACTABLE_ERROR(400, "OMAS-SUBJECT-AREA-400-007", - "An unexpected error with message {0} was returned by the property org.odpi.openmetadata.accessservices.subjectarea.server during {1} request for open metadata access service {2} on org.odpi.openmetadata.accessservices.subjectarea.server {3}", - "The system is unable to process the request as the metadata server in not contactable.", - "Contact your admin to correct configuration to enable the Metadata server to be contacted."), - CREATE_WITHOUT_GLOSSARY(400, "OMAS-SUBJECT-AREA-400-008", - "Cannot continue with {0} without a glossary", - "The system is unable to process the request as the create requires a Glossary to be passed.", - "Correct the code in the caller to create with a glossary."), - GLOSSARY_TERM_CREATE_WITHOUT_NAME(400, "OMAS-SUBJECT-AREA-400-009", - "Cannot create a Term without a name", - "The system is unable to process a term create request without a name.", - "Correct the code in the caller to create a Term with a name."), - GLOSSARY_CATEGORY_CREATE_WITHOUT_NAME(400, "OMAS-SUBJECT-AREA-400-010", - "Cannot create a Category without a name", - "The system is unable to process a category create request without a name.", - "Correct the code in the caller to create a Category with a name."), - GLOSSARY_TERM_CREATE_WITH_CATEGORIES(400, "OMAS-SUBJECT-AREA-400-011", - "Cannot create a Glossary Term {0} with categories", - "The system is unable to process a Term create request specifying categories.", - "Correct the code in the caller to remove the categories. Knit the term into categories after it has been created."), - GLOSSARY_TERM_UPDATE_WITH_CATEGORIES(400, "OMAS-SUBJECT-AREA-400-013", - "Cannot update a Glossary Term {0} with categories", - "The system is unable to update a term with categories .", - "Correct the code in the caller to remove the categories."), - GLOSSARY_PROJECT_CREATE_WITHOUT_NAME(400, "OMAS-SUBJECT-AREA-400-015", - "Cannot create a Project without a name", - "The system is unable to create a glossary project without a name.", - "Correct the code in the caller to create a Project with a name."), - INVALID_PROJECT_DELETION(400, "OMAS-SUBJECT-AREA-400-016", - "Cannot delete Project as it was not intended for glossary use.", - "The system is unable to delete a project that is not a glossary project.", - "Correct the code in the caller to only delete Glossary Projects."), - CREATE_WITH_GLOSSARY_RELATIONSHIP(400, "OMAS-SUBJECT-AREA-400-017", - "Glossary relationship with userId {0} supplied on a create. The relationship cannot exist prior to the relationship end being created.", - "The system is unable to proceed with the create request, as it has unexpectly found a relationship to a glossary already exists.", - "Raise a Git issue indicating that OMAS-SUBJECT-AREA-400-017 has been issued."), - CREATE_WITH_NON_EXISTANT_GLOSSARY_GUID(400, "OMAS-SUBJECT-AREA-400-018", - "Glossary with guid {0} does not exist. Cannot create without a glossary", - "The system is unable to process create request as the supplied glossary userId does not exist.", - "Correct the code in the caller to create with a valid glossary userId."), - GLOSSARY_TERM_CREATE_WITH_PROJECTS(400, "OMAS-SUBJECT-AREA-400-019", - "Cannot create a Glossary Term {0} with projects", - "The system is unable to process the Term create request with projects.", - "Correct the code in the caller to remove the projects. Knit the term into a project after the term has been created."), -// GLOSSARY_CATEGORY_CREATE_WITH_NON_EXISTANT_GLOSSARY(400, "OMAS-SUBJECT-AREA-400-020", -// "Glossary with name {0} does not exist. Cannot create a Category without a glossary", -// "The system is unable to process the request.", -// "Correct the code in the caller to create a Category with a valid glossaryName."), - GLOSSARY_TERM_CREATE_FAILED_ADDING_CLASSIFICATIONS(400, "OMAS-SUBJECT-AREA-400-021", - "Term creation with name {0} failed, because it was unable to create its classifications", - "The system has deleted the Glossary term and is unable to process the request.", - "Retry the Glossary Term creation with correct classifications."), - GLOSSARY_CREATE_FAILED_ADDING_CLASSIFICATIONS(400, "OMAS-SUBJECT-AREA-400-022", - "Glossary creation with name {0} failed, because it was unable to create its classifications", - "The system has deleted the Glossary and is unable to process the requested classifications.", - "Retry the Glossary creation with valid classifications."), - GLOSSARY_CONTENT_PREVENTED_DELETE(400, "OMAS-SUBJECT-AREA-400-023", - "Glossary (guid {0}) deletion failed, because there is glossary content", - "The system is unable to process the glossary delete becase the glossary has content.", - "Retry the Glossary deletion when it is is empty."), - GLOSSARY_CATEGORY_CREATE_FAILED_ADDING_CLASSIFICATIONS(400, "OMAS-SUBJECT-AREA-400-024", - "Category creation with name {0} failed, because it was unable to create its classifications", - "The system has deleted the Glossary category and is unable to add the requested classifications .", - "Retry the Glossary Category creation with valid classifications."), - GLOSSARY_CATEGORY_CREATE_FAILED_KNITTING_TO_GLOSSARY(400, "OMAS-SUBJECT-AREA-400-025", - "Glossary Category creation with name {0} failed, because it was unable to create the relationship with its Glossary", - "The system has deleted the Glossary category and is unable to create a relationship to the requested glossary.", - "Retry the Glossary Category creation with a valid glossary."), - CATEGORY_UPDATE_FAILED_ON_DELETED_CATEGORY(400, "OMAS-SUBJECT-AREA-400-028", - "Glossary Category update with failed, because the category has been deleted.", - "The system is unable to process the Category update request - becase the category has already been deleted..", - "Retry the Glossary Category update against a category that has not been deleted."), - GLOSSARY_UPDATE_FAILED_ON_DELETED_GLOSSARY(400, "OMAS-SUBJECT-AREA-400-029", - "Glossary update with failed, because the glossary has been deleted.", - "The system is unable to process the glossary update request, because the glossary has been deleted..", - "Retry the Glossary update against a glossary that has not been deleted."), - TERM_UPDATE_FAILED_ON_DELETED_TERM(400, "OMAS-SUBJECT-AREA-400-030", - "Term update with failed, because the term has been deleted.", - "The system is unable to process the Term update request, because the Term has been deleted.", - "Retry the term update against a term that has not been deleted."), - TYPEDEF_NOT_KNOWN(400, "OMAS-SUBJECT-AREA-400-031", - "A request {0} has been made for type {1} which is not known.", - "The system is unable to process the request with an unknown TypeDef", - "Look into whether the typename was correctly specified."), - TYPEDEF_ERROR(400, "OMAS-SUBJECT-AREA-400-032", - "An error occurred when processing a request {0}; the instance is not associated with a known type.", - "The system is unable to process the request as there was an error associated with the requested type.", - "Correct the call so that the Typedef is well valid."), - ENTITY_NOT_KNOWN_ERROR(400, "OMAS-SUBJECT-AREA-400-033", - "An error occurred when processing a request {0} involving entity {1}.", - "The system is unable to process the request because the entity was not known.", - "Retry the request with a known entity."), - RELATIONSHIP_NOT_KNOWN_ERROR(400, "OMAS-SUBJECT-AREA-400-034", - "An error occurred when processing a request {0} involving relationship {1} .", - "The system is unable to process the request for the relationship, because it is not known.", - "Retry the request with a known relationship."), - - // The following Exceptions are not descriptive enough - they need more information from the OMRS Exception - INVALID_PARAMETER(400, "OMAS-SUBJECT-AREA-400-035", - "Invalid parameter processing request {0}.", - "The system is unable to process the request due to an invalid parameter.", - "Please correct the parameter and retry."), - CLASSIFICATION_ERROR(400, "OMAS-SUBJECT-AREA-400-036", - "Invalid classification processing request {0}.", - "The system is unable to process the request due to a classification error.", - "Please correct the classification and retry."), - STATUS_NOT_SUPPORTED_ERROR(400, "OMAS-SUBJECT-AREA-400-037", - "Status not supported occurred processing request {0}.", - "The system is unable to process the request because the requested status is not supported", - "Please correct the status and retry."), - FUNCTION_NOT_SUPPORTED(400, "OMAS-SUBJECT-AREA-400-038", - "Function not supported occurred processing request {0}.", - "The system is unable to process the request, as the requested function is not supported.", - "Please so not use this function as it is unsupported."), - PAGING_ERROR(400, "OMAS-SUBJECT-AREA-400-039", - "Paging error occurred processing request {0}.", - "The system is unable to process the request due to a paging error.", - "Please retry the request with different paging options."), - SUBJECT_AREA_FAILED_TO_INITIALISE(400, "OMAS-SUBJECT-AREA-400-040", - "An error occurred when initializing the subject area client .", - "The system is unable to initialize the subject area client, because it failed to connect to the omas server.", - "Retry the request with a known available server name and url."), - - // End of The following Exception - - - CLIENT_RECEIVED_AN_UNEXPECTED_RESPONSE_ERROR(400, "OMAS-SUBJECT-AREA-400-043", - "Received unexpected response category {0} from the server.", - "The system is unable to process the request as it has received an unexpected error response.", - "Contact your administrator to review the audit log to find the cause of the unexpected error."), - - INVALID_STATUS_VALUE_SUPPLIED(400, "OMAS-SUBJECT-AREA-400-0045", - "A status value {0} was supplied - but this is not a valid status", - "The system is unable to process the request with invalid parameters.", - "Correct the code in the caller to provide a valid status."), - STATUS_UPDATE_TO_DELETED_NOT_ALLOWED(400, "OMAS-SUBJECT-AREA-400-0046", - "A status was attempted to be updated to deleted, this is not permitted.", - "The system is unable to process the request to change the status to deleted.", - "Correct the code in the caller to provide a valid status. Use delete call to change status to deleted."), - - GLOSSARY_CREATE_WITHOUT_NAME(400, "OMAS-SUBJECT-AREA-400-049", - "Cannot create a Glossary without a name", - "The system is unable to process the Glossary create request without a name.", - "Correct the code in the caller to create a Glossary with a name."), - - UNABLE_TO_PARSE_SUPPLIED_JSON(400, "OMAS-SUBJECT-AREA-400-0054", - "Unable to parse the supplied json.", - "The system is unable to process the request because it cannot parse the json.", - "Correct the code in the caller to provide a valid json."), - INVALID_NODETYPE(400, "OMAS-SUBJECT-AREA-400-057", - "The nodeType passed is not valid for this operation", - "The system is unable to process the request with an invalid node type.", - "Correct the code in the caller to provide a valid NodeType"), - UNEXPECTED_NODETYPE(400, "OMAS-SUBJECT-AREA-400-058", - "The returned nodeType {0} did not equal the requested nodeType {1}", - "The system returned an unexpected node type in the response.", - "Raise a github issue on the system indicating that you received message OMAS-SUBJECT-AREA-400-058."), - - GUID_NOT_DELETED_ERROR(400, "OMAS-SUBJECT-AREA-400-060", - "A restore was issued for userId {0}, but the status was not deleted. Restores can only succeed after a soft delete.", - "The system returns the not deleted response.", - "Issue a soft delete prior to attempting a restore."), - ERROR_ENCODING_QUERY_PARAMETER(400, "OMAS-SUBJECT-AREA-400-064", - "An error occurred when attempting to encode the value of Query parameter {0}", - "The client is unable to send the rest call as the supplied query parameter {0} cannot be encoded.", - "Correct the code in the caller to supply a query parameter that can be encoded."), - MAPPER_ENTITY_GUID_TYPE_ERROR(400, "OMAS-SUBJECT-AREA-400-065", - "An error occurred because userId {0} has type {1} but was expected to have type {2} ,", - "The server is unable to continue the call.", - "Correct the code in the caller to supply a userId that corresponds to appropriate type."), - MAPPER_RELATIONSHIP_GUID_TYPE_ERROR(400, "OMAS-SUBJECT-AREA-400-066", - "An error occurred because userId {0} is not a {1} so the Relationship cannot be mapped to a {1} ,", - "The server is unable to continue the call as the supplied relationship userId is not associated with the expected type.", - "Correct the code in the caller to supply a userId that corresponds to relationship type {1}."), - RELATIONSHIP_UPDATE_ATTEMPTED_WITH_NO_PROPERTIES(400, "OMAS-SUBJECT-AREA-400-067", - "Cannot update a relationship if no properties are supplied", - "The system is unable to process the relationship update request as no properties were supplied.", - "Correct the code in the caller to only issue updates if there is something to update."), - SERVER_NAME_NOT_SPECIFIED(400, "OMAS-SUBJECT-AREA-400-069", - "The OMAG server name is null", - "The system is unable to connect to the OMAG Server to retrieve metadata properties as the server name was not specified.", - "Ensure a valid OMAG Server name is passed to the Subject Area OMAS when it is created."), - UNEXPECTED_EXCEPTION(400, "OMAS-SUBJECT-AREA-400-070", - "An unexpected Exception occurred. The Exception message is {0}.", - "The system encountered an unexpected exception.", - "Review the exception message to assess whether this is a logic error, in which case raise a git issue against Egeria, or a resource constraint - in which case address that issue."), - BAD_OUT_TOPIC_CONNECTION(400, "OMAS-SUBJECT-AREA-400-071", - "The Subject Area Open Metadata Access Service (OMAS) has been passed an invalid connection for publishing events. The connection was {0}. The resulting exception of {1} included the following message: {2}", - "The access service has not been passed valid configuration for its out topic connection.", - "Correct the topic configuration and restart the server."), - PROJECT_CONTENT_PREVENTED_DELETE(400, "OMAS-SUBJECT-AREA-400-072", - "Project (guid {0}) deletion failed, because there is project content", - "The system is unable to process the project delete because the project has content.", - "Retry the Project deletion when it is is empty."), - TERM_CREATE_WITH_BAD_CATEGORIES(400, "OMAS-SUBJECT-AREA-400-073", - "Cannot continue with create with the supplied Categories, as they do not exist", - "The system is unable to process the request as the Term create requires the supplied Categories to exist.", - "Correct the code in the caller to create Terms specifying not categories opr existing categories."), - INVALID_RELATIONSHIPTYPES_FOR_GRAPH(400, "OMAS-SUBJECT-AREA-400-076", - "Cannot continue with the {0} operation because an invalid relationship name {1} was supplied in the filter", - "The system is unable to process the request as it cannot identify the requested Relationship type.", - "Amend the code to supply only valid Relationship Types for the graph operation."), - UNKNOWN_RELATIONSHIPTYPE_REQUESTED_FOR_GRAPH(400, "OMAS-SUBJECT-AREA-400-077", - "Cannot continue with the {0} operation because there is the Unknown relationship name {1} was supplied in the filter", - "The system is unable to process the request as it cannot identify the requested Unknown Relationship type.", - "Amend the code to supply only known Relationship Types for the graph operation."), - OMRS_NOT_INITIALIZED(404, "OMAS-SUBJECT-AREA-404-001", - "The open metadata repository services are not initialized for the {0} operation", - "The system is unable to connect to the open metadata property server.", - "Check that the server where the Subject Area OMAS is running initialized correctly." + - "Correct any errors discovered and retry the request when the open metadata services are available."), - OMRS_NOT_AVAILABLE(404, "OMAS-SUBJECT-AREA-404-002", - "The open metadata repository services are not available for the {0} operation", - "The system is unable to connect to the open metadata server.", - "Check that the server where the Subject Area OMAS is running initialized OMRS correctly." + - "Correct any errors discovered and retry the request when the open metadata services are available."), - NO_METADATA_COLLECTION(404, "OMAS-SUBJECT-AREA-404-003", - "The requested connection {0} is not found in OMAG Server {1}", - "The system is unable to populate the requested connection object.", - "Check that the connection name and the OMAG Server Platform URL is correct. Retry the request when the connection is available in the" + - " OMAS Service"), - - NULL_CONNECTION_RETURNED(500, "OMAS-SUBJECT-AREA-500-001", - "The requested connection named {0} is not returned by the open metadata Server {1}", - "The system is unable to create a connector because the OMAG Server is not returning the Connection properties.", - "Verify that the OMAG server running and the connection definition is correctly " + - "configured."), - NULL_CONNECTOR_RETURNED(500, "OMAS-SUBJECT-AREA-500-002", - "The requested connector for connection named {0} is not returned by the OMAG Server {1}", - "The system is unable to create a connector.", - "Verify that the server is running and the connection definition is correctly configured."), - NULL_RESPONSE_FROM_API(503, "OMAS-SUBJECT-AREA-503-001", - "A null response was received from REST API call {0} to server {1}", - "The system has issued a call to an open metadata access service REST API in a remote server and has received a null response.", - "Look for errors in the remote server's audit log and console to understand and correct the source of the error."), - CLIENT_SIDE_REST_API_ERROR(503, "OMAS-SUBJECT-AREA-503-002", - "A client-side exception was received from API call {0} to repository {1}. The error message was {2}", - "The server 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. This could be due to the url being incorrect or the server not being up."), - CLIENT_SIDE_API_REST_RESPONSE_ERROR(503, "OMAS-SUBJECT-AREA-503-003", - "The rest call successfully completed, but the response content could not be interpreted for API call {0} to repository {1}. The error message was {2}", - "REST API in a remote server completed, but the response returned was not as expected.", - "Look for errors in the local server's console to understand and correct the source of the error."), - SERVICE_NOT_INITIALIZED(504, "OMAS-SUBJECT-AREA-503-004", - "The access service has not been initialized and can not support REST API call {0}", - "The server has received a call to one of its open metadata access services but is unable to process it because the access service is " + - "not active.", - "If the server is supposed to have this access service activated, correct the server configuration and restart the server."), - NOT_FOUND_CLIENT(500, "OMAS-SUBJECT-AREA-500-003", - "Not found client for {0}.", - "During a method call `getClient` the cache could not find a client instance for this class.", - "Check if the type passed to the getClient method is correct. Check if a client has been created for this type.") - ; - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - SubjectAreaErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/ClassificationException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/ClassificationException.java deleted file mode 100644 index a3a17348919..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/ClassificationException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The ClassificationException is thrown by the Subject Area OMAS when an error occurs during a classification - * value. - */ -public class ClassificationException extends SubjectAreaCheckedException { - /** - * This is the typical constructor used for creating a ClassificationException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public ClassificationException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the constructor used for creating an ClassificationException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - */ - public ClassificationException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError) { - super(messageDefinition, className, actionDescription, caughtError); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/EntityNotDeletedException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/EntityNotDeletedException.java deleted file mode 100644 index 9a78b40ad0b..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/EntityNotDeletedException.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The EntityNotDeletedException is thrown by the Subject Area OMAS when an entity is not deleted - * value. - */ - -public class EntityNotDeletedException extends GuidOrientatedException { - - /** - * This is the typical constructor used for creating an EntityNotDeletedException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param guid the guid of the entity that was not deleted - */ - public EntityNotDeletedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - String guid) { - super(messageDefinition, className, actionDescription, guid); - } - - - /** - * This is the constructor used for creating an UnrecognizedGUIDException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - * @param guid the guid of the entity that was not deleted - */ - public EntityNotDeletedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError, - String guid) { - super(messageDefinition, className, actionDescription, caughtError, guid); - } - -} - - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/FunctionNotSupportedException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/FunctionNotSupportedException.java deleted file mode 100644 index 206d663760f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/FunctionNotSupportedException.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The FunctionNotSupportedException is thrown by the Subject Area OMAS when a function is not supported - * value. - */ -public class FunctionNotSupportedException extends SubjectAreaCheckedException -{ - /** - * This is the typical constructor used for creating an FunctionNotSupportedException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public FunctionNotSupportedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) - { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the constructor used for creating an FunctionNotSupportedException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - */ - public FunctionNotSupportedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError) - { - super(messageDefinition, className, actionDescription, caughtError); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/GuidOrientatedException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/GuidOrientatedException.java deleted file mode 100644 index d3461863634..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/GuidOrientatedException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The GuidOrientatedException is thrown by the Subject Area OMAS when an error occurs that has an associated guid. - */ -public class GuidOrientatedException extends SubjectAreaCheckedException { - private final String guid; - - /** - * This is the typical constructor used for creating a GuidOrientatedException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param guid guid associated with this Exception - */ - public GuidOrientatedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - String guid) { - super(messageDefinition, className, actionDescription); - this.guid = guid; - } - - - /** - * This is the constructor used for creating an GuidOrientatedException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - * @param guid guid associated with this Exception - */ - public GuidOrientatedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError, - String guid) { - super(messageDefinition, className, actionDescription, caughtError); - this.guid = guid; - } - - public String getGuid() { - return guid; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/InvalidParameterException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/InvalidParameterException.java deleted file mode 100644 index ac486423ebc..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/InvalidParameterException.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -import java.io.Serial; -import java.util.Map; - -/** - * The InvalidParameterException is thrown by the Subject Area OMAS when a parameter is null or an invalid - * value. - */ -public class InvalidParameterException extends SubjectAreaCheckedException { - @Serial - private static final long serialVersionUID = 1L; - - /** - * invalid property name - * - * @return invalid property name - */ - public String getInvalidPropertyName() { - return invalidPropertyName; - } - - /** - * invalid property value - * - * @return in valid property value - */ - public String getInvalidPropertyValue() { - return invalidPropertyValue; - } - - private String invalidPropertyName; - private String invalidPropertyValue; - private Map relatedProperties; - - /** - * This is the typical constructor used for creating an InvalidParameterException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param invalidPropertyName invalidPropertyName if there is one - * @param invalidPropertyValue invalidPropertyValue if there is one - */ - public InvalidParameterException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - String invalidPropertyName, - String invalidPropertyValue) { - super(messageDefinition, className, actionDescription); - - this.invalidPropertyName = invalidPropertyName; - this.invalidPropertyValue = invalidPropertyValue; - } - - - /** - * This is the constructor used for creating an InvalidParameterException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - * @param invalidPropertyName invalidPropertyName if there is one - * @param invalidPropertyValue invalidPropertyValue if there is one - */ - public InvalidParameterException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError, - String invalidPropertyName, - String invalidPropertyValue) { - super(messageDefinition, className, actionDescription, caughtError); - this.invalidPropertyName = invalidPropertyName; - this.invalidPropertyValue = invalidPropertyValue; - messageDefinition.setMessageParameters(invalidPropertyName, invalidPropertyValue); - } - - public Map getRelatedProperties() { - return relatedProperties; - } - - public void setRelatedProperties(Map relatedProperties) { - this.relatedProperties = relatedProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/MetadataServerUncontactableException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/MetadataServerUncontactableException.java deleted file mode 100644 index 1a478b7c04e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/MetadataServerUncontactableException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The MetadataServerUncontactableException is thrown by the Subject Area OMAS when the OMAG server cannot be contacted - * value. - */ -public class MetadataServerUncontactableException extends SubjectAreaCheckedException { - /** - * This is the typical constructor used for creating a MetadataServerUncontactableException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public MetadataServerUncontactableException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the constructor used for creating an MetadataServerUncontactableException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - */ - public MetadataServerUncontactableException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError) { - super(messageDefinition, className, actionDescription, caughtError); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/PropertyServerException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/PropertyServerException.java deleted file mode 100644 index 58f9d85b388..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/PropertyServerException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The PropertyServerException is thrown by the Subject Area OMAS when there isa property server error - * value. - */ -public class PropertyServerException extends SubjectAreaCheckedException { - /** - * This is the typical constructor used for creating a PropertyServerException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public PropertyServerException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the constructor used for creating an PropertyServerException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - */ - public PropertyServerException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError) { - super(messageDefinition, className, actionDescription, caughtError); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/StatusNotSupportedException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/StatusNotSupportedException.java deleted file mode 100644 index 99284ea2536..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/StatusNotSupportedException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The StatusNotSupportedException is thrown by the Subject Area OMAS when a status is not supported - * value. - */ -public class StatusNotSupportedException extends SubjectAreaCheckedException { - /** - * This is the typical constructor used for creating a StatusNotSupportedException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public StatusNotSupportedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the constructor used for creating a StatusNotSupportedException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - */ - public StatusNotSupportedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError) { - super(messageDefinition, className, actionDescription, caughtError); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/SubjectAreaCheckedException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/SubjectAreaCheckedException.java deleted file mode 100644 index 843aee183c5..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/SubjectAreaCheckedException.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - -import org.odpi.openmetadata.commonservices.ffdc.exceptions.OMAGCheckedExceptionBase; -import org.odpi.openmetadata.frameworks.auditlog.MessageFormatter; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -import java.io.Serial; -import java.util.Map; - -/** - * SubjectAreaCheckedException provides a checked exception for reporting errors found when using - * the Subject Area OMAS services. - * Typically these errors are either configuration or operational errors that can be fixed by an administrator - * However, there may be the odd bug that surfaces here. - * The SubjectAreaErrorCode can be used with this exception to populate it with standard messages. - * The aim is to be able to uniquely identify the cause and remedy for the error. - */ -public class SubjectAreaCheckedException extends OMAGCheckedExceptionBase { - - @Serial - private static final long serialVersionUID = 1L; - - - /** - * This is the typical constructor used for creating an SubjectAreaCheckedException. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public SubjectAreaCheckedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the typical constructor used for creating an SubjectAreaCheckedException. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param relatedProperties arbitrary properties that may help with diagnosing the problem. - */ - public SubjectAreaCheckedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Map relatedProperties) { - super(messageDefinition, className, actionDescription, relatedProperties); - } - - - /** - * This is the constructor used for creating an SubjectAreaCheckedException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - */ - public SubjectAreaCheckedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError) { - super(messageDefinition, className, actionDescription, caughtError); - } - - - /** - * This is the constructor used for creating an SubjectAreaCheckedException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - * @param relatedProperties arbitrary properties that may help with diagnosing the problem. - */ - public SubjectAreaCheckedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError, - Map relatedProperties) { - super(messageDefinition, className, actionDescription, caughtError, relatedProperties); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/UnrecognizedGUIDException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/UnrecognizedGUIDException.java deleted file mode 100644 index 40179b4c5ed..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/UnrecognizedGUIDException.java +++ /dev/null @@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The UnrecognizedGUIDException is thrown by the Subject Area OMAS when the unique identifier (guid) - * used to request an object is either unrecognized, or is the identifier for a different type of object. - */ -public class UnrecognizedGUIDException extends GuidOrientatedException { - - /** - * This is the typical constructor used for creating an UnrecognizedGUIDException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param guid unrecognised guid - */ - public UnrecognizedGUIDException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - String guid) { - super(messageDefinition, className, actionDescription, guid); - } - - - /** - * This is the constructor used for creating an UnrecognizedGUIDException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - * @param guid unrecognised guid - */ - public UnrecognizedGUIDException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError, - String guid) { - super(messageDefinition, className, actionDescription, caughtError, guid); - } - -} - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/UserNotAuthorizedException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/UserNotAuthorizedException.java deleted file mode 100644 index 0a92673da9d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/UserNotAuthorizedException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * The UserNotAuthorizedException is thrown by the Subject Area OMAS when a userId passed on a request is not - * authorized to perform the requested action. - */ -public class UserNotAuthorizedException extends SubjectAreaCheckedException { - private String userId = null; - - /** - * This is the typical constructor used for creating an UserNotAuthorizedException - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param userId userId associated with this Exception - */ - public UserNotAuthorizedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - String userId) { - super(messageDefinition, className, actionDescription); - this.userId = userId; - } - - - /** - * This is the constructor used for creating an UserNotAuthorizedException when an unexpected error has been caught. - * The properties allow additional information to be associated with the exception. - * - * @param messageDefinition content of the message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError previous error causing this exception - * @param userId userId associated with this Exception - */ - public UserNotAuthorizedException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Exception caughtError, - String userId) { - super(messageDefinition, className, actionDescription, caughtError); - this.userId = userId; - } - - public String getUserId() { - return userId; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/AbstractConcept.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/AbstractConcept.java deleted file mode 100644 index 8862f482cb7..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/AbstractConcept.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies that this glossary term describes an abstract concept. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbstractConcept extends Classification { - private static final Logger log = LoggerFactory.getLogger(AbstractConcept.class); - private static final String className = AbstractConcept.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public AbstractConcept() { - super.classificationName = "AbstractConcept"; - } - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ActivityDescription.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ActivityDescription.java deleted file mode 100644 index 0025efb2685..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ActivityDescription.java +++ /dev/null @@ -1,96 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.ActivityType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies that this glossary term describes an activity. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ActivityDescription extends Classification { - private static final Logger log = LoggerFactory.getLogger(ActivityDescription.class); - private static final String className = ActivityDescription.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "activityType", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - "activityType", - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public ActivityDescription() { - super.classificationName = "ActivityDescription"; - } - - private ActivityType activityType; - - /** - * {@literal Classification of the activity. } - * - * @return {$$PropertyTypeJavadoc$$ } - */ - public ActivityType getActivityType() { - return this.activityType; - } - - public void setActivityType(ActivityType activityType) { - this.activityType = activityType; - } - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/CanonicalVocabulary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/CanonicalVocabulary.java deleted file mode 100644 index 8dec96ed6ee..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/CanonicalVocabulary.java +++ /dev/null @@ -1,105 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a glossary that contains unique terms. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class CanonicalVocabulary extends Classification { - private static final Logger log = LoggerFactory.getLogger(CanonicalVocabulary.class); - private static final String className = CanonicalVocabulary.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "scope", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - "scope", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public CanonicalVocabulary() { - super.classificationName = "CanonicalVocabulary"; - } - - private String scope; - - /** - * {@literal Scope of influence for this canonical glossary. } - * - * @return Scope of influence for this canonical glossary - */ - public String getScope() { - return this.scope; - } - - public void setScope(String scope) { - this.scope = scope; - } - - /** - * Canonical Vocabulary property names - * - * @return Set of Strings of the Canonical Vocabulary property names - */ - public static Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Classification.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Classification.java deleted file mode 100644 index 674fdb94f1b..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Classification.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.OmasObject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes; - -import java.io.Serializable; -import java.util.Date; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A Classification - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Classification implements Serializable, OmasObject { - protected static final long serialVersionUID = 1L; - - //system attributes - private SystemAttributes systemAttributes = null; - private Date effectiveFromTime = null; - private Date effectiveToTime = null; - private Map additionalProperties; - - protected String classificationName = null; - - public Classification() {} - - /** - * Get the core attributes - * - * @return core attributes - */ - public SystemAttributes getSystemAttributes() { - return systemAttributes; - } - - public void setSystemAttributes(SystemAttributes systemAttributes) { - this.systemAttributes = systemAttributes; - } - - /** - * Return the date/time that this node should start to be used (null means it can be used from creationTime). - * - * @return Date the node becomes effective. - */ - public Date getEffectiveFromTime() { - return effectiveFromTime; - } - - public void setEffectiveFromTime(Date effectiveFromTime) { - this.effectiveFromTime = effectiveFromTime; - } - - /** - * Return the date/time that this node should no longer be used. - * - * @return Date the node stops being effective. - */ - public Date getEffectiveToTime() { - return effectiveToTime; - } - - public void setEffectiveToTime(Date effectiveToTime) { - this.effectiveToTime = effectiveToTime; - } - - public String getClassificationName() { - return this.classificationName; - } - - /** - * Get the additional properties - ones that are in addition to the standard types. - * - * @return additional properties - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Confidence.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Confidence.java deleted file mode 100644 index d3491aee121..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Confidence.java +++ /dev/null @@ -1,196 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.ConfidenceLevel; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.GovernanceClassificationStatus; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the level of confidence that should be placed in the accuracy of related data items. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Confidence extends Classification { - private static final Logger log = LoggerFactory.getLogger(Confidence.class); - private static final String className = Confidence.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "status", - "confidence", - "steward", - "source", - "notes", - "level", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - "confidence", - "steward", - "source", - "notes", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - "status", - "level", - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public Confidence() { - super.classificationName = "Confidence"; - } - - private GovernanceClassificationStatus status; - - /** - * {@literal Status of this classification. } - * - * @return Status of this classification. - */ - public GovernanceClassificationStatus getStatus() { - return this.status; - } - - public void setStatus(GovernanceClassificationStatus status) { - this.status = status; - } - - - private Integer confidence; - - /** - * {@literal Level of confidence in the classification (0=none -> 100=excellent). } - * - * @return Level of confidence in the classification - */ - public Integer getConfidence() { - return this.confidence; - } - - public void setConfidence(Integer confidence) { - this.confidence = confidence; - } - - - private String steward; - - /** - * {@literal Person responsible for maintaining this classification. } - * - * @return Person responsible for maintaining this classification. - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - - private String source; - - /** - * {@literal Source of the classification. } - * - * @return Source of the classification. - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - - private String notes; - - /** - * {@literal Information relating to the classification. } - * - * @return Information relating to the classification. - */ - public String getNotes() { - return this.notes; - } - - public void setNotes(String notes) { - this.notes = notes; - } - - - private ConfidenceLevel level; - - /** - * {@literal Level of confidence in the quality of this data. } - * - * @return Level of confidence in the quality of this data. - */ - public ConfidenceLevel getLevel() { - return this.level; - } - - public void setLevel(ConfidenceLevel level) { - this.level = level; - } - - /** - * Confidence property names - * - * @return Set of Strings of the Confidence property names - */ - public static Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Confidentiality.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Confidentiality.java deleted file mode 100644 index d2fde753712..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Confidentiality.java +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.GovernanceClassificationStatus; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the level of confidentiality of related data items. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Confidentiality extends Classification { - private static final Logger log = LoggerFactory.getLogger(Confidentiality.class); - private static final String className = Confidentiality.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "status", - "confidence", - "steward", - "source", - "notes", - "level", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - "confidence", - "steward", - "source", - "notes", - "level", - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - "status", - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public Confidentiality() { - super.classificationName = "Confidentiality"; - } - - private GovernanceClassificationStatus status; - - /** - * {@literal Status of this classification. } - * - * @return Status of this classification. - */ - public GovernanceClassificationStatus getStatus() { - return this.status; - } - - public void setStatus(GovernanceClassificationStatus status) { - this.status = status; - } - - - private Integer confidence; - - /** - * {@literal Level of confidence in the classification (0=none -> 100=excellent). } - * - * @return Level of confidence in the classification - */ - public Integer getConfidence() { - return this.confidence; - } - - public void setConfidence(Integer confidence) { - this.confidence = confidence; - } - - - private String steward; - - /** - * {@literal Person responsible for maintaining this classification. } - * - * @return Person responsible for maintaining this classification. - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - - private String source; - - /** - * {@literal Source of the classification. } - * - * @return Source of the classification. - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - - private String notes; - - /** - * {@literal Information relating to the classification. } - * - * @return Information relating to the classification. - */ - public String getNotes() { - return this.notes; - } - - public void setNotes(String notes) { - this.notes = notes; - } - - - private Integer level; - - /** - * {@literal Level of confidentiality. } - * - * @return Level of confidentiality. - */ - public Integer getLevel() { - return this.level; - } - - public void setLevel(Integer level) { - this.level = level; - } - - /** - * Confidentiality property names - * - * @return Set of Strings of the Confidentiality property names - */ - public static Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ContextDefinition.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ContextDefinition.java deleted file mode 100644 index efb956b7283..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ContextDefinition.java +++ /dev/null @@ -1,113 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a glossary term that describes a context where processing or decisions occur. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ContextDefinition extends Classification { - private static final Logger log = LoggerFactory.getLogger(ContextDefinition.class); - private static final String className = ContextDefinition.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "description", - "scope", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - "description", - "scope", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public ContextDefinition() { - super.classificationName = "ContextDefinition"; - } - - private String description; - - /** - * {@literal Description for how the context is used. } - * - * @return {$$PropertyTypeJavadoc$$ } - */ - public String getDescription() { - return this.description; - } - - public void setDescription(String description) { - this.description = description; - } - - - private String scope; - - /** - * {@literal Scope of influence of the context. } - * - * @return {$$PropertyTypeJavadoc$$ } - */ - public String getScope() { - return this.scope; - } - - public void setScope(String scope) { - this.scope = scope; - } - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Criticality.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Criticality.java deleted file mode 100644 index a43e9e9bfb7..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Criticality.java +++ /dev/null @@ -1,195 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.*; - -/** - * Defines how critical the related data items are to the organization. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Criticality extends Classification { - private static final Logger log = LoggerFactory.getLogger(Criticality.class); - private static final String className = Criticality.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "status", - "confidence", - "steward", - "source", - "notes", - "level", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - "confidence", - "steward", - "source", - "notes", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - "status", - "level", - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - public static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public Criticality() { - super.classificationName = "Criticality"; - } - - private GovernanceClassificationStatus status; - - /** - * {@literal Status of this classification. } - * - * @return Status of this classification. - */ - public GovernanceClassificationStatus getStatus() { - return this.status; - } - - public void setStatus(GovernanceClassificationStatus status) { - this.status = status; - } - - - private Integer confidence; - - /** - * {@literal Level of confidence in the classification (0=none -> 100=excellent). } - * - * @return Level of confidence in the classification - */ - public Integer getConfidence() { - return this.confidence; - } - - public void setConfidence(Integer confidence) { - this.confidence = confidence; - } - - - private String steward; - - /** - * {@literal Person responsible for maintaining this classification. } - * - * @return Person responsible for maintaining this classification. - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - - private String source; - - /** - * {@literal Source of the classification. } - * - * @return Source of the classification. - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - - private String notes; - - /** - * {@literal Information relating to the classification. } - * - * @return Information relating to the classification. - */ - public String getNotes() { - return this.notes; - } - - public void setNotes(String notes) { - this.notes = notes; - } - - - private CriticalityLevel level; - - /** - * {@literal How critical is this data to the organization. } - * - * @return How critical is this data to the organization. - */ - public CriticalityLevel getLevel() { - return this.level; - } - - public void setLevel(CriticalityLevel level) { - this.level = level; - } - - /** - * Criticality property names - * - * @return Set of Strings of the Criticality property names - */ - public static Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/DataValue.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/DataValue.java deleted file mode 100644 index 5ae6a1331f2..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/DataValue.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies that this glossary term describes a data value. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataValue extends Classification { - private static final Logger log = LoggerFactory.getLogger( DataValue.class); - private static final String className = DataValue.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[] { - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] { - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[] { - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[] { - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - /** - * Default constructor - */ - public DataValue() { - super.classificationName="DataValue"; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/GlossaryProject.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/GlossaryProject.java deleted file mode 100644 index 4c6999b642e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/GlossaryProject.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a project that is defining new glossary terms and categories or maintaining an existing glossary. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class GlossaryProject extends Classification { - private static final Logger log = LoggerFactory.getLogger(GlossaryProject.class); - private static final String className = GlossaryProject.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public GlossaryProject() { - super.classificationName = "GlossaryProject"; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ObjectIdentifier.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ObjectIdentifier.java deleted file mode 100644 index f4dfab74d43..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/ObjectIdentifier.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a glossary term that describes an attribute that can be used to identify an instance. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ObjectIdentifier extends Classification { - private static final Logger log = LoggerFactory.getLogger(ObjectIdentifier.class); - private static final String className = ObjectIdentifier.class.getName(); - private Map extraAttributes; - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public ObjectIdentifier() { - super.classificationName = "ObjectIdentifier"; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/PrimaryKey.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/PrimaryKey.java deleted file mode 100644 index affc690590c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/PrimaryKey.java +++ /dev/null @@ -1,106 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A uniquely identifying relational column. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PrimaryKey extends Classification { - private static final Logger log = LoggerFactory.getLogger( PrimaryKey.class); - private static final String className = PrimaryKey.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[] { - "keyPattern", - "name", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] { - "name", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[] { - "keyPattern", - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[] { - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - /** - * Default constructor - */ - public PrimaryKey() { - super.classificationName="PrimaryKey"; - } - - private KeyPattern keyPattern; - /** - * {@literal Type of primary key. } - * @return Key Pattern - */ - public KeyPattern getKeyPattern() { - return this.keyPattern; - } - public void setKeyPattern(KeyPattern keyPattern) { - this.keyPattern = keyPattern; - } - - - private String name; - /** - * {@literal Display name for the primary key. } - * @return Display name for the primary key. - */ - public String getName() { - return this.name; - } - public void setName(String name) { - this.name = name; - } - - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Retention.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Retention.java deleted file mode 100644 index 5194a8ffc7f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Retention.java +++ /dev/null @@ -1,218 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.*; - -/** - * Defines the retention requirements for related data items. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Retention extends Classification { - private static final Logger log = LoggerFactory.getLogger( Retention.class); - private static final String className = Retention.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[] { - "status", - "confidence", - "steward", - "source", - "notes", - "basis", - "associatedGUID", - "archiveAfter", - "deleteAfter", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] { - "confidence", - "steward", - "source", - "notes", - "associatedGUID", - "archiveAfter", - "deleteAfter", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[] { - "status", - "basis", - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[] { - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - /** - * Default constructor - */ - public Retention() { - super.classificationName="Retention"; - } - - private GovernanceClassificationStatus status; - /** - * {@literal Status of this classification. } - * @return Status of this classification. - */ - public GovernanceClassificationStatus getStatus() { - return this.status; - } - public void setStatus(GovernanceClassificationStatus status) { - this.status = status; - } - - - private Integer confidence; - /** - * {@literal Level of confidence in the classification (0=none -> 100=excellent). } - * @return Level of confidence - */ - public Integer getConfidence() { - return this.confidence; - } - public void setConfidence(Integer confidence) { - this.confidence = confidence; - } - - - private String steward; - /** - * {@literal Person responsible for maintaining this classification. } - * @return Person responsible for maintaining this classification. - */ - public String getSteward() { - return this.steward; - } - public void setSteward(String steward) { - this.steward = steward; - } - - - private String source; - /** - * {@literal Source of the classification. } - * @return Source of the classification. - */ - public String getSource() { - return this.source; - } - public void setSource(String source) { - this.source = source; - } - - - private String notes; - /** - * {@literal Information relating to the classification. } - * @return Information relating to the classification. - */ - public String getNotes() { - return this.notes; - } - public void setNotes(String notes) { - this.notes = notes; - } - - /** - * Retention property names - * @return Set of Strings of the Retention property names - */ - public static Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - private RetentionBasis basis; - /** - * {@literal Basis on which the retention period is defined. } - * @return Basis on which the retention period is defined. - */ - public RetentionBasis getBasis() { - return this.basis; - } - public void setBasis(RetentionBasis basis) { - this.basis = basis; - } - - - private String associatedGUID; - /** - * {@literal Related entity used to determine the retention period. } - * @return Related entity used to determine the retention period. - */ - public String getAssociatedGUID() { - return this.associatedGUID; - } - public void setAssociatedGUID(String associatedGUID) { - this.associatedGUID = associatedGUID; - } - - - private Long archiveAfter; - /** - * {@literal Related entity used to determine the retention period. } - * @return Related entity used to determine the retention period. - */ - public Long getArchiveAfter() { - return this.archiveAfter; - } - public void setArchiveAfter(Long archiveAfter) { - this.archiveAfter = archiveAfter; - } - - - private Long deleteAfter; - /** - * {@literal Related entity used to determine the retention period. } - * @return Related entity used to determine the retention period. - */ - public Long getDeleteAfter() { - return this.deleteAfter; - } - public void setDeleteAfter(Long deleteAfter) { - this.deleteAfter = deleteAfter; - } - - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SpineAttribute.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SpineAttribute.java deleted file mode 100644 index ace20452822..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SpineAttribute.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a glossary term that describes an attribute of a spine object. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SpineAttribute extends Classification { - private static final Logger log = LoggerFactory.getLogger(SpineAttribute.class); - private static final String className = SpineAttribute.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public SpineAttribute() { - super.classificationName = "SpineAttribute"; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SpineObject.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SpineObject.java deleted file mode 100644 index ea22920df02..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SpineObject.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a glossary term that describes a type of spine object. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SpineObject extends Classification { - private static final Logger log = LoggerFactory.getLogger(SpineObject.class); - private static final String className = SpineObject.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public SpineObject() { - super.classificationName = "SpineObject"; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SubjectArea.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SubjectArea.java deleted file mode 100644 index d5da4f9f1ae..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/SubjectArea.java +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a glossary category as a subject area. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubjectArea extends Classification { - private static final Logger log = LoggerFactory.getLogger(SubjectArea.class); - private static final String className = SubjectArea.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "name", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - "name", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public SubjectArea() { - super.classificationName = "SubjectArea"; - } - - private String name; - - /** - * Subject Area property names - * - * @return Set of Strings of the SubjectArea property names - */ - public static Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - /** - * {@literal Name of the subject area. } - * - * @return Name of the subject area. - */ - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Taxonomy.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Taxonomy.java deleted file mode 100644 index af976c349eb..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Taxonomy.java +++ /dev/null @@ -1,102 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Identifies a glossary that includes a taxonomy. - */ - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Taxonomy extends Classification { - private static final Logger log = LoggerFactory.getLogger(Taxonomy.class); - private static final String className = Taxonomy.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[]{ - "organizingPrinciple", - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[]{ - "organizingPrinciple", - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[]{ - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - /** - * Default constructor - */ - public Taxonomy() { - super.classificationName = "Taxonomy"; - } - - private String organizingPrinciple; - - /** - * {@literal Characteristics that influence the organization of the taxonomy. } - * - * @return Characteristics that influence the organization of the taxonomy. - */ - public String getOrganizingPrinciple() { - return this.organizingPrinciple; - } - - public void setOrganizingPrinciple(String organizingPrinciple) { - this.organizingPrinciple = organizingPrinciple; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return extraAttributes; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.extraAttributes = additionalProperties; - } - - /** - * Taxonomy property names - * - * @return Set of Strings of the Taxonomy property names - */ - public static Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/comment/Comment.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/comment/Comment.java deleted file mode 100644 index f324481ecb1..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/comment/Comment.java +++ /dev/null @@ -1,271 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.comment; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.CommentType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.Serializable; -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * Comment entity in the Subject Area OMAS. - Descriptive feedback or discussion related to an item. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Comment implements Serializable { - private static final Logger log = LoggerFactory.getLogger(Comment.class); - private static final String className = Comment.class.getName(); - private SystemAttributes systemAttributes = null; - List classifications = null; - - private Map extraAttributes =null; - private Map extraClassifications =null; - - - /** - * Get the system attributes associated with the Comment. - * @return system attributes - */ - public SystemAttributes getSystemAttributes() { - return systemAttributes; - } - - public void setSystemAttributes(SystemAttributes systemAttributes) { - this.systemAttributes = systemAttributes; - } - - // attributes - public static final String[] PROPERTY_NAMES_SET_VALUES = new String[] { - "comment", - "commentType", - "qualifiedName", - "additionalProperties", - - // Terminate the list - null - }; - public static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] { - "comment", - "qualifiedName", - - // Terminate the list - null - }; - public static final String[] ENUM_NAMES_SET_VALUES = new String[] { - "commentType", - - // Terminate the list - null - }; - public static final String[] MAP_NAMES_SET_VALUES = new String[] { - "additionalProperties", - - // Terminate the list - null - }; - public static final Set PROPERTY_NAMES_SET = new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)); - public static final Set ATTRIBUTE_NAMES_SET = new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)); - public static final Set ENUM_NAMES_SET = new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)); - public static final Set MAP_NAMES_SET = new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)); - - - InstanceProperties obtainInstanceProperties() { - final String methodName = "obtainInstanceProperties"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - InstanceProperties instanceProperties = new InstanceProperties(); - EnumPropertyValue enumPropertyValue=null; - enumPropertyValue = new EnumPropertyValue(); - // classification for the comment. - enumPropertyValue.setOrdinal(commentType.ordinal()); - enumPropertyValue.setSymbolicName(commentType.name()); - instanceProperties.setProperty("commentType",enumPropertyValue); - MapPropertyValue mapPropertyValue=null; - // Additional properties for the element. - mapPropertyValue = new MapPropertyValue(); - PrimitivePropertyValue primitivePropertyValue=null; - primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveValue(comment); - instanceProperties.setProperty("comment",primitivePropertyValue); - primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveValue(qualifiedName); - instanceProperties.setProperty("qualifiedName",primitivePropertyValue); - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - return instanceProperties; - } - - private String comment; - /** - * Feedback comments or additional information. - * @return String - */ - public String getComment() { - return this.comment; - } - public void setComment(String comment) { - this.comment = comment; - } - private CommentType commentType; - /** - * classification for the comment. - * @return CommentType - */ - public CommentType getCommentType() { - return this.commentType; - } - public void setCommentType(CommentType commentType) { - this.commentType = commentType; - } - private String qualifiedName; - /** - * Unique identifier for the entity. - * @return String - */ - public String getQualifiedName() { - return this.qualifiedName; - } - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - private Map additionalProperties; - /** - * Additional properties for the element. - * @return {@code Map } - */ - public Map getAdditionalProperties() { - return this.additionalProperties; - } - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - public void setExtraAttributes(Map extraAttributes) { - this.extraAttributes = extraAttributes; - } - - public void setClassifications(List classifications) { - this.classifications = classifications; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * @return {@code Map } - */ - public Map getExtraAttributes() { - return extraAttributes; - } - - /** - * Classifications associated with the Comment - * @return list of classifications - */ - public List getClassifications() { - return classifications; - } - /** - * Extra classifications are classifications that are not in the open metadata model - we include the OMRS Classifications. - * @return {@code Map } - */ - public Map getExtraClassifications() { - return extraClassifications; - } - - public void setExtraClassifications(Map extraClassifications) { - this.extraClassifications = extraClassifications; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Comment{"); - if (systemAttributes !=null) { - sb.append("systemAttributes='").append(systemAttributes.toString()).append('\''); - } - sb.append("Comment Attributes{"); - sb.append("Comment=").append(this.comment); - sb.append("CommentType=").append(this.commentType); - sb.append("QualifiedName=").append(this.qualifiedName); - sb.append("AdditionalProperties=").append(this.additionalProperties); - - sb.append('}'); - if (classifications != null) { - sb.append(", classifications=["); - for (Classification classification:classifications) { - sb.append(classification.toString()).append(", "); - } - sb.append(" ],"); - } - sb.append(", extraAttributes=["); - if (extraAttributes !=null) { - for (String attrname: extraAttributes.keySet()) { - sb.append(attrname).append(":"); - sb.append(extraAttributes.get(attrname)).append(", "); - } - } - sb.append(" ]"); - - sb.append('}'); - - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } - if (!super.equals(o)) { return false; } - - Comment that = (Comment) o; - if (this.comment != null && !Objects.equals(this.comment,that.getComment())) { - return false; - } - if (this.commentType != null && !Objects.equals(this.commentType,that.getCommentType())) { - return false; - } - if (this.qualifiedName != null && !Objects.equals(this.qualifiedName,that.getQualifiedName())) { - return false; - } - if (this.additionalProperties != null && !Objects.equals(this.additionalProperties,that.getAdditionalProperties())) { - return false; - } - - // We view comments as logically equal by checking the properties that the OMAS knows about - i.e. without accounting for extra attributes and references from the org.odpi.openmetadata.accessservices.subjectarea.server. - return Objects.equals(systemAttributes, that.systemAttributes) && - Objects.equals(classifications, that.classifications) ; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), - systemAttributes.hashCode(), - classifications.hashCode() - , this.comment - , this.commentType - , this.qualifiedName - , this.additionalProperties - ); - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ActivityType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ActivityType.java deleted file mode 100644 index bab5653538d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ActivityType.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Different types of activities. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ActivityType implements Serializable { - /** - * Normal processing. - */ - Operation(0, "Normal processing.") -, - /** - * A requested of required change. - */ - Action(1, "A requested of required change.") -, - /** - * A piece of work for a person, organization or engine. - */ - Task(2, "A piece of work for a person, organization or engine.") -, - /** - * A sequence of tasks. - */ - Process(3, "A sequence of tasks.") -, - /** - * An organized activity to achieve a specific goal. - */ - Project(3, "An organized activity to achieve a specific goal.") -, - /** - * Another type of activity. - */ - Other(99, "Another type of activity.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an ActivityType enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - ActivityType(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the ActivityType enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/CommentType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/CommentType.java deleted file mode 100644 index 25a2ce7b4f6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/CommentType.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Descriptor for a comment that indicated its intent. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum CommentType implements Serializable { - /** - * General comment. - */ - GeneralComment(0, "General comment.") -, - /** - * A question. - */ - Question(1, "A question.") -, - /** - * An answer to a previously asked question. - */ - Answer(2, "An answer to a previously asked question.") -, - /** - * A suggestion for improvement. - */ - Suggestion(3, "A suggestion for improvement.") -, - /** - * An account of an experience. - */ - Experience(3, "An account of an experience.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an CommentType enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - CommentType(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the CommentType enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ConfidenceLevel.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ConfidenceLevel.java deleted file mode 100644 index e2fadb8daaf..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ConfidenceLevel.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the level of confidence to place in the accuracy of a data item. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ConfidenceLevel implements Serializable { - /** - * There is no assessment of the confidence level of this data. - */ - Unclassified(0, "There is no assessment of the confidence level of this data.") -, - /** - * The data comes from an ad hoc process. - */ - AdHoc(1, "The data comes from an ad hoc process.") -, - /** - * The data comes from a transactional system so it may have a narrow scope. - */ - Transactional(2, "The data comes from a transactional system so it may have a narrow scope.") -, - /** - * The data comes from an authoritative source. - */ - Authoritative(3, "The data comes from an authoritative source.") -, - /** - * The data is derived from other data through an analytical process. - */ - Derived(4, "The data is derived from other data through an analytical process.") -, - /** - * The data comes from an obsolete source and must no longer be used. - */ - Obsolete(5, "The data comes from an obsolete source and must no longer be used.") -, - /** - * Another confidence level. - */ - Other(99, "Another confidence level.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an ConfidenceLevel enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - ConfidenceLevel(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the ConfidenceLevel enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ConfidentialityLevel.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ConfidentialityLevel.java deleted file mode 100644 index d29feab80e6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/ConfidentialityLevel.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines how confidential a data item is. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ConfidentialityLevel implements Serializable { - /** - * The data is public information. - */ - Unclassified(0, "The data is public information.") -, - /** - * The data should not be exposed outside of this organization. - */ - Internal(1, "The data should not be exposed outside of this organization.") -, - /** - * The data should be protected and only shared with people with a need to see it. - */ - Confidential(2, "The data should be protected and only shared with people with a need to see it.") -, - /** - * The data is sensitive and inappropriate use may adversely impact the data subject. - */ - Sensitive(3, "The data is sensitive and inappropriate use may adversely impact the data subject.") -, - /** - * The data is very valuable and must be restricted to a very small number of people. - */ - Restricted(4, "The data is very valuable and must be restricted to a very small number of people.") -, - /** - * Another confidentially level. - */ - Other(99, "Another confidentially level.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an ConfidentialityLevel enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - ConfidentialityLevel(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the ConfidentialityLevel enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/CriticalityLevel.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/CriticalityLevel.java deleted file mode 100644 index 056fcbc52fb..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/CriticalityLevel.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines how important a data item is to the organization. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum CriticalityLevel implements Serializable { - /** - * There is no assessment of the criticality of this data. - */ - Unclassified(0, "There is no assessment of the criticality of this data.") -, - /** - * The data is of minor importance to the organization. - */ - Marginal(1, "The data is of minor importance to the organization.") -, - /** - * The data is important to the running of the organization. - */ - Important(2, "The data is important to the running of the organization.") -, - /** - * The data is critical to the operation of the organization. - */ - Critical(3, "The data is critical to the operation of the organization.") -, - /** - * The data is so important that its loss is catastrophic putting the future of the organization in doubt. - */ - Catastrophic(4, "The data is so important that its loss is catastrophic putting the future of the organization in doubt.") -, - /** - * Another criticality level. - */ - Other(99, "Another criticality level.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an CriticalityLevel enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - CriticalityLevel(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the CriticalityLevel enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/GovernanceClassificationStatus.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/GovernanceClassificationStatus.java deleted file mode 100644 index 4a1c3174fcd..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/GovernanceClassificationStatus.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the status values of a governance action classification. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GovernanceClassificationStatus implements Serializable { - /** - * The classification assignment was discovered by an automated process. - */ - Discovered(0, "The classification assignment was discovered by an automated process.") -, - /** - * The classification assignment was proposed by a subject matter expert. - */ - Proposed(1, "The classification assignment was proposed by a subject matter expert.") -, - /** - * The classification assignment was imported from another metadata system. - */ - Imported(2, "The classification assignment was imported from another metadata system.") -, - /** - * The classification assignment has been validated and approved by a subject matter expert. - */ - Validated(3, "The classification assignment has been validated and approved by a subject matter expert.") -, - /** - * The classification assignment should no longer be used. - */ - Deprecated(4, "The classification assignment should no longer be used.") -, - /** - * The classification assignment must no longer be used. - */ - Obsolete(5, "The classification assignment must no longer be used.") -, - /** - * Another classification assignment status. - */ - Other(99, "Another classification assignment status.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an GovernanceClassificationStatus enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - GovernanceClassificationStatus(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the GovernanceClassificationStatus enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/MediaType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/MediaType.java deleted file mode 100644 index fccc25ef751..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/MediaType.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the type of media. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum MediaType implements Serializable { - /** - * The media is an image. - */ - Image(0, "The media is an image.") -, - /** - * The media is an audio recording. - */ - Audio(1, "The media is an audio recording.") -, - /** - * The media is a text document, probably rich text. - */ - Document(2, "The media is a text document, probably rich text.") -, - /** - * The media is a video recording. - */ - Video(3, "The media is a video recording.") -, - /** - * Another type of media, probably not supported. - */ - Other(99, "Another type of media, probably not supported.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an MediaType enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - MediaType(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the MediaType enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/MediaUsage.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/MediaUsage.java deleted file mode 100644 index e766b8c220e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/MediaUsage.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines how a related media reference should be used. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum MediaUsage implements Serializable { - /** - * Provides a small image to represent the asset in tree views and graphs. - */ - Icon(0, "Provides a small image to represent the asset in tree views and graphs.") -, - /** - * Provides a small image about the asset that can be used in lists. - */ - Thumbnail(1, "Provides a small image about the asset that can be used in lists.") -, - /** - * Illustrates how the asset works or what it contains. It is complementary to the asset's description. - */ - Illustration(2, "Illustrates how the asset works or what it contains. It is complementary to the asset's description.") -, - /** - * Provides guidance to a person on how to use the asset. - */ - UsageGuidance(3, "Provides guidance to a person on how to use the asset.") -, - /** - * Another usage. - */ - Other(99, "Another usage.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an MediaUsage enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - MediaUsage(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the MediaUsage enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/RetentionBasis.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/RetentionBasis.java deleted file mode 100644 index 90e9700a030..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/RetentionBasis.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the retention requirements associated with a data item. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum RetentionBasis implements Serializable { - /** - * There is no assessment of the retention requirements for this data. - */ - Unclassified(0, "There is no assessment of the retention requirements for this data.") -, - /** - * This data is temporary. - */ - Temporary(1, "This data is temporary.") -, - /** - * The data is needed for the lifetime of the referenced project. - */ - ProjectLifetime(2, "The data is needed for the lifetime of the referenced project.") -, - /** - * The data is needed for the lifetime of the referenced team. - */ - TeamLifetime(3, "The data is needed for the lifetime of the referenced team.") -, - /** - * The data is needed for the lifetime of the referenced contract. - */ - ContractLifetime(4, "The data is needed for the lifetime of the referenced contract.") -, - /** - * The retention period for the data is defined by the referenced regulation. - */ - RegulatedLifetime(5, "The retention period for the data is defined by the referenced regulation.") -, - /** - * The data is needed for the specified time. - */ - TimeBoxedLifetime(6, "The data is needed for the specified time.") -, - /** - * Another basis for determining the retention requirement. - */ - Other(99, "Another basis for determining the retention requirement.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an RetentionBasis enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - RetentionBasis(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the RetentionBasis enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/Status.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/Status.java deleted file mode 100644 index 1b7b8e6ddbc..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/Status.java +++ /dev/null @@ -1,120 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The Status defines the status of a relationship or an entity in the glossary. It effectively - * defines its visibility to different types of queries. Most queries by default will only return instances in the - * active status. - *
    - *
  • UNKNOWN Unknown status of instance.
  • - *
  • DRAFT The content is incomplete.
  • - *
  • PREPARED The content is ready for review.
  • - *
  • PROPOSED The content is in review.
  • - *
  • APPROVED Instance approved.
  • - *
  • ACTIVE: the instance is in active use.
  • - *
  • DELETED: the instance has been deleted and is waiting to be purged. It is kept in the metadata collection - * to support a restore request. It is not returned on normal queries.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum Status implements Serializable -{ - - /** - * Unknown status of instance - */ - UNKNOWN(0, "Unknown", "Unknown status of instance."), - - /** - * The content incomplete and not ready for review. - */ - DRAFT(1, "Draft", "The content incomplete"), - - /** - * The content is ready for review. - */ - PREPARED(2, "Prepared", "The content is ready for review."), - - /** - * The content is in review - */ - PROPOSED(3, "Proposed", "The content is in review."), - - /** - * The content has been approved. - */ - APPROVED(4, "Approved", "Instance approved."), - - /** - * The instance is in use - */ - ACTIVE (15, "Active", "The instance is in use."), - - /** - * Instance that has been deleted and is no longer in use. - */ - - DELETED(90, "Deleted", "Instance that has been deleted and is no longer in use."); - - private static final long serialVersionUID = 1L; - - private int ordinal; - private String statusName; - private String statusDescription; - - - /** - * Default constructor sets up the specific values for an enum instance. - * - * @param ordinal int enum value ordinal - * @param statusName String name - * @param statusDescription String description - */ - Status(int ordinal, - String statusName, - String statusDescription) - { - this.ordinal = ordinal; - this.statusName = statusName; - this.statusDescription = statusDescription; - } - - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the descriptive name for the enum. - * - * @return String name - */ - public String getStatusName() { return statusName; } - - - /** - * Return the description for the enum. - * - * @return String description - */ - public String getStatusDescription() { return statusDescription; } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/StatusFilter.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/StatusFilter.java deleted file mode 100644 index bc190114dc8..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/StatusFilter.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The StatusFilter is used on the API to Filter the status of instances. - *
    - *
  • ALL All instances irrespective of status.
  • - *
  • ACTIVE: Only active instances.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum StatusFilter implements Serializable -{ - - /** - * All instances irrespective of status. - */ - ALL(1, "Unknown", "All instances irrespective of status."), - - /** - * Only active instances. - */ - ACTIVE (15, "Active", "Only active instances."); - - private static final long serialVersionUID = 1L; - - private int ordinal; - private String statusFilterName; - private String statusFilterDescription; - - - /** - * Default constructor sets up the specific values for an enum instance. - * - * @param ordinal int enum value ordinal - * @param statusName String name - * @param statusDescription String description - */ - StatusFilter(int ordinal, - String statusName, - String statusDescription) - { - this.ordinal = ordinal; - this.statusFilterName = statusName; - this.statusFilterDescription = statusDescription; - } - - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the descriptive name for the enum. - * - * @return String name - */ - public String getStatusFilterName() { return statusFilterName; } - - - /** - * Return the description for the enum. - * - * @return String description - */ - public String getStatusFilterDescription() { return statusFilterDescription; } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/TermAssignmentStatus.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/TermAssignmentStatus.java deleted file mode 100644 index 319c0114ade..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/TermAssignmentStatus.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the provenance and confidence of a term assignment. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum TermAssignmentStatus implements Serializable { - /** - * The term assignment was discovered by an automated process. - */ - Discovered(0, "The term assignment was discovered by an automated process.") -, - /** - * The term assignment was proposed by a subject matter expert. - */ - Proposed(1, "The term assignment was proposed by a subject matter expert.") -, - /** - * The term assignment was imported from another metadata system. - */ - Imported(2, "The term assignment was imported from another metadata system.") -, - /** - * The term assignment has been validated and approved by a subject matter expert. - */ - Validated(3, "The term assignment has been validated and approved by a subject matter expert.") -, - /** - * The term assignment should no longer be used. - */ - Deprecated(4, "The term assignment should no longer be used.") -, - /** - * The term assignment must no longer be used. - */ - Obsolete(5, "The term assignment must no longer be used.") -, - /** - * Another term assignment status. - */ - Other(99, "Another term assignment status.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an GlossaryTermAssignmentStatus enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - TermAssignmentStatus(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the GlossaryTermAssignmentStatus enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/TermRelationshipStatus.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/TermRelationshipStatus.java deleted file mode 100644 index 69fd6b462f3..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/enums/TermRelationshipStatus.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the confidence in the assigned relationship. - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum TermRelationshipStatus implements Serializable { - /** - * The term relationship is in development. - */ - Draft(0, "The term relationship is in development.") -, - /** - * The term relationship is approved and in use. - */ - Active(1, "The term relationship is approved and in use.") -, - /** - * The term relationship should no longer be used. - */ - Deprecated(2, "The term relationship should no longer be used.") -, - /** - * The term relationship must no longer be used. - */ - Obsolete(3, "The term relationship must no longer be used.") -, - /** - * Another term relationship status. - */ - Other(99, "Another term relationship status.") -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an TermRelationshipStatus enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - TermRelationshipStatus(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the TermRelationshipStatus enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/OmasObject.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/OmasObject.java deleted file mode 100644 index 2b897d87cb1..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/OmasObject.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects; - -public interface OmasObject { -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/category/Category.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/category/Category.java deleted file mode 100644 index 862d1367c65..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/category/Category.java +++ /dev/null @@ -1,99 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; - -import java.util.Objects; - -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) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = Category.class, - visible = true -) -@JsonSubTypes({ @JsonSubTypes.Type(value = SubjectAreaDefinition.class) }) -public class Category extends Node { - private GlossarySummary glossary = null; - private CategorySummary parentCategory = null; - - public Category() { - nodeType = NodeType.Category; - } - - /** - * The owning glossary for this category. - * @return GlossarySummary - */ - public GlossarySummary getGlossary() { - return glossary; - } - - public void setGlossary(GlossarySummary glossary) { - this.glossary = glossary; - } - - /** - * "Identifies the parent category." - * @return CategorySummary - */ - public CategorySummary getParentCategory() { - return parentCategory; - } - - public void setParentCategory(CategorySummary parentCategory) { - this.parentCategory = parentCategory; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("Category="); - sb.append(super.toString(sb)); - - - if (glossary!=null ){ - sb.append(", glossary="); - sb.append(glossary.toString(sb)); - - } - if (parentCategory!=null ){ - sb.append(", parent Category="); - sb.append(parentCategory.toString(sb)); - - } - sb.append('}'); - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - Category category = (Category) o; - Node node = (Node) o; - if (!node.equals(this)) return false; - return Objects.equals(glossary, category.glossary); - } - - @Override - public int hashCode() { - int result =super.hashCode(); - result = 31 * result + (glossary != null ? glossary.hashCode() : 0); - result = 31 * result + (parentCategory != null ? parentCategory.hashCode() : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/category/SubjectAreaDefinition.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/category/SubjectAreaDefinition.java deleted file mode 100644 index 6b4f4dd3153..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/category/SubjectAreaDefinition.java +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A type of Category called a Subject Area Definition is one that describes a subject area or a domain. - * For a category to be in a subject area - it would be within the children category hierarchies under - * a Subject Area Definition. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SubjectAreaDefinition extends Category { - public SubjectAreaDefinition() { - nodeType = NodeType.SubjectAreaDefinition; - } - public SubjectAreaDefinition(Category category) { - this.setName(category.getName()); - this.setParentCategory(category.getParentCategory()); - this.setGlossary(category.getGlossary()); - this.setClassifications(category.getClassifications()); - this.setAdditionalProperties(category.getAdditionalProperties()); - this.setIcons(category.getIcons()); - this.setDescription(category.getDescription()); - this.setQualifiedName(category.getQualifiedName()); - this.setSystemAttributes(category.getSystemAttributes()); - this.setExtendedProperties(category.getExtendedProperties()); - this.setAdditionalProperties(category.getAdditionalProperties()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Config.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Config.java deleted file mode 100644 index 10ddab7a611..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Config.java +++ /dev/null @@ -1,94 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Config is used by the Subject Area OMAS to retrieve useful configuration information when using the subject area APIs - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Config -{ - private Integer maxPageSize = null; - - /** - * Default constructor - */ - public Config() { - } - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public Config(Config template) { - if (template != null) { - this.maxPageSize = template.getMaxPageSize(); - } - } - - /** - * Get the maximum page size that will be accepted by the Subject Area OMAS - * @return the maximum page size - */ - public Integer getMaxPageSize() { - return maxPageSize; - } - - /** - * Set the maximum page size that will be accepted by the Subject Area OMAS - * @param maxPageSize maximum page size - */ - public void setMaxPageSize(Integer maxPageSize) { - this.maxPageSize = maxPageSize; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "Config{" + - "maxPageSize='" + maxPageSize + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * @return boolean result of comparison - */ - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Config that = (Config) o; - return - Objects.equals(maxPageSize, that.maxPageSize); - } - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() { - return Objects.hash(maxPageSize); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/FindRequest.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/FindRequest.java deleted file mode 100644 index c65b5ad98c2..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/FindRequest.java +++ /dev/null @@ -1,207 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FindRequest is used by the Subject Area OMAS to specify paging information for find calls. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FindRequest -{ - private String searchCriteria = null; - private String sequencingProperty = null; - private SequencingOrder sequencingOrder = null; - private int startingFrom = 0; - private Integer pageSize = null; - private Date asOfTime; - /** - * Default constructor - */ - public FindRequest() { - } - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FindRequest(FindRequest template) { - if (template != null) { - this.searchCriteria = template.getSearchCriteria(); - this.sequencingProperty = template.getSequencingProperty(); - this.sequencingOrder = template.getSequencingOrder(); - this.asOfTime = template.getAsOfTime(); - this.startingFrom = template.getStartingFrom(); - this.pageSize = getPageSize(); - } - } - - public String getSearchCriteria() { - return searchCriteria; - } - - public void setSearchCriteria(String searchCriteria) { - this.searchCriteria = searchCriteria; - } - - /** - * Return the name of the property that should be used to sequence the results. - * - * @return property name - */ - public String getSequencingProperty() - { - return sequencingProperty; - } - - - /** - * Set up the name of the property that should be used to sequence the results. - * - * @param sequencingProperty property name - */ - public void setSequencingProperty(String sequencingProperty) - { - this.sequencingProperty = sequencingProperty; - } - - - /** - * Return the sequencing order for the results. - * - * @return sequencing order enum - */ - public SequencingOrder getSequencingOrder() - { - return sequencingOrder; - } - - - /** - * Set up the sequencing order for the results. - * - * @param sequencingOrder sequencing order enum - */ - public void setSequencingOrder(SequencingOrder sequencingOrder) - { - this.sequencingOrder = sequencingOrder; - } - - - /** - * Return the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * - * @return startingFrom number - */ - public int getStartingFrom() - { - return startingFrom; - } - - - /** - * Set up the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * - * @param startingFrom startingFrom number - */ - public void setStartingFrom(int startingFrom) - { - this.startingFrom = startingFrom; - } - - - /** - * Return the maximum number of elements that can be returned on this request. - * @return page size - */ - public Integer getPageSize() - { - return pageSize; - } - - - /** - * Set up the maximum number of elements that can be returned on this request. - * - * @param pageSize integer number - */ - public void setPageSize(Integer pageSize) - { - this.pageSize = pageSize; - } - - /** - * Get the time at which the find should be issued. - * @return Date at which the find should be issued - */ - public Date getAsOfTime() { - return asOfTime; - } - - /** - * set up the time at which the find should be made. null means current time. - * @param asOfTime Date at which the find should be issued - */ - public void setAsOfTime(Date asOfTime) { - this.asOfTime = asOfTime; - } - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "OMRSAPIPagedFindRequest{" + - "sequencingProperty='" + sequencingProperty + '\'' + - ", sequencingOrder=" + sequencingOrder + - ", startingFrom=" + startingFrom + - ", pageSize=" + pageSize + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * @return boolean result of comparison - */ - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - FindRequest that = (FindRequest) o; - return startingFrom == that.startingFrom && - pageSize == that.pageSize && - Objects.equals(searchCriteria, that.searchCriteria) && - Objects.equals(sequencingProperty, that.sequencingProperty) && - sequencingOrder == that.sequencingOrder && - Objects.equals(asOfTime, that.asOfTime); - } - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() { - return Objects.hash(searchCriteria, sequencingProperty, sequencingOrder, startingFrom, pageSize, asOfTime); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/GovernanceClassifications.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/GovernanceClassifications.java deleted file mode 100644 index 72bfbb78de5..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/GovernanceClassifications.java +++ /dev/null @@ -1,78 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidence; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidentiality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Criticality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Retention; - -/** - * Governance actions are classifications that are important for goverance programs. These classifications are - * referred to by governance rules, so that governance action classified entities can be governed consistently. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceClassifications implements Serializable { - private Confidentiality confidentiality = null; - private Confidence confidence =null; - private Retention retention =null; - private Criticality criticality=null; - /** - * Defines the level of confidentiality. - * @return confidentiality - */ - public Confidentiality getConfidentiality() { - return confidentiality; - } - - public void setConfidentiality(Confidentiality confidentiality) { - this.confidentiality = confidentiality; - } - /** - * Defines the level of confidence. - * @return confidence - */ - public Confidence getConfidence() { - return confidence; - } - - public void setConfidence(Confidence confidence) { - this.confidence = confidence; - } - /** - * Defines the level of retention. - * @return retention - */ - public Retention getRetention() { - return retention; - } - - public void setRetention(Retention retention) { - this.retention = retention; - } - /** - * Defines the level of criticality. - * @return criticality - */ - public Criticality getCriticality() { - return criticality; - } - - public void setCriticality(Criticality criticality) { - this.criticality = criticality; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/NeighborhoodHistoricalFindRequest.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/NeighborhoodHistoricalFindRequest.java deleted file mode 100644 index e3d30289de3..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/NeighborhoodHistoricalFindRequest.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import java.io.Serializable; -import java.util.Date; -import java.util.HashSet; -import java.util.Objects; -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NeighborhoodHistoricalFindRequest is used by the Subject Area OMAS to specify information for graph find calls. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NeighborhoodHistoricalFindRequest implements Serializable { - private Date asOfTime = null; - private Set nodeFilter = null; - private Set relationshipFilter = null; - private StatusFilter statusFilter = StatusFilter.ACTIVE; - private int level = 3; - - /** - * Default constructor */ - public NeighborhoodHistoricalFindRequest() { - - } - - public Date getAsOfTime() { - return asOfTime; - } - - public void setAsOfTime(Date asOfTime) { - this.asOfTime = asOfTime; - } - - public Set getNodeFilter() { - if(nodeFilter == null) { - nodeFilter = new HashSet<>(); - } - - return nodeFilter; - } - - public void setNodeFilter(Set nodeFilter) { - this.nodeFilter = nodeFilter; - } - - public Set getRelationshipFilter() { - if (relationshipFilter == null) { - relationshipFilter = new HashSet<>(); - } - - return relationshipFilter; - } - - public void setRelationshipFilter(Set relationshipFilter) { - this.relationshipFilter = relationshipFilter; - } - - public StatusFilter getStatusFilter() { - if(statusFilter == null) { - statusFilter = StatusFilter.ACTIVE; - } - - return statusFilter; - } - - public void setStatusFilter(StatusFilter statusFilter) { - this.statusFilter = statusFilter; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - NeighborhoodHistoricalFindRequest that = (NeighborhoodHistoricalFindRequest) o; - return level == that.level && - Objects.equals(asOfTime, that.asOfTime) && - Objects.equals(nodeFilter, that.nodeFilter) && - Objects.equals(relationshipFilter, that.relationshipFilter) && - statusFilter == that.statusFilter; - } - - @Override - public int hashCode() { - return Objects.hash(asOfTime, nodeFilter, relationshipFilter, statusFilter, level); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Permission.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Permission.java deleted file mode 100644 index 879e37a60e7..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Permission.java +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - - -/** - * OMAS permissions - * WRITE - can create children - * UPDATE - can update - * DELETE -can delete - */ - -// For the future we could include ATTRIBUTE, ARRAY, MAP, ENUM here so that the tree could naturally show these things -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum Permission { - WRITE, UPDATE, DELETE -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Reference.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Reference.java deleted file mode 100644 index f6d890abb9c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/Reference.java +++ /dev/null @@ -1,245 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * This is a view of a relationship from the perspective of one of the ends. - */ -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Reference implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String KEY_RELATED_END_GUID = "relatedEndGuid"; - public static final String KEY_RELATIONSHIP_GUID = "RelationshipGuid"; - public static final String KEY_TYPENAME = "relatedEndType"; - public static final String KEY_UNIQUE_ATTRIBUTES = "uniqueAttributes"; - - /* - In cases where the relationship ends have different names, there will be 2 references - one from each of the relationship ends perspective. - - There are some attributes that will be the same in each of these references and some - some attributes that are end specific. - */ - - // relationship information - protected String relationship_Type = null; - protected String relationshipGuid; - protected Map uniqueAttributes; - - // end / reference specific fields - protected String relatedEndGuid; - protected String relatedEndType = null; - protected String referenceName = null; - - /** - * the type of relationship - * @return relationship type - */ - public String getRelationship_Type() { - return relationship_Type; - } - - public void setRelationship_Type(String relationship_Type) { - this.relationship_Type = relationship_Type; - } - - - /** - * Attributes associated with the relationship itself - * @return relationship attributes - */ - public Map getRelationshipAttributes() { - return relationshipAttributes; - } - - public void setRelationshipAttributes(Map relationshipAttributes) { - this.relationshipAttributes = relationshipAttributes; - } - - private Map relationshipAttributes; - - /** - * This guid of the related end of this reference - * @return related end guid - */ - public String getRelatedEndGuid() { - return relatedEndGuid; - } - - public void setRelatedEndGuid(String relatedEndGuid) { - this.relatedEndGuid = relatedEndGuid; - } - - /** - * This is the relationship guid associated with this reference - * @return relationship guid - */ - public String getRelationshipGuid() { - return relationshipGuid; - } - - public void setRelationshipGuid(String relationshipGuid) { - this.relationshipGuid = relationshipGuid; - } - - /** - * This is the related ends type name - * @return related ends type name - */ - public String getRelatedEndType() { - return relatedEndType; - } - - public void setRelatedEndType(String relatedEndType) { - this.relatedEndType = relatedEndType; - } - - public Reference() { - this(null, null, (Map) null); - } - - public Reference(String guid) { - this(guid, null, (Map) null); - } - - public Reference(String guid, String relatedEndType) { - this(guid, relatedEndType, (Map) null); - } - - public Reference(String relatedEndType, Map uniqueAttributes) { - this(null, relatedEndType, uniqueAttributes); - } - - public Reference(String guid, String relatedEndType, Map uniqueAttributes) { - setRelationshipGuid(guid); - setRelatedEndType(relatedEndType); - setUniqueAttributes(uniqueAttributes); - } - - public Reference(Reference other) { - if (other != null) { - setRelationshipGuid(other.getRelationshipGuid()); - setRelatedEndGuid(other.getRelatedEndGuid()); - setRelatedEndType(other.getRelatedEndType()); - setUniqueAttributes(other.getUniqueAttributes()); - } - } - - public Reference(Map objIdMap) { - if (objIdMap != null) { - Object reg = objIdMap.get(KEY_RELATED_END_GUID); - Object rg = objIdMap.get(KEY_RELATIONSHIP_GUID); - Object t = objIdMap.get(KEY_TYPENAME); - Object u = objIdMap.get(KEY_UNIQUE_ATTRIBUTES); - - if (reg != null) { - setRelatedEndGuid(reg.toString()); - } - if (rg != null) { - setRelationshipGuid(rg.toString()); - } - - - if (t != null) { - setRelatedEndType(t.toString()); - } - - if (u instanceof Map) { - setUniqueAttributes((Map) u); - } - } - } - - /** - * Get a map of the unique attributes. i.e. the attributes whose values must are all different. - * @return {@code Map } - */ - public Map getUniqueAttributes() { - return uniqueAttributes; - } - - public void setUniqueAttributes(Map uniqueAttributes) { - this.uniqueAttributes = uniqueAttributes; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Reference{"); - sb.append("relatedEndGuid='").append(relatedEndGuid).append('\''); - sb.append("relationshipGuid='").append(relationshipGuid).append('\''); - sb.append("relatedEndType='").append(relatedEndType).append('\''); - sb.append(", uniqueAttributes={"); - //AtlasBaseTypeDef.dumpObjects(uniqueAttributes, sb); - sb.append('}'); - sb.append('}'); - - return sb; - } - - /** - * get the name of the reference - * @return reference name - */ - public String getReferenceName() { - return referenceName; - } - - public void setReferenceName(String referenceName) { - this.referenceName = referenceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Reference that = (Reference) o; - - if (relatedEndGuid != null && !Objects.equals(relatedEndGuid, that.relatedEndGuid)) { - return false; - } - if (relationshipGuid != null && !Objects.equals(relationshipGuid, that.relationshipGuid)) { - return false; - } - - return Objects.equals(relatedEndType, that.relatedEndType) && - Objects.equals(uniqueAttributes, that.uniqueAttributes); - } - - @Override - public int hashCode() { - return relatedEndGuid != null ? Objects.hash(relatedEndGuid) : Objects.hash(relatedEndType, uniqueAttributes); - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/RelationshipEnd.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/RelationshipEnd.java deleted file mode 100644 index cada387d06f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/RelationshipEnd.java +++ /dev/null @@ -1,189 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * this is represents a relationship and the related end. - */ -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipEnd implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String KEY_END_GUID = "EndGuid"; - public static final String KEY_RELATIONSHIP_GUID = "RelationshipGuid"; - public static final String KEY_TYPENAME = "relatedEndType"; - public static final String KEY_UNIQUE_ATTRIBUTES = "uniqueAttributes"; - - private String EndGuid; - private String relationshipGuid; - private Map uniqueAttributes; - protected String typeName = null; - - /** - * This guid of the is the related end of this reference - * @return guid of the end - */ - public String getEndGuid() { - return EndGuid; - } - - public void setEndGuid(String EndGuid) { - this.EndGuid = EndGuid; - } - - /** - * This is the relationship guid associated with this reference - * @return relationship guid - */ - public String getRelationshipGuid() { - return relationshipGuid; - } - - public void setRelationshipGuid(String relationshipGuid) { - this.relationshipGuid = relationshipGuid; - } - - /** - * This is the related ends type name - * @return the related ends name - */ - public String getTypeName() { - return typeName; - } - - public void setTypeName(String typeName) { - this.typeName = typeName; - } - - public RelationshipEnd() { - this(null, null, (Map) null); - } - - public RelationshipEnd(String guid) { - this(guid, null, (Map) null); - } - - public RelationshipEnd(String guid, String typeName) { - this(guid, typeName, (Map) null); - } - - public RelationshipEnd(String typeName, Map uniqueAttributes) { - this(null, typeName, uniqueAttributes); - } - - public RelationshipEnd(String guid, String typeName, Map uniqueAttributes) { - setRelationshipGuid(guid); - setTypeName(typeName); - setUniqueAttributes(uniqueAttributes); - } - - public RelationshipEnd(RelationshipEnd other) { - if (other != null) { - setRelationshipGuid(other.getRelationshipGuid()); - setEndGuid(other.getEndGuid()); - setTypeName(other.getTypeName()); - setUniqueAttributes(other.getUniqueAttributes()); - } - } - - public RelationshipEnd(Map objIdMap) { - if (objIdMap != null) { - Object reg = objIdMap.get(KEY_END_GUID); - Object rg = objIdMap.get(KEY_RELATIONSHIP_GUID); - Object t = objIdMap.get(KEY_TYPENAME); - Object u = objIdMap.get(KEY_UNIQUE_ATTRIBUTES); - - if (reg != null) { - setEndGuid(reg.toString()); - } - if (rg != null) { - setRelationshipGuid(rg.toString()); - } - - - if (t != null) { - setTypeName(t.toString()); - } - - if (u instanceof Map) { - setUniqueAttributes((Map) u); - } - } - } - - - public Map getUniqueAttributes() { - return uniqueAttributes; - } - - public void setUniqueAttributes(Map uniqueAttributes) { - this.uniqueAttributes = uniqueAttributes; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Reference{"); - sb.append("EndGuid='").append(EndGuid).append('\''); - sb.append("relationshipGuid='").append(relationshipGuid).append('\''); - sb.append("relatedEndType='").append(typeName).append('\''); - sb.append(", uniqueAttributes={"); - //AtlasBaseTypeDef.dumpObjects(uniqueAttributes, sb); - sb.append('}'); - sb.append('}'); - - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - RelationshipEnd that = (RelationshipEnd) o; - - if (EndGuid != null && !Objects.equals(EndGuid, that.EndGuid)) { - return false; - } - if (relationshipGuid != null && !Objects.equals(relationshipGuid, that.relationshipGuid)) { - return false; - } - - return Objects.equals(typeName, that.typeName) && - Objects.equals(uniqueAttributes, that.uniqueAttributes); - } - - @Override - public int hashCode() { - return EndGuid != null ? Objects.hash(EndGuid) : Objects.hash(typeName, uniqueAttributes); - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/SystemAttributes.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/SystemAttributes.java deleted file mode 100644 index b0f4c5e52c5..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/common/SystemAttributes.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status; - -import java.io.Serializable; -import java.util.Date; - - -/** - * These are the core ' system' attributes - */ -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SystemAttributes implements Serializable { - protected static final long serialVersionUID = 1L; - /* - * system attributes - */ - private String GUID = null; - private Status status = null; - private String createdBy = null; - private String updatedBy = null; - private Long createTime = null; - private Long updateTime = null; - private Long version = null; - - public String getGUID() { - return GUID; - } - - public void setGUID(String GUID) { - this.GUID = GUID; - } - - /** - * Status indicates the status of the object - the values are specified in the Status enumeration - * @return status of the object - */ - public Status getStatus() { - return status; - } - - public void setStatus(Status status) { - this.status = status; - } - - /** - * User who created this object - * @return user who created this. - */ - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - /** - * User who last updated this object - * @return use who last updated this - */ - public String getUpdatedBy() { - return updatedBy; - } - - public void setUpdatedBy(String updatedBy) { - this.updatedBy = updatedBy; - } - - /** - * The time at which this object was created. - * @return create time in milliseconds since epoch - */ - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - /** - * The time at which this object was last updated. - * @return update time in milliseconds since epoch - */ - public Long getUpdateTime() { - return updateTime; - } - /** - * Update the time at which this object was last updated in milliseconds since epoch - * @param updateTime date/time as long - */ - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - /** - * version of the object. - * @return version - */ - public Long getVersion() { - return version; - } - - public void setVersion(Long version) { - this.version = version; - } - - public StringBuilder toString(StringBuilder sb) - { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("GUID=").append(GUID).append(","); - sb.append("status=").append(this.status).append(","); - sb.append("createdBy=").append(createdBy).append(","); - sb.append("updatedBy=").append(updatedBy).append(","); - sb.append("createTime=").append(createTime).append(","); - sb.append("updateTime=").append(updateTime).append(","); - sb.append("version=").append(version).append(","); - return sb; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/CanonicalGlossary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/CanonicalGlossary.java deleted file mode 100644 index 3a6d84c799e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/CanonicalGlossary.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -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) -public class CanonicalGlossary extends Glossary { - private String scope = null; - public CanonicalGlossary() { - nodeType = NodeType.CanonicalGlossary; - } - - public String getScope() { - return scope; - } - - public void setScope(String scope) { - this.scope = scope; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/CanonicalTaxonomy.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/CanonicalTaxonomy.java deleted file mode 100644 index da806ea6f69..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/CanonicalTaxonomy.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -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) -public class CanonicalTaxonomy extends Taxonomy { - private String scope = null; - - public CanonicalTaxonomy() { - nodeType = NodeType.TaxonomyAndCanonicalGlossary; - } - - public String getScope() { - return scope; - } - - public void setScope(String scope) { - this.scope = scope; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/Glossary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/Glossary.java deleted file mode 100644 index 35fe0bd30ed..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/Glossary.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.CanonicalVocabulary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.IconSummary; - -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Glossary object - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = Glossary.class, - visible = true -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = Taxonomy.class, name = "Taxonomy"), - @JsonSubTypes.Type(value = CanonicalGlossary.class, name = "CanonicalGlossary") -}) -public class Glossary extends Node { - public Glossary() { - nodeType = NodeType.Glossary; - } - - private String usage = null; - private String language = null; - - /** - * Guidance on the usage of this glossary content. - * @return the usage. - */ - public String getUsage() { - return usage; - } - - public void setUsage(String usage) { - this.usage = usage; - } - - /** - * The Natural Language used in the glossary. - * - * This is a String - there is a Jira raised to enhance Egeria to standardise the language values. - * https://jira.odpi.org/browse/EGERIA-9 - * @return the natural language - */ - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } - - /** - * The Governance level associated with this glossary - */ - - @Override - /** - * The icons associated with this glossary. - * @return the url of the icon. - */ - public Set getIcons() { - return super.getIcons(); - } - - @Override - public void processClassification (Classification classification) { - if (classification.getClassificationName().equals("Taxonomy")) { - if (nodeType == NodeType.CanonicalGlossary || nodeType == NodeType.TaxonomyAndCanonicalGlossary) { - super.setNodeType(NodeType.TaxonomyAndCanonicalGlossary); - } else { - super.setNodeType(NodeType.Taxonomy); - } - } else if (classification.getClassificationName().equals(new CanonicalVocabulary().getClassificationName())) { - if (nodeType == NodeType.Taxonomy || nodeType == NodeType.TaxonomyAndCanonicalGlossary) { - super.setNodeType(NodeType.TaxonomyAndCanonicalGlossary); - } else { - super.setNodeType(NodeType.CanonicalGlossary); - } - } - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("Glossary="); - sb.append(super.toString(sb)); - - return sb; - } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - return this.equals(o); - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (usage != null ? usage.hashCode() : 0); - result = 31 * result + (language != null ? language.hashCode() : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/Taxonomy.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/Taxonomy.java deleted file mode 100644 index 6a275b95ccf..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/glossary/Taxonomy.java +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -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) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = Taxonomy.class, - visible = true -) -@JsonSubTypes.Type(value = CanonicalTaxonomy.class, name = "CanonicalTaxonomy") -public class Taxonomy extends Glossary { - private String organizingPrinciple = null; - - public Taxonomy() { - nodeType = NodeType.Taxonomy; - } - - public String getOrganizingPrinciple() { - return organizingPrinciple; - } - - public void setOrganizingPrinciple(String organizingPrinciple) { - this.organizingPrinciple = organizingPrinciple; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernanceClassificationLevel.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernanceClassificationLevel.java deleted file mode 100644 index 220aa08bfea..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernanceClassificationLevel.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.governednode; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * This is the level of the GovernanceLevel classification. - * This level is specified by an integer that can be higher or lower. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceClassificationLevel { - private int level; - private String name; - - /** - * How high this classification is - * @return an integer - */ - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - /** - * The name of this classification. - * @return the classification name - */ - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernanceLevel.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernanceLevel.java deleted file mode 100644 index 71273efbd72..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernanceLevel.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.governednode; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A Governance level is a type of Governance Action classification that has an associated GovernanceClassificationLevel. - * These classifications can be higher or lower; this allows goverance rules to treat higher levels with more restrictively. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceLevel { - private String classificationName =null; - - private String description=null; - - private String icon=null; - - private GovernanceClassificationLevel level=null; - - /** - * The name of the goverance level classification - * @return classification name - */ - public String getClassificationName() { - return classificationName; - } - - public void setClassificationName(String classificationName) { - this.classificationName = classificationName; - } - - /** - * Governance level classification description - * @return description - */ - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - /** - * The icon url associated with the governance level classification. - * @return icon url - */ - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } - - /** - * The level of this classification. - * @return level of classification - */ - public GovernanceClassificationLevel getLevel() { - return level; - } - - public void setLevel(GovernanceClassificationLevel level) { - this.level = level; - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernedNode.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernedNode.java deleted file mode 100644 index 765710f0a1d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/governednode/GovernedNode.java +++ /dev/null @@ -1,114 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.governednode; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.GovernanceClassifications; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * A governed Node is a node that can have associated governance classifications. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernedNode extends Node implements Serializable { - private static final Logger log = LoggerFactory.getLogger(GovernedNode.class); - private static final String className = GovernedNode.class.getName(); - - private GovernanceClassifications governanceClassifications = null; - - - public GovernanceClassifications getGovernanceClassifications() { - return governanceClassifications; - } - - public void setGovernanceClassifications(GovernanceClassifications governanceClassifications) { - this.governanceClassifications = governanceClassifications; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Node{"); - sb.append("node='").append(super.toString(sb)).append('\''); - - if (governanceClassifications !=null) { - sb.append(",governanceClassifications=").append(governanceClassifications); - } - - - sb.append('}'); - - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - GovernedNode that = (GovernedNode) o; - return Objects.equals(governanceClassifications, that.governanceClassifications); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), governanceClassifications); - } - - /** - * If governance action classifications (Retention, Confidence, Confidentiality or Criticality) are supplied then remove them - * from the classifications and add to the appropriate named field. e.g. Retention will be set in the retention field. - * - * @param classifications the list of classifications to set on the GovernedNode. - */ - @JsonIgnore - public void setClassifications(List classifications) { - if (CollectionUtils.isNotEmpty(classifications)) { - List newClassifications = new ArrayList<>(); - if (this.governanceClassifications ==null) { - this.governanceClassifications = new GovernanceClassifications(); - } - - for (Classification classification : classifications) { - if (classification.getClassificationName().equals(new Confidentiality().getClassificationName())) { - this.governanceClassifications.setConfidentiality((Confidentiality) classification); - } else if (classification.getClassificationName().equals(new Confidence().getClassificationName())) { - this.governanceClassifications.setConfidence((Confidence) classification); - } else if (classification.getClassificationName().equals(new Criticality().getClassificationName())) { - this.governanceClassifications.setCriticality((Criticality) classification); - } else if (classification.getClassificationName().equals(new Retention().getClassificationName())) { - this.governanceClassifications.setRetention((Retention) classification); - } else { - newClassifications.add(classification); - } - processClassification(classification); - } - this.classifications=newClassifications; - } - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Graph.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Graph.java deleted file mode 100644 index d3a3296af5f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Graph.java +++ /dev/null @@ -1,170 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * A graph contain - * A Node is a Glossary Artifact in the subject area omas that has a type {@code NodeType}, name, qualified name and description. - * A node may be in one or more projects. - *

- * Nodes can be connected with {@code Relationship}s to form graphs. As they may be visualised, so a node has an associated - * icon. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Graph implements Serializable { - private Map nodes = null; - private Map relationships = null; - private String rootNodeGuid = null; - private String nodeFilter = null; - private String relationshipFilter = null; - /** - * Get the nodes that are in the neighbourhood of the root node - * - * @return the nodes - */ - public Map getNodes() { - return nodes; - } - - /** - * Set the nodes that are in the neighbourhood of the root node - * - * @param nodes supply the nodes associated with the root node - */ - public void setNodes(Map nodes) { - this.nodes = nodes; - } - - /** - * Get the relationships that are in the neighbourhood of the root node - * - * @return the relationships - */ - public Map getRelationships() { - return relationships; - } - - /** - * Set the relationships that are in the neighbourhood of the root node - * - * @param relationships supply the nodes associated with the root node - */ - public void setRelationships(Map relationships) { - this.relationships = relationships; - } - - /** - * - * @return the root node guid - */ - public String getRootNodeGuid() { - return rootNodeGuid; - } - - /** - * the root node's guid. - * - * @param rootNodeGuid the guid of the root node - */ - public void setRootNodeGuid(String rootNodeGuid) { - this.rootNodeGuid = rootNodeGuid; - } - - /** - * Get the node type filters as a comma separated string - * @return string of node types - */ - public String getNodeFilter() { - return nodeFilter; - } - - /** - * Set the node type filters as a comma separated string - * @param nodeFilter the node type filters - */ - public void setNodeFilter(String nodeFilter) { - this.nodeFilter = nodeFilter; - } - - /** - * Get the relationship type filters as a comma separated string - * @return string of relationship types - */ - public String getRelationshipFilter() { - return relationshipFilter; - } - - /** - * Set the relationship type filters as a comma separated string - * @param relationshipFilter the node type filters - */ - public void setRelationshipFilter(String relationshipFilter) { - this.relationshipFilter = relationshipFilter; - } - - public String toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("NodeGUID=" + rootNodeGuid + "\n"); - sb.append(("NodeTypeFilter=" + nodeFilter == null || nodeFilter == "") ? "none" : nodeFilter + "\n"); - sb.append(("relationshipTypeFilter=" + relationshipFilter == null || relationshipFilter == "") ? "none" : relationshipFilter + "\n"); - if (nodes != null && !nodes.isEmpty()) { - - sb.append("Nodes= [\n"); - Set guids = nodes.keySet(); - for (String guid : guids) { - nodes.get(guid).toString(sb); - } - sb.append("]\n"); - } - if (relationships != null && !relationships.isEmpty()) { - sb.append("Relationships= [\n"); - Set guids = relationships.keySet(); - for (String guid : guids) { - relationships.get(guid).toString(sb); - } - sb.append("]\n"); - } - - sb.append('}'); - - return sb.toString(); - } - - - @Override - public String toString() { - return toString(new StringBuilder()); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Graph graph = (Graph) o; - return Objects.equals(rootNodeGuid, graph.getRootNodeGuid()) && Objects.equals(nodes, graph.nodes) && - Objects.equals(relationships, graph.relationships) && Objects.equals(nodeFilter, graph.nodeFilter) && - Objects.equals(relationshipFilter, graph.relationshipFilter); - } - - @Override - public int hashCode() { - return Objects.hash(rootNodeGuid, nodes, relationships, nodeFilter, relationshipFilter); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Node.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Node.java deleted file mode 100644 index 3cce0aa1cd9..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Node.java +++ /dev/null @@ -1,317 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.OmasObject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.IconSummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; - -import java.io.Serializable; -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * A Node is an entity in the subject area omas that has a type {@code NodeType}, name, qualified name and description. - * A node may be in one or more projects. - *

- * Nodes can be connected with {@code Relationship }s to form graphs. As they may be visualised, so a node has an associated - * icon. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = Node.class, - visible = true -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = Category.class), - @JsonSubTypes.Type(value = Glossary.class), - @JsonSubTypes.Type(value = Term.class), - @JsonSubTypes.Type(value = Project.class) -}) -public class Node implements Serializable, OmasObject { - protected NodeType nodeType = NodeType.Unknown; - private String typeName = null; - private String name =null; - private String qualifiedName =null; - private SystemAttributes systemAttributes=null; - private boolean readOnly = false; - private Long effectiveFromTime = null; - private Long effectiveToTime = null; - private String description =null; - protected List classifications = null; - private Set icons = null; - private Map additionalProperties; - private Map extendedProperties; - - /** - * Node type - * @return the type of the node - */ - public NodeType getNodeType() { - return nodeType; - } - - public void setNodeType(NodeType nodeType) { - this.nodeType = nodeType; - } - - /** - * The name of the node - * @return name - */ - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - /** - * The name of the type of the node - * @return name - */ - public String getTypeName() { - return typeName; - } - - public void setTypeName(String typeName) { - this.typeName = typeName; - } - /** - * The qualified name of the node. - * @return qualified name - */ - public String getQualifiedName() { - return qualifiedName; - } - - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - public SystemAttributes getSystemAttributes() { - return systemAttributes; - } - - public void setSystemAttributes(SystemAttributes systemAttributes) { - this.systemAttributes = systemAttributes; - } - - /** - * Description of the node - * @return description - */ - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - /** - * The Node is readOnly - * @return whether read only - */ - public boolean isReadOnly() { - return readOnly; - } - - /** - * set whether the node is readOnly - * @param readOnly readonly flag - */ - public void setReadOnly(boolean readOnly) { - this.readOnly = readOnly; - } - - /** - * List of associated classifications - * @return {@code List } - */ - public List getClassifications() { - if (classifications == null) { - classifications = new ArrayList<>(); - } - return classifications; - } - /** - * If governance action classifications (Retention, Confidence, Confidentiality or Criticality) are supplied then remove them - * from the classifications and add to the appropriate named field. e.g. Retention will be set in the retention field. - * - * @param classifications list of classifications to set on the Node. - */ - public void setClassifications(List classifications) { - this.classifications = classifications; - } - /** - * icon summary - * @return icon - */ - public Set getIcons() { - return icons; - } - - public void setIcons(Set icons) { - this.icons = icons; - } - - /** - * Return the date/time that this node should start to be used (null means it can be used from creationTime). - * @return Date the node becomes effective. - */ - public Long getEffectiveFromTime() - { - return effectiveFromTime; - } - - public void setEffectiveFromTime(Long effectiveFromTime) - { - this.effectiveFromTime = effectiveFromTime; - } - /** - * Return the date/time that this node should no longer be used. - * - * @return Date the node stops being effective. - */ - public Long getEffectiveToTime() - { - return effectiveToTime; - } - - public void setEffectiveToTime(Long effectiveToTime) - { - this.effectiveToTime = effectiveToTime; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Node{"); - if (name !=null) { - sb.append("name='").append(name).append('\''); - } - if (qualifiedName!=null) { - sb.append(", qualifiedName='").append(qualifiedName).append('\''); - } - - if (description!=null) { - sb.append(", description=").append(description); - } - - if (icons != null) { - sb.append(", icon='").append(icons).append('\''); - } - if (effectiveFromTime!=null) { - sb.append(", effective from date='").append(effectiveFromTime).append('\''); - } - if (effectiveToTime!=null) { - sb.append(", effective to date='").append(effectiveToTime).append('\''); - } - - sb.append('}'); - - return sb; - } - - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - Node node = (Node) o; - - if (!Objects.equals(name, node.name)) return false; - if (!Objects.equals(qualifiedName, node.qualifiedName)) return false; - if (!Objects.equals(description, node.description)) return false; - if (!Objects.equals(effectiveFromTime, node.effectiveFromTime)) return false; - if (!Objects.equals(effectiveToTime, node.effectiveToTime)) return false; - //TODO deal with icon set properly - return Objects.equals(icons, node.icons); - - } - - @Override - public int hashCode() { - int result = name != null ? name.hashCode() : 0; - result = 31 * result + (qualifiedName != null ? qualifiedName.hashCode() : 0); - result = 31 * result + (description != null ? description.hashCode() : 0); - result = 31 * result + (effectiveFromTime !=null ? effectiveFromTime.hashCode() :0); - result = 31 * result + (effectiveToTime !=null ? effectiveToTime.hashCode() :0); - - //TODO deal with icon set properly - result = 31 * result + (icons != null ? icons.hashCode() : 0); - return result; - } - - // allow child classes to process classifications - protected void processClassification(Classification classification) { - } - - /** - * Set the additional properties. - * The additional properties are OMRS attributes that exist in the Node - * - * These additional properties should be supplied on calls for this node - or they will be lost. - * @param additionalProperties the additional properties - */ - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - /** - * Get the additional properties - * - * The additional properties are OMRS attributes that exist in the Node. - * - * These additional properties should be supplied on calls for this node - or they will be lost. - * @return the additional properties - */ - public Map getAdditionalProperties() { - return this.additionalProperties; - } - /** - * Get the extended properties. - * - * The extended properties. are OMRS attributes that exist in the Node. - * - * Extended properties should be supplied on calls for this node - or they will be lost. - * @return the extended properties - */ - public Map getExtendedProperties() { - return extendedProperties; - } - /** - * Set the extended properties. - * The extended properties are OMRS attributes that come from subtypes - * - * These extended properties should be supplied on calls for this node - or they will be lost. - * @param extendedProperties extended properties - */ - public void setExtendedProperties(Map extendedProperties) { - this.extendedProperties = extendedProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/NodeType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/NodeType.java deleted file mode 100644 index 0f44fc65f0d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/NodeType.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Different types of nodes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum NodeType implements Serializable { - /** - * A Glossary that is not acting as a taxonomy or a Canonical Glossary - */ - Glossary - , - /** - * This Glossary is a taxonomy. A Taxonomy is a glossary that has a formal structure. Typically the terms have been organized into a category hierarchy that reflects their - * meaning or use. There may also be term relationships that also form part of the hierarchy. Taxonomies are often used to organize documents and other media in content repositories. - */ - Taxonomy - , - /** - * /** - * This Glossary is a taxonomy. A Taxonomy is a glossary that has a formal structure. Typically the terms have been organized into a category hierarchy that reflects their - * meaning or use. There may also be term relationships that also form part of the hierarchy. Taxonomies are often used to organize documents and other media in content repositories. - * - * This Glossary is also acting as a canonical glossary - it has a Canonical Vocabulary providing the standard vocabulary definitions for an organization. Typically terms from other - * glossaries are linked to terms from the canonical glossary. - */ - TaxonomyAndCanonicalGlossary - , - /** - * This Glossary is a canonical glossary - it has a Canonical Vocabulary providing the standard vocabulary definitions for an organization. Typically terms from other glossaries are linked to terms - * from the canonical glossary. - */ - CanonicalGlossary - , - /** - * Term - */ - Term - , - /** - * Activity - */ - Activity - , - /** - * Category - */ - Category - , - - /** - * Asset - */ - Asset - , - /** - * SubjectAreaDefinition - */ - SubjectAreaDefinition - , - - /** - * Project - */ - Project, - /** - * Glossary Project - */ - GlossaryProject, - - // TODO Consider other types like classification, comment, - /** - * Unknown type of node. - */ - Unknown -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Relationship.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Relationship.java deleted file mode 100644 index 984b8678499..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/Relationship.java +++ /dev/null @@ -1,219 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.OmasObject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; - -import java.io.Serializable; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * A relationship between 2 subject area OMAS Nodes. It is contains named attributes and has 2 relationship ends. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = Relationship.class, - visible = true -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = HasA.class), - @JsonSubTypes.Type(value = RelatedTerm.class), - @JsonSubTypes.Type(value = Synonym.class), - @JsonSubTypes.Type(value = Antonym.class), - @JsonSubTypes.Type(value = PreferredTerm.class), - @JsonSubTypes.Type(value = ReplacementTerm.class), - @JsonSubTypes.Type(value = Translation.class), - @JsonSubTypes.Type(value = IsA.class), - @JsonSubTypes.Type(value = ValidValue.class), - @JsonSubTypes.Type(value = UsedInContext.class), - @JsonSubTypes.Type(value = IsATypeOfDeprecated.class), - @JsonSubTypes.Type(value = TypedBy.class), - @JsonSubTypes.Type(value = TermAnchor.class), - @JsonSubTypes.Type(value = CategoryAnchor.class), - @JsonSubTypes.Type(value = Categorization.class), - @JsonSubTypes.Type(value = SemanticAssignment.class), - @JsonSubTypes.Type(value = LibraryCategoryReference.class), - @JsonSubTypes.Type(value = LibraryTermReference.class), - @JsonSubTypes.Type(value = ProjectScope.class), - @JsonSubTypes.Type(value = CategoryHierarchyLink.class), - @JsonSubTypes.Type(value = IsATypeOf.class) -}) -abstract public class Relationship implements Serializable, OmasObject { - protected static final long serialVersionUID = 1L; - private SystemAttributes systemAttributes = null; - private Long effectiveFromTime = null; - private Long effectiveToTime = null; - private Map additionalProperties; - protected RelationshipType relationshipType; - private boolean readOnly = false; - // this is the relationship name - protected String name; - protected RelationshipEnd end1; - protected RelationshipEnd end2; - - protected Relationship(String name, RelationshipEnd end1, RelationshipEnd end2) { - this.end1 = new RelationshipEnd(end1); - this.end2 = new RelationshipEnd(end2); - this.name = name; - initialise(); - } - - protected void initialise() { - // set the RelationshipType if this is a RelationshipType enum value. - try { - relationshipType = RelationshipType.valueOf(name); - } catch (IllegalArgumentException e) { - relationshipType = RelationshipType.Unknown; - } - } - - public RelationshipType getRelationshipType() { - return relationshipType; - } - - public void setRelationshipType(RelationshipType relationshipType) { - this.relationshipType = relationshipType; - } - - public SystemAttributes getSystemAttributes() { - return systemAttributes; - } - - public void setSystemAttributes(SystemAttributes systemAttributes) { - this.systemAttributes = systemAttributes; - } - - /** - * Return the date/time that this relationship should start to be used (null means it can be used from creationTime). - * - * @return Date the relationship becomes effective. - */ - public Long getEffectiveFromTime() { - return effectiveFromTime; - } - - public void setEffectiveFromTime(Long effectiveFromTime) { - this.effectiveFromTime = effectiveFromTime; - } - - /** - * Return the date/time that this relationship should no longer be used. - * - * @return Date the relationship stops being effective. - */ - public Long getEffectiveToTime() { - return effectiveToTime; - } - - public void setEffectiveToTime(Long effectiveToTime) { - this.effectiveToTime = effectiveToTime; - } - - public String getGuid() { - if (this.systemAttributes == null) { - return null; - } else { - return systemAttributes.getGUID(); - } - } - - public void setGuid(String guid) { - if (this.systemAttributes == null) { - this.systemAttributes = new SystemAttributes(); - } - this.systemAttributes.setGUID(guid); - } - - public String getName() { - return name; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * - * @return extra attributes - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - /** - * Get relationship end 1. The child relationship sets the appropriate values for its relationship end 1 - * - * @return RelationshipEnd relationship end 1 - */ - public RelationshipEnd getEnd1() { - return end1; - } - - public void setEnd1(RelationshipEnd end1) { - this.end1 = end1; - } - - /** - * Get relationship end 1. The child relationship sets the appropriate values for its relationship end 1 - * - * @return RelationshipEnd relationship end 1 - */ - public RelationshipEnd getEnd2() { - return end2; - } - - public void setEnd2(RelationshipEnd end2) { - this.end2 = end2; - } - - /** - * The relationship is readOnly - * @return whether read only - */ - public boolean isReadOnly() { - return readOnly; - } - - /** - * set whether the relationship is readOnly - * @param readOnly readonly flag - */ - public void setReadOnly(boolean readOnly) { - this.readOnly = readOnly; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Relationship{"); -// sb.append("typeDefGuid=").append(typeDefGuid).append(","); - sb.append("RelationshipType=").append(relationshipType.name()).append(","); - sb.append("name=").append(name); - if (this.systemAttributes != null) { - sb.append("systemAttributes { "); - sb = this.systemAttributes.toString(sb); - sb.append("}"); - } - sb.append('}'); - return sb; - } - - @Override - public String toString() { - return this.toString(null).toString(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/RelationshipEnd.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/RelationshipEnd.java deleted file mode 100644 index b93514c70e8..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/RelationshipEnd.java +++ /dev/null @@ -1,189 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.OmasObject; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * A Relationship end, that is associated with a Node. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = RelationshipEnd.class, - visible = true -) -public class RelationshipEnd implements Serializable, OmasObject { - protected static final long serialVersionUID = 1L; - private String nodeGuid =null; - private String nodeTypeName = null; - private String nodeQualifiedName = null; - private String name = null; - private String description = null; - private RelationshipEndCardinality cardinality; - - /** - * Default constructor - */ - public RelationshipEnd() { - } - - /** - * constructor - * @param nodeTypeName node type associated with this end of the relationship - * @param name name of the end - * @param description description of the end - * @param cardinality cardinality of the end - */ - public RelationshipEnd(String nodeTypeName, String name, String description, RelationshipEndCardinality cardinality) { - this.setNodeTypeName(nodeTypeName); - this.setName(name); - this.setDescription(description); - this.setCardinality(cardinality); - this.setNodeGuid(null); - this.setNodeQualifiedName(null); - } - /** - * Copy constructor - * @param endToCopy relationshipEnd to copy - */ - public RelationshipEnd(RelationshipEnd endToCopy) { - this.setNodeTypeName(endToCopy.getNodeTypeName()); - this.setName(endToCopy.getName()); - this.setDescription(endToCopy.getDescription()); - this.setCardinality(endToCopy.getCardinality()); - this.setNodeGuid(endToCopy.getNodeGuid()); - this.setNodeQualifiedName(endToCopy.getNodeQualifiedName()); - } - - /** - * get the node guid for this end - * @return guid - */ - public String getNodeGuid() { - return nodeGuid; - } - - /** - * Set the node guid for this end - * @param nodeGuid node guid - */ - public void setNodeGuid(String nodeGuid) { - this.nodeGuid = nodeGuid; - } - - /** - * get the node qualified name for this end - * @return node qualified name - */ - public String getNodeQualifiedName() { - return nodeQualifiedName; - } - - /** - * Set the node qualified name for this end - * @param nodeQualifiedName node qualified name - */ - public void setNodeQualifiedName(String nodeQualifiedName) { - this.nodeQualifiedName = nodeQualifiedName; - } - - /** - * Get the node type for this end - * @return node type - */ - public String getNodeTypeName() { - return nodeTypeName; - } - - /** - * Set the node type for this end - * @param nodeTypeName node type - */ - public void setNodeTypeName(String nodeTypeName) { - this.nodeTypeName = nodeTypeName; - } - - /** - * Get the name of this end - * @return name - */ - public String getName() { - return name; - } - - /** - * Set the name of this end - * @param name name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Get the description of this end - * @return description - */ - public String getDescription() { - return description; - } - - /** - * set the description of this end - * @param description description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Get the cardinality of this end - * @return cardinality - */ - public RelationshipEndCardinality getCardinality() { - return cardinality; - } - - /** - * Set the cardnicality of this end - * @param cardinality cardinality - */ - public void setCardinality(RelationshipEndCardinality cardinality) { - this.cardinality = cardinality; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("RelationshipEnd{"); - sb.append("nodeGuid=").append(nodeGuid).append(","); - sb.append("nodeQualifiedName=").append(nodeQualifiedName).append(","); - sb.append("nodeType=").append(nodeTypeName).append(","); - sb.append("name=").append(name).append(","); - sb.append("description=").append(description).append(","); - sb.append("cardinality=").append(cardinality); - sb.append('}'); - return sb; - } - - @Override - public String toString() { - return this.toString(null).toString(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/RelationshipType.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/RelationshipType.java deleted file mode 100644 index 7c7310a662c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/graph/RelationshipType.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public enum RelationshipType { - // glossary glossary - ExternallySourcedGlossary, - //term term - UsedInContext, - Translation, - PreferredTerm, - ValidValue, - ReplacementTerm, - TypedBy, - Synonym, - Antonym, - IsA, - IsATypeOfDeprecated, // deprecated; use IsaTypeOf instead - IsATypeOf, - RelatedTerm, - HasA, - // category category - LibraryCategoryReference, - CategoryHierarchyLink, - // category term - TermCategorization, - // glossary category - CategoryAnchor, - //glossary term - TermAnchor, - // TODO add support for the following -// AttachedComment, -// License, -// ToDoSource, -// ExternalIdLink, -// CollectionMember, -// ExternalReferenceLink, -// MediaReference, -// ExternalIdScope, -// StaffAssignment, -// Certification, -// ToDoOnReferenceable, -// Contributor, -// AttachedRating, -// AttachedNoteLog, -// MeetingOnReferenceable, -// AttachedTag, -// ReferenceableFacet, -// AttachedLike, - SemanticAssignment, - // project scope - ProjectScope, - Unknown; -} - - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/AssetSummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/AssetSummary.java deleted file mode 100644 index 93023cb8805..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/AssetSummary.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A SummaryAsset is a summary of an asset. It is used to identify a related asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetSummary extends NodeSummary { - protected final NodeType nodeType = NodeType.Asset; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CanonicalGlossarySummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CanonicalGlossarySummary.java deleted file mode 100644 index 4375a2c32f3..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CanonicalGlossarySummary.java +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A Canonical Glossary summary is a summary of a canonical glossary. It is used to identify a related canonical glossary. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CanonicalGlossarySummary extends NodeSummary { - protected NodeType nodeType = NodeType.CanonicalGlossary; - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CanonicalTaxonomySummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CanonicalTaxonomySummary.java deleted file mode 100644 index 63b58d8fb13..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CanonicalTaxonomySummary.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A Glossary that is both a taxonomy and a Canonical Glossary is summarized with this class. - * It is used to identify a related canonical glossary, which is also a taxonomy. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CanonicalTaxonomySummary extends NodeSummary { - protected NodeType nodeType = NodeType.TaxonomyAndCanonicalGlossary; - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CategorySummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CategorySummary.java deleted file mode 100644 index 0ac15c38e7c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/CategorySummary.java +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A SummaryCategory is a summary of a category. It is used to identify a related category. - * Note that this summary could represent a SubjectAreaDefinition even though the NodeType is Category. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CategorySummary extends NodeSummary { - public CategorySummary() { type = NodeType.Category; } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/GlossarySummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/GlossarySummary.java deleted file mode 100644 index d7fc71bb599..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/GlossarySummary.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A SummaryGlossary is a summary of a glossary. It is used to identify a related glossary. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GlossarySummary extends NodeSummary { - public GlossarySummary() { - type = NodeType.Glossary; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/IconSummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/IconSummary.java deleted file mode 100644 index 2cc90bb6cd6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/IconSummary.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A SummaryIcon is a summary of an icon. It is used to identify a related icon. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class IconSummary { - private static final Logger log = LoggerFactory.getLogger(IconSummary.class); - private static final String className = IconSummary.class.getName(); - private String url = null; - private String qualifiedName = null; - private String guid = null; - private String relationshipguid = null; - private String label = null; - - /** - * The url of the icon - * - * @return url - */ - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - /** - * The qualified name of the node. - * - * @return qualified name - */ - public String getQualifiedName() { - return qualifiedName; - } - - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - /** - * A unique identifier for a node - * - * @return guid - */ - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - /** - * The unique identifier of the associated relationship - * - * @return relationship guid - */ - public String getRelationshipguid() { - return relationshipguid; - } - - public void setRelationshipguid(String relationshipguid) { - this.relationshipguid = relationshipguid; - } - - /** - * Display name of the icon to be used as a label in user interfaces - * - * @return label - */ - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("IconSummary{"); - if (url != null) { - sb.append("name='").append(url).append('\''); - } - if (qualifiedName != null) { - sb.append(", qualifiedName='").append(qualifiedName).append('\''); - } - if (guid != null) { - sb.append(", guid='").append(guid).append('\''); - } - if (label != null) { - sb.append(", label='").append(label); - } - sb.append('}'); - return sb.toString(); - } - - @Override - public String toString() { - return toString(new StringBuilder()); - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - IconSummary node = (IconSummary) o; - - if (!Objects.equals(url, node.url)) { - return false; - } - return Objects.equals(qualifiedName, node.qualifiedName); - } - - @Override - public int hashCode() { - int result = url != null ? url.hashCode() : 0; - result = 31 * result + (qualifiedName != null ? qualifiedName.hashCode() : 0); - result = 31 * result + (url != null ? url.hashCode() : 0); - return result; - } - - // allow child classes to process classifications - protected void processClassification(Classification classification) { - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/NodeSummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/NodeSummary.java deleted file mode 100644 index 6b6592889f5..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/NodeSummary.java +++ /dev/null @@ -1,271 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ - -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import java.io.Serializable; -import java.util.Objects; -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * A SummaryNode represents a node in the subject area omas that has a type {@code NodeType}, relationship type, name and icon. - * A Summary Node is used when a Node needs to hold a reference to another node. It contains only fields useful for identification. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class NodeSummary implements Serializable { - protected NodeType type = NodeType.Unknown; - protected String relationshipType = null; - private String name = null; - private String qualifiedName = null; - private Set icons = null; - private String guid = null; - private Long fromEffectivityTime = null; - private Long toEffectivityTime = null; - private String relationshipguid = null; - private Long fromRelationshipEffectivityTime = null; - private Long toRelationshipEffectivityTime = null; - - /** - * Type of the other end of this relationship - * - * @return the type - */ - public NodeType getType() { - return type; - } - - public void setType(NodeType type) { - this.type = type; - } - - /** - * the type of the relationship - * - * @return relationship type - */ - public String getRelationshipType() { - return relationshipType; - } - - public void setRelationshipType(String relationshipType) { - this.relationshipType = relationshipType; - } - - /** - * The name of the node - * - * @return name - */ - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - /** - * The qualified name of the node. - * - * @return qualified name - */ - public String getQualifiedName() { - return qualifiedName; - } - - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - /** - * icons - * - * @return set of icon summaries - */ - public Set getIcons() { - return icons; - } - - public void setIcons(Set icons) { - this.icons = icons; - } - - /** - * A unique identifier for a node - * - * @return guid - */ - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - /** - * get the date effective from which this node is effective - * - * @return Date date effective from which this node is effective - */ - public Long getFromEffectivityTime() { - return fromEffectivityTime; - } - - /** - * set the date from which this node is effective - * - * @param fromEffectivityTime date from which this node is effective - */ - public void setFromEffectivityTime(Long fromEffectivityTime) { - this.fromEffectivityTime = fromEffectivityTime; - } - - /** - * get the date to which this node is effective - * - * @return Date to which this node is effective - */ - - public Long getToEffectivityTime() { - return toEffectivityTime; - } - - /** - * set the date to which this node is effective - * - * @param toEffectivityTime date to which this node is effective - */ - public void setToEffectivityTime(Long toEffectivityTime) { - this.toEffectivityTime = toEffectivityTime; - } - - /** - * The unique identifier of the associated relationship - * - * @return relationship guid - */ - public String getRelationshipguid() { - return relationshipguid; - } - - /** - * The set the unique identifier of the associated relationship - * - * @param relationshipguid relationship guid - */ - public void setRelationshipguid(String relationshipguid) { - this.relationshipguid = relationshipguid; - } - - /** - * get when date from which the relationship is effective - * - * @return Date date from which the relationship is effective - */ - public Long getFromRelationshipEffectivityTime() { - return fromRelationshipEffectivityTime; - } - - /** - * set date from which the relationship is effective - * - * @param fromRelationshipEffectivityTime date from which the relationship is effective - */ - public void setFromRelationshipEffectivityTime(Long fromRelationshipEffectivityTime) { - this.fromRelationshipEffectivityTime = fromRelationshipEffectivityTime; - } - - /** - * get date from which the relationship is effective - * - * @return date from which the relationship is effective - */ - public Long getToRelationshipEffectivityTime() { - return toRelationshipEffectivityTime; - } - - /** - * set date to which the relationship is effective - * - * @param toRelationshipEffectivityTime date to which the relationship is effective - */ - public void setToRelationshipEffectivityTime(Long toRelationshipEffectivityTime) { - this.toRelationshipEffectivityTime = toRelationshipEffectivityTime; - } - - public String toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("NodeSummary{"); - if (name != null) { - sb.append("name='").append(name).append('\''); - } - if (qualifiedName != null) { - sb.append(", qualifiedName='").append(qualifiedName).append('\''); - } -//TODO Icons - if (guid != null) { - sb.append(", guid='").append(guid).append('\''); - } - if (fromEffectivityTime != null) { - sb.append(", fromEffectivityTime='").append(fromEffectivityTime).append('\''); - } - if (toEffectivityTime != null) { - sb.append(", toEffectivityTime='").append(toEffectivityTime).append('\''); - } - - sb.append('}'); - - return sb.toString(); - } - - @Override - public String toString() { - return toString(new StringBuilder()); - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - NodeSummary node = (NodeSummary) o; - - if (!Objects.equals(name, node.name)) return false; - if (!Objects.equals(fromEffectivityTime, node.fromEffectivityTime)) return false; - if (!Objects.equals(toEffectivityTime, node.toEffectivityTime)) return false; - //TODO Icons - return Objects.equals(qualifiedName, node.qualifiedName); - } - - @Override - public int hashCode() { - int result = name != null ? name.hashCode() : 0; - result = 31 * result + (qualifiedName != null ? qualifiedName.hashCode() : 0); - result = 31 * result + (fromEffectivityTime != null ? fromEffectivityTime.hashCode() : 0); - result = 31 * result + (toEffectivityTime != null ? toEffectivityTime.hashCode() : 0); -// result = 31 * result + (icon != null ? icon.hashCode() : 0); - //TODO Icons - return result; - } - - // allow child classes to process classifications - protected void processClassification(Classification classification) { - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/TaxonomySummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/TaxonomySummary.java deleted file mode 100644 index 1fdc11bffd2..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/TaxonomySummary.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A Taxonomy summary is a summary of a taxonomy. It is used to identify a related taxonomy. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TaxonomySummary extends NodeSummary { - protected NodeType nodeType = NodeType.Taxonomy; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/TermSummary.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/TermSummary.java deleted file mode 100644 index 80fc6c196da..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/nodesummary/TermSummary.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A SummaryTerm is a summary of a term. It is used to identify a related term. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TermSummary extends NodeSummary { - protected final NodeType nodeType = NodeType.Term; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/project/GlossaryProject.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/project/GlossaryProject.java deleted file mode 100644 index 3d3f673402e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/project/GlossaryProject.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -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) -/** - * A GlossaryProject is a project used for authoring Glossaries and their associated content. - */ -public class GlossaryProject extends Project { - - public GlossaryProject() { - nodeType = NodeType.GlossaryProject; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/project/Project.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/project/Project.java deleted file mode 100644 index 659b4919392..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/project/Project.java +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.CanonicalVocabulary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.IconSummary; - -import java.util.Date; -import java.util.Objects; -import java.util.Set; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Glossary object - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = Project.class, - visible = true -) -@JsonSubTypes({ @JsonSubTypes.Type(value = GlossaryProject.class, name = "GlossaryProject") }) -public class Project extends Node{ - public Project() { - nodeType = NodeType.Project; - } - - private String identifier = null; - private Date startDate = null; - private Date plannedEndDate = null; - private String status = null; - - - public String getIdentifier() { return identifier; } - - public void setIdentifier(String identifier) { this.identifier = identifier;} - - public Date getStartDate() { - return startDate; - } - - public void setStartDate(Date startDate) { - this.startDate = startDate; - } - - public Date getPlannedEndDate() { - return plannedEndDate; - } - - public void setPlannedEndDate(Date plannedEndDate) { - this.plannedEndDate = plannedEndDate; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - /** - * The icons associated with this glossary. - * @return the url of the icon. - */ - @Override - public Set getIcons() { - return super.getIcons(); - } - - @Override - public void processClassification (Classification classification) { - //TODO - if (classification.getClassificationName().equals("Taxonomy")) { - if (nodeType == NodeType.CanonicalGlossary || nodeType == NodeType.TaxonomyAndCanonicalGlossary) { - super.setNodeType(NodeType.TaxonomyAndCanonicalGlossary); - } else { - super.setNodeType(NodeType.Taxonomy); - } - } else if (classification.getClassificationName().equals(new CanonicalVocabulary().getClassificationName())) { - if (nodeType == NodeType.Taxonomy || nodeType == NodeType.TaxonomyAndCanonicalGlossary) { - super.setNodeType(NodeType.TaxonomyAndCanonicalGlossary); - } else { - super.setNodeType(NodeType.CanonicalGlossary); - } - } - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("Glossary="); - sb.append(super.toString(sb)); - - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - Project project = (Project) o; - if (!(this.equals(o))) return false; - if (!Objects.equals(identifier, project.identifier)) return false; - if (!Objects.equals(startDate, project.startDate)) return false; - if (!Objects.equals(plannedEndDate, project.plannedEndDate)) return false; - return Objects.equals(status, project.status); - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (identifier != null ? identifier.hashCode() : 0); - result = 31 * result + (startDate != null ? startDate.hashCode() : 0); - result = 31 * result + (plannedEndDate != null ? plannedEndDate.hashCode() : 0); - result = 31 * result + (status != null ? status.hashCode() : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Activity.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Activity.java deleted file mode 100644 index a39dcdfa5c3..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Activity.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term; - - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.ActivityType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import java.io.Serializable; - -/** - * This is a Term that describes an activity - */ - -public class Activity extends Term implements Serializable { - private ActivityType activityType = null; - - public Activity() { - nodeType = NodeType.Activity; - } - - /** - * Different types of activities. - * @return ActivityType - */ - public ActivityType getActivityType() { - return activityType; - } - - public void setActivityType(ActivityType activityType) { - this.activityType = activityType; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Asset.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Asset.java deleted file mode 100644 index 4b39f919c50..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Asset.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class Asset { - private String name=null; - private String guid=null; - - // TODO consider adding the following ... -// private String type=null; -// private String description=null; -// private String icon=null; - - /** - * Display name for the asset. - * @return String - */ - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - /** - * The unique identifier for this asset. - * @return String - */ - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Term.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Term.java deleted file mode 100644 index 4d09bc66364..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/Term.java +++ /dev/null @@ -1,249 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term; - -import com.fasterxml.jackson.annotation.*; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.ObjectIdentifier; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.SpineAttribute; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.SpineObject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.governednode.GovernedNode; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.*; - -import java.io.Serializable; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A Term in the Subject Area OMAS is a semantic description of something, such as a concept, object, asset, technology, role or group. - * A Term lives in a Glossary. - * Terms can be categorised, which gives them context. Categories are hierarchical. - * Terms can be grouped into projects, for particular groups of people to work with. - * Terms can be related to other terms and can form ontologies. - * Terms can be classified. - * Terms can be semantically assigned to assets. - * - * {@literal A term can be a spine object, spine attribute and/or an object identifier. This allows terms to be grouped into objects that have attributes and identity. } - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - property = "class", - defaultImpl = Term.class, - visible = true -) -@JsonSubTypes({ @JsonSubTypes.Type(value = Activity.class, name = "Activity") }) -public class Term extends GovernedNode implements Serializable { - private String summary =null; - private String abbreviation =null; - private String examples =null; - private String usage =null; - - private GlossarySummary glossary =null; - private List categories = null; - @JsonProperty(value="spineObject") - private boolean spineObject =false; - @JsonProperty(value="spineAttribute") - private boolean spineAttribute =false; - @JsonProperty(value="objectIdentifier") - private boolean objectIdentifier =false; - - public Term() { - nodeType = NodeType.Term; - } - - /** - * The associated Glossary - * @return Glossary summary - */ - public GlossarySummary getGlossary() { - return glossary; - } - - public void setGlossary(GlossarySummary glossary) { - this.glossary = glossary; - } - - /** - * The short description of the glossary term. - * @return String - */ - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - /** - * How this glossary term is abbreviated. - * @return String - */ - public String getAbbreviation() { - return abbreviation; - } - - public void setAbbreviation(String abbreviation) { - this.abbreviation = abbreviation; - } - - /** - * Examples of this glossary term in use. - * @return String - */ - public String getExamples() { - return examples; - } - - public void setExamples(String examples) { - this.examples = examples; - } - - /** - * Further guidance on the use of this glossary term. - * @return String - */ - public String getUsage() { - return usage; - } - - public void setUsage(String usage) { - this.usage = usage; - } - - /** - * Identifies a glossary term that describes a type of spine object. - * @return true if spine object, false otherwise. - */ - public boolean isSpineObject() { - return spineObject; - } - - public void setSpineObject(boolean spineObject) { - this.spineObject = spineObject; - } - - /** - * Identifies a glossary term that describes an attribute of a spine object. - * @return true if spine object, false otherwise. - */ - public boolean isSpineAttribute() { - return spineAttribute; - } - - public void setSpineAttribute(boolean spineAttribute) { - this.spineAttribute = spineAttribute; - } - - /** - * Identifies a glossary term that describes an attribute that can be used to identify an instance. - * @return true if term is an identifier, false otherwise. - */ - public boolean isObjectIdentifier() { - return objectIdentifier; - } - - public void setObjectIdentifier(boolean objectIdentifier) { - this.objectIdentifier = objectIdentifier; - } - /** - * The Categories that categorize this Term - * @return Category Summaries - */ - public List getCategories() { - return categories; - } - - public void setCategories(List categories) { - this.categories = categories; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("term="); - sb.append(super.toString(sb)); - sb.append("Term Attributes{"); - sb.append("Summary=").append(this.summary); - - sb.append("Examples=").append(this.examples); - sb.append("Abbreviation=").append(this.abbreviation); - sb.append("Usage=").append(this.usage); - sb.append("Glossary").append(this.glossary); - if (this.categories != null && this.categories.size() >0) { - sb.append("Categories: ["); - for (CategorySummary categorySummary : this.categories) { - sb.append("Category=" + categorySummary); - } - sb.append("]"); - } - sb.append(getGovernanceClassifications()); - sb.append(", SpineInformation=["); - - if (spineObject) { - sb.append("SpineObject "); - } - if (spineAttribute) { - sb.append("SpineAttribute "); - } - if (objectIdentifier) { - sb.append("SpineIdentifier"); - } - sb.append("]"); - - if (glossary!=null ){ - sb.append(", glossary:").append(glossary.toString()); - - } - sb.append('}'); - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - Term term = (Term) o; - - return spineObject == term.spineObject && - spineAttribute == term.spineAttribute && - objectIdentifier == term.objectIdentifier && - Objects.equals(categories,term.categories) && - Objects.equals(summary, term.summary) && - Objects.equals(abbreviation, term.abbreviation) && - Objects.equals(usage, term.usage) && - Objects.equals(getGovernanceClassifications(), term.getGovernanceClassifications()) && - Objects.equals(glossary, term.glossary); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), summary, usage, abbreviation, glossary, spineObject, spineAttribute, objectIdentifier, categories, getGovernanceClassifications()); - } - - protected void processClassification(Classification classification) { - String classificationName = new SpineObject().getClassificationName(); - if (classification.getClassificationName().equals(classificationName)) { - this.spineObject = true; - } - classificationName = new SpineAttribute().getClassificationName(); - if (classification.getClassificationName().equals(classificationName)) { - this.spineAttribute = true; - } - classificationName = new ObjectIdentifier().getClassificationName(); - if (classification.getClassificationName().equals(classificationName)) { - this.objectIdentifier = true; - } - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Antonym.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Antonym.java deleted file mode 100644 index b028319aa8f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Antonym.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Link between glossary terms that have the opposite meaning. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Antonym extends Relationship { - private String description = "Link between glossary terms that have the opposite meaning."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "antonyms"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Glossary terms with the opposite meaning."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "antonyms"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Glossary terms with the opposite meaning."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public Antonym() { - super(RelationshipType.Antonym.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" Antonym="); - sb.append(super.toString(sb)); - sb.append(" Antonym Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Categorization.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Categorization.java deleted file mode 100644 index b32d170ce74..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Categorization.java +++ /dev/null @@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TermCategorizationRelationship is a relationship between a Category and an Term. The Category categorises the Term - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Categorization extends Relationship { - private String description = "Links a glossary term into a glossary category."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Category"; - private static final String END_1_ATTRIBUTE_NAME = "categories"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Glossary categories that this term is linked to."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "terms"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Glossary terms linked to this category."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private TermRelationshipStatus status; - - public Categorization() { - super(RelationshipType.TermCategorization.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Explanation of why this term is in this categorization. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal Status of the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append(" TermCategorizationRelationship="); - sb.append(super.toString(sb)); - sb.append(" TermCategorizationRelationship Attributes{"); - sb.append("description=").append(this.description).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/CategoryAnchor.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/CategoryAnchor.java deleted file mode 100644 index b7d4701828a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/CategoryAnchor.java +++ /dev/null @@ -1,69 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CategoryAnchorRelationship is a relationship a Glossary and a Category. - * It connects a glossary category with its owning glossary. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class CategoryAnchor extends Relationship { - private String description = "Connects a glossary category with its owning glossary."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Glossary"; - private static final String END_1_ATTRIBUTE_NAME = "anchor"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Owning glossary for this category."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Category"; - private static final String END_2_ATTRIBUTE_NAME = "categories"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Categories owned by this glossary."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - public CategoryAnchor() { - super(RelationshipType.CategoryAnchor.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append(" CategoryAnchorRelationship="); - sb.append(super.toString(sb)); - sb.append(" CategoryAnchorRelationship Attributes{"); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/CategoryHierarchyLink.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/CategoryHierarchyLink.java deleted file mode 100644 index 6dfa6a7d0ad..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/CategoryHierarchyLink.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CategoryHierarchyLink is a parent child relationship between a Categories; it is used to create nested categories - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class CategoryHierarchyLink extends Relationship { - private String description = "Relationship between two glossary categories used to create nested categories."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Category"; - private static final String END_1_ATTRIBUTE_NAME = "superCategory"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Identifies the parent category."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Category"; - private static final String END_2_ATTRIBUTE_NAME = "subcategories"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Glossary categories nested inside this category."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - public CategoryHierarchyLink() { - super(RelationshipType.CategoryHierarchyLink.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append(" CategoryHierarchyLink="); - sb.append(super.toString(sb)); - sb.append(" CategoryHierarchyLink Attributes{"); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/HasA.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/HasA.java deleted file mode 100644 index 524a82353c5..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/HasA.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the relationship between a spine object and a spine attribute. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class HasA extends Relationship { - private String description = "Defines the relationship between a spine object and a spine attribute."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "objects"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Objects where this attribute may occur."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "attributes"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Typical attributes for this object."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private TermRelationshipStatus status; - private String steward; - private String source; - - public HasA() { - super(RelationshipType.HasA.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append(" HasA="); - sb.append(super.toString(sb)); - sb.append(" HasA Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsA.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsA.java deleted file mode 100644 index dab48bffe67..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsA.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Link between a more general glossary term and a more specific definition. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class IsA extends Relationship { - private String description = "Link between a more general glossary term and a more specific definition."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "classifies"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "More specific glossary terms."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "isA"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "More general glossary terms."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public IsA() { - super(RelationshipType.IsA.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" IsA="); - sb.append(super.toString(sb)); - sb.append(" IsA Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsATypeOf.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsATypeOf.java deleted file mode 100644 index 154db153989..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsATypeOf.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * Defines an inheritance relationship between two spine objects. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class IsATypeOf extends Relationship { - private String description = "Defines an inheritance relationship between two spine objects."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "inherited"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Inherited (Subtypes) for this object."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "inheritedFrom"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Inherited from (Supertypes) for this object."; - - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private TermRelationshipStatus status; - private String steward; - private String source; - - public IsATypeOf() { - super(RelationshipType.IsATypeOf.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" isATypeOf="); - sb.append(super.toString(sb)); - sb.append(" isATypeOf Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsATypeOfDeprecated.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsATypeOfDeprecated.java deleted file mode 100644 index fd4a05e76dc..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/IsATypeOfDeprecated.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * Defines an inheritance relationship between two spine objects. - * - * @deprecated IsATypeOfDeprecated it is deprecated; move your instances to use IsATypeOf instead. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@Deprecated -public class IsATypeOfDeprecated extends Relationship { - private String description = "Defines an inheritance relationship between two spine objects. This is deprecated - use IsATypeOf instead."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "supertypes"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Supertypes for this object."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "subtypes"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Subtypes for this object."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private TermRelationshipStatus status; - private String steward; - private String source; - - public IsATypeOfDeprecated() { - super(RelationshipType.IsATypeOfDeprecated.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" IsATypeOf="); - sb.append(super.toString(sb)); - sb.append(" IsATypeOf Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Leadership.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Leadership.java deleted file mode 100644 index 6d0c43aaea6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Leadership.java +++ /dev/null @@ -1,67 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Leadership is a relationship between an ActorProfile and another ActorProfile. - * It is a relationship identifying leaders and their followers. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Leadership extends Relationship { - final String description = "Relationship identifying the leaders of teams."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "TeamLeader"; - private static final String END_1_ATTRIBUTE_NAME = "teamLeaders"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "The leaders of the team."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Team"; - private static final String END_2_ATTRIBUTE_NAME = "leadsTeam"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "The team lead by this team leader."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - public Leadership() { - super("Leadership", RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" Leadership="); - sb.append(super.toString(sb)); - sb.append(" Leadership Attributes{"); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/LibraryCategoryReference.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/LibraryCategoryReference.java deleted file mode 100644 index 4540f3f3611..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/LibraryCategoryReference.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import java.util.Date; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LibraryCategoryReference is a relationship between a Category and an ExternalGlossaryLink. - * It links a glossary category to a corresponding category in an external glossary. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class LibraryCategoryReference extends Relationship { - private String description = "Links a glossary category to a corresponding category in an external glossary."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Category"; - private static final String END_1_ATTRIBUTE_NAME = "localCategories"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Related local glossary categories."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "ExternalGlossaryLink"; - private static final String END_2_ATTRIBUTE_NAME = "externalGlossaryCategories"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Links to related external glossaries."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String identifier; - private String steward; - private Date lastVerified; - - public LibraryCategoryReference() { - super("LibraryCategoryReference", RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Identifier of the corresponding element from the external glossary. } - * - * @return {@code String } - */ - public String getIdentifier() { - return this.identifier; - } - - public void setIdentifier(String identifier) { - this.identifier = identifier; - } - - /** - * {@literal Description of the corresponding element from the external glossary. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - - /** - * {@literal Set the description of the relationship. } - * - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal Person who established the link to the external glossary. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Date when this reference was last checked. } - * - * @return {@code Date } - */ - public Date getLastVerified() { - return this.lastVerified; - } - - public void setLastVerified(Date lastVerified) { - this.lastVerified = lastVerified; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" LibraryCategoryReference="); - sb.append(super.toString(sb)); - sb.append(" LibraryCategoryReference Attributes{"); - sb.append("identifier=").append(this.identifier).append(","); - sb.append("description=").append(this.description).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("lastVerified=").append(this.lastVerified).append(","); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/LibraryTermReference.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/LibraryTermReference.java deleted file mode 100644 index fb50958c044..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/LibraryTermReference.java +++ /dev/null @@ -1,133 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import java.util.Date; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LibraryTermReference is a relationship between a Term and an ExternalGlossaryLink. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class LibraryTermReference extends Relationship { - private String description = "Links a glossary term to a glossary term in an external glossary."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "localTerms"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Related local glossary categories."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "ExternalGlossaryLink"; - private static final String END_2_ATTRIBUTE_NAME = "externalGlossaryTerms"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Links to related external glossaries."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String identifier; - private String steward; - private Date lastVerified; - - public LibraryTermReference() { - super("LibraryTermReference", RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Identifier of the corresponding element from the external glossary. } - * - * @return {@code String } - */ - public String getIdentifier() { - return this.identifier; - } - - public void setIdentifier(String identifier) { - this.identifier = identifier; - } - - /** - * {@literal Description of the corresponding element from the external glossary. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - - /** - * {@literal Set the description of the relationship. } - * - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal Person who established the link to the external glossary. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Date when this reference was last checked. } - * - * @return {@code Date } - */ - public Date getLastVerified() { - return this.lastVerified; - } - - public void setLastVerified(Date lastVerified) { - this.lastVerified = lastVerified; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" LibraryTermReference="); - sb.append(super.toString(sb)); - sb.append(" LibraryTermReference Attributes{"); - sb.append("identifier=").append(this.identifier).append(","); - sb.append("description=").append(this.description).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("lastVerified=").append(this.lastVerified).append(","); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/MediaReference.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/MediaReference.java deleted file mode 100644 index f2e69f2d887..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/MediaReference.java +++ /dev/null @@ -1,102 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MediaReference is a relationship between a Referenceable and a RelatedMedia. - * Link to related media such as images, videos and audio. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class MediaReference extends Relationship { - private String description = "Link to related media such as images, videos and audio."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Referenceable"; - private static final String END_1_ATTRIBUTE_NAME = "consumingItem"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Item that is referencing this work."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "RelatedMedia"; - private static final String END_2_ATTRIBUTE_NAME = "relatedMedia"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Link to external media."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String mediaId; - - public MediaReference() { - super("MediaReference", RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Local identifier for the media. } - * - * @return {@code String } - */ - public String getMediaId() { - return this.mediaId; - } - - public void setMediaId(String mediaId) { - this.mediaId = mediaId; - } - - /** - * {@literal Description of the relevance of this media to the linked item. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - - /** - * {@literal Set the description of the relationship. } - * - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" MediaReference="); - sb.append(super.toString(sb)); - sb.append(" MediaReference Attributes{"); - sb.append("mediaId=").append(this.mediaId).append(","); - sb.append("description=").append(this.description).append(","); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/PreferredTerm.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/PreferredTerm.java deleted file mode 100644 index 36d9cc58e42..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/PreferredTerm.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Link to an alternative term that the organization prefer is used. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class PreferredTerm extends Relationship { - private String description = "Link to an alternative term that the organization prefer is used."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "alternateTerms"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Link to external media."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "preferredTerms"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Related glossary terms."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public PreferredTerm() { - super(RelationshipType.PreferredTerm.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append(" PreferredTerm="); - sb.append(super.toString(sb)); - sb.append(" PreferredTerm Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ProjectScope.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ProjectScope.java deleted file mode 100644 index e332254e133..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ProjectScope.java +++ /dev/null @@ -1,83 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The Project Scope relationship links documentation, assets and definitions to the project. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ProjectScope extends Relationship { - private String description = "The documentation, assets and definitions that are affected by the project."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Project"; - private static final String END_1_ATTRIBUTE_NAME = "impactingProjects"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "The projects that are making changes to these elements."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Referenceable"; - private static final String END_2_ATTRIBUTE_NAME = "projectScope"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "The elements that are being changed by this project."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - public ProjectScope() { - super(RelationshipType.ProjectScope.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" ProjectScopeRelationship="); - sb.append(super.toString(sb)); - sb.append(" ProjectScopeRelationship Attributes{"); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - - /** - * {@literal Description of the scope of the project. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/RelatedTerm.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/RelatedTerm.java deleted file mode 100644 index c60cb97c539..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/RelatedTerm.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedTerm is a relationship between a Term and another related Term. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class RelatedTerm extends Relationship { - private String description = "Link between similar glossary terms."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "seeAlso"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Related glossary terms."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "seeAlso"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Related glossary terms."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public RelatedTerm() { - super(RelationshipType.RelatedTerm.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" RelatedTerm="); - sb.append(super.toString(sb)); - sb.append(" RelatedTerm Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ReplacementTerm.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ReplacementTerm.java deleted file mode 100644 index 007a2678156..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ReplacementTerm.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Link to a glossary term that is replacing an obsolete glossary term. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ReplacementTerm extends Relationship { - private String description = "Link to a glossary term that is replacing an obsolete glossary term."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "replacedTerms"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Replaced glossary terms."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "replacementTerms"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Replacement glossary terms."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public ReplacementTerm() { - super(RelationshipType.ReplacementTerm.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - - /** - * {@literal Set the description of the relationship. } - * - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" ReplacementTerm="); - sb.append(super.toString(sb)); - sb.append(" ReplacementTerm Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/SemanticAssignment.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/SemanticAssignment.java deleted file mode 100644 index 1ea32618911..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/SemanticAssignment.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermAssignmentStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Links a glossary term to another element such as an asset or schema element to define its meaning. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SemanticAssignment extends Relationship { - private String description = "Links a glossary term to another element such as an asset or schema element to define its meaning."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Referenceable"; - private static final String END_1_ATTRIBUTE_NAME = "assignedElements"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Elements identified as managing data that has the same meaning as this glossary term."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "meaning"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Semantic definition for this element."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermAssignmentStatus status; - private Integer confidence; - private String steward; - private String source; - - public SemanticAssignment() { - super(RelationshipType.SemanticAssignment.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal Expression describing the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of the relationship. } - * - * @return {@code GlossaryTermAssignmentStatus } - */ - public TermAssignmentStatus getStatus() { - return this.status; - } - - public void setStatus(TermAssignmentStatus status) { - this.status = status; - } - - /** - * {@literal Level of confidence in the correctness of the relationship. } - * - * @return {@code Integer } - */ - public Integer getConfidence() { - return this.confidence; - } - - public void setConfidence(Integer confidence) { - this.confidence = confidence; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" SemanticAssignment="); - sb.append(super.toString(sb)); - sb.append(" SemanticAssignment Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("confidence=").append(this.confidence).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Synonym.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Synonym.java deleted file mode 100644 index 87c3a17f036..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Synonym.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Link between glossary terms that have the same meaning. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Synonym extends Relationship { - private String description = "Link between glossary terms that have the same meaning."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "synonyms"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Glossary terms with the same meaning."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "synonyms"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Glossary terms with the same meaning."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public Synonym() { - super(RelationshipType.Synonym.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" Synonym="); - sb.append(super.toString(sb)); - sb.append(" Synonym Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/TermAnchor.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/TermAnchor.java deleted file mode 100644 index 8433fa5ae6d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/TermAnchor.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TermAnchorRelationship is a relationship between a Glossary and a Term. - * It links a term to its owning glossary. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class TermAnchor extends Relationship { - final String description = "Links a term to its owning glossary."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Glossary"; - private static final String END_1_ATTRIBUTE_NAME = "anchor"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Owning glossary."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "terms"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Terms owned by this glossary."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - public TermAnchor() { - super(RelationshipType.TermAnchor.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" TermAnchorRelationship="); - sb.append(super.toString(sb)); - sb.append(" TermAnchorRelationship Attributes{"); - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Translation.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Translation.java deleted file mode 100644 index d04d5192037..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/Translation.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * Link between glossary terms that provide different natural language translation of the same concept. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Translation extends Relationship { - private String description = "Link between glossary terms that provide different natural language translation of the same concept."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "translations"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Translations of glossary term."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "translations"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Translations of glossary term."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public Translation() { - super(RelationshipType.Translation.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" Translation="); - sb.append(super.toString(sb)); - sb.append(" Translation Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/TypedBy.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/TypedBy.java deleted file mode 100644 index bd414fa321f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/TypedBy.java +++ /dev/null @@ -1,133 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Defines the relationship between a spine attribute and its type. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class TypedBy extends Relationship { - private String description = "Defines the relationship between a spine attribute and its type."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "attributesTypedBy"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Attributes of this type."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "types"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Types for this attribute."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private TermRelationshipStatus status; - private String steward; - private String source; - - public TypedBy() { - super(RelationshipType.TypedBy.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" TypedBy="); - sb.append(super.toString(sb)); - sb.append(" TypedBy Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/UsedInContext.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/UsedInContext.java deleted file mode 100644 index 2c92217ee52..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/UsedInContext.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Link between glossary terms where on describes the context where the other one is valid to use. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class UsedInContext extends Relationship { - private String description = "Link between glossary terms where on describes the context where the other one is valid to use."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "contextRelevantTerms"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Glossary terms used in this specific context."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "usedInContexts"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Glossary terms describing the contexts where this term is used."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public UsedInContext() { - super(RelationshipType.UsedInContext.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" UsedInContext="); - sb.append(super.toString(sb)); - sb.append(" UsedInContext Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ValidValue.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ValidValue.java deleted file mode 100644 index a7abc81fc47..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/relationships/ValidValue.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.properties.relationships; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Link between glossary terms where one defines one of the data values for the another. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ValidValue extends Relationship { - private String description = "Link between glossary terms where one defines one of the data values for the another."; - - /* - * Set up end 1. - */ - private static final String END_1_NODE_TYPE = "Term"; - private static final String END_1_ATTRIBUTE_NAME = "validValueFor"; - private static final String END_1_ATTRIBUTE_DESCRIPTION = "Glossary terms for data items that can be set to this value."; - private static final RelationshipEndCardinality END_1_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_1 = new RelationshipEnd(END_1_NODE_TYPE, - END_1_ATTRIBUTE_NAME, END_1_ATTRIBUTE_DESCRIPTION, END_1_CARDINALITY); - - /* - * Set up end 2. - */ - private static final String END_2_NODE_TYPE = "Term"; - private static final String END_2_ATTRIBUTE_NAME = "validValues"; - private static final String END_2_ATTRIBUTE_DESCRIPTION = "Glossary terms for data values that can be used with data items represented by this glossary term."; - private static final RelationshipEndCardinality END_2_CARDINALITY = RelationshipEndCardinality.ANY_NUMBER; - private static final RelationshipEnd RELATIONSHIP_END_2 = new RelationshipEnd(END_2_NODE_TYPE, - END_2_ATTRIBUTE_NAME, END_2_ATTRIBUTE_DESCRIPTION, END_2_CARDINALITY); - - private String expression; - private TermRelationshipStatus status; - private String steward; - private String source; - - public ValidValue() { - super(RelationshipType.ValidValue.name(), RELATIONSHIP_END_1, RELATIONSHIP_END_2); - } - - /** - * {@literal Description of the relationship. } - * - * @return {@code String } - */ - public String getDescription() { - return this.description; - } - /** - * {@literal Set the description of the relationship. } - * @param description {@code String } - */ - public void setDescription(String description) { - this.description = description; - } - /** - * {@literal An expression that explains the relationship. } - * - * @return {@code String } - */ - public String getExpression() { - return this.expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * {@literal The status of or confidence in the relationship. } - * - * @return {@code TermRelationshipStatus } - */ - public TermRelationshipStatus getStatus() { - return this.status; - } - - public void setStatus(TermRelationshipStatus status) { - this.status = status; - } - - /** - * {@literal Person responsible for the relationship. } - * - * @return {@code String } - */ - public String getSteward() { - return this.steward; - } - - public void setSteward(String steward) { - this.steward = steward; - } - - /** - * {@literal Person, organization or automated process that created the relationship. } - * - * @return {@code String } - */ - public String getSource() { - return this.source; - } - - public void setSource(String source) { - this.source = source; - } - - @Override - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append(" ValidValue="); - sb.append(super.toString(sb)); - sb.append(" ValidValue Attributes{"); - sb.append("description=").append(this.description).append(","); - sb.append("expression=").append(this.expression).append(","); - sb.append("steward=").append(this.steward).append(","); - sb.append("source=").append(this.source).append(","); - if (status != null) { - sb.append("status=").append(status.name()); - } - sb.append("}"); - return sb; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/responses/SubjectAreaOMASAPIResponse.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/responses/SubjectAreaOMASAPIResponse.java deleted file mode 100644 index 8a2e5c2d28a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/responses/SubjectAreaOMASAPIResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.responses; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * @param type for response results - * SubjectAreaOMASAPIResponse provides a common header for Subject Area OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true, value = {"head"}) -public class SubjectAreaOMASAPIResponse extends FFDCResponseBase implements GenericResponse { - @JsonProperty("result") - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "class", visible = true) - private final List result = new ArrayList<>(); - - @JsonCreator - public SubjectAreaOMASAPIResponse() { /* default constructor */ } - - @Override - public void addAllResults(Collection results) { - this.result.addAll(results); - } - - @Override - public void addResult(R result){ - this.result.add(result); - } - - /** - * Set a standard exceptional info for the response - * - * @param e exception {@link OCFCheckedExceptionBase} - * @param className name of the class being called. - **/ - public void setExceptionInfo(OCFCheckedExceptionBase e, String className) { - super.setRelatedHTTPCode(e.getReportedHTTPCode()); - super.setExceptionClassName(e.getClass().getName()); - super.setActionDescription(e.getReportingActionDescription()); - super.setExceptionUserAction(e.getReportedUserAction()); - super.setExceptionErrorMessage(e.getReportedErrorMessage()); - super.setExceptionSystemAction(e.getReportedSystemAction()); - super.setExceptionProperties(e.getRelatedProperties()); - } - - @Override - public List results() { - return new ArrayList<>(result); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/validators/InputValidator.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/validators/InputValidator.java deleted file mode 100644 index 9f44f39e4e9..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/validators/InputValidator.java +++ /dev/null @@ -1,212 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.accessservices.subjectarea.validators; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - -/** - * Methods used for rest API input validation - */ -public class InputValidator { - /** - * Throw an exception if the metadata server URL (which comes from the configuration has not been supplied on the constructor. - * - * @param className - name of the class making the call. - * @param actionDescription - action description - * @param omasServerURL - metadata server url. - * @throws InvalidParameterException - the org.odpi.openmetadata.accessservices.subjectarea.server URL is not set - */ - static public void validateRemoteServerURLNotNull(String className, String actionDescription, String omasServerURL) throws InvalidParameterException { - if (omasServerURL == null) { - /* - * It is not possible to retrieve a connection without knowledge of where the OMAS Server is located. - */ - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.SERVER_URL_NOT_SPECIFIED.getMessageDefinition(); - - String invalidPropertyName = "omasServerURL"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - invalidPropertyName, - null); - } - } - - /** - * Throw an exception if the metadata server Name (which comes from the configuration has not been supplied on the constructor. - * - * @param className - name of the class making the call. - * @param actionDescription - action description - * @param omasServerName - metadata server name - * @throws InvalidParameterException - the org.odpi.openmetadata.accessservices.subjectarea.server URL is not set - */ - static public void validateRemoteServerNameNotNull(String className, String actionDescription, String omasServerName) throws InvalidParameterException { - if (omasServerName == null) { - /* - * It is not possible to retrieve a connection without knowledge of where the OMAS Server is located. - */ - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.SERVER_NAME_NOT_SPECIFIED.getMessageDefinition(); - String invalidPropertyName = "omasServerName"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - invalidPropertyName, - null); - } - } - - - /** - * Throw an exception if the supplied userId is null - * - * @param className name of the class - * @param actionDescription - action description - * @param userId user name to validate - * @throws InvalidParameterException the userId is null - */ - static public void validateUserIdNotNull( - String className, - String actionDescription, - String userId) throws InvalidParameterException { - if (userId == null) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.NULL_USER_ID.getMessageDefinition(); - String invalidPropertyName = "userId"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - invalidPropertyName, - null); - } - } - - /** - * Validate the supplied string can be converted to a Status and return that status. If it cannot be converted then null is returned. - * - * @param className - name of the class making the call. - * @param actionDescription - name of the method making the call. - * @param statusName - the String name to convert to a Status - * @return Status or null. - * @throws InvalidParameterException invalid status - */ - static public Status validateStatusAndCheckNotDeleted( - String className, - String actionDescription, - String statusName) throws InvalidParameterException { - Status newStatus = null; - try { - newStatus = Status.valueOf(statusName); - } catch (Exception e) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.INVALID_STATUS_VALUE_SUPPLIED.getMessageDefinition(); - String invalidPropertyName = "status"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - invalidPropertyName, - statusName); - - } - if (Status.DELETED == newStatus) { - - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.STATUS_UPDATE_TO_DELETED_NOT_ALLOWED.getMessageDefinition(); - String invalidPropertyName = "status"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - invalidPropertyName, - statusName); - - } - - return newStatus; - } - - - /** - * Throw an exception if the supplied userId is null - * - * @param className - name of the class making the call. - * @param actionDescription - name of the method making the call. - * @param guid - unique identifier to validate - * @param guidParameter - name of the parameter that passed the userId - * @throws InvalidParameterException - the userId is null - */ - static public void validateGUIDNotNull( - String className, - String actionDescription, - String guid, - String guidParameter) throws InvalidParameterException { - if (guid == null) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.NULL_GUID.getMessageDefinition(); - String invalidPropertyName = "guid"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - invalidPropertyName, - null); - } - } - - - /** - * Throw an exception if the supplied userId is null - * - * @param className - name of the class making the call. - * @param actionDescription - name of the method making the call. - * @param name - unique name to validate - * @param nameParameter - name of the parameter that passed the name. - * @throws InvalidParameterException - the userId is null - */ - public static void validateNameNotNull(String className, - String actionDescription, - String name, - String nameParameter - ) throws InvalidParameterException { - if (name == null) { - - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.NULL_NAME.getMessageDefinition(); - - messageDefinition.setMessageParameters(nameParameter, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - nameParameter, - null); - } - } - - public static void validateNodeType(Object... args) throws InvalidParameterException { - if (args.length < 4) return; - boolean isValid = false; - String className = (String) args[0]; - String actionDescription = (String) args[1]; - NodeType nodeTypeToCheck = (NodeType) args[2]; - - if (nodeTypeToCheck != null) { - for (int i = 3; i < args.length; i++) { - if (nodeTypeToCheck.equals(args[i])) { - isValid = true; - } - } - if (!isValid) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.INVALID_NODETYPE.getMessageDefinition(); - String invalidPropertyName = "nodeType"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - actionDescription, - invalidPropertyName, - nodeTypeToCheck.name()); - } - } - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/ErrorCodeTest.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/ErrorCodeTest.java deleted file mode 100644 index bac6f8188df..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/ErrorCodeTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.ffdc; - - -import org.odpi.openmetadata.test.unittest.utilities.ExceptionMessageSetTest; -import org.testng.annotations.Test; - -/** - * Verify the SubjectAreaErrorCode 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 = "OMAS-SUBJECT-AREA"; - - /** - * Validated the values of the enum. - */ - @Test - public void testAllErrorCodeValues() { - for (SubjectAreaErrorCode errorCode : SubjectAreaErrorCode.values()) { - super.testSingleErrorCodeValue(errorCode, messageIdPrefix); - } - } -} - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/TestTerm.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/TestTerm.java deleted file mode 100644 index cd3d4ae77b5..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/properties/objects/term/TestTerm.java +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -public class TestTerm { - @Test - public void testBooleans() throws JsonProcessingException { - Term term = new Term(); - term.setSpineAttribute(true); - term.setSpineObject(false); - if (!term.isSpineAttribute()){ - fail("Spine attribute is not correct"); - } - if (term.isSpineObject()){ - fail("Spine object is not correct"); - } - ObjectMapper objectMapper = new ObjectMapper(); - String termAsString = objectMapper.writeValueAsString(term); - Term term2 = objectMapper.readValue(termAsString, Term.class); - if (!term2.isSpineAttribute()){ - fail("Spine attribute is not correct after serialisation"); - } - if (term2.isSpineObject()){ - fail("Spine object is not correct after serialisation"); - } - - - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/validators/TestInputValidator.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/validators/TestInputValidator.java deleted file mode 100644 index 102ad30e9ee..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/validators/TestInputValidator.java +++ /dev/null @@ -1,118 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.validators; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.testng.annotations.Test; - -import static org.testng.Assert.*; -public class TestInputValidator { - @Test - public void testGUIDNotNull() { - try { - InputValidator.validateGUIDNotNull("c","m","A1","guidParm"); - } catch (InvalidParameterException e) { - fail("Non null should not fail"); - } - try { - InputValidator.validateGUIDNotNull("c","m",null,"guidParm"); - } catch (InvalidParameterException e) { - System.out.println("Expected error message " + e.getReportedErrorMessageId()); - if (e.getReportedErrorMessage().contains("{") || e.getReportedErrorMessage().contains("}") ){ - fail("inserts not correct"); - } - } - } - @Test - public void testNameNotNull() { - try { - InputValidator.validateNameNotNull("c","m","A1","nameParm"); - } catch (InvalidParameterException e) { - fail("Non null should not fail"); - } - try { - InputValidator.validateNameNotNull("c","m",null,"nameParm"); - } catch (InvalidParameterException e) { - System.out.println("Expected error message " + e.getReportedErrorMessageId()); - if (e.getReportedErrorMessage().contains("{") || e.getReportedErrorMessage().contains("}") ){ - fail("inserts not correct"); - } - } - } - @Test - public void testOMASServerURLNotNull() { - try { - InputValidator.validateRemoteServerURLNotNull("c", "m", "A1"); - } catch (InvalidParameterException e) { - fail("Non null should not fail"); - } - try { - InputValidator.validateRemoteServerURLNotNull("c", "m", null); - } catch (InvalidParameterException e) { - System.out.println("Expected error message " + e.getReportedErrorMessageId()); - if (e.getReportedErrorMessage().contains("{") || e.getReportedErrorMessage().contains("}") ){ - fail("inserts not correct"); - } - } - } - @Test - public void testUseridNotNull() { - try { - InputValidator.validateUserIdNotNull("c","m","A1"); - } catch (InvalidParameterException e) { - fail("Non null should not fail"); - } - try { - InputValidator.validateUserIdNotNull("c","m",null); - } catch (InvalidParameterException e) { - System.out.println("Expected error message " + e.getReportedErrorMessageId()); - if (e.getReportedErrorMessage().contains("{") || e.getReportedErrorMessage().contains("}") ){ - fail("inserts not correct"); - } - } - } - @Test - public void testValidateStatus() { - try { - InputValidator.validateStatusAndCheckNotDeleted("c","m","ACTIVE"); - } catch (InvalidParameterException e) { - fail("Non null should not fail"); - } - try { - InputValidator.validateStatusAndCheckNotDeleted("c","m","DELETED"); - } catch (InvalidParameterException e) { - System.out.println("Expected error message " + e.getReportedErrorMessageId()); - if (e.getReportedErrorMessage().contains("{") || e.getReportedErrorMessage().contains("}") ){ - fail("inserts not correct"); - } - } - try { - InputValidator.validateStatusAndCheckNotDeleted("c","m","DANCER"); - } catch (InvalidParameterException e) { - System.out.println("Expected error message " + e.getReportedErrorMessageId()); - if (e.getReportedErrorMessage().contains("{") || e.getReportedErrorMessage().contains("}") ){ - fail("inserts not correct"); - } - } - } - @Test - public void testValidateNodeType() throws InvalidParameterException { - - NodeType nodetype = NodeType.Glossary; - validateNodeTypeforGlossary(NodeType.Glossary); - validateNodeTypeforGlossary(NodeType.Taxonomy); - validateNodeTypeforGlossary(NodeType.TaxonomyAndCanonicalGlossary); - validateNodeTypeforGlossary(NodeType.CanonicalGlossary); - validateNodeTypeforGlossary(null); - try { - validateNodeTypeforGlossary(NodeType.Term); - assertFalse(false, "Error incorrect nodetype accepted"); - } catch (InvalidParameterException e) { - - } - } - private void validateNodeTypeforGlossary (NodeType nodetype) throws InvalidParameterException { - InputValidator.validateNodeType("classa","method1",nodetype, NodeType.Glossary,NodeType.Taxonomy,NodeType.TaxonomyAndCanonicalGlossary, NodeType.CanonicalGlossary); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/README.md b/open-metadata-implementation/access-services/subject-area/subject-area-client/README.md deleted file mode 100644 index f347b4fbc22..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/README.md +++ /dev/null @@ -1,12 +0,0 @@ - - - -# Subject Area Open Metadata Access Service (OMAS) Client - -The Subject Area OMAS supports a REST API for requests and an event-based -interface for asynchronous integration. This client -package provides language-specific client packages to make it easier -for data tools and applications to call these 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-implementation/access-services/subject-area/subject-area-client/build.gradle b/open-metadata-implementation/access-services/subject-area/subject-area-client/build.gradle deleted file mode 100644 index 9805dbef949..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-api') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:open-integration-framework') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - - implementation 'org.slf4j:slf4j-api' - implementation 'org.reflections:reflections' - implementation 'org.springframework:spring-core' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - testImplementation 'org.junit.jupiter:junit-jupiter' - -} - -description = 'Subject Area OMAS Client' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/SubjectArea.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/SubjectArea.java deleted file mode 100644 index dbaab29c20a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/SubjectArea.java +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea; - -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfig; -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraph; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationshipClients; - -/** - * The SubjectArea Open Metadata Access Service (OMAS). - */ -public interface SubjectArea { - - SubjectAreaNodeClients nodeClients(); - - /** - * Get the subject area relationship API class - use this class to issue relationship calls. - * - * @return subject area relationship API class - */ - SubjectAreaRelationshipClients relationshipClients(); - - /** - * Get the subject area config API class - use this class to issue config calls. - * - * @return subject area config API class - */ - SubjectAreaConfigClient subjectAreaConfigClient(); - - /** - * Get the subject area graph API class - use this class to issue graph calls. - * - * @return subject area graph API class - */ - SubjectAreaGraphClient subjectAreaGraphClient(); - - - /** - * Server Name under which this request is performed, this is used in multi tenanting to identify the tenant - * - * @return serverName name of the server - */ - String serverName(); - - /** - * Base url used to issue Rest calls - * - * @return base url - */ - String omasServerUrl(); -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/AbstractSubjectArea.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/AbstractSubjectArea.java deleted file mode 100644 index 782cefd5592..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/AbstractSubjectArea.java +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryParams; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -public abstract class AbstractSubjectArea implements SubjectAreaClient, ResponseParameterization { - public static final String SUBJECT_AREA_BASE_URL = "/servers/%s/open-metadata/access-services/subject-area/users/%s/"; - public static final String BASE_RELATIONSHIPS_URL = SUBJECT_AREA_BASE_URL + "relationships"; - - protected final String BASE_URL; - protected final SubjectAreaRestClient client; - - protected AbstractSubjectArea(SubjectAreaRestClient client, String baseUrl) { - this.BASE_URL = baseUrl; - this.client = client; - } - - @Override - public T getByGUID(String userId, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String urlTemplate = BASE_URL + "/%s"; - GenericResponse response = client.getByIdRESTCall(userId, guid, getMethodInfo("getByGUID"), getParameterizedType(), urlTemplate); - return response.head().get(); - } - - @Override - public T create(String userId, T supplied) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), supplied); - return response.head().get(); - } - @Override - public List find(String userId, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, findRequest, false,true); - } - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, findRequest, exactValue, ignoreCase, null); - } - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - QueryParams queryParams = new QueryParams() - .setExactValue(exactValue) - .setIgnoreCase(ignoreCase); - - GenericResponse response = client.findRESTCall(userId, getMethodInfo("find"), BASE_URL, getParameterizedType(), findRequest, queryParams, maximumPageSizeOnRestCall); - return response.results(); - } - - @Override - public T update(String userId, String guid, T supplied, boolean isReplace) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String urlTemplate = BASE_URL + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - GenericResponse response = client.putRESTCall(userId, guid, methodInfo, urlTemplate, getParameterizedType(), supplied); - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String urlTemplate = BASE_URL + "/%s"; - client.deleteRESTCall(userId, guid, getMethodInfo("delete()"), getParameterizedType(), urlTemplate); - } - - @Override - public T restore(String userId, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String urlTemplate = BASE_URL + "/%s"; - GenericResponse response = client.restoreRESTCall(userId, guid, getMethodInfo("restore"), getParameterizedType(), urlTemplate); - return response.head().get(); - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/ConnectedAssetClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/ConnectedAssetClient.java deleted file mode 100644 index 055d3c43f6a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/ConnectedAssetClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase; - -/** - * ConnectedAssetClient manages the retrieval of connections, and the creation of resource connectors used to access the - * content of data sources and services. - */ -public class ConnectedAssetClient extends ConnectedAssetClientBase -{ - private final static String serviceURLMarker = "community-profile"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's userId embedded in all HTTP requests - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public ConnectedAssetClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, serviceURLMarker, serverUserId, serverPassword); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/OpenMetadataStoreClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/OpenMetadataStoreClient.java deleted file mode 100644 index 77664065789..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/OpenMetadataStoreClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworkservices.gaf.client.OpenMetadataClientBase; - -/** - * OpenMetadataClientBase provides an interface to the open metadata store. This is part of the Governance Action Framework (GAF) - * and provides a comprehensive interface for working with all types of metadata, subject to the user's (and this OMAS's) security permissions. - * The interface supports search, maintenance of metadata elements, classifications and relationships plus the ability to raise incident reports - * and todos along with the ability to work with metadata valid values and translations. - */ -public class OpenMetadataStoreClient extends OpenMetadataClientBase -{ - private final static String serviceURLMarker = "subject-area"; - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, maxPageSize); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformURLRoot the network address of the server running the OMAS REST services - * @param serverUserId caller's userId embedded in all HTTP requests - * @param serverPassword caller's password embedded in all HTTP requests - * @param maxPageSize maximum value allowed for page size - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public OpenMetadataStoreClient(String serverName, - String serverPlatformURLRoot, - String serverUserId, - String serverPassword, - int maxPageSize) throws InvalidParameterException - { - super(serviceURLMarker, serverName, serverPlatformURLRoot, serverUserId, serverPassword, maxPageSize); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaClient.java deleted file mode 100644 index 617cca74495..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaClient.java +++ /dev/null @@ -1,230 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -/** - * @param Glossary Artifact type for supplied and return. - * Interface describing common methods to client working with Subject area resources. - * - * This is the Subject Area client API, for use by the subject area expert. - * This API exposes SCRUD (search, create, read ,update, delete) operations that can be performed on a Glossary Artifact. - */ -public interface SubjectAreaClient { - - FindRequest EMPTY_FIND_REQUEST = new FindRequest(); - - /** - * Get Glossary Artifact by guid - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the Glossary Artifact. - * @return found Glossary Artifact of the T type. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - T getByGUID(String userId, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - /** - * Create a Glossary Artifact. To create, you must pass the created object and specify a unique user identifier. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param supplied Glossary Artifact to create. - * @return created Glossary Artifact. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - T create(String userId, T supplied) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - /** - * Request to find all Glossary Artifacts of the type T. - * Be aware that getting all objects may incur a big performance hit when there are many objects. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @return list all Glossary Artifacts of the T type. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - default List findAll(String userId) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - return find(userId, EMPTY_FIND_REQUEST, false, true); - } - - /** - * Request to find all Glossary Artifacts of the type T. - * Be aware that getting all objects may incur a big performance hit when there are many objects. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param maximumPageSizeOnRestCall maximum page size that can be used on rest calls, null and 0 mean no limit set. - * @return list all Glossary Artifacts of the T type. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - default List findAll(String userId, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - return find(userId, EMPTY_FIND_REQUEST, false, true, maximumPageSizeOnRestCall); - } - - /** - * Request to find Glossary Artifacts of the type T. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param findRequest information Glossary Artifact for find calls. - * @return list Glossary Artifacts of the T type relevant in the findRequest information. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - List find(String userId, FindRequest findRequest) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - /** - * Request to find Glossary Artifacts of the type T. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param findRequest information Glossary Artifact for find calls. - * @param exactValue should the result match exactly? - * @param ignoreCase should the match be case insensitive? - * @return list Glossary Artifacts of the T type relevant in the findRequest information. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - /** - * Request to find Glossary Artifacts of the type T. - * - * The downstream server is likely to have a maximum Page Size is will accept, the client can interrogate this value - * and include it on the maximumPageSizeOnRestCall parameter. This API will ensure will issue multiple rest calls if required - * to ensure requests only request the supported max page size. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param findRequest information Glossary Artifact for find calls. - * @param exactValue exactValue - when false values with trailing characters will match - * @param ignoreCase ignore the case when matching - * @param maximumPageSizeOnRestCall maximum page size that can be used on rest calls, null and 0 mean no limit set. - * @return list Glossary Artifacts of the T type relevant in the findRequest information. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - List find(String userId, FindRequest findRequest, - boolean exactValue, - boolean ignoreCase, - Integer maximumPageSizeOnRestCall) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - /** - * Update or replace a Glossary Artifact. - * - * @param guid unique identifier of the Glossary Artifact. - * @param userId unique identifier for requesting user, under which the request is performed. - * @param supplied Glossary Artifact to be updated or replaced. - * @param isReplace flag to indicate that this update is a replace. - * @return updated Glossary Artifact. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - T update(String userId, String guid, T supplied, boolean isReplace) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - /** - * Replace a Glossary Artifact. This means to override all the existing attributes with the supplied attributes. - * - * @param guid unique identifier of the Glossary Artifact. - * @param userId unique identifier for requesting user, under which the request is performed. - * @param supplied Glossary Artifact to be replaced. - * @return replaced Glossary Artifact. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - default T replace(String userId, String guid, T supplied) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - return update(userId, guid, supplied, true); - } - - /** - * Update a Glossary Artifact. This means to update the object with any non-null attributes from the supplied Glossary Artifact. - * - * @param guid unique identifier of the Glossary Artifact. - * @param userId unique identifier for requesting user, under which the request is performed. - * @param supplied Glossary Artifact to be updated. - * @return updated Glossary Artifact. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - default T update(String userId, String guid, T supplied) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - return update(userId, guid, supplied, false); - } - - /** - * Delete a Glossary Artifact. - * - * @param guid unique identifier of the Glossary Artifact. - * @param userId unique identifier for requesting user, under which the request is performed. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - void delete(String userId, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - /** - * Restore of a soft deleted Glossary Artifact. - * - * @param guid unique identifier of the Glossary Artifact. - * @param userId unique identifier for requesting user, under which the request is performed. - * @return restored glossary Artifact - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - T restore(String userId, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaImpl.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaImpl.java deleted file mode 100644 index c6fd47f867c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.accessservices.subjectarea.SubjectArea; -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.DefaultSubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationship; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationshipClients; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.accessservices.subjectarea.validators.InputValidator; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; - - -/** - * SubjectAreaImpl is the OMAS client library implementation of the SubjectAreaImpl OMAS. - * This interface provides glossary authoring interfaces for subject area experts. - */ -public class SubjectAreaImpl implements SubjectArea { - private static final String className = SubjectAreaImpl.class.getName(); - - private final SubjectAreaNodeClients nodeClients; - private final SubjectAreaRelationshipClients relationshipAPI; - private final SubjectAreaGraphClient graphAPI; - private final SubjectAreaConfigClient configAPI; - private final String serverName; - private final String omasServerUrl; - - /** - * Default Constructor used once a connector is created. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param omasServerURL - unique id for the connector instance - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - public SubjectAreaImpl(String serverName, String omasServerURL) throws InvalidParameterException { - String methodName = "SubjectAreaImpl"; - InputValidator.validateRemoteServerNameNotNull(className, methodName, serverName); - InputValidator.validateRemoteServerURLNotNull(className, methodName, omasServerURL); - try { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, omasServerURL); - DefaultSubjectAreaNodeClients subjectAreaNode = new DefaultSubjectAreaNodeClients(client); - SubjectAreaRelationship subjectAreaRelationship = new SubjectAreaRelationship(client); - SubjectAreaGraphClient subjectAreaGraph = new SubjectAreaGraphClient(client); - SubjectAreaConfigClient subjectAreaConfig = new SubjectAreaConfigClient(client); - - this.nodeClients = subjectAreaNode; - this.relationshipAPI = subjectAreaRelationship; - this.graphAPI = subjectAreaGraph; - this.configAPI = subjectAreaConfig; - - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - String parameterName = "serverName or omasServerURL"; - String parameterValue = "unknown"; - if (serverName == null || "".equals(serverName)) { - parameterName = "serverName"; - parameterValue = serverName; - } - if (omasServerURL == null || "".equals(omasServerURL)) { - parameterName = "omasServerURL"; - parameterValue = omasServerURL; - } - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.SUBJECT_AREA_FAILED_TO_INITIALISE.getMessageDefinition(); - messageDefinition.setMessageParameters(parameterName, parameterValue); - throw new InvalidParameterException(messageDefinition, className, methodName, e, parameterName, parameterValue); - } - - this.serverName = serverName; - this.omasServerUrl = omasServerURL; - } - - - @Override - public SubjectAreaNodeClients nodeClients() { - return this.nodeClients; - } - - /** - * Get the subject area relationship API class - use this class to issue relationship calls. - * - * @return subject area relationship API class - */ - @Override - public SubjectAreaRelationshipClients relationshipClients() { - return this.relationshipAPI; - } - - /** - * Get the subject area graph API class - use this class to issue config calls. - * - * @return subject area config API class - */ - @Override - public SubjectAreaConfigClient subjectAreaConfigClient() { - return this.configAPI; - } - /** - * Get the subject area graph API class - use this class to issue graph calls. - * - * @return subject area graph API class - */ - @Override - public SubjectAreaGraphClient subjectAreaGraphClient() { return this.graphAPI; } - - /** - * Server Name under which this request is performed, this is used in multi tenanting to identify the tenant - * - * @return serverName name of the server - */ - - @Override - public String serverName() { - return serverName; - } - - /** - * Base url used to issue OMAS Rest calls - * - * @return url of the server - */ - @Override - public String omasServerUrl() { - return omasServerUrl; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaNodeClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaNodeClient.java deleted file mode 100644 index 0ed83d40c77..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaNodeClient.java +++ /dev/null @@ -1,70 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -/** - * @param inherited from {@link Node} type - * Interface for Subject Area client node operations - */ -public interface SubjectAreaNodeClient extends SubjectAreaClient { - - /** - * Request to search relationships for current node. - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. - * @return list relationships relevant in the findRequest information. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - List getRelationships(String userId, - String guid, - FindRequest findRequest) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - /** - * Request to search relationships for current node. - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. - * @param maximumPageSizeOnRestCall maximum page size to use on rest calls. - * @return list relationships relevant in the findRequest information. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - List getRelationships(String userId, - String guid, - FindRequest findRequest, - Integer maximumPageSizeOnRestCall) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - /** - * Request to search all relationships for current node. - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @return list all relationships. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - default List getAllRelationships(String userId, String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - return getRelationships(userId, guid, new FindRequest()); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaRelationshipClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaRelationshipClient.java deleted file mode 100644 index 98ea0059db0..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaRelationshipClient.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; - -import java.util.List; - -/** - * Client class for subject area relationships {@link Relationship} - * */ -public interface SubjectAreaRelationshipClient extends SubjectAreaClient { - - /** - * @throws UnsupportedOperationException - this method is until not supported - **/ - @Override - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws UnsupportedOperationException; -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaRestClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaRestClient.java deleted file mode 100644 index 72dd6f15ea7..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/SubjectAreaRestClient.java +++ /dev/null @@ -1,592 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryParams; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryUtils; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.ParameterizedTypeReference; - -/** - * RESTClient is responsible for issuing calls to the Subject Area OMAS REST APIs. - * - * In this class with methods there is a parameter "urnTemplate" below is an example for a better understanding. - * For example "/servers/%s/open-metadata/access-services/subject-area/users/%s/categories/%s" - * where first %s - serverName, second %s - userId and third %s - guid - * This URN will be a continuation of serverPlatformURLRoot, which was set when creating the object - */ -public class SubjectAreaRestClient extends FFDCRESTClient { - private static final Logger log = LoggerFactory.getLogger(SubjectAreaRestClient.class); - protected static final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - - private final String serverName; - private final String serverPlatformURLRoot; - - /** - * Constructor - */ - public SubjectAreaRestClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException { - super(serverName, serverPlatformURLRoot); - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformURLRoot; - } - - /** - * Constructor - */ - public SubjectAreaRestClient(String serverName, - String serverPlatformURLRoot, - String userId, - String password) throws InvalidParameterException - { - super(serverName, serverPlatformURLRoot, userId, password); - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformURLRoot; - } - - /** - * Issue a POST REST call that returns a response object. This is typically a create, update, or find with - * complex parameters. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param requestBody request body for the request. - * - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse postRESTCall(String userId, - String methodName, - String urnTemplate, - ParameterizedTypeReference> type, - T requestBody) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException - { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - String expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId); - GenericResponse response = callPostRESTCall(methodName, type, expandedURL, requestBody); - exceptionHandler.detectAndThrowStandardExceptions(methodName, response); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return response; - } - - /** - * Issue a PUT REST call that returns a response object. This is typically an update. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the update object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param requestBody request body for the request. - * - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse putRESTCall(String userId, - String guid, - String methodName, - String urnTemplate, - ParameterizedTypeReference> type, - T requestBody) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - String expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - GenericResponse response = callPutRESTCall(methodName, type, expandedURL, requestBody); - exceptionHandler.detectAndThrowStandardExceptions(methodName, response); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return response; - } - /** - * Issue a GET REST call that returns a response object by guid. This is a get for a single object. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the received object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse getByIdRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - return getByIdRESTCall(userId, guid, methodName, type, urnTemplate, null, null, null); - } - /** - * Issue a GET REST call that returns a response object by guid. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the received object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param findRequest search specification - * - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse getByIdRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate, - FindRequest findRequest) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - return getByIdRESTCall(userId, guid, methodName, type, urnTemplate, findRequest, null, null); - } - /** - * Issue a GET REST call that returns a response object by guid. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the received object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param maximumPageSizeOnRestCall maximum page size that can be used on rest calls, null and 0 mean no limit set. - * @param findRequest search specification - * @param queryParams {@link QueryParams} - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse getByIdRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate, - FindRequest findRequest, - Integer maximumPageSizeOnRestCall, - QueryParams queryParams) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - GenericResponse completeResponse = null; - int requestedPageSize = 0; - if (findRequest != null) { - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - requestedPageSize = findRequest.getPageSize(); - } - - if (maximumPageSizeOnRestCall == null || maximumPageSizeOnRestCall < 1 || maximumPageSizeOnRestCall >= requestedPageSize ) { - // Only need to make one call - String expandedURL; - if (findRequest == null) { - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - } else { - QueryBuilder queryBuilder = createFindQuery(methodName, findRequest, queryParams); - String findUrlTemplate = urnTemplate + queryBuilder.toString(); - expandedURL = String.format(serverPlatformURLRoot + findUrlTemplate, serverName, userId, guid); - } - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - } else { - // amend the urnTemplate to replace the guid - which will be the last %s, note there might be characters after this %s we need to keep. - int lastIndex = urnTemplate.lastIndexOf("%s"); - String lastBit =urnTemplate.substring(lastIndex); - String lastBitWithGuid = lastBit.replace("%s",guid); - urnTemplate = urnTemplate.substring(0, lastIndex) + lastBitWithGuid; - completeResponse = getAccumulatedResponse(userId, methodName, urnTemplate, type, findRequest, maximumPageSizeOnRestCall, requestedPageSize); - } - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return completeResponse; - } - - - /** - * Issue a GET REST call that returns a response found objects using the information described in findRequest, - * specifying the maximum amount that the downstream server supports. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param findRequest {@link FindRequest} - * @param queryParams {@link QueryParams} - * - * @return GenericResponse with T results - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse findRESTCall(String userId, - String methodName, - String urnTemplate, - ParameterizedTypeReference> type, - FindRequest findRequest, - QueryParams queryParams) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - return findRESTCall(userId, methodName, urnTemplate, type, findRequest, queryParams, null); - } - /** - * Issue a GET REST call that returns a response found objects using the information described in findRequest, - * specifying the maximum amount that the downstream server supports. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param findRequest {@link FindRequest} - * @param maximumPageSizeOnRestCall maximum page size that can be used on rest calls, null and 0 mean no limit set. - * @param queryParams {@link QueryParams} - * - * @return GenericResponse with T results - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse findRESTCall(String userId, - String methodName, - String urnTemplate, - ParameterizedTypeReference> type, - FindRequest findRequest, - QueryParams queryParams, - Integer maximumPageSizeOnRestCall) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - GenericResponse completeResponse = null; - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - int requestedPageSize = findRequest.getPageSize(); - if (maximumPageSizeOnRestCall == null || maximumPageSizeOnRestCall < 1 || maximumPageSizeOnRestCall >= requestedPageSize ) { - // Only need to make one call - String findUrlTemplate = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId); - // the searchCriteria could contain utf-8 characters that could include % characters, that format would incorrectly interpret. So we add the query params after the format - String expandedURL = findUrlTemplate + createFindQuery(methodName, findRequest, queryParams).toString(); - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - } else { - completeResponse = getAccumulatedResponse(userId, methodName, urnTemplate, type, findRequest, maximumPageSizeOnRestCall, requestedPageSize); - } - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return completeResponse; - } - - private GenericResponse getAccumulatedResponse(String userId, String methodName, String urnTemplate, ParameterizedTypeReference> type, FindRequest findRequest, Integer maximumPageSizeOnRestCall, int requestedPageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - // issue multiple calls to build up the requested page - GenericResponse completeResponse = null; - int startingFrom = findRequest.getStartingFrom(); - int totalNumberRetrieved = 0; - // while we have got less than the requested page size continuing getting more by issuing rest calls - while (totalNumberRetrieved < requestedPageSize) { - // set the page size to the maximum that the downstream server accepts. - findRequest.setPageSize(maximumPageSizeOnRestCall); - // we need to amend the startingFrom portions when issuing subsequent requests. - findRequest.setStartingFrom(startingFrom + totalNumberRetrieved); - // encode a url with the new find request - String findUrlTemplate = urnTemplate + createFindQuery(methodName, findRequest).toString(); - String expandedURL = String.format(serverPlatformURLRoot + findUrlTemplate, serverName, userId); - // issue the get call - GenericResponse responseForPart = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, responseForPart); - - int numberRetrieved = responseForPart.results().size(); - - if (getMore(numberRetrieved, maximumPageSizeOnRestCall, requestedPageSize)) { - // there are more to get - totalNumberRetrieved = totalNumberRetrieved + numberRetrieved; - } else { - // Don't get any more - totalNumberRetrieved = requestedPageSize; - } - // update the completeResponse - if (completeResponse == null) { - // first time in initialise the complete response - completeResponse = responseForPart; - } else { - // add the results from this get to the complete response - completeResponse.addAllResults(responseForPart.results()); - } - } - return completeResponse; - } - - boolean getMore(int numberRetrieved, int maximumPageSizeOnRestCall, int requestedPageSize) { - return (numberRetrieved == maximumPageSizeOnRestCall) && (requestedPageSize > maximumPageSizeOnRestCall); - } - - /** - * Issue a GET REST call that returns a response found objects using the information described in findRequest - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object to which the found objects should relate - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param findRequest {@link FindRequest} - * @param maximumPageSizeOnRestCall maximum number of results - * - * @return GenericResponse with T results - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse findRESTCall(String userId, - String guid, - String methodName, - String urnTemplate, - ParameterizedTypeReference> type, - FindRequest findRequest, - Integer maximumPageSizeOnRestCall) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - GenericResponse completeResponse = null; - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - int requestedPageSize = findRequest.getPageSize(); - int startingFrom = findRequest.getStartingFrom(); - if (maximumPageSizeOnRestCall == null || maximumPageSizeOnRestCall == 0 || maximumPageSizeOnRestCall >= requestedPageSize ) { - // only need to issued one rest call - completeResponse = getByIdRESTCall(userId, guid, methodName, type, urnTemplate, findRequest); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - } else { - // issue multiple calls to build up the requested page - int totalNumberRetrieved = 0; - // while we have got less than the requested page size continuing getting more by issuing rest calls - while (totalNumberRetrieved < requestedPageSize) { - // set the page size to the maximum that the downstream server accepts. - findRequest.setPageSize(maximumPageSizeOnRestCall); - // we need to amend the startingFrom potions when issuing subsequent requests. - findRequest.setStartingFrom(totalNumberRetrieved); - // issue the get call - GenericResponse responseForPart = getByIdRESTCall(userId, guid, methodName, type, urnTemplate, findRequest); - exceptionHandler.detectAndThrowStandardExceptions(methodName, responseForPart); - - int numberRetrieved = responseForPart.results().size(); - if (numberRetrieved == 0) { - // break out of the while loop as there is no more to retrieve. - totalNumberRetrieved = requestedPageSize; - } else { - // there may be more to get - totalNumberRetrieved = totalNumberRetrieved + numberRetrieved; - if (completeResponse == null) { - // first time in initialise the complete response - completeResponse = responseForPart; - } else { - // add the results from this get to the complete response - completeResponse.addAllResults(responseForPart.results()); - } - // amend the starting from - startingFrom= startingFrom + numberRetrieved; - } - } - } - return completeResponse; - } - - /** - * Issue a Delete REST call - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the delete object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse deleteRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException - { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - String expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - GenericResponse response = callDeleteRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, response); - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - return response; - } - - /** - * Issue a restore object - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the restore object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse restoreRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - String expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - GenericResponse response = callPostRESTCall(methodName, type, expandedURL, null); - exceptionHandler.detectAndThrowStandardExceptions(methodName, response); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return response; - } - /** - * Method for constructing a query (https://en.wikipedia.org/wiki/Query_string) using the information described in the findRequest - * page size and startingFrom need to set by the caller. - * - * @param methodName name of the method being called. - * @param findRequest {@link FindRequest} - * - * @return query - * @throws InvalidParameterException one of the parameters is null or invalid - * */ - public QueryBuilder createFindQuery(String methodName, FindRequest findRequest) throws InvalidParameterException { - return createFindQuery(methodName, findRequest, null); - } - - /** - * Method for constructing a query (https://en.wikipedia.org/wiki/Query_string) using the information described in the findRequest - * page size and startingFrom need to set by the caller. - * - * @param methodName name of the method being called. - * @param findRequest {@link FindRequest} - * @param queryParams {@link QueryParams} - * - * @return query - * @throws InvalidParameterException one of the parameters is null or invalid - * */ - public QueryBuilder createFindQuery(String methodName, FindRequest findRequest, QueryParams queryParams) throws InvalidParameterException { - QueryBuilder queryBuilder = new QueryBuilder(); - SequencingOrder sequencingOrder = findRequest.getSequencingOrder(); - if (sequencingOrder == null) { - sequencingOrder = SequencingOrder.ANY; - } - String sequencingOrderName = QueryUtils.encodeParams(methodName, "sequencingOrder", sequencingOrder.name()); - queryBuilder.addParam("sequencingOrder", sequencingOrderName); - Integer pageSize = findRequest.getPageSize(); - if (pageSize != null) { - queryBuilder.addParam("pageSize", pageSize); - } - queryBuilder.addParam("startingFrom", findRequest.getStartingFrom()); - - String searchCriteria = findRequest.getSearchCriteria(); - if (searchCriteria != null) { - searchCriteria = QueryUtils.encodeParams(methodName, "searchCriteria", searchCriteria); - queryBuilder.addParam("searchCriteria", searchCriteria); - } - String property = findRequest.getSequencingProperty(); - if (property != null) { - property = QueryUtils.encodeParams(methodName, "sequencingProperty", property); - queryBuilder.addParam("sequencingProperty", property); - } - queryBuilder.addParams(queryParams); - return queryBuilder; - } - - public String getServerName() { - return serverName; - } - - public String getServerPlatformURLRoot() { - return serverPlatformURLRoot; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfig.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfig.java deleted file mode 100644 index bc263834bbd..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfig.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.configs; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -public interface SubjectAreaConfig { - - /** - * Get the config. - *

- * The result is the configuration - * - * @param userId userId under which the request is performed - * - * @return The configuration - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Config getConfig(String userId) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfigClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfigClient.java deleted file mode 100644 index 4737a40ecb3..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfigClient.java +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.configs; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import static org.odpi.openmetadata.accessservices.subjectarea.client.AbstractSubjectArea.SUBJECT_AREA_BASE_URL; - -public class SubjectAreaConfigClient implements SubjectAreaConfig, ResponseParameterization { - private static final String BASE_URL = SUBJECT_AREA_BASE_URL + "configs"; - protected final SubjectAreaRestClient client; - public SubjectAreaConfigClient(SubjectAreaRestClient client) { - this.client = client; - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } - - @Override - public Config getConfig(String userId) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - final String methodName = "getConfig"; - - String urlTemplate = BASE_URL + "/%s"; - GenericResponse response = client.getByIdRESTCall(userId, "current", methodName, getParameterizedType(), urlTemplate); - return response.head().get(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfigClients.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfigClients.java deleted file mode 100644 index c6423feaf9c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/configs/SubjectAreaConfigClients.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.configs; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; - -public interface SubjectAreaConfigClients { - - /** - * Get the subject area config API class - use this class to issue glossary calls. - * - * @return subject area glossary API class - */ - SubjectAreaConfigClient configs(); -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/AbstractSubjectAreaNode.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/AbstractSubjectAreaNode.java deleted file mode 100644 index 21cb67a2f93..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/AbstractSubjectAreaNode.java +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes; - -import org.odpi.openmetadata.accessservices.subjectarea.client.AbstractSubjectArea; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.List; - -/** - * @param inherited from {@link Node} type - * Abstract class for Subject Area client node operations - */ -public abstract class AbstractSubjectAreaNode extends AbstractSubjectArea implements SubjectAreaNodeClient { - protected AbstractSubjectAreaNode(SubjectAreaRestClient client, String baseUrl) { - super(client, baseUrl); - } - - @Override - public List getRelationships(String userId, String guid, FindRequest findRequest, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/%s/relationships"; - final String methodInfo = getMethodInfo("getRelationships"); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.findRESTCall(userId, guid, methodInfo, urlTemplate, type, findRequest, maximumPageSizeOnRestCall); - return response.results(); - } - - @Override - public List getRelationships(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - return getRelationships(userId, guid, findRequest, null); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/DefaultSubjectAreaNodeClients.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/DefaultSubjectAreaNodeClients.java deleted file mode 100644 index 10dc5ded2c3..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/DefaultSubjectAreaNodeClients.java +++ /dev/null @@ -1,110 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.projects.SubjectAreaProjectClient; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.reflections.Reflections; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.*; - -/** - * The OMAS client library implementation of the Subject Area OMAS. - * This interface provides entities {@link Node} authoring interface for subject area experts. - */ -public class DefaultSubjectAreaNodeClients implements SubjectAreaNodeClients { - private final Map, SubjectAreaNodeClient> cache = new HashMap<>(); - private static final String DEFAULT_SCAN_PACKAGE = DefaultSubjectAreaNodeClients.class.getPackage().getName(); - - /** - * @param packagesToScan - search packages for finding classes placed by annotation {@link org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClient} - * @param subjectAreaRestClient - rest client for Subject Area OMAS REST APIs - * */ - @SuppressWarnings("rawtypes") - public DefaultSubjectAreaNodeClients(SubjectAreaRestClient subjectAreaRestClient, String... packagesToScan) { - Set packages = new HashSet<>(Arrays.asList(packagesToScan)); - packages.add(DEFAULT_SCAN_PACKAGE); - - Reflections reflections = new Reflections(packages); - Set> clientClasses = reflections.getTypesAnnotatedWith(org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClient.class); - for (Class declaredClass : clientClasses) { - try { - if (AbstractSubjectAreaNode.class.isAssignableFrom(declaredClass)) { - Constructor ctor = declaredClass.getDeclaredConstructor(SubjectAreaRestClient.class); - ctor.setAccessible(true); - final AbstractSubjectAreaNode newInstance = - (AbstractSubjectAreaNode) ctor.newInstance(subjectAreaRestClient); - cache.put(newInstance.resultType(), newInstance); - } - } catch (NoSuchMethodException - | IllegalAccessException - | InstantiationException - | InvocationTargetException e) { - throw new ExceptionInInitializerError( - "During initialization `DefaultSubjectAreaNodeClients` an error has occurred - " - + e.getMessage() - ); - } - } - } - - /** - * The constructor uses the current package to scan "org.odpi.openmetadata.accessservices.subjectarea.client.nodes" - * to search for classes placed by annotation {@link org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClient}. - * - * @param subjectAreaRestClient - rest client for Subject Area OMAS REST APIs - */ - public DefaultSubjectAreaNodeClients(SubjectAreaRestClient subjectAreaRestClient) { - this(subjectAreaRestClient, DEFAULT_SCAN_PACKAGE); - } - - @Override - public SubjectAreaNodeClient glossaries() { - return (SubjectAreaNodeClient) getClient(Glossary.class); - } - - @Override - public SubjectAreaNodeClient terms() { - return (SubjectAreaNodeClient) getClient(Term.class); - } - - @Override - public SubjectAreaNodeClient categories() { - return (SubjectAreaNodeClient) getClient(Category.class); - } - - @Override - public

SubjectAreaProjectClient

projects() { - return (SubjectAreaProjectClient

) getClient(Project.class); - } - - /** - * @param - {@link Relationship} type of object - * @param clazz - the class for which you want to get the client from cache - * - * @return SubjectAreaNodeClient or null if this client is not present - * */ - @SuppressWarnings("unchecked") - public SubjectAreaNodeClient getClient(Class clazz) { - if (cache.containsKey(clazz)) { - return (SubjectAreaNodeClient) cache.get(clazz); - } - final ExceptionMessageDefinition messageDefinition = - SubjectAreaErrorCode.NOT_FOUND_CLIENT.getMessageDefinition(clazz.getName()); - final SubjectAreaCheckedException exc = - new SubjectAreaCheckedException(messageDefinition, getClass().getName(), messageDefinition.getSystemAction()); - throw new IllegalArgumentException(exc); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/SubjectAreaNodeClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/SubjectAreaNodeClient.java deleted file mode 100644 index 78dd70e0151..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/SubjectAreaNodeClient.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotating client class for working with Node objects. - */ -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -public @interface SubjectAreaNodeClient { -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/SubjectAreaNodeClients.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/SubjectAreaNodeClients.java deleted file mode 100644 index 919a4c6cebb..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/SubjectAreaNodeClients.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.projects.SubjectAreaProjectClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; - -public interface SubjectAreaNodeClients { - - /** - * Get the subject area glossary API class - use this class to issue glossary calls. - * - * @param type for supplied and return. - * @return subject area glossary API class - */ - SubjectAreaNodeClient glossaries(); - - /** - * Get the subject area term API class - use this class to issue term calls. - * - * @param type for supplied and return. - * @return subject area term API class - */ - SubjectAreaNodeClient terms(); - - /** - * Get the subject area category API class - use this class to issue category calls. - * - * @param type for supplied and return. - * @return subject area category API class - */ - SubjectAreaNodeClient categories(); - - /** - * Get the subject area project API class - use this class to issue project calls. - * - * @param

type for supplied and return. - * @return subject area project API class - */ -

SubjectAreaNodeClient

projects(); - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/categories/SubjectAreaCategoryClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/categories/SubjectAreaCategoryClient.java deleted file mode 100644 index fcdc786d28d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/categories/SubjectAreaCategoryClient.java +++ /dev/null @@ -1,118 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes.categories; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.AbstractSubjectAreaNode; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryParams; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@SubjectAreaNodeClient -public class SubjectAreaCategoryClient extends AbstractSubjectAreaNode { - public SubjectAreaCategoryClient(SubjectAreaRestClient client) - { - super(client, SUBJECT_AREA_BASE_URL + "categories"); - } - /** - * Get the Category's children categories - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the Category - * @param findRequest specification of the search - * @return list of Category children - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getCategoryChildren(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return getCategoryChildren(userId,guid, findRequest, false, true); - } - /** - * Get the Category's children categories - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the Category - * @param findRequest specification of the search - * @param exactValue should the result match exactly? - * @param ignoreCase should the match be case insensitive? - * @return list of Category children - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getCategoryChildren(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo(" getCategoryChildren"); - QueryParams queryParams = new QueryParams() - .setExactValue(exactValue) - .setIgnoreCase(ignoreCase); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest, queryParams); - - String urlTemplate = urnTemplate + query.toString(); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,guid, methodInfo, type, urlTemplate); - return response.results(); - } - /** - * Get the terms owned by this Category - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @return list of Terms - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getTerms(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - return getTerms(userId, guid, findRequest, false,true); - } - /** - * Get the terms owned by this Category - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue should the result match exactly? - * @param ignoreCase should the match be case insensitive? - * @return list of Terms - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getTerms(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/terms"; - final String methodInfo = getMethodInfo("getTerms"); - QueryParams queryParams = new QueryParams() - .setExactValue(exactValue) - .setIgnoreCase(ignoreCase); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest, queryParams); - String urlTemplate = urnTemplate + query.toString(); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,guid, methodInfo, type, urlTemplate); - return response.results(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/glossaries/SubjectAreaGlossaryClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/glossaries/SubjectAreaGlossaryClient.java deleted file mode 100644 index 7caaa05648e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/glossaries/SubjectAreaGlossaryClient.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes.glossaries; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.AbstractSubjectAreaNode; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryParams; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.List; - -@SubjectAreaNodeClient -public class SubjectAreaGlossaryClient extends AbstractSubjectAreaNode { - public SubjectAreaGlossaryClient(SubjectAreaRestClient client) - { - super(client, SUBJECT_AREA_BASE_URL + "glossaries"); - } - - /** - * Get the Categories owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @return list of Categories - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getCategories(String userId, String guid, FindRequest findRequest, Boolean onlyTop) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return getCategories(userId, guid, findRequest, onlyTop, false, true); - } - /** - * Get the Categories owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @param exactValue should the match be an exact value? - * @param ignoreCase should the search be case insensitive? - * @return list of Categories - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getCategories(String userId, String guid, FindRequest findRequest, Boolean onlyTop, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return getCategories(userId, guid, findRequest, onlyTop, exactValue, ignoreCase, null); - } - - /** - * Get the Categories owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @param exactValue should the match be an exact value? - * @param ignoreCase should the search be case insensitive? - * @param maximumPageSizeOnRestCall maximum page size that can be specified on a rest call - * @return list of Categories - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getCategories(String userId, String guid, FindRequest findRequest, Boolean onlyTop, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo("getCategories"); - QueryParams queryParams = new QueryParams() - .setOnlyTop(onlyTop) - .setExactValue(exactValue) - .setIgnoreCase(ignoreCase); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,guid, methodInfo, type, urnTemplate, findRequest, maximumPageSizeOnRestCall, queryParams); - return response.results(); - } - /** - * Get the Terms owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @return list of Terms - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - public List getTerms(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return getTerms(userId, guid, findRequest, false, true); - } - /** - * Get the Terms owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue should the match be an exact value? - * @param ignoreCase should the search be case insensitive? - * @return list of Terms - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - public List getTerms(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return getTerms(userId, guid, findRequest, exactValue, ignoreCase, null); - } - - /** - * Get the Terms owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue should the match be an exact value? - * @param ignoreCase should the search be case insensitive? - * @param maximumPageSizeOnRestCall maximum page size on rest call. - * @return list of Terms - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - public List getTerms(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodInfo = getMethodInfo("getTerms"); - final String urlTemplate = BASE_URL + "/%s/terms"; - QueryParams queryParams = new QueryParams() - .setExactValue(exactValue) - .setIgnoreCase(ignoreCase); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId, guid, methodInfo, type, urlTemplate, findRequest, maximumPageSizeOnRestCall, queryParams); - return response.results(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/projects/SubjectAreaProjectClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/projects/SubjectAreaProjectClient.java deleted file mode 100644 index 8efcfa1529c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/projects/SubjectAreaProjectClient.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes.projects; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.AbstractSubjectAreaNode; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@SubjectAreaNodeClient -public class SubjectAreaProjectClient

extends AbstractSubjectAreaNode

{ - public SubjectAreaProjectClient(SubjectAreaRestClient client) - { - super(client, SUBJECT_AREA_BASE_URL + "projects"); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/terms/SubjectAreaTermClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/terms/SubjectAreaTermClient.java deleted file mode 100644 index c6d04c2441e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/nodes/terms/SubjectAreaTermClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.nodes.terms; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.AbstractSubjectAreaNode; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.List; - -@SubjectAreaNodeClient -public class SubjectAreaTermClient extends AbstractSubjectAreaNode { - public SubjectAreaTermClient(SubjectAreaRestClient client) - { - super(client, SUBJECT_AREA_BASE_URL + "terms"); - } - /** - * Get the Categories that categorise this term. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param guid unique identifier of the Term - * @param findRequest request specification - * @return list of categories - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - - public List getCategories(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo(" getCategories"); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest); - String urlTemplate = urnTemplate + query.toString(); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,guid, methodInfo, type, urlTemplate); - return response.results(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/AbstractSubjectAreaRelationship.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/AbstractSubjectAreaRelationship.java deleted file mode 100644 index 19c028a5ac7..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/AbstractSubjectAreaRelationship.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.client.AbstractSubjectArea; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; - -import java.util.List; - -/** - * @param inherited from {@link Relationship} object type - * Abstract class for Subject Area client relationship operations - */ -public abstract class AbstractSubjectAreaRelationship extends AbstractSubjectArea implements SubjectAreaRelationshipClient { - protected AbstractSubjectAreaRelationship(SubjectAreaRestClient subjectAreaRestClient, String resourceUrnName) - { - super(subjectAreaRestClient, BASE_RELATIONSHIPS_URL + "/" + resourceUrnName); - } - - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase ) { - throw new UnsupportedOperationException(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaGraph.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaGraph.java deleted file mode 100644 index 5a9c1908719..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaGraph.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.NeighborhoodHistoricalFindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.Date; -import java.util.Set; - -public interface SubjectAreaGraph { - /** - * Get the graph of nodes and relationships radiating out from a node. - *

- * The results are scoped by types of relationships, types of nodes and classifications as well as level. - * - * @param userId userId under which the request is performed - * @param guid the starting point of the query. - * @param nodeFilter Set of the names of the nodes to include in the query results. Null means include - * all nodes found, irrespective of their type. - * @param relationshipFilter Set of names of relationships to include in the query results. Null means include - * all relationships found, irrespective of their type. - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * @param asOfTime Requests a historical query of the relationships for the node. Null means return the - * present values. - * @param level the number of the relationships (relationships) out from the starting node that the query will traverse to - * gather results. If not specified then it defaults to 3. - * @return A graph of nodes. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - default Graph getGraph(String userId, - String guid, - Date asOfTime, - Set nodeFilter, - Set relationshipFilter, - StatusFilter statusFilter, - int level) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - NeighborhoodHistoricalFindRequest request = new NeighborhoodHistoricalFindRequest(); - request.setAsOfTime(asOfTime); - request.setNodeFilter(nodeFilter); - request.setRelationshipFilter(relationshipFilter); - request.setLevel(level); - request.setStatusFilter(statusFilter); - return getGraph(userId, guid, request); - } - - /** - * Get the graph of nodes and relationships radiating out from a node. - *

- * The results are scoped by types of relationships, types of nodes and classifications as well as level. - * - * @param userId userId under which the request is performed - * @param guid the starting point of the query. - * @param request {@link NeighborhoodHistoricalFindRequest} - * - * @return A graph of nodes. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Graph getGraph(String userId, String guid, NeighborhoodHistoricalFindRequest request) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaGraphClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaGraphClient.java deleted file mode 100644 index 8e8af723c3d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaGraphClient.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.NeighborhoodHistoricalFindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.stream.Collectors; - -import static org.odpi.openmetadata.accessservices.subjectarea.client.AbstractSubjectArea.SUBJECT_AREA_BASE_URL; - -public class SubjectAreaGraphClient implements SubjectAreaGraph, ResponseParameterization { - private static final String BASE_URL = SUBJECT_AREA_BASE_URL + "nodes"; - protected final SubjectAreaRestClient client; - public SubjectAreaGraphClient(SubjectAreaRestClient client) { - this.client = client; - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } - - @Override - public Graph getGraph(String userId, String guid, NeighborhoodHistoricalFindRequest request) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getGraph";; - - String urlTemplate = BASE_URL + "/%s" + createGraphQuery(request).toString(); - GenericResponse response = client.getByIdRESTCall(userId, guid, methodName, getParameterizedType(), urlTemplate); - return response.head().get(); - } - - public QueryBuilder createGraphQuery(NeighborhoodHistoricalFindRequest request) { - QueryBuilder queryBuilder = new QueryBuilder(); - String nodeFilter = request.getNodeFilter().stream().map(NodeType::name).collect(Collectors.joining(",")); - String relationshipFilter = request.getRelationshipFilter().stream().map(RelationshipType::name).collect(Collectors.joining(",")); - - if (!nodeFilter.isEmpty()) - queryBuilder.addParam("nodeFilter", nodeFilter); - - if(!relationshipFilter.isEmpty()) - queryBuilder.addParam("relationshipFilter", relationshipFilter); - - return queryBuilder - .addParam("asOfTime", request.getAsOfTime()) - .addParam("statusFilter", request.getStatusFilter().name()) - .addParam("level", request.getLevel()); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationship.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationship.java deleted file mode 100644 index 2020de5df58..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationship.java +++ /dev/null @@ -1,316 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.reflections.Reflections; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.*; - -/** - * The OMAS client library implementation of the Subject Area OMAS. - * This interface provides relationship {@link Relationship} authoring interface for subject area experts. - */ -public class SubjectAreaRelationship implements SubjectAreaRelationshipClients { - private static final String HAS_A = "has-as"; - private static final String RELATED_TERM = "related-terms"; - private static final String SYNONYM = "synonyms"; - private static final String ANTONYM = "antonyms"; - private static final String TRANSLATION = "translations"; - private static final String USED_IN_CONTEXT = "used-in-contexts"; - private static final String PREFERRED_TERM = "preferred-terms"; - private static final String VALID_VALUE = "valid-values"; - private static final String REPLACEMENT_TERM = "replacement-terms"; - private static final String TYPED_BY = "typed-bys"; - private static final String IS_A = "is-as"; - private static final String IS_A_TYPE_OF_DEPRECATED = "is-a-type-of-deprecateds"; - private static final String IS_A_TYPE_OF = "is-a-type-ofs"; - private static final String TERM_CATEGORIZATION = "term-categorizations"; - private static final String SEMANTIC_ASSIGNMENT = "semantic-assignments"; - private static final String TERM_ANCHOR = "term-anchor"; - private static final String CATEGORY_ANCHOR = "category-anchor"; - private static final String PROJECT_SCOPE = "project-scopes"; - private static final String CATEGORY_HIERARCHY_LINK = "category-hierarchy-link"; - - private final Map, org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient> cache = new HashMap<>(); - private static final String DEFAULT_SCAN_PACKAGE = SubjectAreaRelationship.class.getPackage().getName(); - - /** - * @param packagesToScan - search packages for finding classes placed by annotation {@link SubjectAreaRelationshipClient} - * @param subjectAreaRestClient - rest client for Subject Area OMAS REST APIs - * */ - @SuppressWarnings("rawtypes") - public SubjectAreaRelationship(SubjectAreaRestClient subjectAreaRestClient, String... packagesToScan) { - Set packages = new HashSet<>(Arrays.asList(packagesToScan)); - packages.add(DEFAULT_SCAN_PACKAGE); - - Reflections reflections = new Reflections(packages); - Set> clientClasses = reflections.getTypesAnnotatedWith(SubjectAreaRelationshipClient.class); - for (Class declaredClass : clientClasses) { - try { - if (AbstractSubjectAreaRelationship.class.isAssignableFrom(declaredClass)) { - Constructor ctor = declaredClass.getDeclaredConstructor(SubjectAreaRestClient.class); - ctor.setAccessible(true); - final AbstractSubjectAreaRelationship newInstance = - (AbstractSubjectAreaRelationship) ctor.newInstance(subjectAreaRestClient); - cache.put(newInstance.resultType(), newInstance); - } - } catch (NoSuchMethodException - | IllegalAccessException - | InstantiationException - | InvocationTargetException e) { - throw new ExceptionInInitializerError( - "During initialization `SubjectArearelationship` an error has occurred - " - + e.getMessage() - ); - } - } - } - - /** - * The constructor uses the current package to scan "org.odpi.openmetadata.accessservices.subjectarea.client.relationships" - * to search for classes placed by annotation {@link SubjectAreaRelationshipClient}. - * - * @param subjectAreaRestClient - rest client for Subject Area OMAS REST APIs - */ - public SubjectAreaRelationship(SubjectAreaRestClient subjectAreaRestClient) { - this(subjectAreaRestClient, DEFAULT_SCAN_PACKAGE); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient hasA() { - return getClient(HasA.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient relatedTerm() { - return getClient(RelatedTerm.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient termAnchor() { - return getClient(TermAnchor.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient projectScope() { - return getClient(ProjectScope.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient synonym() { - return getClient(Synonym.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient antonym() { - return getClient(Antonym.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient translation() { - return getClient(Translation.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient usedInContext() { - return getClient(UsedInContext.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient preferredTerm() { - return getClient(PreferredTerm.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient validValue() { - return getClient(ValidValue.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient replacementTerm() { - return getClient(ReplacementTerm.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient typedBy() { - return getClient(TypedBy.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient isA() { - return getClient(IsA.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient isaTypeOfDeprecated() { - return getClient(IsATypeOfDeprecated.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient isATypeOf() { - return getClient(IsATypeOf.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient termCategorization() { - return getClient(Categorization.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient semanticAssignment() { - return getClient(SemanticAssignment.class); - } - - @Override - public SubjectAreaClient categoryHierarchyLink() { - return getClient(CategoryHierarchyLink.class); - } - - @Override - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient categoryAnchor() { - return getClient(CategoryAnchor.class); - } - - @SubjectAreaRelationshipClient - static class SubjectAreaCategoryHierarchyLinkClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaCategoryHierarchyLinkClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, CATEGORY_HIERARCHY_LINK); - } - } - - @SubjectAreaRelationshipClient - static class SubjectAreaTermAnchorClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaTermAnchorClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, TERM_ANCHOR); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaRelatedTermClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaRelatedTermClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, RELATED_TERM); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaHasaClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaHasaClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, HAS_A); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaSynonymClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaSynonymClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, SYNONYM); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaAntonymClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaAntonymClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, ANTONYM); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaCategoryAnchorClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaCategoryAnchorClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, CATEGORY_ANCHOR); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaCategorizationClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaCategorizationClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, TERM_CATEGORIZATION); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaTranslationClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaTranslationClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, TRANSLATION); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaUsedInContextClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaUsedInContextClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, USED_IN_CONTEXT); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaPreferredTermClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaPreferredTermClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, PREFERRED_TERM); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaValidValueClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaValidValueClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, VALID_VALUE); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaReplacementTermClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaReplacementTermClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, REPLACEMENT_TERM); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaSemanticAssignmentClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaSemanticAssignmentClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, SEMANTIC_ASSIGNMENT); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaTypedByClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaTypedByClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, TYPED_BY); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaIsaClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaIsaClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, IS_A); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaIsaTypeOfDeprecatedClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaIsaTypeOfDeprecatedClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, IS_A_TYPE_OF_DEPRECATED); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaIsATypeOfClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaIsATypeOfClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, IS_A_TYPE_OF); - } - } - @SubjectAreaRelationshipClient - static class SubjectAreaProjectScopeClient extends AbstractSubjectAreaRelationship { - protected SubjectAreaProjectScopeClient(SubjectAreaRestClient subjectAreaRestClient) { - super(subjectAreaRestClient, PROJECT_SCOPE); - } - } - - /** - * @param - {@link Relationship} type of object - * @param clazz - the class for which you want to get the client from cache - * - * @return SubjectAreaRelationshipClient or null if this client is not present - * */ - @SuppressWarnings("unchecked") - public org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient getClient(Class clazz) { - if (cache.containsKey(clazz)) { - return (org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient) cache.get(clazz); - } - final ExceptionMessageDefinition messageDefinition = - SubjectAreaErrorCode.NOT_FOUND_CLIENT.getMessageDefinition(clazz.getName()); - final SubjectAreaCheckedException exc = - new SubjectAreaCheckedException(messageDefinition, getClass().getName(), messageDefinition.getSystemAction()); - throw new IllegalArgumentException(exc); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationshipClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationshipClient.java deleted file mode 100644 index 840fc8e66fc..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationshipClient.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.relationships; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotating client class for working with Node objects. - */ -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -public @interface SubjectAreaRelationshipClient { -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationshipClients.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationshipClients.java deleted file mode 100644 index 740448432ac..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/client/relationships/SubjectAreaRelationshipClients.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRelationshipClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; - -/** - * The SubjectAreaDefinition Open Metadata Access Service (OMAS) API for relationships. - */ -public interface SubjectAreaRelationshipClients { - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with HasA objects - */ - SubjectAreaRelationshipClient hasA(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with RelatedTerm objects - */ - SubjectAreaRelationshipClient relatedTerm(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with TermAnchor objects - */ - SubjectAreaRelationshipClient termAnchor(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with ProjectScope objects - */ - SubjectAreaRelationshipClient projectScope(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with Synonym objects - */ - SubjectAreaRelationshipClient synonym(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with Antonym objects - */ - SubjectAreaRelationshipClient antonym(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with Translation objects - */ - SubjectAreaRelationshipClient translation(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with UsedInContext objects - */ - SubjectAreaRelationshipClient usedInContext(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with PreferredTerm objects - */ - SubjectAreaRelationshipClient preferredTerm(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with ValidValue objects - */ - SubjectAreaRelationshipClient validValue(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with ReplacementTerm objects - */ - SubjectAreaRelationshipClient replacementTerm(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with TypedBy objects - */ - SubjectAreaRelationshipClient typedBy(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with IsA objects - */ - SubjectAreaRelationshipClient isA(); - - /** - * @deprecated IsATypeOfDeprecated it is deprecated; move your instances to use IsATypeOf instead. - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with IsaTypeOfDeprecated objects - */ - @Deprecated - SubjectAreaRelationshipClient isaTypeOfDeprecated(); - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with IsATypeOf objects - */ - SubjectAreaRelationshipClient isATypeOf(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with Categorization objects - */ - SubjectAreaRelationshipClient termCategorization(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with SemanticAssignment objects - */ - SubjectAreaRelationshipClient semanticAssignment(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with CategoryAnchor objects - */ - SubjectAreaRelationshipClient categoryAnchor(); - - /** - * @return {@link SubjectAreaRelationshipClient} for client calls(described in {@link SubjectAreaClient}) - * when working with CategoryHierarchyLink objects - */ - SubjectAreaClient categoryHierarchyLink(); -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryBuilder.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryBuilder.java deleted file mode 100644 index a7d82a180f9..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.utils; - -import java.util.StringJoiner; - -public class QueryBuilder { - private final StringJoiner joiner = new StringJoiner("&", "?", ""); - - public QueryBuilder() {} - - public QueryBuilder addParam(Object key, Object value) { - if (key != null && value != null) { - join(key, value); - } - - return this; - } - - public QueryBuilder addParams(QueryParams queryParams) { - if (queryParams != null) { - queryParams - .getParamMap() - .forEach(this::join); - } - - return this; - } - - private void join(Object key, Object value) { - joiner.add(key + "=" + value); - } - - @Override - public String toString() { - return joiner.toString(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryParams.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryParams.java deleted file mode 100644 index dad0d3eac2b..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryParams.java +++ /dev/null @@ -1,35 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.utils; - -import java.util.LinkedHashMap; -import java.util.Map; - -public class QueryParams { - private static final String KEY_EXACT_VALUE = "exactValue"; - private static final String KEY_IGNORE_CASE = "ignoreCase"; - private static final String KEY_ONLY_TOP = "onlyTop"; - - private final Map paramMap = new LinkedHashMap<>(); - - public QueryParams() {} - - Map getParamMap() { - return Map.copyOf(paramMap); - } - - public QueryParams setExactValue(boolean exactValue) { - paramMap.put(KEY_EXACT_VALUE, exactValue); - return this; - } - - public QueryParams setIgnoreCase(boolean ignoreCase) { - paramMap.put(KEY_IGNORE_CASE, ignoreCase); - return this; - } - - public QueryParams setOnlyTop(boolean onlyTop) { - paramMap.put(KEY_ONLY_TOP, onlyTop); - return this; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryUtils.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryUtils.java deleted file mode 100644 index aacedc211a6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utils/QueryUtils.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.utils; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; - -public class QueryUtils { - /** - * Convert param value to URL UTF-8 encode - * @param methodName - name of the method being called. - * @param paramName - name of the parameter for encode - * @param paramValue - value of the parameter for encode - * @return encoded param value - * - * @throws InvalidParameterException - error when attempting to encode - * */ - public static String encodeParams(String methodName, String paramName, String paramValue) throws InvalidParameterException { - try { - paramValue = URLEncoder.encode(paramValue, "UTF-8"); - } catch (UnsupportedEncodingException e) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.ERROR_ENCODING_QUERY_PARAMETER.getMessageDefinition(); - messageDefinition.setMessageParameters(paramName, paramValue); - throw new InvalidParameterException(messageDefinition, "", methodName, paramName); - } - - return paramValue; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/client/TestSubjectAreaRestClient.java b/open-metadata-implementation/access-services/subject-area/subject-area-client/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/client/TestSubjectAreaRestClient.java deleted file mode 100644 index e30d424d245..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-client/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/client/TestSubjectAreaRestClient.java +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.client; - -import org.junit.jupiter.api.Test; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; - -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.assertFalse; - -public class TestSubjectAreaRestClient { - @Test - public void testGetMore() throws InvalidParameterException { - SubjectAreaRestClient client = new SubjectAreaRestClient("aa","bb"); - assertFalse( client.getMore(1,1,1)); - assertTrue( client.getMore(1,1,2)); - assertFalse( client.getMore(10,10,10)); - assertTrue( client.getMore(10,10,11)); - assertFalse( client.getMore(0,10,11)); - - - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/README.md b/open-metadata-implementation/access-services/subject-area/subject-area-server/README.md deleted file mode 100644 index a4c77021a6d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/README.md +++ /dev/null @@ -1,21 +0,0 @@ - - - -# Subject Area Open Metadata Access Service (OMAS) server-side implementation - -The Subject Area OMAS server-side support is organized in the following top level packages - -* admin - The SubjectAreaAdmin controls this OMAS's lifecycle. It is initialised here receiving the access service configuration. It is shutdown here. -* auditlog - this is a list of the audit log messages -* initialization -* internal response -* listener -* outtopic -* publisher - messaging publishing -* server - server services -* utilities - utilities - including helper methods -* validators - methods to do validation - ----- -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/subject-area/subject-area-server/build.gradle b/open-metadata-implementation/access-services/subject-area/subject-area-server/build.gradle deleted file mode 100644 index 26ad702e865..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:generic-handlers') - implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-server') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-resources:open-metadata-archives:open-metadata-types') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:common-services:repository-handler') - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'org.reflections:reflections' - implementation 'org.apache.commons:commons-collections4' - testImplementation 'org.testng:testng' - testImplementation 'org.mockito:mockito-core' -} - -description = 'Subject Area OMAS Server-side' - -java { - withJavadocJar() -} - -test { - useTestNG() - // This will default to standard search pattern - see https://docs.gradle.org/current/userguide/java_testing.html#sec:test_detection - scanForTestClasses = false -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/admin/SubjectAreaAdmin.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/admin/SubjectAreaAdmin.java deleted file mode 100644 index 411ee2f1dce..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/admin/SubjectAreaAdmin.java +++ /dev/null @@ -1,91 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.admin; - - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaAuditCode; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaServicesInstance; -import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; -import org.odpi.openmetadata.adminservices.registration.AccessServiceAdmin; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - - -/** - * SubjectAreaAdmin is the Subject Area Open Metadata Access Service (OMAS) implementation class that controls its lifecycle. - * It is initialised here receiving the OMAS configuration. It is shutdown here. - */ -public class SubjectAreaAdmin extends AccessServiceAdmin { - private AuditLog auditLog = null; - private SubjectAreaServicesInstance instance = null; - private String serverName = null; - - /** - * Default constructor - */ - public SubjectAreaAdmin() { - } - - - /** - * Initialize the access service. - * - * @param accessServiceConfig specific configuration properties for this access service. - * @param omrsTopicConnector connector for receiving OMRS Events from the cohorts - * @param repositoryConnector connector for querying the cohort repositories - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use on OMRS calls where there is no end user. - * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. - */ - public void initialize(AccessServiceConfig accessServiceConfig, - OMRSTopicConnector omrsTopicConnector, - OMRSRepositoryConnector repositoryConnector, - AuditLog auditLog, - String serverUserName) throws OMAGConfigurationErrorException { - final String actionDescription = "initialize"; - - auditLog.logMessage(actionDescription, SubjectAreaAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - this.auditLog = auditLog; - - try { - this.instance = new SubjectAreaServicesInstance(repositoryConnector, - auditLog, - serverUserName, - repositoryConnector.getMaxPageSize()); - this.serverName = instance.getServerName(); - - auditLog.logMessage(actionDescription, - SubjectAreaAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), - accessServiceConfig.toString()); - - } catch (Exception error) { - auditLog.logException(actionDescription, - SubjectAreaAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getClass().getName(), error.getMessage()), - accessServiceConfig.toString(), - error); - - super.throwUnexpectedInitializationException(actionDescription, - AccessServiceDescription.SUBJECT_AREA_OMAS.getAccessServiceFullName(), - error); - } - } - - - /** - * Shutdown the access service. - */ - public void shutdown() { - final String actionDescription = "shutdown"; - - if (instance != null) { - this.instance.shutdown(); - } - - auditLog.logMessage(actionDescription, SubjectAreaAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(serverName)); - } -} - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaCategoryHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaCategoryHandler.java deleted file mode 100644 index 3ea298a1cab..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaCategoryHandler.java +++ /dev/null @@ -1,707 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.CategoryAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.CategoryHierarchyLink; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.CategoryMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.CategoryAnchorMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.CategoryHierarchyLinkMapper; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.accessservices.subjectarea.validators.InputValidator; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.commonservices.generichandlers.*; - - -import java.util.*; - - -/** - * The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides glossary authoring interfaces for subject area experts. - */ - -public class SubjectAreaCategoryHandler extends SubjectAreaHandler { - private static final String className = SubjectAreaCategoryHandler.class.getName(); - - - /** - * Construct the Subject Area Category Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaCategoryHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - super(genericHandler, maxPageSize); - } - - /** - * Create a Category. There is specialization of a Category that can also be created using this operation. - * To create this specialization, you should specify a nodeType other than Category in the supplied category. - *

- * Valid nodeTypes for this request are: - *

    - *
  • SubjectAreaDefinition to create a Category that represents a subject area
  • - *
  • Category to create a category that is not a subject area
  • - *
- *

- * The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is - * unique. If this qualifiedName is not specified then one will be generated as GlossaryCategory concatenated with the guid. - * - *

- * Failure to create the Categories classifications, link to its glossary or its icon, results in the create failing and the category being deleted - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param relationshipHandler relationship handler - * @param suppliedCategory category to create - * @return response, when successful contains the created category. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createCategory(String userId, SubjectAreaRelationshipHandler relationshipHandler, Category suppliedCategory) { - final String methodName = "createCategory"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - String createdCategoryGuid = null; - - try { - InputValidator.validateNodeType(className, methodName, suppliedCategory.getNodeType(), NodeType.Category, NodeType.SubjectAreaDefinition); - // need to check we have a name - final String suppliedCategoryName = suppliedCategory.getName(); - if (suppliedCategoryName == null || suppliedCategoryName.equals("")) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.GLOSSARY_CATEGORY_CREATE_WITHOUT_NAME.getMessageDefinition(); - throw new InvalidParameterException(messageDefinition, className, methodName, "Name", null); - } else { - setUniqueQualifiedNameIfBlank(suppliedCategory); - GlossarySummary suppliedGlossary = suppliedCategory.getGlossary(); - String glossaryGuid = validateGlossarySummaryDuringCreation(userId, methodName, suppliedGlossary); - - Date effectiveFrom = null; - Date effectiveTo = null; - - if (suppliedCategory.getEffectiveFromTime() != null) { - effectiveFrom = new Date(suppliedCategory.getEffectiveFromTime()); - } - if (suppliedCategory.getEffectiveToTime() != null) { - effectiveTo = new Date(suppliedCategory.getEffectiveToTime()); - } - - GlossaryCategoryBuilder builder = new GlossaryCategoryBuilder(suppliedCategory.getQualifiedName(), - suppliedCategory.getName(), - suppliedCategory.getDescription(), - genericHandler.getRepositoryHelper(), - genericHandler.getServiceName(), - genericHandler.getServerName()); - - builder.setEffectivityDates(effectiveFrom, effectiveTo); - builder.setAnchors(userId, - glossaryGuid, - OpenMetadataType.GLOSSARY_TYPE_NAME, - OpenMetadataType.GLOSSARY_TYPE_NAME, - methodName); - - createdCategoryGuid = genericHandler.createBeanInRepository(userId, - null, - null, - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_GUID, - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - builder, - null, - methodName); - if (response.getRelatedHTTPCode() == 200) { - - - CategoryAnchor categoryAnchor = new CategoryAnchor(); - categoryAnchor.getEnd1().setNodeGuid(glossaryGuid); - categoryAnchor.getEnd2().setNodeGuid(createdCategoryGuid); - SubjectAreaOMASAPIResponse categoryAnchorResponse = relationshipHandler.createRelationship(methodName, userId, CategoryAnchorMapper.class, categoryAnchor); - if (categoryAnchorResponse.getRelatedHTTPCode() == 200) { - CategoryAnchor createdCategoryAnchor = categoryAnchorResponse.results().get(0); - createdCategoryAnchor.getGuid(); - - // set subject area classification if required. - if (suppliedCategory.getNodeType() == NodeType.SubjectAreaDefinition) { - genericHandler.setClassificationInRepository(userId, - null, - null, - createdCategoryGuid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - OpenMetadataType.SUBJECT_AREA_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.SUBJECT_AREA_CLASSIFICATION_TYPE_NAME, - null, - null, - false, - false, - true, - null, - null, - methodName); - } - - if (suppliedCategory.getParentCategory() != null && suppliedCategory.getParentCategory().getGuid() != null) { - createCategoryParentRelationship(userId, relationshipHandler, createdCategoryGuid, suppliedCategory.getParentCategory().getGuid() , methodName); - } - } - response = getCategoryByGuid(userId, createdCategoryGuid); - } - } - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - //if the entity is created, but subsequently an error occurred while creating the relationship - if (createdCategoryGuid != null) { - deleteCategory(userId, createdCategoryGuid); - } - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * Create category parent relationship - * @param userId unique identifier for requesting user, under which the request is performed - * @param relationshipHandler relationship handler - * @param categoryGuid category guid - * @param parentCategoryGuid parent category guid - * @param methodName API name - */ - private void createCategoryParentRelationship(String userId, SubjectAreaRelationshipHandler relationshipHandler, String categoryGuid, String parentCategoryGuid, String methodName) { - - CategoryHierarchyLink categoryHierarchyLink = new CategoryHierarchyLink(); - categoryHierarchyLink.getEnd1().setNodeGuid(parentCategoryGuid); - categoryHierarchyLink.getEnd2().setNodeGuid(categoryGuid); - relationshipHandler.createRelationship(methodName, userId, CategoryHierarchyLinkMapper.class, categoryHierarchyLink); - } - - /** - * Get a Category - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get. This could be a guid for a SubjectAreaDefinition, which is a type of category - * @return response which when successful contains the category with the requested guid - * n not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryByGuid(String userId, String guid) { - final String methodName = "getCategory"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - EntityDetail entityDetail = genericHandler.getEntityFromRepository(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - null, - null, - false, - false, - null, - methodName); - CategoryMapper categoryMapper = mappersFactory.get(CategoryMapper.class); - Category category = categoryMapper.map(entityDetail); - populateGlossarySummaryFromOMRS(userId, category, methodName); - populateParentCategoryFromOMRS(userId, category, methodName); - response.addResult(category); - - } catch (InvalidParameterException | UserNotAuthorizedException | PropertyServerException | SubjectAreaCheckedException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Find Category - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param findRequest {@link FindRequest} - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @return A list of Categories meeting the search Criteria - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findCategory(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) { - final String methodName = "findCategory"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - List foundCategories = findNodes(userId, OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, OpenMetadataType.GLOSSARY_CATEGORY_TYPE_GUID, findRequest, exactValue, ignoreCase, CategoryMapper.class, methodName); - - if (foundCategories != null) { - for (Category category : foundCategories) { - populateGlossarySummaryFromOMRS(userId, category, methodName); - populateParentCategoryFromOMRS(userId, category, methodName); - response.addResult(category); - } - } - } catch (UserNotAuthorizedException | SubjectAreaCheckedException | InvalidParameterException | PropertyServerException e) { - response.setExceptionInfo(e, className); - } - - return response; - } - - private void populateGlossarySummaryFromOMRS(String userId, Category category, String methodName) throws SubjectAreaCheckedException, - PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException { - final String guid = category.getSystemAttributes().getGUID(); - List relationships = - getRelationshipsForEntityByType(methodName, - userId, - guid, - new FindRequest(), - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - OpenMetadataType.CATEGORY_ANCHOR_TYPE_GUID , - OpenMetadataType.CATEGORY_ANCHOR_TYPE_NAME, - OpenMetadataType.GLOSSARY_TYPE_NAME - ); - - if (CollectionUtils.isNotEmpty(relationships)) { - for (Relationship relationship : relationships) { - CategoryAnchor categoryAnchor = (CategoryAnchor)relationship; - GlossarySummary glossarySummary = getGlossarySummary(methodName, userId, categoryAnchor); - if (glossarySummary != null) { - category.setGlossary(glossarySummary); - break; - } - } - } - } - - - private void populateParentCategoryFromOMRS(String userId, Category category, String methodName) throws SubjectAreaCheckedException, - PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException { - final String currentCategoryGuid = category.getSystemAttributes().getGUID(); - List foundEntities = genericHandler.getAttachedFilteredEntities(userId, - currentCategoryGuid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - OpenMetadataType.CATEGORY_HIERARCHY_TYPE_NAME, - OpenMetadataType.CATEGORY_HIERARCHY_TYPE_GUID, - 1, // get only the parent - null, - null, - 0, - false, - false, - maxPageSize, - methodName); - - if (CollectionUtils.isNotEmpty(foundEntities)) { - for (EntityDetail entity : foundEntities) { - String entityGUID = entity.getGUID(); - List relationships = - getRelationshipsForEntityByType(methodName, - userId, - entityGUID, - new FindRequest(), - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - OpenMetadataType.CATEGORY_HIERARCHY_TYPE_GUID, - OpenMetadataType.CATEGORY_HIERARCHY_TYPE_NAME, - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME - ); - for (Relationship relationship : relationships) { - String parentGuid = relationship.getEnd1().getNodeGuid(); - String childGuid = relationship.getEnd2().getNodeGuid(); - if (entityGUID.equals(parentGuid) && currentCategoryGuid.equals(childGuid)) { - CategoryMapper categoryMapper = mappersFactory.get(CategoryMapper.class); - CategoryHierarchyLink link = (CategoryHierarchyLink)relationship; - Category parentCategory = categoryMapper.map(entity); - category.setParentCategory(SubjectAreaUtils.extractCategorySummaryFromCategory(parentCategory, link)); - } - } - } - } - } - - /** - * Get Category relationships - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid - * @param findRequest {@link FindRequest} - * @return the relationships associated with the requested Category guid - *

- * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryRelationships(String userId, String guid, FindRequest findRequest) { - String restAPIName = "getCategoryRelationships"; - return getAllRelationshipsForEntity(restAPIName, userId, guid, findRequest, OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME ); - } - - /** - * Update a Category - *

- * Status is not updated using this call. - * The category parent can be updated with this call. For isReplace a null category parent will remove the existing parent relationship. - * - * @param userId userId under which the request is performed - * @param relationshipHandler relationshipHandler - * @param guid guid of the category to update - * @param suppliedCategory category to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateCategory(String userId, SubjectAreaRelationshipHandler relationshipHandler, String guid, Category suppliedCategory, boolean isReplace) { - final String methodName = "updateCategory"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - InputValidator.validateNodeType(className, methodName, suppliedCategory.getNodeType(), NodeType.Category, NodeType.SubjectAreaDefinition); - - Date effectiveFrom = null; - Date effectiveTo = null; - - if (suppliedCategory.getEffectiveFromTime() != null) { - effectiveFrom = new Date(suppliedCategory.getEffectiveFromTime()); - } - if (suppliedCategory.getEffectiveToTime() != null) { - effectiveTo = new Date(suppliedCategory.getEffectiveToTime()); - } - - GlossaryCategoryBuilder builder = new GlossaryCategoryBuilder(suppliedCategory.getQualifiedName(), - suppliedCategory.getName(), - suppliedCategory.getDescription(), - genericHandler.getRepositoryHelper(), - genericHandler.getServiceName(), - genericHandler.getServerName()); - - builder.setEffectivityDates(effectiveFrom, effectiveTo); - - genericHandler.updateBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_GUID, - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - false, - false, - builder.getInstanceProperties(methodName), - !isReplace, - null, - methodName); - - response = getCategoryByGuid(userId, guid); - - if (response.getRelatedHTTPCode() == 200 ) { - // was a parent category requested - CategorySummary suppliedParent = suppliedCategory.getParentCategory(); - List existingCategory = response.results(); - String existingParentRelationshipGuid = null; - String existingParentGuid = null; - String suppliedParentGuid = null; - if (existingCategory.size() > 0 && existingCategory.get(0).getParentCategory() != null) { - existingParentRelationshipGuid = existingCategory.get(0).getParentCategory().getRelationshipguid(); - existingParentGuid = existingCategory.get(0).getParentCategory().getGuid(); - } - if (suppliedParent != null && suppliedParent.getGuid() != null) { - suppliedParentGuid = suppliedParent.getGuid(); - } - - if (existingParentGuid != null) { - boolean doDelete = false; - if (suppliedParentGuid != null) { - if (!existingParentGuid.equals(suppliedParentGuid)) { - doDelete = true; - } - } else if (isReplace) { - // there is an existing parent category the requestor supplies a blank parent - we should delete the parent relationship for isReplace - doDelete = true; - } - if (doDelete) { - relationshipHandler.deleteRelationship(methodName, userId, CategoryHierarchyLinkMapper.class, existingParentRelationshipGuid); - } - } - if (suppliedParentGuid !=null) { - createCategoryParentRelationship(userId, relationshipHandler, guid, suppliedParentGuid, methodName); - } - - response = getCategoryByGuid(userId, guid); - } - - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Delete a Category or SubjectAreaDefinition instance - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. Soft delete is the default. - *

- * A soft delete means that the category instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the category will not exist after the operation. - * when not successful the following Exception responses can occur - * - * @param userId userId under which the request is performed - * @param guid guid of the category to be deleted. - * @return a void response - * n not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
  • EntityNotDeletedException a soft delete was issued but the category was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteCategory(String userId, String guid) { - final String methodName = "deleteCategory"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - genericHandler.deleteBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_GUID, - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - null, - null, - false, - false, - null, - methodName); - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * Restore a Category or a SubjectAreaDefinition - *

- * Restore allows the deleted Category to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to restore - * @return response which when successful contains the restored category - * n not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreCategory(String userId, String guid) { - final String methodName = "restoreCategory"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - genericHandler.getRepositoryHandler().restoreEntity(userId, - null, - null, - guid, - methodName); - - response = getCategoryByGuid(userId, guid); - } catch (UserNotAuthorizedException | PropertyServerException e) { - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * Get the terms that are categorized by this Category - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression to match the categorized Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param termHandler term handler - * @param startingFrom initial position in the stored list. - * @param pageSize maximum number of definitions to return on this call. - * @return A list of terms categorized by this Category - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategorizedTerms(String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, SubjectAreaTermHandler termHandler, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategorizedTerms"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - if (pageSize == null) { - pageSize = maxPageSize; - } - if (startingFrom == null) { - startingFrom = 0; - } - SubjectAreaOMASAPIResponse thisCategoryResponse = getCategoryByGuid(userId, guid); - if (thisCategoryResponse.getRelatedHTTPCode() == 200) { - try { - Set specificMatchPropertyNames = new HashSet(); - - // specify the names of string attributes for this type that we want to match against - specificMatchPropertyNames.add(OpenMetadataProperty.DISPLAY_NAME.name); - specificMatchPropertyNames.add(OpenMetadataProperty.DESCRIPTION.name); - specificMatchPropertyNames.add(OpenMetadataProperty.QUALIFIED_NAME.name); - - List entities = genericHandler.getAttachedFilteredEntities(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_NAME, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_GUID, - 2, // get only the children - specificMatchPropertyNames, - searchCriteria, - startingFrom, - !exactValue, - ignoreCase, - pageSize, - null, // any date - methodName); - - Set terms = new HashSet<>(); - if (CollectionUtils.isNotEmpty(entities)) { - for (EntityDetail entity : entities) { - SubjectAreaOMASAPIResponse termResponse = termHandler.getTermByGuid(userId, entity.getGUID()); - if (termResponse.getRelatedHTTPCode() == 200) { - terms.add(termResponse.results().get(0)); - } else { - response = termResponse; - break; - } - } - if (response.getRelatedHTTPCode() == 200) { - response.addAllResults(terms); - } - } - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - } - return response; - } - - /** - * Get this Category's child Categories. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the parent category - * @param searchCriteria String expression matching child Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of child categories filtered by the search criteria if one is supplied. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- **/ - public SubjectAreaOMASAPIResponse getCategoryChildren(String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategoryChildren"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - if (pageSize == null) { - pageSize = maxPageSize; - } - if (startingFrom == null) { - startingFrom = 0; - } - SubjectAreaOMASAPIResponse thisCategoryResponse = getCategoryByGuid(userId, guid); - if (thisCategoryResponse.getRelatedHTTPCode() == 200) { - try { - Set specificMatchPropertyNames = new HashSet(); - - // specify the names of string attributes for this type that we want to match against - specificMatchPropertyNames.add(OpenMetadataProperty.DISPLAY_NAME.name); - specificMatchPropertyNames.add(OpenMetadataProperty.DESCRIPTION.name); - specificMatchPropertyNames.add(OpenMetadataProperty.QUALIFIED_NAME.name); - - List entities = genericHandler.getAttachedFilteredEntities(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - OpenMetadataType.CATEGORY_HIERARCHY_TYPE_NAME, - OpenMetadataType.CATEGORY_HIERARCHY_TYPE_GUID, - 2, // get only the children - specificMatchPropertyNames, - searchCriteria, - startingFrom, - !exactValue, - ignoreCase, - pageSize, - null, // any date - methodName); - - Set categories = new HashSet<>(); - if (CollectionUtils.isNotEmpty(entities)) { - for (EntityDetail entity : entities) { - SubjectAreaOMASAPIResponse categoryResponse = getCategoryByGuid(userId, entity.getGUID()); - if (categoryResponse.getRelatedHTTPCode() == 200) { - categories.add(categoryResponse.results().get(0)); - } else { - response = categoryResponse; - break; - } - } - if (response.getRelatedHTTPCode() == 200) { - response.addAllResults(categories); - } - } - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - } - - return response; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaConfigHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaConfigHandler.java deleted file mode 100644 index 8820eda7fd5..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaConfigHandler.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria term. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.generichandlers.*; - - -/** - * SubjectAreaTermHandler manages config objects from the property server. It runs server-side in the subject Area - * OMAS and retrieves configuration information. - */ -public class SubjectAreaConfigHandler extends SubjectAreaHandler { - private static final String className = SubjectAreaConfigHandler.class.getName(); - - /** - * Construct the Subject Area Config Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaConfigHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - super(genericHandler, maxPageSize); - } - - /** - * Get the subject area configuration. - * @param userId user id of the caller - * @return config response - */ - public SubjectAreaOMASAPIResponse getConfig(String userId) { - // TODO check the userid - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - Config config = new Config(); - config.setMaxPageSize(maxPageSize); - response.addResult(config); - return response; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaGlossaryHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaGlossaryHandler.java deleted file mode 100644 index 9e303a6f387..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaGlossaryHandler.java +++ /dev/null @@ -1,620 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.EntityNotDeletedException; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.GlossaryMapper; -import org.odpi.openmetadata.accessservices.subjectarea.validators.InputValidator; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; - - -/** - * SubjectAreaGlossaryHandler manages Glossary objects from the property server. It runs server-side in the subject Area - * OMAS and retrieves entities and relationships through the OMRSRepositoryConnector. - */ -public class SubjectAreaGlossaryHandler extends SubjectAreaHandler { - private static Class clazz = SubjectAreaGlossaryHandler.class; - String className = clazz.getName(); - private static final Logger log = LoggerFactory.getLogger(clazz); - - - /** - * Construct the Subject Area Glossary Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaGlossaryHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - super(genericHandler, maxPageSize); - } - - /** - * Create a Glossary. There are specializations of glossaries that can also be created using this operation. - * To create a specialization, you should specify a nodeType other than Glossary in the supplied glossary. - *

- * Glossaries with the same name can be confusing. Best practise is to createGlossaries that have unique names. - * This Create call does not police that glossary names are unique. So it is possible to create Glossaries with the same name as each other. - * - *

- * Valid nodeTypes for this request are: - *

    - *
  • Taxonomy to create a Taxonomy
  • - *
  • CanonicalGlossary to create a canonical glossary
  • - *
  • TaxonomyAndCanonicalGlossary to create a glossary that is both a taxonomy and a canonical glossary
  • - *
  • Glossary to create a glossary that is not a taxonomy or a canonical glossary
  • - *
- * - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedGlossary Glossary to create - * @return response, when successful contains the created glossary. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createGlossary(String userId, Glossary suppliedGlossary) { - final String methodName = "createGlossary"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - InputValidator.validateNodeType(className, methodName, suppliedGlossary.getNodeType(), NodeType.Glossary, NodeType.Taxonomy, NodeType.TaxonomyAndCanonicalGlossary, NodeType.CanonicalGlossary); - final String suppliedGlossaryName = suppliedGlossary.getName(); - - // need to check we have a name - if (suppliedGlossaryName == null || suppliedGlossaryName.equals("")) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.GLOSSARY_CREATE_WITHOUT_NAME.getMessageDefinition(); - throw new InvalidParameterException(messageDefinition, className, methodName, "name"); - } else { - setUniqueQualifiedNameIfBlank(suppliedGlossary); - - Date effectiveFrom = null; - Date effectiveTo = null; - - if (suppliedGlossary.getEffectiveFromTime() != null) { - effectiveFrom = new Date(suppliedGlossary.getEffectiveFromTime()); - } - if (suppliedGlossary.getEffectiveToTime() != null) { - effectiveTo = new Date(suppliedGlossary.getEffectiveToTime()); - } - - GlossaryBuilder builder = new GlossaryBuilder(suppliedGlossary.getQualifiedName(), - suppliedGlossary.getName(), - suppliedGlossary.getDescription(), - suppliedGlossary.getLanguage(), - suppliedGlossary.getUsage(), - genericHandler.getRepositoryHelper(), - genericHandler.getServiceName(), - genericHandler.getServerName()); - - builder.setEffectivityDates(effectiveFrom, effectiveTo); - - String guid = genericHandler.createBeanInRepository(userId, - null, - null, - OpenMetadataType.GLOSSARY_TYPE_GUID, - OpenMetadataType.GLOSSARY_TYPE_NAME, - builder, - null, - methodName); - - // set classifications if required - if (suppliedGlossary.getNodeType() == NodeType.Taxonomy || suppliedGlossary.getNodeType() == NodeType.TaxonomyAndCanonicalGlossary) { - - genericHandler.setClassificationInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_NAME, - OpenMetadataType.TAXONOMY_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.TAXONOMY_CLASSIFICATION_TYPE_NAME, - null, // TODO properties - false, - false, - false, - null, - methodName); - } - if (suppliedGlossary.getNodeType() == NodeType.CanonicalGlossary || suppliedGlossary.getNodeType() == NodeType.TaxonomyAndCanonicalGlossary) { - genericHandler.setClassificationInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_NAME, - OpenMetadataType.CANONICAL_VOCAB_CLASSIFICATION_TYPE_GUID, - OpenMetadataType.CANONICAL_VOCAB_CLASSIFICATION_TYPE_NAME, - null, // TODO properties - false, - false, - false, - null, - methodName); - } - - - - - response = getGlossaryByGuid(userId, guid); - } - } catch (PropertyServerException | UserNotAuthorizedException | SubjectAreaCheckedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - - - /** - * Get a glossary by guid. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to get - * @return response which when successful contains the glossary with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getGlossaryByGuid(String userId, String guid) { - final String methodName = "getGlossaryByGuid"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - InputValidator.validateGUIDNotNull(className, methodName, guid, "guid"); - EntityDetail entityDetail = genericHandler.getEntityFromRepository(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_NAME, - null, - null, - false, - false, - null, - methodName); - GlossaryMapper glossaryMapper = mappersFactory.get(GlossaryMapper.class); - response.addResult(glossaryMapper.map(entityDetail)); - } catch (InvalidParameterException | SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Find Glossary - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param findRequest {@link FindRequest} - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @return A list of Glossaries meeting the search Criteria - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findGlossary(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) { - final String methodName = "findGlossary"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - // If no search criteria is supplied then we return all glossaries, this should not be too many. - try { - List foundGlossaries = findNodes(userId, OpenMetadataType.GLOSSARY_TYPE_NAME, OpenMetadataType.GLOSSARY_TYPE_GUID, findRequest, exactValue, ignoreCase, GlossaryMapper.class, methodName); - if (foundGlossaries != null) { - response.addAllResults(foundGlossaries); - } else { - return response; - } - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Get Glossary relationships - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid - * @param findRequest {@link FindRequest} - * @return the relationships associated with the requested Glossary guid - *

- * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getGlossaryRelationships(String userId, String guid, FindRequest findRequest) { - String methodName = "getGlossaryRelationships"; - return getAllRelationshipsForEntity(methodName, userId, guid, findRequest, OpenMetadataType.GLOSSARY_TYPE_NAME ); - } - - /** - * Update a Glossary - *

- * If the caller has chosen to incorporate the glossary name in their Glossary Terms or Categories qualified name, renaming the glossary will cause those - * qualified names to mismatch the Glossary name. - * If the caller has chosen to incorporate the glossary qualifiedName in their Glossary Terms or Categories qualified name, changing the qualified name of the glossary will cause those - * qualified names to mismatch the Glossary name. - * Status is not updated using this call. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to update - * @param suppliedGlossary glossary to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateGlossary(String userId, String guid, Glossary suppliedGlossary, boolean isReplace) { - final String methodName = "updateGlossary"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - InputValidator.validateNodeType(className, methodName, suppliedGlossary.getNodeType(), NodeType.Glossary, NodeType.Taxonomy, NodeType.TaxonomyAndCanonicalGlossary, NodeType.CanonicalGlossary); - - Date effectiveFrom = null; - Date effectiveTo = null; - - if (suppliedGlossary.getEffectiveFromTime() != null) { - effectiveFrom = new Date(suppliedGlossary.getEffectiveFromTime()); - } - if (suppliedGlossary.getEffectiveToTime() != null) { - effectiveTo = new Date(suppliedGlossary.getEffectiveToTime()); - } - - GlossaryBuilder builder = new GlossaryBuilder(suppliedGlossary.getQualifiedName(), - suppliedGlossary.getName(), - suppliedGlossary.getDescription(), - suppliedGlossary.getLanguage(), - suppliedGlossary.getUsage(), - genericHandler.getRepositoryHelper(), - genericHandler.getServiceName(), - genericHandler.getServerName()); - - builder.setEffectivityDates(effectiveFrom, effectiveTo); - - genericHandler.updateBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_GUID, - OpenMetadataType.GLOSSARY_TYPE_NAME, - false, - false, - builder.getInstanceProperties(methodName), - !isReplace, - null, - methodName); - response = getGlossaryByGuid(userId, guid); - - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * Delete a Glossary instance - *

- * The deletion of a glossary is only allowed if there is no glossary content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the glossary instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the glossary will not exist after the operation. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
  • EntityNotDeletedException a soft delete was issued but the glossary was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteGlossary(String userId, String guid) { - final String methodName = "deleteGlossary"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - boolean issueDelete = false; - try { - // if this is a not a purge then check there are no relationships before deleting, - // otherwise the deletion could remove all anchored entities. - if (genericHandler.isBeanIsolated(userId, - guid, - OpenMetadataType.GLOSSARY_TYPE_NAME, - false, - false, - null, - methodName)) { - - issueDelete = true; - } else { - throw new EntityNotDeletedException(SubjectAreaErrorCode.GLOSSARY_CONTENT_PREVENTED_DELETE.getMessageDefinition(guid), - className, - methodName, - guid); - } - - if (issueDelete) { - genericHandler.deleteBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_GUID, // true for sub types - OpenMetadataType.GLOSSARY_TYPE_NAME, // true for sub types - null, - null, - false, - false, - null, - methodName); - } - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Restore a Glossary - *

- * Restore allows the deleted Glossary to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to restore - * @return response which when successful contains the restored glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreGlossary(String userId, String guid) { - final String methodName = "restoreGlossary"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - genericHandler.getRepositoryHandler().restoreEntity(userId, - null, - null, - guid, - methodName); - response = getGlossaryByGuid(userId, guid); - } catch (UserNotAuthorizedException | PropertyServerException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Get terms that are owned by this glossary. The server has a maximum page size defined, the number of terms returned is limited by that maximum page size. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param findRequest {@link FindRequest} - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @return A list of terms owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getTerms(String userId, String guid, SubjectAreaTermHandler termHandler, FindRequest findRequest, boolean exactValue, boolean ignoreCase) { - final String methodName = "getTerms"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - Integer pageSize = findRequest.getPageSize(); - Integer requestedStartingFrom = findRequest.getStartingFrom(); - String searchCriteria = findRequest.getSearchCriteria(); - if (pageSize == null) { - pageSize = maxPageSize; - } - if (requestedStartingFrom == null) { - requestedStartingFrom = 0; - } - SubjectAreaOMASAPIResponse thisGlossaryResponse = getGlossaryByGuid(userId, guid); - if (thisGlossaryResponse.getRelatedHTTPCode() == 200) { - try { - Set specificMatchPropertyNames = new HashSet(); - - // specify the names of string attributes for this type that we want to match against - specificMatchPropertyNames.add(OpenMetadataProperty.DISPLAY_NAME.name); - specificMatchPropertyNames.add(OpenMetadataProperty.DESCRIPTION.name); - specificMatchPropertyNames.add(OpenMetadataProperty.QUALIFIED_NAME.name); - specificMatchPropertyNames.add(OpenMetadataProperty.SUMMARY.name); - specificMatchPropertyNames.add(OpenMetadataProperty.EXAMPLES.name); - specificMatchPropertyNames.add(OpenMetadataProperty.ABBREVIATION.name); - specificMatchPropertyNames.add(OpenMetadataProperty.USAGE.name); - - List entities = genericHandler.getAttachedFilteredEntities(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_NAME, - OpenMetadataType.TERM_ANCHOR.typeName, - OpenMetadataType.TERM_ANCHOR.typeGUID, - 2, // get only the children - specificMatchPropertyNames, - searchCriteria, - requestedStartingFrom, - !exactValue, - ignoreCase, - pageSize, - methodName); - - Set terms = new HashSet<>(); - if (entities != null) { - for (EntityDetail entity : entities) { - SubjectAreaOMASAPIResponse termResponse = termHandler.getTermByGuid(userId, entity.getGUID()); - if (termResponse.getRelatedHTTPCode() == 200) { - terms.add(termResponse.results().get(0)); - } else { - response = termResponse; - break; - } - } - if (response.getRelatedHTTPCode() == 200) { - response.addAllResults(terms); - } - } - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - } - return response; - } - - /** - * Get the Categories owned by this glossary. The server has a maximum page size defined, the number of categories returned is limited by that maximum page size. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param findRequest {@link FindRequest} - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @param categoryHandler category handler is supplied, so that we can obtain categories containing the parentCategory field, - * which we need to test as part of the onlyTop processing - * @return A list of categories owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategories(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Boolean onlyTop, SubjectAreaCategoryHandler categoryHandler) { - final String methodName = "getCategories"; - if (log.isDebugEnabled()) { - String searchCriteria = "not set"; - int startingFrom = 0; - if (findRequest != null) { - searchCriteria = findRequest.getSearchCriteria(); - startingFrom = findRequest.getStartingFrom(); - } - - log.debug("==> " + methodName + ",userId=" + userId + ",guid=" + guid +",searchCriteria="+searchCriteria+",startingFrom="+startingFrom); - } - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - Integer pageSize = findRequest.getPageSize(); - Integer requestedStartingFrom = findRequest.getStartingFrom(); - String searchCriteria = findRequest.getSearchCriteria(); - if (pageSize == null) { - pageSize = maxPageSize; - } - if (requestedStartingFrom == null) { - requestedStartingFrom = 0; - } - SubjectAreaOMASAPIResponse thisGlossaryResponse = getGlossaryByGuid(userId, guid); - if (thisGlossaryResponse.getRelatedHTTPCode() == 200) { - try { - if (log.isDebugEnabled()) { - log.debug(methodName + ": got glossary guid " + guid ); - } - - Set specificMatchPropertyNames = new HashSet(); - - specificMatchPropertyNames.add(OpenMetadataProperty.DISPLAY_NAME.name); - specificMatchPropertyNames.add(OpenMetadataProperty.DESCRIPTION.name); - specificMatchPropertyNames.add(OpenMetadataProperty.QUALIFIED_NAME.name); - - String parentToCheckTypeGUID = null; - String parentToCheckTypeName = null; - if (onlyTop) { - parentToCheckTypeGUID = OpenMetadataType.CATEGORY_HIERARCHY_TYPE_GUID; - parentToCheckTypeName = OpenMetadataType.CATEGORY_HIERARCHY_TYPE_NAME; - if (log.isDebugEnabled()) { - log.debug("parentToCheckTypeGUID="+parentToCheckTypeGUID+",parentToCheckTypeName=" + parentToCheckTypeName); - } - } - - - List entities = genericHandler.getAttachedFilteredEntities(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_NAME, - OpenMetadataType.CATEGORY_ANCHOR_TYPE_NAME, - OpenMetadataType.CATEGORY_ANCHOR_TYPE_GUID, - 2, // get only the category end - parentToCheckTypeName, //set for onlyTop - parentToCheckTypeGUID, //set for onlyTop - true, // CategoryHierarchyLink end1 is the parent. - specificMatchPropertyNames, - searchCriteria, - requestedStartingFrom, - !exactValue, - ignoreCase, - pageSize, - false, - false, - null, - methodName); - Set categories = new HashSet<>(); - if(entities != null) - { - for (EntityDetail entity : entities) - { - SubjectAreaOMASAPIResponse categoryResponse = categoryHandler.getCategoryByGuid(userId, entity.getGUID()); - if (categoryResponse.getRelatedHTTPCode() == 200) - { - categories.add(categoryResponse.results().get(0)); - } else - { - response = categoryResponse; - break; - } - } - if (response.getRelatedHTTPCode() == 200) - { - response.addAllResults(categories); - } - } - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - } - return response; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaGraphHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaGraphHandler.java deleted file mode 100644 index 6184f478c0f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaGraphHandler.java +++ /dev/null @@ -1,191 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph.RelationshipTypeMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph.NodeTypeMapper; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.commonservices.generichandlers.*; - -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static java.util.stream.Collectors.toList; - - -/** - * The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides glossary authoring interfaces for subject area experts. - */ - -public class SubjectAreaGraphHandler extends SubjectAreaHandler { - private static final String className = SubjectAreaGraphHandler.class.getName(); - - /** - * Construct the Subject Area Graph Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaGraphHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - super(genericHandler, maxPageSize); - } - - /** - * Get the graph of nodes and relationships radiating out from a node. - *

- * Return the nodes and relationships that radiate out from the supplied node (identified by a GUID). - * The results are scoped by types of relationships, types of nodes and classifications as well as level. - * - * @param userId userId under which the request is performed - * @param guid the starting point of the query. - * @param nodeFilterStr Comma separated list of node names to include in the query results. Null means include - * all entities found, irrespective of their type. - * @param relationshipFilterStr comma separated list of relationship names to include in the query results. Null means include - * all relationships found, irrespective of their type. - * @param asOfTime Requests a historical query of the relationships for the entity. Null means return the - * present values. - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * @param level the number of the relationships (relationships) out from the starting node that the query will traverse to - * gather results. If not specified then it defaults to 3. - * @return A graph of nodeTypes. - * - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - public SubjectAreaOMASAPIResponse getGraph(String userId, - String guid, - Date asOfTime, - String nodeFilterStr, - String relationshipFilterStr, - StatusFilter statusFilter, // may need to extend this for controlled terms - Integer level) { - - final String methodName = "getGraph"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - List requestedInstanceStatus = new ArrayList<>(); - if (statusFilter == null || statusFilter == StatusFilter.ACTIVE) { - requestedInstanceStatus.add(SubjectAreaUtils.convertStatusToInstanceStatus(Status.ACTIVE)); - } else { - // request all status instances. - for (Status omasStatus : Status.values()) { - requestedInstanceStatus.add(SubjectAreaUtils.convertStatusToInstanceStatus(omasStatus)); - } - } - if (level == null) { - level = 3; - } - - InstanceGraph instanceGraph = genericHandler.getRepositoryHandler().getEntityNeighborhood( - userId, - guid, - getEntityGuids(nodeFilterStr), - getRelationshipTypeGuids(methodName, relationshipFilterStr), - requestedInstanceStatus, - null, - asOfTime, - level, - methodName); - - Graph graph = new Graph(); - graph.setRootNodeGuid(guid); - graph.setNodeFilter(nodeFilterStr); - graph.setRelationshipFilter(relationshipFilterStr); - if (instanceGraph != null) { - if (CollectionUtils.isNotEmpty(instanceGraph.getRelationships())) { - List relationships = getRelationshipsFromRelationships(instanceGraph.getRelationships()); - Map guidToRelationshipMap = new HashMap<>(); - for (Relationship relationship : relationships) { - guidToRelationshipMap.put(relationship.getSystemAttributes().getGUID(), relationship); - } - graph.setRelationships(guidToRelationshipMap); - } - - if (CollectionUtils.isNotEmpty(instanceGraph.getEntities())) { - List nodes = getNodesFromEntityDetails(instanceGraph.getEntities()); - Map guidToNodeMap = new HashMap<>(); - for (Node node : nodes) { - guidToNodeMap.put(node.getSystemAttributes().getGUID(), node); - } - graph.setNodes(guidToNodeMap); - } - } - // end of if after getEntityNeighbourhood call - response.addResult(graph); - } catch (UserNotAuthorizedException | SubjectAreaCheckedException | PropertyServerException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - private List getEntityGuids(String nodeFilterStr) { - // if there was no NodeFilter supplied then limit to the NodeType values, - // so we only get the types that this omas is interested in. - Stream nodeTypeStream = Arrays.stream(NodeType.values()); - if (nodeFilterStr == null) { - return nodeTypeStream - .filter(type -> type != NodeType.Unknown) - .map(NodeTypeMapper::mapNodeTypeToEntityTypeGuid) - .collect(toList()); - } else { - Set typeNames = nodeTypeStream.map(NodeType::name).collect(Collectors.toSet()); - return Arrays.stream(nodeFilterStr.split(",")) - .filter(typeNames::contains) - .map(NodeType::valueOf) - .map(NodeTypeMapper::mapNodeTypeToEntityTypeGuid) - //set of entity type guids so we do not have duplicates - .distinct() - .collect(toList()); - } - } - - private List getRelationshipTypeGuids(String operation, String relationshipFilterStr) throws InvalidParameterException { - // if there was no relationship filter supplied then limit to the relationshipType values, - // so we only get the types that this omas is interested in. - Stream relationshipTypeStream = Arrays.stream(RelationshipType.values()); - List relationshipTypeGuids = new ArrayList<>(); - Set relationshipTypes = new HashSet<>(); - - if (relationshipFilterStr == null) { - relationshipTypes = new HashSet(Arrays.asList(RelationshipType.values())); - } else { - String[] relationshipStringArray = relationshipFilterStr.split(","); - for (String relationshipString : relationshipStringArray) { - RelationshipType relationshipType = RelationshipType.valueOf(relationshipString); - if (relationshipType == null) { - // error - } else { - relationshipTypes.add(relationshipType); - } - } - } - for (RelationshipType type : relationshipTypes) { - if (type != RelationshipType.Unknown) { - String guid = RelationshipTypeMapper.mapOMASRelationshipTypeToOMRSRelationshipTypeGuid(operation, type); - relationshipTypeGuids.add(guid); - } - } - - return relationshipTypeGuids; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaHandler.java deleted file mode 100644 index 0607636ea2a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaHandler.java +++ /dev/null @@ -1,551 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.OmasObject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.CategoryAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.TermAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.IRelationshipMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.INodeMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.Mapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.MappersFactory; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.CategoryMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.GlossaryMapper; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.commonservices.generichandlers.*; - -import java.util.*; - - -/** - * SubjectAreaProjectHandler manages Project objects from the property server. It runs server-side in the subject Area - * OMAS and retrieves entities and relationships through the OMRSRepositoryConnector. - */ -public abstract class SubjectAreaHandler { - private static final String className = SubjectAreaHandler.class.getName(); - - protected final MappersFactory mappersFactory; - protected final OpenMetadataAPIGenericHandler genericHandler; - protected final int maxPageSize; - protected InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - - /** - * Construct the Subject Area Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - this.genericHandler =genericHandler; - this.mappersFactory = new MappersFactory(genericHandler); - this.maxPageSize = maxPageSize; - invalidParameterHandler.setMaxPagingSize(this.maxPageSize); - } - - public int getMaxPageSize() { - return maxPageSize; - } - - /** - * Get glossary summary - * @param restAPIName rest API Name - * @param userId userid under which to issue to the get of the related media - * @param relationship glossary relationship {@link TermAnchor} or {@link CategoryAnchor} - * @return Glossary summary - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws UserNotAuthorizedException user not authorized to issue this request. - * @throws PropertyServerException problem retrieving the Glossary. - */ - GlossarySummary getGlossarySummary(String restAPIName, - String userId, - Relationship relationship) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException, - SubjectAreaCheckedException { - String guid = SubjectAreaUtils.getGlossaryGuidFromAnchor(relationship); - - EntityDetail entityDetail = genericHandler.getEntityFromRepository(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_NAME, - null, - null, - false, - false, - null, - restAPIName); - GlossaryMapper glossaryMapper = mappersFactory.get(GlossaryMapper.class); - Glossary glossary = glossaryMapper.map(entityDetail); - // TODO sort out icons - return SubjectAreaUtils.extractGlossarySummaryFromGlossary(glossary, relationship); - } - /** - * Get category summary - * @param restAPIName rest API Name - * @param userId userid under which to issue to the get of the related media - * @param relationship category relationship {@link TermAnchor} or {@link CategoryAnchor} - * @return category summary - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws UserNotAuthorizedException user not authorized to issue this request. - * @throws PropertyServerException problem retrieving the Category. - */ - CategorySummary getCategorySummary(String restAPIName, - String userId, - Relationship relationship) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException, - SubjectAreaCheckedException - { - String categoryGuid = relationship.getEnd1().getNodeGuid(); - EntityDetail entityDetail = genericHandler.getEntityFromRepository(userId, - categoryGuid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - null, - null, - false, - false, - null, - restAPIName); - CategoryMapper CategoryMapper = mappersFactory.get(CategoryMapper.class); - Category category = CategoryMapper.map(entityDetail); - // TODO sort out icons - return SubjectAreaUtils.extractCategorySummaryFromCategory(category, relationship); - } - protected String sanitiseFindRequest(String searchCriteria, boolean exactValue, boolean ignoreCase) { - OMRSRepositoryHelper omrsRepositoryHelper =genericHandler.getRepositoryHelper(); - - if (searchCriteria != null && "".equals(searchCriteria.trim())) { - // ignore the flags for an empty search criteria string - assume we want everything - searchCriteria = ".*"; - } else { - // lose any leading and trailing blanks - searchCriteria = searchCriteria.trim(); - if (exactValue) { - searchCriteria = omrsRepositoryHelper.getExactMatchRegex(searchCriteria, ignoreCase); - } else { - searchCriteria = omrsRepositoryHelper.getStartsWithRegex(searchCriteria, ignoreCase); - } - } - - return searchCriteria; - } - /** - * Take a FindRequest and sanitise it. - * - * The FindRequest from the user could contain a regex expression which would cause the regex engine to loop. - * to avoid this, we turn what the user has given us into a literal and then use the exactValue and ignoreCase flags - * to add to the regular expression in a controlled way. - * - * @param findRequest supplied find request - that contains the search criteria - * @param exactValue flag indicating that exact value mathcing should be done - * @param ignoreCase flag indicating that case should be ignored - * @return sanitised find request - */ - protected FindRequest sanitiseFindRequest(FindRequest findRequest, boolean exactValue, boolean ignoreCase) { - FindRequest sanitisedFindRequest = findRequest; - String searchCriteria = sanitiseFindRequest(findRequest.getSearchCriteria(), exactValue, ignoreCase); - sanitisedFindRequest.setSearchCriteria(searchCriteria); - return sanitisedFindRequest; - } - - protected List findNodes(String userId, - String typeEntityName, - String typeEntityGuid, - FindRequest findRequest, - boolean exactValue, - boolean ignoreCase, - Class> mapperClass, - String methodName) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException { - List entityDetails = null; - List foundEntities = null; - - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - if (findRequest.getSearchCriteria() == null) { - entityDetails = genericHandler.getEntitiesByType(userId, - typeEntityGuid, - typeEntityName, - findRequest.getSequencingProperty(), - false, - false, - findRequest.getStartingFrom(), - findRequest.getPageSize(), - null, // any effective date - methodName); - } else { - FindRequest sanitisedFindRequest = sanitiseFindRequest(findRequest, exactValue, ignoreCase); - entityDetails = genericHandler.findEntities(userId, - sanitisedFindRequest.getSearchCriteria(), - "searchCriteria", - typeEntityGuid, - typeEntityName, - null, - null, - findRequest.getSequencingProperty(), - findRequest.getStartingFrom(), - findRequest.getPageSize(), - false, - false, - null, // any effective date - methodName); - } - if (entityDetails != null) { - foundEntities = convertOmrsToOmas(entityDetails, mapperClass); - } - return foundEntities; - } - - /** - * Get All relationships for Node - * - * @param methodName name of the method being called. - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid - * @param findRequest {@link FindRequest} - * @param entityTypeName typpe name of the starting entity - * @return the relationships associated with the requested guid - * */ - public SubjectAreaOMASAPIResponse getAllRelationshipsForEntity(String methodName, - String userId, - String guid, - FindRequest findRequest, - String entityTypeName) - { - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - response.addAllResults(getAllRelationshipForEntity(methodName, userId, guid, findRequest, entityTypeName)); - } catch (UserNotAuthorizedException | SubjectAreaCheckedException | PropertyServerException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * Get the relationships keyed off an entity guid. - * - * @param restAPIName rest API name - * @param userId user identity - * @param entityGuid globally unique identifier - * @param findRequest {@link FindRequest} - * @param entityTypeName type name of the starting entity - * @return {@code List} - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws SubjectAreaCheckedException standard exception Subject Area OMAS services - */ - public List getAllRelationshipForEntity(String restAPIName, - String userId, - String entityGuid, - FindRequest findRequest, - String entityTypeName) throws SubjectAreaCheckedException, - PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException { - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), restAPIName); - List relationships = - genericHandler.getAttachmentLinks(userId, - entityGuid, - "guid", - entityTypeName, - null, - null, - null, - null, - 0, - false, - false, - findRequest.getStartingFrom(), - findRequest.getPageSize(), - null, // any effective time - restAPIName); - - - return getRelationshipsFromRelationships(relationships); - } - /** - * Get the relationships keyed off an entity guid. - * - * @param restAPIName rest API name - * @param userId user identity - * @param entityGuid globally unique identifier - * @param findRequest {@link FindRequest} - * @param entityTypeName type name of the starting entity - * @param attachmentRelationshipTypeGUID attachment relationship type guid - * @param attachmentRelationshipTypeName attachment relationship type name - * @param attachmentEntityTypeName attached entity type name - * @return {@code List} - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws SubjectAreaCheckedException standard exception Subject Area OMAS services - */ - public List getRelationshipsForEntityByType(String restAPIName, - String userId, - String entityGuid, - FindRequest findRequest, - String entityTypeName, - String attachmentRelationshipTypeGUID, - String attachmentRelationshipTypeName, - String attachmentEntityTypeName) throws SubjectAreaCheckedException, - PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException { - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), restAPIName); - List relationships = - genericHandler.getAttachmentLinks(userId, - entityGuid, - "guid", - entityTypeName, - attachmentRelationshipTypeGUID, - attachmentRelationshipTypeName, - null, - attachmentEntityTypeName, - 0, - false, - false, - findRequest.getStartingFrom(), - findRequest.getPageSize(), - null, // any effective time - restAPIName); - - return getRelationshipsFromRelationships(relationships); - } - - - public List getRelationshipsFromRelationships(Collection relationships) { - return convertOmrsToOmas(relationships, IRelationshipMapper.class); - } - - public List getNodesFromEntityDetails(Collection entityDetails){ - return convertOmrsToOmas(entityDetails, INodeMapper.class); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public List - convertOmrsToOmas(Collection list, Class mapperInterface) - { - List result = new ArrayList<>(); - if (list != null) { - Map> cache = new HashMap<>(); - for (R entityDetail : list) { - String typeDefName = entityDetail.getType().getTypeDefName(); - if (cache.containsKey(typeDefName)) { - Mapper mapper = cache.get(typeDefName); - result.add(mapper.map(entityDetail)); - } else { - Set> allMapperClasses = mappersFactory.getAllMapperClasses(); - for (Class mapperClass : allMapperClasses) { - if (mapperInterface.isAssignableFrom(mapperClass)) { - Mapper mapper = mapperInterface.cast(mappersFactory.get(mapperClass)); - if (mapper.getTypeName().equals(typeDefName)) { - cache.put(typeDefName, mapper); - result.add(mapper.map(entityDetail)); - } - } - } - } - } - } - return result; - } - - /** - * This method validated for creation. - * - * @param userId userId under which the request is performed - * @param methodName method making the call - * @param suppliedGlossary glossary to validate against. - * @return SubjectAreaOMASAPIResponse this response is of type ResponseCategory.Category.Glossary if successful, otherwise there is an error response. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws SubjectAreaCheckedException standard exception Subject Area OMAS services - */ - protected String validateGlossarySummaryDuringCreation(String userId, - String methodName, - GlossarySummary suppliedGlossary) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException, - SubjectAreaCheckedException { - /* - * There needs to be an associated glossary supplied - * The glossary could be of NodeType Glossary, Taxonomy , Canonical glossary or canonical and taxonomy. - * The Glossary summary contains 4 identifying fields. We only require one of these fields to be supplied. - * If more than one is supplied then we look for a glossary matching the supplied userId then matching the name. - * Note if a relationship userId is supplied - then we reject this request - as the relationship cannot exist before one of its ends exists. - */ - - if (suppliedGlossary != null) { - String guid = suppliedGlossary.getGuid(); - String relationshipGuid = suppliedGlossary.getRelationshipguid(); - if (relationshipGuid != null) { - // glossary relationship cannot exist before the Term exists. - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.CREATE_WITH_GLOSSARY_RELATIONSHIP.getMessageDefinition(); - throw new InvalidParameterException( - messageDefinition, - className, - methodName, - "glossary", - null); - } - // find by glossary by guid - EntityDetail entityDetail = genericHandler.getEntityFromRepository(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_TYPE_NAME, - null, - null, - false, - false, - null, - methodName); - - return entityDetail.getGUID(); - - } else { - // error - glossary is mandatory - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.CREATE_WITHOUT_GLOSSARY.getMessageDefinition(methodName); - throw new InvalidParameterException( - messageDefinition, - className, - methodName, - "glossary", - null); - } - } - /** - * Set unique qualifiedName into the supplied Node. The qualified name needs to be unique and is supplied on an addnEtity omrs call. - * Prior to the add, we do not know the guid of the entity. We do not want to add an entity, then immediately update it; as these changes to - * entity identity would be propagated across the cohort. So we set the qualified name by concatinating the supplied seed, an @ symbol and a newly generated UUID. - * - * The assumption is that this method is supplied a node that contains a name. - * - * @param node Node to set the unique qualified name into - */ - protected void setUniqueQualifiedNameIfBlank(Node node) { - String qualifiedName = node.getQualifiedName(); - if (qualifiedName == null || qualifiedName.trim().equals("")) { - node.setQualifiedName(node.getName() + "@" + UUID.randomUUID().toString()); - } - } - - /** - * Set the effectivity to and from dates date for a Node - * @param userId calling user - * @param node node to update with effectivity dates if required - * @param methodName name of the calling method - * @param guid guid of the Bean to update - * @param typeGUID the guid of the associated type - * @param typeName the name of the associated type - * @throws InvalidParameterException invalid parameter - * @throws PropertyServerException there is a problem with the repositories - * @throws UserNotAuthorizedException the user is not allowed to update the security tags - */ - protected void setNodeEffectivity(String userId, Node node, String methodName, String guid, String typeGUID, String typeName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Long effectiveFromLong = node.getEffectiveFromTime(); - Long effectiveToLong = node.getEffectiveToTime(); - if (effectiveFromLong != null || effectiveToLong != null) { - Date effectiveFrom = null; - Date effectiveTo = null; - if (effectiveToLong != null) { - effectiveTo = new Date(effectiveToLong); - } - if (effectiveFromLong != null) { - effectiveFrom = new Date(effectiveFromLong); - } - genericHandler.updateBeanEffectivityDates(userId, - null, - null, - guid, - "guid", - typeGUID, - typeName, - false, - false, - effectiveFrom, - effectiveTo, - null, - methodName); - } - } - /** - * Set the effectivity to and from dates date for a Relationship - * @param userId calling user - * @param node node to take the effectivity dates from - * @param methodName name of the calling method - * @param relationshipGUID relationshipGUID of the Relationship to update - * @param typeGUID the relationshipGUID of the associated type - * @param typeName the name of the associated type - * @throws InvalidParameterException invalid parameter - * @throws PropertyServerException there is a problem with the repositories - * @throws UserNotAuthorizedException the user is not allowed to update the security tags - */ - protected void setRelationshipEffectivity(String userId, Node node, String methodName, String relationshipGUID, String typeGUID, String typeName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Long effectiveFromLong = node.getEffectiveFromTime(); - Long effectiveToLong = node.getEffectiveToTime(); - if (effectiveFromLong != null || effectiveToLong != null) { - Date effectiveFrom = null; - Date effectiveTo = null; - if (effectiveToLong != null) { - effectiveTo = new Date(effectiveToLong); - } - if (effectiveFromLong != null) { - effectiveFrom = new Date(effectiveFromLong); - } - genericHandler.updateRelationshipEffectivityDates(userId, - null, - null, - relationshipGUID, - "relationshipGUID", - typeName, - effectiveFrom, - effectiveTo, - false, - false, - null, - methodName); - - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaProjectHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaProjectHandler.java deleted file mode 100644 index c87d66f738e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaProjectHandler.java +++ /dev/null @@ -1,497 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.EntityNotDeletedException; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.responses.*; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.ProjectMapper; -import org.odpi.openmetadata.accessservices.subjectarea.validators.InputValidator; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.odpi.openmetadata.commonservices.generichandlers.*; - -import java.util.*; - - -/** - * SubjectAreaProjectHandler manages Project objects from the property server. It runs server-side in the subject Area - * OMAS and retrieves entities and relationships through the OMRSRepositoryConnector. - */ -public class SubjectAreaProjectHandler extends SubjectAreaHandler { - private static final Class clazz = SubjectAreaProjectHandler.class; - private static final String className = clazz.getName(); - private static final Logger log = LoggerFactory.getLogger(clazz); - - /** - * Construct the Subject Area Project Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaProjectHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - super(genericHandler, maxPageSize); - } - - /** - * Create a Project. There are specializations of projects that can also be created using this operation. - * To create a specialization, you should specify a nodeType other than Project in the supplied project. - *

- * Projects with the same name can be confusing. Best practise is to createProjects that have unique names. - * This Create call does not police that project names are unique. So it is possible to create Projects with the same name as each other. - * - *

- * Valid nodeTypes for this request are: - *

    - *
  • Taxonomy to create a Taxonomy
  • - *
  • CanonicalProject to create a canonical project
  • - *
  • TaxonomyAndCanonicalProject to create a project that is both a taxonomy and a canonical project
  • - *
  • Project to create a project that is not a taxonomy or a canonical project
  • - *
- * - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedProject Project to create - * @return response, when successful contains the created project. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised.
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createProject(String userId, Project suppliedProject) { - final String methodName = "createProject"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - InputValidator.validateNodeType(className, methodName, suppliedProject.getNodeType(), NodeType.Project, NodeType.GlossaryProject); - String suppliedProjectName = suppliedProject.getName(); - // need to check we have a name - if (suppliedProjectName == null || suppliedProjectName.equals("")) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.GLOSSARY_PROJECT_CREATE_WITHOUT_NAME.getMessageDefinition(); - throw new InvalidParameterException(messageDefinition, className, methodName, "Name", null); - } else { - setUniqueQualifiedNameIfBlank(suppliedProject); - - Date effectiveFrom = null; - Date effectiveTo = null; - - if (suppliedProject.getEffectiveFromTime() != null) { - effectiveFrom = new Date(suppliedProject.getEffectiveFromTime()); - } - if (suppliedProject.getEffectiveToTime() != null) { - effectiveTo = new Date(suppliedProject.getEffectiveToTime()); - } - - ProjectBuilder builder = new ProjectBuilder(suppliedProject.getQualifiedName(), - suppliedProject.getIdentifier(), - suppliedProject.getName(), - suppliedProject.getDescription(), - suppliedProject.getStartDate(), - suppliedProject.getPlannedEndDate(), - null, - null, - suppliedProject.getStatus(), - 0, - null, - OpenMetadataType.PROJECT.typeGUID, - OpenMetadataType.PROJECT.typeName, - null, - genericHandler.getRepositoryHelper(), - genericHandler.getServiceName(), - genericHandler.getServerName()); - - builder.setEffectivityDates(effectiveFrom, effectiveTo); - - String entityDetailGuid = genericHandler.createBeanInRepository(userId, - null, - null, - OpenMetadataType.PROJECT.typeGUID, - OpenMetadataType.PROJECT.typeName, - builder, - null, - methodName); - if (entityDetailGuid != null) { - response = getProjectByGuid(userId, entityDetailGuid); - } - } - } catch (InvalidParameterException | SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Get a project by guid. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the project to get - * @return response which when successful contains the project with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getProjectByGuid(String userId, String guid) { - final String methodName = "getProjectByGuid"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - EntityDetail entityDetail = genericHandler.getEntityFromRepository(userId, - guid, - "guid", - OpenMetadataType.PROJECT.typeName, - null, - null, - false, - false, - null, - methodName); - - ProjectMapper projectMapper = mappersFactory.get(ProjectMapper.class); - Project project = projectMapper.map(entityDetail); - response.addResult(project); - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Find Project - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param findRequest {@link FindRequest} - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @return A list of Projects meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - public SubjectAreaOMASAPIResponse findProject(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) { - - final String methodName = "findProject"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - List foundProjects = findNodes(userId, OpenMetadataType.PROJECT.typeName, OpenMetadataType.PROJECT.typeGUID, findRequest, exactValue, ignoreCase, ProjectMapper.class, methodName); - if (foundProjects != null) { - response.addAllResults(foundProjects); - } else { - return response; - } - } catch (PropertyServerException | UserNotAuthorizedException |InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Get Project relationships - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the project to get - * @param findRequest {@link FindRequest} - * @return the relationships associated with the requested Project userId - *

- * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getProjectRelationships(String userId, String guid, FindRequest findRequest) { - String methodName = "getProjectRelationships"; - return getAllRelationshipsForEntity(methodName, userId, guid, findRequest, OpenMetadataType.PROJECT.typeName ); - } - - /** - * Update a Project - *

- * If the caller has chosen to incorporate the project name in their Project Terms or Categories qualified name, renaming the project will cause those - * qualified names to mismatch the Project name. - * If the caller has chosen to incorporate the project qualifiedName in their Project Terms or Categories qualified name, changing the qualified name of the project will cause those - * qualified names to mismatch the Project name. - * Status is not updated using this call. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the project to update - * @param suppliedProject project to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated project - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateProject(String userId, String guid, Project suppliedProject, boolean isReplace) { - final String methodName = "updateProject"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - InputValidator.validateNodeType(className, methodName, suppliedProject.getNodeType(), NodeType.Project, NodeType.GlossaryProject); - - response = getProjectByGuid(userId, guid); - if (response.head().isPresent()) { -// - - Project storedProject = response.head().get(); - ProjectMapper projectMapper = mappersFactory.get(ProjectMapper.class); - - EntityDetail suppliedEntity = projectMapper.map(suppliedProject); - EntityDetail storedEntity = projectMapper.map(storedProject); - genericHandler.updateBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.PROJECT.typeGUID, - OpenMetadataType.PROJECT.typeName, - false, - false, - suppliedEntity.getProperties(), - !isReplace, - null, - methodName); - setNodeEffectivity(userId, - suppliedProject, - methodName, - guid, - OpenMetadataType.PROJECT.typeGUID, - OpenMetadataType.PROJECT.typeName); - response = getProjectByGuid(userId, guid); - } - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * Delete a Project instance - *

- * The deletion of a project is only allowed if there is no project content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the project instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the project will not exist after the operation. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the project to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the project was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteProject(String userId, String guid) { - final String methodName = "deleteProject"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - boolean issueDelete = false; try { - if (genericHandler.isBeanIsolated(userId, - guid, - OpenMetadataType.PROJECT.typeName, - false, - false, - null, - methodName)) { - - issueDelete = true; - } else { - throw new EntityNotDeletedException(SubjectAreaErrorCode.PROJECT_CONTENT_PREVENTED_DELETE.getMessageDefinition(guid), - className, - methodName, - guid); - } - if (issueDelete) { - genericHandler.deleteBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.PROJECT.typeGUID, // true for sub types - OpenMetadataType.PROJECT.typeName, // true for sub types - null, - null, - false, - false, - null, - methodName); - } - - } catch (UserNotAuthorizedException | SubjectAreaCheckedException | PropertyServerException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - - /** - * Restore a Project - *

- * Restore allows the deleted Project to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the project to restore - * @return response which when successful contains the restored project - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreProject(String userId, String guid) { - final String methodName = "restoreProject"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - genericHandler.getRepositoryHandler().restoreEntity(userId, - null, - null, - guid, - methodName); - response = getProjectByGuid(userId, guid); - } catch (UserNotAuthorizedException | PropertyServerException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - // The following method is not used - there is some commented out code to use as a basis to implement this method. - -// /** -// * Get the terms in this project. -// * -// * @param userId unique identifier for requesting user, under which the request is performed -// * @param guid guid of the Project -// * @param termHandler Term handler -// * @param startingFrom the starting element number for this set of results. This is used when retrieving elements -// * beyond the first page of results. Zero means the results start from the first element. -// * @param pageSize the maximum number of elements that can be returned on this request. -// * @return a response which when successful contains the Project terms -// * when not successful the following Exception responses can occur -// *
    -// *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • -// *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • -// *
  • InvalidParameterException one of the parameters is null or invalid.
  • -// *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • -// *
-// */ -// public SubjectAreaOMASAPIResponse getProjectContent(String userId, String guid, SubjectAreaTermHandler termHandler, Integer startingFrom, Integer pageSize) { -// final String methodName = "getProjectContent"; -// SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); -// -// if (pageSize == null) { -// pageSize = maxPageSize; -// } -// if (startingFrom == null) { -// startingFrom = 0; -// } -// SubjectAreaOMASAPIResponse thisTermResponse = getProjectByGuid(userId, guid); -// if (thisTermResponse.getRelatedHTTPCode() == 200) { -// try { -// -// List entities = genericHandler.getAttachedFilteredEntities(userId, -// guid, -// "guid", -// OpenMetadataType.GLOSSARY_TERM_TYPE_GUID, -// OpenMetadataType.PROJECT_SCOPE_RELATIONSHIP_TYPE_NAME, -// OpenMetadataType.PROJECT_SCOPE_RELATIONSHIP_TYPE_GUID , -// 2, // get the content -// null, -// "", // no search criteria -// startingFrom, -// false, -// false, -// pageSize, -// methodName); -// -// Set nodes = new HashSet<>(); -// -// -// for (EntityDetail entity : entities) { -// String typeName = entity.getType().getTypeDefName(); -// String serviceName = genericHandler.getServiceName(); -// if (genericHandler.getRepositoryHelper().isTypeOf(serviceName, typeName, OpenMetadataType.GLOSSARY_TERM_TYPE_NAME)) { -// SubjectAreaOMASAPIResponse termResponse = termHandler.getTermByGuid(userId, entity.getGUID()); -// if (termResponse.getRelatedHTTPCode() == 200) { -// nodes.add(termResponse.results().get(0)); -// } else { -// response = termResponse; -// break; -// } -// } else if (genericHandler.getRepositoryHelper().isTypeOf(serviceName, typeName, OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME)) { -// SubjectAreaOMASAPIResponse categoryResponse = categoryHandler.getCategoryByGuid(userId, entity.getGUID()); -// if (categoryResponse.getRelatedHTTPCode() == 200) { -// nodes.add(categoryResponse.results().get(0)); -// } else { -// response = categoryResponse; -// break; -// } -// } else if (genericHandler.getRepositoryHelper().isTypeOf(serviceName, typeName, OpenMetadataType.GLOSSARY_TYPE_NAME)) { -// SubjectAreaOMASAPIResponse glossaryResponse = glossaryHandler.getCategoryByGuid(userId, entity.getGUID()); -// if (glossaryResponse.getRelatedHTTPCode() == 200) { -// nodes.add(glossaryResponse.results().get(0)); -// } else { -// response = glossaryResponse; -// break; -// } -// -// -// } -// } -// if (response.getRelatedHTTPCode() == 200) { -// response.addAllResults(nodes); -// } -// -// } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { -// response.setExceptionInfo(e, className); -// } -// } -// -// return response; -// -// } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaRelationshipHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaRelationshipHandler.java deleted file mode 100644 index 3586f7803af..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaRelationshipHandler.java +++ /dev/null @@ -1,337 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.responses.*; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.IRelationshipMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph.NodeTypeMapper; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.commonservices.generichandlers.*; - -import java.util.Date; - - - -/** - * TheSubjectAreaTermRESTServices provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS) for Terms. This interface provides relationship authoring interfaces for subject area experts. - */ - -public class SubjectAreaRelationshipHandler extends SubjectAreaHandler { - private static final String className = SubjectAreaRelationshipHandler.class.getName(); - - /** - * Construct the Subject Area Relationship Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaRelationshipHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - super(genericHandler, maxPageSize); - } - - /** - * Create a relationship, which is a link between two Nodes. - *

- * - * @param {@link Relationship} type of object for response - * @param restAPIName rest API name - * @param userId userId under which the request is performed - * @param clazz mapper Class - * @param relationship relationship to create - * @return response, when successful contains the created relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported. - *
- */ - public SubjectAreaOMASAPIResponse createRelationship(String restAPIName, - String userId, - Class> clazz, - R relationship) { - - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - - IRelationshipMapper mapper = mappersFactory.get(clazz); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship omrsRelationship = mapper.map(relationship); - InstanceProperties instanceProperties = omrsRelationship.getProperties(); - if (instanceProperties == null) { - instanceProperties = new InstanceProperties(); - } - String proxy1TypeName = NodeTypeMapper.mapNodeTypeNameToEntityTypeName(relationship.getEnd1().getNodeTypeName()); - String proxy2TypeName = NodeTypeMapper.mapNodeTypeNameToEntityTypeName(relationship.getEnd2().getNodeTypeName()); - - invalidParameterHandler.validateTypeName(proxy1TypeName, - proxy1TypeName, - genericHandler.getServiceName(), - restAPIName, - genericHandler.getRepositoryHelper()); - invalidParameterHandler.validateTypeName(proxy2TypeName, - proxy2TypeName, - genericHandler.getServiceName(), - restAPIName, - genericHandler.getRepositoryHelper()); - - String guid = genericHandler.linkElementToElement( - userId, - null, - null, - omrsRelationship.getEntityOneProxy().getGUID(), - "end1.guid", - proxy1TypeName, - omrsRelationship.getEntityTwoProxy().getGUID(), - "end2.guid", - proxy2TypeName, - false, - false, - omrsRelationship.getType().getTypeDefGUID(), - omrsRelationship.getType().getTypeDefName(), - instanceProperties, - null, - null, - null, - restAPIName); - response = getRelationship(restAPIName, userId, clazz, guid); - - } catch (UserNotAuthorizedException | PropertyServerException | org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Get a relationship (relationship) - * - * @param {@link Relationship} type of object for response - * @param restAPIName rest API name - * @param userId unique identifier for requesting user, under which the request is performed - * @param clazz mapper Class - * @param guid guid of the relationship to get - * @return response which when successful contains the relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getRelationship(String restAPIName, - String userId, - Class> clazz, - String guid) { - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - IRelationshipMapper mapper = mappersFactory.get(clazz); - String typeDefName = mapper.getTypeName(); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship oMRSRelationship = - genericHandler.getRepositoryHandler().getRelationshipByGUID(userId, guid, - "guid", - typeDefName, - null, // any effective time - restAPIName); - - R omasRelationship = mapper.map(oMRSRelationship); - response.addResult(omasRelationship); - - } catch (UserNotAuthorizedException | PropertyServerException | org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Update a relationship. - *

- * - * @param {@link Relationship} type of object for response - * @param restAPIName rest API name - * @param userId userId under which the request is performed - * @param relationshipGuid unique identifier of the relationship - * @param clazz mapper Class - * @param relationship the relationship to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateRelationship(String restAPIName, - String userId, - String relationshipGuid, - Class> clazz, - R relationship, - Boolean isReplace) { - final String methodName = "updateRelationship"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - IRelationshipMapper mapper = mappersFactory.get(clazz); - response = getRelationship(methodName, userId, clazz, relationshipGuid); - R storedOMASRelationship = response.results().get(0); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship storedRelationship = mapper.map(storedOMASRelationship); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationshipToUpdate = mapper.map(relationship); - relationshipToUpdate.setGUID(relationshipGuid); - - genericHandler.updateRelationshipProperties(userId, - null, // local cohort. - null, - relationshipGuid, - "guid", - mapper.getTypeName(), - !isReplace, - relationshipToUpdate.getProperties(), - false, false, null, - methodName); - - Date requestedEffectiveFrom = relationship.getEffectiveFromTime() == null ? null : new Date(relationship.getEffectiveFromTime()); - Date requestedEffectiveTo = relationship.getEffectiveToTime() == null ? null : new Date(relationship.getEffectiveToTime()); - Date storedEffectiveFrom = storedRelationship.getProperties().getEffectiveFromTime(); - Date storedEffectiveTo = storedRelationship.getProperties().getEffectiveToTime(); - - if (!isReplace) { - // do not change the effectivity dates if null and not replacing - if (requestedEffectiveFrom == null && storedEffectiveFrom != null) { - requestedEffectiveFrom = storedEffectiveFrom; - } - if (requestedEffectiveTo == null && storedEffectiveTo != null) { - requestedEffectiveTo = storedEffectiveTo; - } - } - - genericHandler.updateRelationshipEffectivityDates(userId, - null, // local cohort. - null, - relationshipGuid, - "guid", - mapper.getTypeName(), - requestedEffectiveFrom, - requestedEffectiveTo, - false, - false, - null, - methodName); - - response = getRelationship(restAPIName, userId, clazz, relationshipGuid); - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Delete a relationship - * - * @param {@link Relationship} type of object for response - * @param restAPIName rest API name - * @param userId unique identifier for requesting user, under which the request is performed - * @param clazz mapper Class - * @param guid guid of the relationship to delete - * @return response for a soft delete, the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteRelationship(String restAPIName, - String userId, - Class> clazz, - String guid) { - final String methodName = "deleteRelationship"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - IRelationshipMapper mapper = mappersFactory.get(clazz); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship oMRSRelationship = - genericHandler.getRepositoryHandler().getRelationshipByGUID(userId, guid, - "guid", - mapper.getTypeName(), - null, // any effective time - restAPIName); - - genericHandler.unlinkElementFromElement(userId, - false, - null, - null, - oMRSRelationship.getEntityOneProxy().getGUID(), - "end1,guid", - oMRSRelationship.getEntityOneProxy().getType().getTypeDefName(), - oMRSRelationship.getEntityTwoProxy().getGUID(), - "end2,guid", - oMRSRelationship.getEntityTwoProxy().getType().getTypeDefGUID(), - oMRSRelationship.getEntityTwoProxy().getType().getTypeDefName(), - false, - false, - oMRSRelationship.getType().getTypeDefName(), - oMRSRelationship, - null, - methodName); - } catch (UserNotAuthorizedException | PropertyServerException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Restore a relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param {@link Relationship} type of object for response - * @param restAPIName rest API name - * @param userId unique identifier for requesting user, under which the request is performed - * @param clazz mapper Class - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreRelationship(String restAPIName, - String userId, - Class> clazz, - String guid) { - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - genericHandler.getRepositoryHandler().restoreRelationship(userId, - null, - null, - guid, - restAPIName); - response = getRelationship(restAPIName, userId, clazz, guid); - } catch (UserNotAuthorizedException | PropertyServerException e) { - response.setExceptionInfo(e, className); - } - return response; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaTermHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaTermHandler.java deleted file mode 100644 index 04de9d5531b..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/handlers/SubjectAreaTermHandler.java +++ /dev/null @@ -1,837 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria term. */ -package org.odpi.openmetadata.accessservices.subjectarea.handlers; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.GovernanceClassifications; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Categorization; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.TermAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.CategoryMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.TermMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.TermAnchorMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.TermCategorizationMapper; -import org.odpi.openmetadata.accessservices.subjectarea.validators.InputValidator; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; - -import java.util.*; -import java.util.stream.Collectors; - - -/** - * SubjectAreaTermHandler manages Term objects from the property server. It runs server-side in the subject Area - * OMAS and retrieves entities and relationships through the OMRSRepositoryConnector. - */ -public class SubjectAreaTermHandler extends SubjectAreaHandler { - private static final String className = SubjectAreaTermHandler.class.getName(); - private final TermAnchorMapper termAnchorMapper; - private final TermCategorizationMapper termCategorizationMapper; - private final CategoryMapper categoryMapper; - - /** - * Construct the Subject Area Term Handler - * needed to operate within a single server instance. - * - * @param genericHandler generic handler - * @param maxPageSize maximum page size - */ - public SubjectAreaTermHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) { - super(genericHandler, maxPageSize); - termAnchorMapper = mappersFactory.get(TermAnchorMapper.class); - termCategorizationMapper = mappersFactory.get(TermCategorizationMapper.class); - categoryMapper = mappersFactory.get(CategoryMapper.class); - } - - /** - * Create a Term. There are specializations of terms that can also be created using this operation. - * To create a specialization, you should specify a nodeType other than Term in the supplied term. - *

- * Terms with the same name can be confusing. Best practise is to createTerms that have unique names. - * This Create call does not police that term names are unique. So it is possible to create Terms with the same name as each other. - * - *

- * Valid nodeTypes for this request are: - *

    - *
  • Taxonomy to create a Taxonomy
  • - *
  • CanonicalTerm to create a canonical term
  • - *
  • TaxonomyAndCanonicalTerm to create a term that is both a taxonomy and a canonical term
  • - *
  • Term to create a term that is not a taxonomy or a canonical term
  • - *
- * - * @param userId unique identifier for requesting user, under which the request is performed - * @param relationshipHandler relationship handler - * @param suppliedTerm Term to create - * @return response, when successful contains the created term. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised.
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTerm(String userId, SubjectAreaRelationshipHandler relationshipHandler, Term suppliedTerm) { - final String methodName = "createTerm"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - String createdTermGuid = null; - try { - InputValidator.validateNodeType(className, methodName, suppliedTerm.getNodeType(), NodeType.Term); - // need to check we have a name - final String suppliedTermName = suppliedTerm.getName(); - if (suppliedTermName == null || suppliedTermName.equals("")) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.GLOSSARY_TERM_CREATE_WITHOUT_NAME.getMessageDefinition(); - throw new InvalidParameterException(messageDefinition, className, methodName, "Name", null); - } else { - setUniqueQualifiedNameIfBlank(suppliedTerm); - TermMapper termMapper = mappersFactory.get(TermMapper.class); - EntityDetail termEntityDetail = termMapper.map(suppliedTerm); - GlossarySummary suppliedGlossary = suppliedTerm.getGlossary(); - List suppliedCategorysummaries = suppliedTerm.getCategories(); - - String glossaryGuid = validateGlossarySummaryDuringCreation(userId, methodName, suppliedGlossary); - validateCategoriesDuringCreation(userId, methodName, suppliedCategorysummaries); - - Date effectiveFrom = null; - Date effectiveTo = null; - - if (suppliedTerm.getEffectiveFromTime() != null) { - effectiveFrom = new Date(suppliedTerm.getEffectiveFromTime()); - } - if (suppliedTerm.getEffectiveToTime() != null) { - effectiveTo = new Date(suppliedTerm.getEffectiveToTime()); - } - - GlossaryTermBuilder builder = new GlossaryTermBuilder(suppliedTerm.getQualifiedName(), - suppliedTerm.getName(), - suppliedTerm.getSummary(), - suppliedTerm.getDescription(), - suppliedTerm.getExamples(), - suppliedTerm.getAbbreviation(), - suppliedTerm.getUsage(), - null, - suppliedTerm.getAdditionalProperties(), - suppliedTerm.getExtendedProperties(), - null, - genericHandler.getRepositoryHelper(), - genericHandler.getServiceName(), - genericHandler.getServerName()); - - - builder.setEffectivityDates(effectiveFrom, effectiveTo); - builder.setAnchors(userId, - glossaryGuid, - OpenMetadataType.GLOSSARY_TYPE_NAME, - OpenMetadataType.GLOSSARY_TYPE_NAME, - methodName); - - createdTermGuid = genericHandler.createBeanInRepository(userId, - null, - null, - OpenMetadataType.GLOSSARY_TERM_TYPE_GUID, - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - builder, - null, - methodName); - if (createdTermGuid != null) { - - TermAnchor termAnchor = new TermAnchor(); - - termAnchor.getEnd1().setNodeGuid(glossaryGuid); - termAnchor.getEnd2().setNodeGuid(createdTermGuid); - - relationshipHandler.createRelationship(methodName, userId, TermAnchorMapper.class, termAnchor); - response = getTermByGuid(userId, createdTermGuid); - if (response.getRelatedHTTPCode() == 200) { - if (suppliedCategorysummaries != null && suppliedCategorysummaries.size() > 0) { - for (CategorySummary categorySummary : suppliedCategorysummaries) { - Categorization categorization = new Categorization(); - categorization.getEnd1().setNodeGuid(categorySummary.getGuid()); - categorization.getEnd2().setNodeGuid(createdTermGuid); - // we expect that the created term has a from time of now or the supplied value. - // set the relationship from value to the same - categorization.setEffectiveFromTime(suppliedTerm.getEffectiveFromTime()); - categorization.setEffectiveToTime(suppliedTerm.getEffectiveToTime()); - - // TODO check error - relationshipHandler.createRelationship(methodName, userId, TermCategorizationMapper.class, categorization); - - if (response.getRelatedHTTPCode() != 200) { - break; - } - } - } - } - // TODO set classifications - EntityDetail entityDetail = termMapper.map(suppliedTerm); - List classifications =entityDetail.getClassifications(); - if (classifications != null) { - for (Classification classification : classifications) { - String classificationTypeName = classification.getName(); - TypeDef typeDef = genericHandler.getRepositoryHelper().getTypeDefByName(methodName, classificationTypeName); - if (typeDef != null) { - genericHandler.setClassificationInRepository(userId, - null, - null, - createdTermGuid, - "guid", - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - typeDef.getGUID(), - classificationTypeName, - classification.getProperties(), - true, - false, - false, - null, - methodName); - } else { - //TODO Error invalid classification - } - } - } - response = getTermByGuid(userId, createdTermGuid); - } - } - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - //if the entity is created, but subsequently an error occurred while creating the relationship - if (createdTermGuid != null) { - deleteTerm(userId, createdTermGuid); - } - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * This method validates that any Categories supplied to a Term create exist. - * - * @param userId userId under which the request is performed - * @param methodName method making the call - * @param suppliedCategories categories to validate. - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws SubjectAreaCheckedException standard exception Subject Area OMAS services - */ - protected void validateCategoriesDuringCreation(String userId, - String methodName, - List suppliedCategories) throws UserNotAuthorizedException, - PropertyServerException, - InvalidParameterException, - SubjectAreaCheckedException { - /* - * If there are categories supplied then they need to specify a guid that is exists and is for a Category or - * a child of Category. - */ - if (suppliedCategories != null) { - for (CategorySummary categorySummary : suppliedCategories) { - String guid = categorySummary.getGuid(); - // find by guid, expect an exception if the category is not accessible - genericHandler.getEntityFromRepository(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - null, - null, - false, - false, - null, - methodName); - } - } - } - - /** - * Get a term by guid. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to get - * @return response which when successful contains the term with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermByGuid(String userId, String guid) { - final String methodName = "getTermByGuid"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - EntityDetail entityDetail = genericHandler.getEntityFromRepository(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - null, - null, - false, - false, - null, - methodName); - - TermMapper termMapper = mappersFactory.get(TermMapper.class); - Term term = termMapper.map(entityDetail); - setSummaryObjects(userId, term, methodName); - response.addResult(term); - - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - - /** - * Find Term - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param findRequest {@link FindRequest} - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @return A list of Terms meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - public SubjectAreaOMASAPIResponse findTerm(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) { - - final String methodName = "findTerm"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - // If no search criteria is supplied then we return all terms, this should not be too many - try { - List foundTerms = findNodes(userId, OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, OpenMetadataType.GLOSSARY_TERM_TYPE_GUID, findRequest, exactValue, ignoreCase, TermMapper.class, methodName); - if (foundTerms != null) { - for (Term term : foundTerms) { - setSummaryObjects(userId, term, methodName); - response.addResult(term); - } - } else { - return response; - } - } catch (UserNotAuthorizedException | SubjectAreaCheckedException | PropertyServerException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Set the summary objects into the Term. This means if we find a relationship to a Glossary (TermAnchor) or a relationship - * to a Category (TermCategorization) then represent those relationships are summary objects. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param term Term on which to set the summary objects - * @param methodName rest API - * @throws SubjectAreaCheckedException - * @throws PropertyServerException - * @throws UserNotAuthorizedException - * @throws InvalidParameterException - */ - private void setSummaryObjects(String userId, Term term, String methodName) throws SubjectAreaCheckedException, - PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException { - final String guid = term.getSystemAttributes().getGUID(); - - List termAnchorRelationships = - getRelationshipsForEntityByType(methodName, - userId, - guid, - new FindRequest(), - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - OpenMetadataType.TERM_ANCHOR_TYPE_GUID, - OpenMetadataType.TERM_ANCHOR_TYPE_NAME, - OpenMetadataType.GLOSSARY_TYPE_NAME); - if (CollectionUtils.isNotEmpty(termAnchorRelationships)) { - for (Relationship relationship : termAnchorRelationships) { - TermAnchor termAnchor = (TermAnchor)relationship; - GlossarySummary glossarySummary = getGlossarySummary(methodName, userId, termAnchor); - if (glossarySummary != null) { - term.setGlossary(glossarySummary); - } - } - } - List termCategorizationRelationships = - getRelationshipsForEntityByType(methodName, - userId, - guid, - new FindRequest(), - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_GUID, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_NAME, - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME - ); - - if (CollectionUtils.isNotEmpty(termCategorizationRelationships)) { - List categorySummaryList = new ArrayList<>(); - for (Relationship relationship : termCategorizationRelationships) { - Categorization categorization = (Categorization)relationship; - if (categorization != null) { - CategorySummary categorySummary = getCategorySummary(methodName, userId, categorization); - if (categorySummary != null) { - categorySummaryList.add(categorySummary); - } - } - } - if (categorySummaryList.size() > 0) { - term.setCategories(categorySummaryList); - } - } - } - - /** - * Get Term relationships - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid - * @param findRequest {@link FindRequest} - * @return the relationships associated with the requested Term guid - *

- * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getTermRelationships(String userId, String guid, FindRequest findRequest) { - String methodName = "getTermRelationships"; - return getAllRelationshipsForEntity(methodName, userId, guid, findRequest, OpenMetadataType.GLOSSARY_TERM_TYPE_NAME); - } - - /** - * Update a Term - *

- * If the caller has chosen to incorporate the term name in their Term Terms or Categories qualified name, renaming the term will cause those - * qualified names to mismatch the Term name. - * If the caller has chosen to incorporate the term qualifiedName in their Term Terms or Categories qualified name, changing the qualified name of the term will cause those - * qualified names to mismatch the Term name. - * Status is not updated using this call. - * The Categories categorising this Term can be amended using this call; this means that the termCategorization relationships are removed and/or added in this call. - * For an update (rather than a replace) with no categories supplied, no changes are made to the termCategorizations; otherwise the - * supplied categorizing Categories will replace the existing ones. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to update - * @param suppliedTerm term to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated term - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTerm(String userId, String guid, Term suppliedTerm, SubjectAreaRelationshipHandler relationshipHandler, boolean isReplace) { - final String methodName = "updateTerm"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - try { - InputValidator.validateNodeType(className, methodName, suppliedTerm.getNodeType(), NodeType.Term, NodeType.Activity); - - response = getTermByGuid(userId, guid); - if (response.head().isPresent()) { - Term storedTerm = response.head().get(); - TermMapper termMapper = mappersFactory.get(TermMapper.class); - - EntityDetail suppliedEntity = termMapper.map(suppliedTerm); - EntityDetail storedEntity = termMapper.map(storedTerm); - - Date effectiveFrom = null; - - if (suppliedTerm.getEffectiveFromTime() != null) { - effectiveFrom = new Date(suppliedTerm.getEffectiveFromTime()); - } - - genericHandler.updateBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TERM_TYPE_GUID, - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - false, - false, - suppliedEntity.getProperties(), - !isReplace, - null, - methodName); - - // the update properties should not have updated the classifications so we can use - Set storedClassificationNames = getStoredClassificationNames(storedTerm); - - // always update the governance actions for a replace or an update - - List suppliedClassifications = suppliedEntity.getClassifications(); - List storedClassifications = storedEntity.getClassifications(); - Map storedClassificationMap = null; - - if ((storedClassifications != null) && (!storedClassifications.isEmpty())) { - storedClassificationMap = new HashMap<>(); - for (Classification storedClassification : storedClassifications) { - if (storedClassification != null) { - storedClassificationMap.put(storedClassification.getName(), storedClassification); - } - } - } - - if (CollectionUtils.isNotEmpty(suppliedClassifications)) { - for (Classification suppliedClassification : suppliedClassifications) { - if (suppliedClassification != null) { - String classificationTypeName = suppliedClassification.getName(); - String classificationTypeGUID = null; - TypeDef typeDef = genericHandler.getRepositoryHelper().getTypeDefByName(genericHandler.getServiceName(), - classificationTypeName); - if (typeDef != null) { - classificationTypeGUID = typeDef.getGUID(); - } - - boolean isMergeUpdate; - - if ((storedClassificationMap == null) || (!storedClassificationMap.containsKey(classificationTypeName))) { - isMergeUpdate = false; - } else { - isMergeUpdate = true; - } - - genericHandler.setClassificationInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - classificationTypeGUID, - classificationTypeName, - suppliedClassification.getProperties(), - isMergeUpdate, - false, - false, - null, - methodName); - - storedClassificationNames.remove(suppliedClassification.getName()); - } - } - - for (String deClassifyName : storedClassificationNames) { - String classificationTypeGUID = null; - TypeDef typeDef = genericHandler.getRepositoryHelper().getTypeDefByName(genericHandler.getServiceName(), - deClassifyName); - if (typeDef != null) { - classificationTypeGUID = typeDef.getGUID(); - } - genericHandler.removeClassificationFromRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - classificationTypeGUID, - deClassifyName, - false, - false, - null, - methodName); - - - } - } - List suppliedCategories = suppliedTerm.getCategories(); - if (suppliedCategories == null && !isReplace) { - // in the update case with null categories supplied then do not change anything. - } else { - replaceCategories(userId, guid, suppliedTerm, relationshipHandler, methodName); - } - response = getTermByGuid(userId, guid); - } - - } catch (SubjectAreaCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response = new SubjectAreaOMASAPIResponse<>(); - response.setExceptionInfo(e, className); - } - - return response; - } - - /** - * Update the Categories sub-object of Term. Replace the categories with those supplied. This means that the termCategorization relationships are removed and - * added as per the request. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to update - * @param suppliedTerm term to be updated - * @param relationshipHandler relationship handler - * @param methodName API name - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws PropertyServerException reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector. - * @throws SubjectAreaCheckedException reporting errors found when using the Subject Area OMAS services. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - private void replaceCategories(String userId, String guid, Term suppliedTerm, SubjectAreaRelationshipHandler relationshipHandler, String methodName) throws UserNotAuthorizedException, PropertyServerException, SubjectAreaCheckedException, InvalidParameterException { - Set deleteCategorizationGuidSet = new HashSet<>(); - SubjectAreaOMASAPIResponse relationshipResponse = getTermRelationships(userId, guid, new FindRequest()); - List relationships = relationshipResponse.results(); - /* - * The supplied categories may not be completely filled out. - * we will accept a guid (i.e. that of the category) and ignore the rest. - */ - for (Relationship relationship : relationships) { - if (relationship.getRelationshipType().equals(RelationshipType.TermCategorization)) { - deleteCategorizationGuidSet.add(relationship.getGuid()); - } - } - - // always replace the categories if categories are supplied - // delete any existing categorizations - if (deleteCategorizationGuidSet != null && deleteCategorizationGuidSet.size() > 0) { - for (String guidToDelete : deleteCategorizationGuidSet) { - relationshipHandler.deleteRelationship(methodName, userId, TermCategorizationMapper.class,guidToDelete); - } - } - // add any supplied ones - List suppliedCategories = suppliedTerm.getCategories(); - if (suppliedCategories != null && suppliedCategories.size() > 0) { - for (CategorySummary categorySummary : suppliedCategories) { - addCategorizationRelationship(userId, suppliedTerm, methodName, categorySummary.getGuid()); - } - } - } - - private void addCategorizationRelationship(String userId, Term suppliedTerm, String methodName, String categoryGuid) throws SubjectAreaCheckedException, PropertyServerException, UserNotAuthorizedException, InvalidParameterException { - - genericHandler.linkElementToElement(userId, - null, - null, - categoryGuid, - "guid end1", - OpenMetadataType.GLOSSARY_CATEGORY_TYPE_NAME, - suppliedTerm.getSystemAttributes().getGUID(), - "guid end2", - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - false, - false, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_GUID, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_NAME, - (InstanceProperties) null, - null, - null, - null, - methodName); - - - } - - private Set getStoredClassificationNames(Term currentTerm) { - Set currentClassificationNames = currentTerm.getClassifications() - .stream() - .map(x -> x.getClassificationName()) - .collect(Collectors.toSet()); - - GovernanceClassifications currentActions = currentTerm.getGovernanceClassifications(); - if (currentActions != null) { - if (currentActions.getConfidence() != null) - currentClassificationNames.add(currentActions.getConfidence().getClassificationName()); - if (currentActions.getConfidentiality() != null) - currentClassificationNames.add(currentActions.getConfidentiality().getClassificationName()); - if (currentActions.getRetention() != null) - currentClassificationNames.add(currentActions.getRetention().getClassificationName()); - if (currentActions.getCriticality() != null) - currentClassificationNames.add(currentActions.getCriticality().getClassificationName()); - } - return currentClassificationNames; - } - - - /** - * Delete a Term instance - *

- * The deletion of a term is only allowed if there is no term content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the term instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the term will not exist after the operation. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the term was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteTerm(String userId, String guid) { - final String methodName = "deleteTerm"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - genericHandler.deleteBeanInRepository(userId, - null, - null, - guid, - "guid", - OpenMetadataType.GLOSSARY_TERM_TYPE_GUID, - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - null, - null, - false, - false, - null, - methodName); - - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Restore a Term - *

- * Restore allows the deleted Term to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to restore - * @return response which when successful contains the restored term - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreTerm(String userId, String guid) { - final String methodName = "restoreTerm"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - try { - genericHandler.getRepositoryHandler().restoreEntity(userId, - null, - null, - guid, - methodName); - response = getTermByGuid(userId, guid); - } catch (UserNotAuthorizedException | PropertyServerException e) { - response.setExceptionInfo(e, className); - } - return response; - } - - /** - * Get the Categories categorizing this Term. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param categoryHandler category handler - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of categories categorizing this Term - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermCategories(String userId, String guid, SubjectAreaCategoryHandler categoryHandler, Integer startingFrom, Integer pageSize) { - final String methodName = "getTermCategories"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - if (pageSize == null) { - pageSize = maxPageSize; - } - if (startingFrom == null) { - startingFrom = 0; - } - SubjectAreaOMASAPIResponse thisTermResponse = getTermByGuid(userId, guid); - if (thisTermResponse.getRelatedHTTPCode() == 200) { - try { - Set specificMatchPropertyNames = new HashSet(); - - // specify the names of string attributes for this type that we want to match against - specificMatchPropertyNames.add(OpenMetadataProperty.DISPLAY_NAME.name); - specificMatchPropertyNames.add(OpenMetadataProperty.DESCRIPTION.name); - specificMatchPropertyNames.add(OpenMetadataProperty.QUALIFIED_NAME.name); - - List entities = genericHandler.getAttachedFilteredEntities(userId, - guid, - "guid", - OpenMetadataType.GLOSSARY_TERM_TYPE_NAME, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_NAME, - OpenMetadataType.TERM_CATEGORIZATION_TYPE_GUID, - 1, // get the categories - specificMatchPropertyNames, - "", // no search criteria - startingFrom, - false, - false, - pageSize, - null, // any date - methodName); - if (entities != null) { - Set categories = new HashSet<>(); - for (EntityDetail entity : entities) { - SubjectAreaOMASAPIResponse categoryResponse = categoryHandler.getCategoryByGuid(userId, entity.getGUID()); - if (categoryResponse.getRelatedHTTPCode() == 200) { - categories.add(categoryResponse.results().get(0)); - } else { - response = categoryResponse; - break; - } - } - if (response.getRelatedHTTPCode() == 200) { - response.addAllResults(categories); - } - } - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - response.setExceptionInfo(e, className); - } - } - - return response; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/SubjectAreaRegistration.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/SubjectAreaRegistration.java deleted file mode 100644 index 317e0a9f910..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/SubjectAreaRegistration.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server; - -import org.odpi.openmetadata.accessservices.subjectarea.admin.SubjectAreaAdmin; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceRegistrationEntry; -import org.odpi.openmetadata.adminservices.registration.OMAGAccessServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; - -/** - * SubjectAreaRegistration registers the access service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * access service in the server and it can be configured and used. - */ -public class SubjectAreaRegistration -{ - /** - * Pass information about this access service to the OMAG Server administration services. - */ - public static void registerAccessService() - { - AccessServiceDescription myDescription = AccessServiceDescription.SUBJECT_AREA_OMAS; - AccessServiceRegistrationEntry myRegistration = new AccessServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - SubjectAreaAdmin.class.getName()); - OMAGAccessServiceRegistration.registerAccessService(myRegistration); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/INodeMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/INodeMapper.java deleted file mode 100644 index bf3775de9c9..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/INodeMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -/** - * Interface for mapping between a Subject Area OMAS Node to an OMRS EntityDetail - */ -public interface INodeMapper extends Mapper { - /** - * Map from an OMRS EntityDetail to a Subject Area OMAS Node - * @param entityDetail OMRS EntityDetail - * @return Subject Area OMAS Node - */ - N map(EntityDetail entityDetail); - - /** - * Map from a Subject Area OMAS Node to an OMRS EntityDetail - * @param node a Subject Area OMAS Node - * @return an OMRS EntityDetail - */ - EntityDetail map(N node) throws InvalidParameterException; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/IRelationshipMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/IRelationshipMapper.java deleted file mode 100644 index 87657ca3d46..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/IRelationshipMapper.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; - -/** - * Interface for mapping between a Subject Area OMAS Relationship to an OMRS Relationship - */ -public interface IRelationshipMapper extends Mapper { - /** - * Map from an OMRS Relationship to a Subject Area OMAS relationship - * - * @param relationship OMRS relationships - * @return Subject Area OMAS relationship - */ - R map(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship); - - /** - * Map from a Subject Area OMAS relationship to an OMRS Relationship - * - * @param relationship a Subject Area OMAS relationship - * @return an OMRS Relationship - */ - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship map(R relationship) throws InvalidParameterException; -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/Mapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/Mapper.java deleted file mode 100644 index 7ad3d98906c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/Mapper.java +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.OmasObject; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader; - -public interface Mapper { - - /** - * Map from an OMRS object to a Subject Area OMAS object - * @param omrsObject OMRS Relationship - * @return Subject Area OMAS object - */ - OMAS map(OMRS omrsObject); - - /** - * Map from a Subject Area OMAS object to an OMRS object - * @param omasObject a Subject Area OMAS object - * @return an OMRS object - */ - OMRS map(OMAS omasObject) throws InvalidParameterException; - - /** - * get the Guid - * This method should be overridden to provide the appropriate guid for the type. - * - * @return the guid of the typedef - */ - String getTypeDefGuid(); - - /** - * Get the type name - * @return type name - */ - String getTypeName(); -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/MappersFactory.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/MappersFactory.java deleted file mode 100644 index 6424dd55ba6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/MappersFactory.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers; - -import org.reflections.Reflections; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.*; -import java.util.function.Supplier; -import org.odpi.openmetadata.commonservices.generichandlers.*; - -/** - * Factory class for {@link SubjectAreaMapper} classes */ -public class MappersFactory { - private final Map, Supplier> mappers = new HashMap<>(); - private static final String SUBJECT_AREA_PACKAGE = "org.odpi.openmetadata.accessservices.subjectarea"; - - /** - * @param packagesToScan - search packages for finding classes placed by annotation {@link SubjectAreaMapper} - * @param genericHandler - {@link OpenMetadataAPIGenericHandler} - **/ - public MappersFactory(final OpenMetadataAPIGenericHandler genericHandler, String... packagesToScan) { - Set packages = new HashSet<>(Arrays.asList(packagesToScan)); - packages.add(SUBJECT_AREA_PACKAGE); - - Reflections reflections = new Reflections(packages); - Set> mappersClasses = reflections.getTypesAnnotatedWith(SubjectAreaMapper.class); - for (Class mapperClass : mappersClasses) { - try { - Constructor ctor = mapperClass.getDeclaredConstructor(OpenMetadataAPIGenericHandler.class); - ctor.setAccessible(true); - final Object mapper = ctor.newInstance(genericHandler); - mappers.put(mapperClass, () -> mapper); - } catch (NoSuchMethodException - | IllegalAccessException - | InstantiationException - | InvocationTargetException e) { - throw new ExceptionInInitializerError( - "During initialization MappersFactory an error has occurred - " - + e.getMessage() - ); - } - } - } - - /** - * The constructor uses the current package to scan "org.odpi.openmetadata.accessservices.subjectarea";" - * to search for classes placed by annotation {@link SubjectAreaMapper}. - * - * @param genericHandler - {@link OpenMetadataAPIGenericHandler} - */ - public MappersFactory(final OpenMetadataAPIGenericHandler genericHandler){ - - this(genericHandler, SUBJECT_AREA_PACKAGE); - } - - /** - * @param - type of mapper object - * @param mapperClass - the class for which you want to get the mapper from cache - * - * @return mapper or null if it is not present - * */ - @SuppressWarnings("unchecked") - public T get(Class mapperClass) { - if (mappers.containsKey(mapperClass)) { - return (T) this.mappers.get(mapperClass).get(); - } - return null; - } - - /** - * @return all mapper classes from cache */ - public Set> getAllMapperClasses() { - return mappers.keySet(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/SubjectAreaMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/SubjectAreaMapper.java deleted file mode 100644 index 8b03d169ae9..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/SubjectAreaMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -public @interface SubjectAreaMapper { -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/CanonicalVocabularyMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/CanonicalVocabularyMapper.java deleted file mode 100644 index 43b0bdd66ac..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/CanonicalVocabularyMapper.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.CanonicalVocabulary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Set; - -/** - * Mapping methods to map between CanonicalVocabulary and the omrs equivalents. - */ -public class CanonicalVocabularyMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( CanonicalVocabularyMapper.class); - private static final String className = CanonicalVocabularyMapper.class.getName(); - private static final String typeName = "CanonicalVocabulary"; - - public CanonicalVocabularyMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - CanonicalVocabulary canonicalVocabulary = (CanonicalVocabulary)omasClassification; - String stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"scope",omrsClassificationProperties,""); - canonicalVocabulary.setScope(stringValue); - return CanonicalVocabulary.getPropertyNames(); - } - @Override - protected Classification createOmasClassification() { - return new CanonicalVocabulary(); - } - - @Override - protected String getTypeName() { - return typeName; - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - - InstanceProperties instanceProperties = new InstanceProperties(); - CanonicalVocabulary canonicalVocabulary = (CanonicalVocabulary)omasClassification; - if (canonicalVocabulary.getScope()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"scope",canonicalVocabulary.getScope(),"updateOMRSAttributes"); - } - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ClassificationFactory.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ClassificationFactory.java deleted file mode 100644 index 04e5af8c637..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ClassificationFactory.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - // This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A factory to create new instances of classes of open metadata classifications by name. Return null if the classification is not known. - */ -public class ClassificationFactory { - private static final Logger log = LoggerFactory.getLogger( ClassificationFactory.class); - private static final String className = ClassificationFactory.class.getName(); - private OMRSRepositoryHelper repositoryHelper; - private OpenMetadataAPIGenericHandler genericHandler; - - - public ClassificationFactory(OpenMetadataAPIGenericHandler genericHandler){ - this.genericHandler= genericHandler; - this.repositoryHelper=genericHandler.getRepositoryHelper(); - } - - /** - * Get an OMAS Classification based on the name and then map the supplied omrs classificaiton to the omas one. - * @param name name of the classification. Note this may not match the classification name if the classification is a sub type of the supplied name. - * @param omrsClassification the supplied omrs classification to map - * @return the omas classification, null if not known. - */ - public org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification getOMASClassification(String name, Classification omrsClassification) { - final String serviceName = genericHandler.getServiceName(); - if (this.repositoryHelper.isTypeOf(serviceName,name,"SpineAttribute")) { - return new SpineAttributeMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - if (this.repositoryHelper.isTypeOf(serviceName,name,"CanonicalVocabulary")) { - return new CanonicalVocabularyMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Confidence")) { - return new ConfidenceMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Criticality")) { - return new CriticalityMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"GlossaryProject")) { - return new GlossaryProjectMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"SpineObject")) { - return new SpineObjectMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Taxonomy")) { - return new TaxonomyMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Retention")) { - return new RetentionMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"SubjectArea")) { - return new SubjectAreaMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"ObjectIdentifier")) { - return new ObjectIdentifierMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Confidentiality")) { - return new ConfidentialityMapper(genericHandler).mapOmrsToBean(omrsClassification); - } - return null; - } - /** - * Get an OMRS Classification based on the supplied omas classification. - * @param omasClassification the supplied omas classification to map - * @return the omas classification, null if not known. - */ - public Classification getOMRSClassification(org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification) { - final String name = omasClassification.getClassificationName(); - final String serviceName = genericHandler.getServiceName(); - - if (this.repositoryHelper.isTypeOf(serviceName,name,"SpineAttribute")) { - return new SpineAttributeMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - if (this.repositoryHelper.isTypeOf(serviceName,name,"CanonicalVocabulary")) { - return new CanonicalVocabularyMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Confidence")) { - return new ConfidenceMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Criticality")) { - return new CriticalityMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"GlossaryProject")) { - return new GlossaryProjectMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"SpineObject")) { - return new SpineObjectMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Taxonomy")) { - return new TaxonomyMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Retention")) { - return new RetentionMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"SubjectArea")) { - return new SubjectAreaMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"ObjectIdentifier")) { - return new ObjectIdentifierMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - - if (this.repositoryHelper.isTypeOf(serviceName,name,"Confidentiality")) { - return new ConfidentialityMapper(genericHandler).mapBeanToOmrs(omasClassification); - } - return null; - - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ClassificationMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ClassificationMapper.java deleted file mode 100644 index 71eba67b15f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ClassificationMapper.java +++ /dev/null @@ -1,176 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; - -/** - * Static mapping methods to map between an OMAS Classification and the OMRS Classification. - */ -abstract public class ClassificationMapper { - private static final Logger log = LoggerFactory.getLogger( ClassificationMapper.class); - private static final String className = ClassificationMapper.class.getName(); - protected final OpenMetadataAPIGenericHandler genericHandler; - protected final OMRSRepositoryHelper repositoryHelper; - protected ClassificationMapper(OpenMetadataAPIGenericHandler genericHandler){ - this.genericHandler = genericHandler; - this.repositoryHelper = genericHandler.getRepositoryHelper(); - } - /** - * @param omrsClassification - the supplied omrs classification - * @return equivalent org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification - */ - public org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification mapOmrsToBean(Classification omrsClassification) { - String classificationTypeName = omrsClassification.getName(); - if (isTypeCorrect(classificationTypeName)) { - org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification = createOmasClassification(); - //set core attributes - SystemAttributes systemAttributes = createSystemAttributesFromOMRSClassification(omrsClassification); - omasClassification.setSystemAttributes(systemAttributes); - // Set properties if there are any to set - InstanceProperties omrsClassificationProperties = omrsClassification.getProperties(); - if (omrsClassificationProperties !=null && omrsClassificationProperties.getInstanceProperties() !=null && !omrsClassificationProperties.getInstanceProperties().isEmpty() ) { - omasClassification.setEffectiveFromTime(omrsClassificationProperties.getEffectiveFromTime()); - omasClassification.setEffectiveToTime(omrsClassificationProperties.getEffectiveToTime()); - - Set attributeNameSet = mapKnownAttributesToOmrs(omasClassification, omrsClassificationProperties); - - Iterator omrsPropertyIterator = omrsClassificationProperties.getPropertyNames(); - while (omrsPropertyIterator.hasNext()) { - String name = omrsPropertyIterator.next(); - //TODO check if this is a property we expect or whether the type has been added to. - // this is a property we expect - InstancePropertyValue value = omrsClassificationProperties.getPropertyValue(name); - - if (!attributeNameSet.contains(name)) { - // this is not an attribute we know about so put the attribute in extra Attributes - String attributeValue = null; - switch (value.getInstancePropertyCategory()) { - case PRIMITIVE: - PrimitivePropertyValue primitivePropertyValue = (PrimitivePropertyValue) value; - // put out the omrs value object - if (null == omasClassification.getAdditionalProperties()) { - omasClassification.setAdditionalProperties(Collections.emptyMap()); - } - attributeValue = primitivePropertyValue.valueAsString(); - break; - case ENUM: - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) value; - // put out the omrs value object - if (null == omasClassification.getAdditionalProperties()) { - omasClassification.setAdditionalProperties(Collections.emptyMap()); - } - attributeValue = enumPropertyValue.valueAsString(); - - break; - case MAP: - MapPropertyValue mapPropertyValue = (MapPropertyValue) value; - // put out the omrs value object - if (null == omasClassification.getAdditionalProperties()) { - omasClassification.setAdditionalProperties(Collections.emptyMap()); - } - attributeValue = mapPropertyValue.getMapValues().toString(); - break; - case ARRAY: - case STRUCT: - case UNKNOWN: - // error - break; - } - omasClassification.getAdditionalProperties().put(name, attributeValue); - - - } // end while - } // end if (omrsClassificationProperties !=null) - } - return omasClassification; - } else { - // TODO wrong type - } - return null; - } - public Classification mapBeanToOmrs(org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification) { - SystemAttributes systemAttributes = omasClassification.getSystemAttributes(); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification omrsClassification = new org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification(); - SubjectAreaUtils.populateSystemAttributesForInstanceAuditHeader(systemAttributes, omrsClassification); - // copy over the classification name - String classificationName = omasClassification.getClassificationName(); - omrsClassification.setName(classificationName); - // copy over the classification type - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - String classificationTypeGuid = archiveAccessor.getClassificationDefByName(classificationName).getGUID(); - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(classificationName); - instanceType.setTypeDefGUID(classificationTypeGuid); - omrsClassification.setType(instanceType); - // copy over the classification properties - omrsClassification.setProperties(updateOMRSAttributes(omasClassification)); - return omrsClassification; - } - - /** - * get an instance of the classification - * @return classification instance - */ - protected abstract org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification createOmasClassification(); - - /** - * Map attributes we know are part of this type to OMRS. - * @param omasClassification omasclassification - * @param omrsClassificationProperties omrs properties - * @return set of property Names that we know about. - */ - protected abstract Set mapKnownAttributesToOmrs( org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification,InstanceProperties omrsClassificationProperties); - - /** - * Check whether the type name matches the mapper. - * @param actualTypeName name of type to check - * @return true if type is correct otherwise false. - */ - protected boolean isTypeCorrect(String actualTypeName) { - return this.repositoryHelper.isTypeOf(genericHandler.getServiceName(),actualTypeName,getTypeName()); - } - - /** - * Get the omas classification type name (same as the classification name) - this is defined in the subclass. - * @return classsification name - */ - abstract String getTypeName(); - - protected abstract InstanceProperties updateOMRSAttributes(org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification); - - public static SystemAttributes createSystemAttributesFromOMRSClassification(Classification omrsClassification) { - SystemAttributes systemAttributes = new SystemAttributes(); - Status status = SubjectAreaUtils.convertInstanceStatusToStatus(omrsClassification.getStatus()); - systemAttributes.setStatus(status); - systemAttributes.setCreatedBy(omrsClassification.getCreatedBy()); - systemAttributes.setUpdatedBy(omrsClassification.getUpdatedBy()); - Date createtimeDate = omrsClassification.getCreateTime(); - Long createTimeLong=null; - if (createtimeDate != null) { - createTimeLong = createtimeDate.getTime(); - } - systemAttributes.setCreateTime(createTimeLong); - Date updatetimeDate = omrsClassification.getUpdateTime(); - Long updateTimeLong=null; - if (updatetimeDate != null) { - updateTimeLong = updatetimeDate.getTime(); - } - systemAttributes.setUpdateTime(updateTimeLong); - systemAttributes.setVersion(omrsClassification.getVersion()); - return systemAttributes; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ConfidenceMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ConfidenceMapper.java deleted file mode 100644 index fea5ca601d7..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ConfidenceMapper.java +++ /dev/null @@ -1,111 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidence; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.ConfidenceLevel; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.GovernanceClassificationStatus; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Map; -import java.util.Set; - -/** - * Mapping methods to map between Confidence and the omrs equivalents. - */ -public class ConfidenceMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( ConfidenceMapper.class); - private static final String className = ConfidenceMapper.class.getName(); - private static final String typeName = "Confidence"; - - public ConfidenceMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - Confidence confidence = (Confidence)omasClassification; - - String stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"steward",omrsClassificationProperties,""); - confidence.setSteward(stringValue); - - stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"notes",omrsClassificationProperties,""); - confidence.setNotes(stringValue); - - Integer intValue = repositoryHelper.getIntProperty(genericHandler.getServiceName(),"confidence",omrsClassificationProperties,""); - confidence.setConfidence(intValue); - - // map enums - Map instancePropertyMap = omrsClassificationProperties.getInstanceProperties(); - InstancePropertyValue instancePropertyValue = instancePropertyMap.get("level"); - if (instancePropertyValue!=null) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - ConfidenceLevel level = ConfidenceLevel.valueOf(enumPropertyValue.getSymbolicName()); - confidence.setLevel(level); - } - - instancePropertyValue = instancePropertyMap.get("status"); - if (instancePropertyValue!=null) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - GovernanceClassificationStatus status = GovernanceClassificationStatus.valueOf(enumPropertyValue.getSymbolicName()); - confidence.setStatus(status); - } - return Confidence.getPropertyNames(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new Confidence(); - } - - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - InstanceProperties instanceProperties = new InstanceProperties(); - Confidence confidence = (Confidence)omasClassification; - if (confidence.getSteward()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"steward",confidence.getSteward(),"updateOMRSAttributes"); - } - - if (confidence.getSource()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"source",confidence.getSource(),"updateOMRSAttributes"); - } - - if (confidence.getNotes()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"notes",confidence.getNotes(),"updateOMRSAttributes"); - } - - if (confidence.getConfidence()!=null) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT); - primitivePropertyValue.setPrimitiveValue(confidence.getConfidence()); - instanceProperties.setProperty("confidence", primitivePropertyValue); - } - if (confidence.getLevel()!=null) { - EnumPropertyValue enumPropertyValue = new EnumPropertyValue(); - enumPropertyValue.setOrdinal(confidence.getLevel().getOrdinal()); - enumPropertyValue.setSymbolicName(confidence.getLevel().getName()); - instanceProperties.setProperty("level",enumPropertyValue); - } - if (confidence.getStatus()!=null) { - EnumPropertyValue enumPropertyValue = new EnumPropertyValue(); - enumPropertyValue.setOrdinal(confidence.getStatus().getOrdinal()); - enumPropertyValue.setSymbolicName(confidence.getStatus().getName()); - instanceProperties.setProperty("status",enumPropertyValue); - } - - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ConfidentialityMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ConfidentialityMapper.java deleted file mode 100644 index df7453a81f2..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ConfidentialityMapper.java +++ /dev/null @@ -1,98 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidentiality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.GovernanceClassificationStatus; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Map; -import java.util.Set; - - -/** - * Mapping methods to map between Confidentiality and the omrs equivalents. - */ -public class ConfidentialityMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( ConfidentialityMapper.class); - private static final String className = ConfidentialityMapper.class.getName(); - private static final String typeName = "Confidentiality"; - - public ConfidentialityMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - Confidentiality confidentiality = (Confidentiality)omasClassification; - - String stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"steward",omrsClassificationProperties,""); - confidentiality.setSteward(stringValue); - - stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"notes",omrsClassificationProperties,""); - confidentiality.setNotes(stringValue); - - int intValue = repositoryHelper.getIntProperty(genericHandler.getServiceName(),"confidence",omrsClassificationProperties,""); - confidentiality.setConfidence(intValue); - intValue = repositoryHelper.getIntProperty(genericHandler.getServiceName(),"level",omrsClassificationProperties,""); - confidentiality.setLevel(intValue); - - // map enums - Map instancePropertyMap = omrsClassificationProperties.getInstanceProperties(); - InstancePropertyValue instancePropertyValue = instancePropertyMap.get("status"); - if (instancePropertyValue!=null) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - GovernanceClassificationStatus status = GovernanceClassificationStatus.valueOf(enumPropertyValue.getSymbolicName()); - confidentiality.setStatus(status); - } - - return Confidentiality.getPropertyNames(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new Confidentiality(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - InstanceProperties instanceProperties = new InstanceProperties(); - Confidentiality confidentiality = (Confidentiality)omasClassification; - if (confidentiality.getSteward()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"steward",confidentiality.getSteward(),"updateOMRSAttributes"); - } - - if (confidentiality.getSource()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"source",confidentiality.getSource(),"updateOMRSAttributes"); - } - - if (confidentiality.getNotes()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"notes",confidentiality.getNotes(),"updateOMRSAttributes"); - } - - if (confidentiality.getConfidence()!=null) { - repositoryHelper.addIntPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"confidence",confidentiality.getConfidence(),"updateOMRSAttributes"); - } - if (confidentiality.getLevel()!=null) { - repositoryHelper.addIntPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"level",confidentiality.getLevel(),"updateOMRSAttributes"); - } - if (confidentiality.getStatus()!=null) { - EnumPropertyValue enumPropertyValue = new EnumPropertyValue(); - enumPropertyValue.setOrdinal(confidentiality.getStatus().getOrdinal()); - enumPropertyValue.setSymbolicName(confidentiality.getStatus().getName()); - instanceProperties.setProperty("status",enumPropertyValue); - } - - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/CriticalityMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/CriticalityMapper.java deleted file mode 100644 index 2867698f457..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/CriticalityMapper.java +++ /dev/null @@ -1,99 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Criticality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.CriticalityLevel; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Map; -import java.util.Set; - - -/** - * Mapping methods to map between Criticality and the omrs equivalents. - */ -public class CriticalityMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( CriticalityMapper.class); - private static final String className = CriticalityMapper.class.getName(); - private static final String typeName = "Criticality"; - - public CriticalityMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - Criticality criticality = (Criticality)omasClassification; - - String stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"steward",omrsClassificationProperties,""); - criticality.setSteward(stringValue); - - stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"source",omrsClassificationProperties,""); - criticality.setSource(stringValue); - - stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"notes",omrsClassificationProperties,""); - criticality.setNotes(stringValue); - - Integer intValue = repositoryHelper.getIntProperty(genericHandler.getServiceName(),"confidence",omrsClassificationProperties,""); - criticality.setConfidence(intValue); - - Map instancePropertyMap = omrsClassificationProperties.getInstanceProperties(); - InstancePropertyValue instancePropertyValue = instancePropertyMap.get("level"); - if (instancePropertyValue!=null) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - CriticalityLevel level = CriticalityLevel.valueOf(enumPropertyValue.getSymbolicName()); - criticality.setLevel(level); - } - return Criticality.PROPERTY_NAMES_SET; - } - - @Override - protected String getTypeName() { - return typeName; - } - @Override - protected Classification createOmasClassification() { - return new Criticality(); - } - - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - InstanceProperties instanceProperties = new InstanceProperties(); - Criticality criticality = (Criticality)omasClassification; - if (criticality.getSteward()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"steward",criticality.getSteward(),"updateOMRSAttributes"); - } - - if (criticality.getSource()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"source",criticality.getSource(),"updateOMRSAttributes"); - } - - if (criticality.getNotes()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"notes",criticality.getNotes(),"updateOMRSAttributes"); - } - - if (criticality.getConfidence()!=null) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT); - primitivePropertyValue.setPrimitiveValue(criticality.getConfidence()); - instanceProperties.setProperty("confidence", primitivePropertyValue); - } - if (criticality.getLevel()!=null) { - EnumPropertyValue enumPropertyValue = new EnumPropertyValue(); - enumPropertyValue.setOrdinal(criticality.getLevel().getOrdinal()); - enumPropertyValue.setSymbolicName(criticality.getLevel().getName()); - instanceProperties.setProperty("level",enumPropertyValue); - } - - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/GlossaryProjectMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/GlossaryProjectMapper.java deleted file mode 100644 index ab76fab7bd3..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/GlossaryProjectMapper.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.GlossaryProject; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashSet; -import java.util.Set; - -/** - * Mapping methods to map between GlossaryProject and the omrs equivalents. - */ -public class GlossaryProjectMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( GlossaryProjectMapper.class); - private static final String className = GlossaryProjectMapper.class.getName(); - private static final String typeName = "GlossaryProject"; - - public GlossaryProjectMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - return new HashSet<>(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new GlossaryProject(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - return new InstanceProperties(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ObjectIdentifierMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ObjectIdentifierMapper.java deleted file mode 100644 index 62d1d8ad1e6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/ObjectIdentifierMapper.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.ObjectIdentifier; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashSet; -import java.util.Set; - -/** - * Mapping methods to map between ObjectIdentifier and the omrs equivalents. - */ -public class ObjectIdentifierMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( ObjectIdentifierMapper.class); - private static final String className = ObjectIdentifierMapper.class.getName(); - private static final String typeName = "ObjectIdentifier"; - - public ObjectIdentifierMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - return new HashSet<>(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new ObjectIdentifier(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - return new InstanceProperties(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/RetentionMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/RetentionMapper.java deleted file mode 100644 index 5e553fe8559..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/RetentionMapper.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Retention; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.GovernanceClassificationStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.RetentionBasis; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Date; -import java.util.Map; -import java.util.Set; - - -/** - * Mapping methods to map between Retention and the omrs equivalents. - */ -public class RetentionMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( RetentionMapper.class); - private static final String className = RetentionMapper.class.getName(); - private static final String typeName = "Retention"; - - public RetentionMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - Retention retention = (Retention) omasClassification; - - String stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(), "steward", omrsClassificationProperties, ""); - retention.setSteward(stringValue); - - stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(), "source", omrsClassificationProperties, ""); - retention.setSteward(stringValue); - - stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(), "notes", omrsClassificationProperties, ""); - retention.setNotes(stringValue); - - stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(), "associatedGUID", omrsClassificationProperties, ""); - retention.setAssociatedGUID(stringValue); - - Date dateValue = repositoryHelper.getDateProperty(genericHandler.getServiceName(), "archiveAfter", omrsClassificationProperties, ""); - if (dateValue !=null) { - retention.setArchiveAfter(dateValue.getTime()); - } - dateValue = repositoryHelper.getDateProperty(genericHandler.getServiceName(), "deleteAfter", omrsClassificationProperties, ""); - if (dateValue !=null) { - retention.setDeleteAfter(dateValue.getTime()); - } - Integer intValue = repositoryHelper.getIntProperty(genericHandler.getServiceName(), "confidence", omrsClassificationProperties, ""); - retention.setConfidence(intValue); - - Map instancePropertyMap = omrsClassificationProperties.getInstanceProperties(); - if (instancePropertyMap != null) { - InstancePropertyValue instancePropertyValue = instancePropertyMap.get("status"); - if (instancePropertyValue != null) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - GovernanceClassificationStatus status = GovernanceClassificationStatus.valueOf(enumPropertyValue.getSymbolicName()); - retention.setStatus(status); - } - instancePropertyValue = instancePropertyMap.get("basis"); - if (instancePropertyValue != null) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - RetentionBasis basis = RetentionBasis.valueOf(enumPropertyValue.getSymbolicName()); - retention.setBasis(basis); - } - } - - return Retention.getPropertyNames(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new Retention(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - InstanceProperties instanceProperties = new InstanceProperties(); - Retention retention = (Retention)omasClassification; - if (retention.getSteward()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"steward",retention.getSteward(),"updateOMRSAttributes"); - } - - if (retention.getSource()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"source",retention.getSource(),"updateOMRSAttributes"); - } - - if (retention.getNotes()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"notes",retention.getNotes(),"updateOMRSAttributes"); - } - - if (retention.getAssociatedGUID()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"associatedGUID",retention.getAssociatedGUID(),"updateOMRSAttributes"); - } - - if (retention.getArchiveAfter()!=null) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_LONG); - primitivePropertyValue.setPrimitiveValue(retention.getArchiveAfter()); - instanceProperties.setProperty("archiveAfter", primitivePropertyValue); - } - - if (retention.getDeleteAfter()!=null) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_LONG); - primitivePropertyValue.setPrimitiveValue(retention.getDeleteAfter()); - instanceProperties.setProperty("deleteAfter", primitivePropertyValue); - } - - if (retention.getConfidence()!=null) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT); - primitivePropertyValue.setPrimitiveValue(retention.getConfidence()); - instanceProperties.setProperty("confidence", primitivePropertyValue); - } - if (retention.getBasis()!=null) { - EnumPropertyValue enumPropertyValue = new EnumPropertyValue(); - enumPropertyValue.setOrdinal(retention.getBasis().getOrdinal()); - enumPropertyValue.setSymbolicName(retention.getBasis().getName()); - instanceProperties.setProperty("basis",enumPropertyValue); - } - if (retention.getStatus()!=null) { - EnumPropertyValue enumPropertyValue = new EnumPropertyValue(); - enumPropertyValue.setOrdinal(retention.getStatus().getOrdinal()); - enumPropertyValue.setSymbolicName(retention.getStatus().getName()); - instanceProperties.setProperty("status",enumPropertyValue); - } - - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SpineAttributeMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SpineAttributeMapper.java deleted file mode 100644 index aefed1e8996..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SpineAttributeMapper.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.SpineAttribute; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashSet; -import java.util.Set; - -/** - * Mapping methods to map between SpineAttribute and the omrs equivalents. - */ -public class SpineAttributeMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( SpineAttributeMapper.class); - private static final String className = SpineAttributeMapper.class.getName(); - private static final String typeName = "SpineAttribute"; - - public SpineAttributeMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - return new HashSet<>(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification createOmasClassification() { - return new SpineAttribute(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - return new InstanceProperties(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SpineObjectMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SpineObjectMapper.java deleted file mode 100644 index 303335a8d55..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SpineObjectMapper.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.SpineObject; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashSet; -import java.util.Set; - -/** - * Mapping methods to map between SpineObject and the omrs equivalents. - */ -public class SpineObjectMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( SpineObjectMapper.class); - private static final String className = SpineObjectMapper.class.getName(); - private static final String typeName = "SpineObject"; - - public SpineObjectMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - return new HashSet<>(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new SpineObject(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - return new InstanceProperties(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SubjectAreaMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SubjectAreaMapper.java deleted file mode 100644 index 00812cbd1a8..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/SubjectAreaMapper.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.SubjectArea; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Set; - -/** - * Mapping methods to map between SubjectArea and the omrs equivalents. - */ -public class SubjectAreaMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( SubjectAreaMapper.class); - private static final String className = SubjectAreaMapper.class.getName(); - private static final String typeName = "SubjectArea"; - - public SubjectAreaMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - SubjectArea canonicalVocabulary = (SubjectArea)omasClassification; - String stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"name",omrsClassificationProperties,""); - canonicalVocabulary.setName(stringValue); - return SubjectArea.getPropertyNames(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new SubjectArea(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - InstanceProperties instanceProperties = new InstanceProperties(); - SubjectArea canonicalVocabulary = (SubjectArea)omasClassification; - if (canonicalVocabulary.getName()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,"name",canonicalVocabulary.getName(),"updateOMRSAttributes"); - } - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/TaxonomyMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/TaxonomyMapper.java deleted file mode 100644 index 61591f37af2..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/TaxonomyMapper.java +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Taxonomy; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Set; - - -/** - * Mapping methods to map between Taxonomy and the omrs equivalents. - */ -public class TaxonomyMapper extends ClassificationMapper{ - private static final Logger log = LoggerFactory.getLogger( TaxonomyMapper.class); - private static final String className = TaxonomyMapper.class.getName(); - private static final String typeName = "Taxonomy"; - - public TaxonomyMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - @Override - protected Set mapKnownAttributesToOmrs(Classification omasClassification, InstanceProperties omrsClassificationProperties) { - Taxonomy taxonomy = (Taxonomy)omasClassification; - String stringValue = repositoryHelper.getStringProperty(genericHandler.getServiceName(),"organizingPrinciple",omrsClassificationProperties,""); - taxonomy.setOrganizingPrinciple(stringValue); - return Taxonomy.getPropertyNames(); - } - - @Override - protected String getTypeName() { - return typeName; - } - - @Override - protected Classification createOmasClassification() { - return new Taxonomy(); - } - @Override - protected InstanceProperties updateOMRSAttributes(Classification omasClassification) { - InstanceProperties instanceProperties = new InstanceProperties(); - Taxonomy taxonomy = (Taxonomy)omasClassification; - if (taxonomy.getOrganizingPrinciple()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(),instanceProperties,("organizingPrinciple"),taxonomy.getOrganizingPrinciple(),"updateOMRSAttributes"); - } - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/package-info.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/package-info.java deleted file mode 100644 index 2e59488554c..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/classifications/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - -/** - * Subject Area Mappers between OMAS Subject Area beans and OMRS Classification representations. - */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications; diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/CategoryMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/CategoryMapper.java deleted file mode 100644 index e19344606f4..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/CategoryMapper.java +++ /dev/null @@ -1,112 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.SubjectArea; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -/** - * Mapping methods to map between Category (or a subtype of Category) and EntityDetail. - * These mapping methods map classifications and attributes that directly map to OMRS. - * - */ -@SubjectAreaMapper -public class CategoryMapper extends EntityDetailMapper { - private static final Logger log = LoggerFactory.getLogger(CategoryMapper.class); - private static final String className = CategoryMapper.class.getName(); - public static final String GLOSSARY_CATEGORY = "GlossaryCategory"; - - public CategoryMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map EntityDetail to Category or a sub type of Category - * @param entityDetail the supplied EntityDetail - * @return Category the equivalent Category to the supplied entityDetail. - */ - @Override - public Category map(EntityDetail entityDetail) { - Category category = new Category(); - if (entityDetail.getClassifications()!=null) { - Set classificationNames = entityDetail.getClassifications().stream().map(x -> x.getName()).collect(Collectors.toSet()); - if (classificationNames.contains("SubjectArea")) { - // construct the right object so that that is is serialised appropriately as a SubjectArea Definition on the response. - category = new SubjectAreaDefinition(); - } - } - mapEntityDetailToNode(category,entityDetail); - return category; - } - - @Override - public EntityDetail map(Category node) throws InvalidParameterException { - return super.toEntityDetail(node); - } - - /** - * Map the supplied Node to omrs InstanceProperties. - * @param node supplied node - * @param instanceProperties equivalent instance properties to the Node - */ - @Override - protected void mapNodeToInstanceProperties(Category node, InstanceProperties instanceProperties) { - if (node.getName()!=null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, node.getName(), "displayName"); - } - } - - @Override - protected boolean updateNodeWithClassification(Category category, Classification omasClassification) { - boolean handled = false; - final String classificationName = omasClassification.getClassificationName(); - //TODO do additional properties for classification subtypes. - NodeType nodeType = NodeType.Category; - if (repositoryHelper.isTypeOf(genericHandler.getServiceName(),"SubjectArea",classificationName)) { - nodeType =NodeType.SubjectAreaDefinition; - handled =true; - } - category.setNodeType(nodeType); - return handled; - } - /** - * A Classification either exists in the classifications associated with a node or as an inlined attribute (these are properties / attributes of a node that correspond to OMRS Classifications) - * @param node supplied term - * @return inlined classifications. - */ - @Override - protected List getInlinedClassifications(Category node) { - List inlinedClassifications = new ArrayList<>(); - - if (node.getNodeType()== NodeType.SubjectAreaDefinition) { - SubjectArea subjectArea = new SubjectArea(); - subjectArea.setName(node.getName()); - inlinedClassifications.add(subjectArea); - } - - return inlinedClassifications; - } - - @Override - public String getTypeName(){ - return GLOSSARY_CATEGORY; - } -} - - diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/EntityDetailMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/EntityDetailMapper.java deleted file mode 100644 index a97985914cb..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/EntityDetailMapper.java +++ /dev/null @@ -1,459 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.INodeMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.classifications.ClassificationFactory; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.*; - -/** - * This class provides a mapping between OMRS object EntityDetail and Subject Area OMAS object Node. - * Sub-classes of Node are expected to provide a mapper that extends this class, to provide the mappings for the properties that - * they support. - */ -abstract public class EntityDetailMapper implements INodeMapper { - protected final OMRSRepositoryHelper repositoryHelper; - protected final OpenMetadataAPIGenericHandler genericHandler; - public EntityDetailMapper(OpenMetadataAPIGenericHandler genericHandler){ - this.genericHandler = genericHandler; - this.repositoryHelper = genericHandler.getRepositoryHelper(); - } - - /** - * map the EntityDetail to the Node - * @param node to be mapped to (the target of the map) - * @param omrsEntityDetail entityDetail to be mapped from (the source of the mapping) - */ - protected void mapEntityDetailToNode(N node, EntityDetail omrsEntityDetail) { - - node.setSystemAttributes(SubjectAreaUtils.createSystemAttributes(omrsEntityDetail)); - // Set properties - InstanceProperties omrsEntityDetailProperties = omrsEntityDetail.getProperties(); - if (omrsEntityDetailProperties!=null) { - mapEntityDetailPropertiesToNode(node, omrsEntityDetailProperties); - } - // set classifications - mapOmrsClassificationsToNode(omrsEntityDetail, node); - // set readonly - if (omrsEntityDetail.getInstanceProvenanceType() != InstanceProvenanceType.LOCAL_COHORT) { - node.setReadOnly(true); - } - } - - /** - * Map EntityDetail properties to Node properties. This method calls out to methods that are overridden for the different Nodes. - * @param node supplied Node to be updated - * @param instanceProperties entity detail properties - */ - private void mapEntityDetailPropertiesToNode(N node, InstanceProperties instanceProperties) { - // copy over effectivity - Date effectivityFromtime = null; - Date effectivityTotime = null; - if (instanceProperties.getEffectiveFromTime() != null) { - effectivityFromtime = instanceProperties.getEffectiveFromTime(); - node.setEffectiveFromTime(effectivityFromtime.getTime()); - } - if (instanceProperties.getEffectiveToTime() !=null) { - effectivityTotime = instanceProperties.getEffectiveToTime(); - node.setEffectiveToTime(effectivityTotime.getTime()); - } - -// instanceProperties.setQualifiedName(removePropertyByNameFromInstanceProperties(instanceProperties, )); -// instanceProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); -// instanceProperties.setDisplayName(this.removeName(instanceProperties)); -// instanceProperties.setDescription(this.removeDescription(instanceProperties)); -// instanceProperties.setTypeDescription(this.removeDeployedImplementationType(instanceProperties)); -// instanceProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); -// instanceProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); -// instanceProperties.setSource(this.removeSource(instanceProperties)); -// -// /* -// * Any remaining properties are returned in the extended properties. They are -// * assumed to be defined in a subtype. -// */ -// instanceProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); -// instanceProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); -// -// bean.setSoftwareServerCapabilitiesProperties(instanceProperties); - - - // copy over properties - Iterator omrsPropertyIterator = instanceProperties.getPropertyNames(); - NodeType nodeType = node.getNodeType(); - while (omrsPropertyIterator.hasNext()) { - String propertyName = omrsPropertyIterator.next(); - //TODO check if this is a property we expect or whether the type has been added to. - // this is a property we expect - InstancePropertyValue value = instanceProperties.getPropertyValue(propertyName); - - // supplied guid matches the expected type - - Object actualValue; - switch (value.getInstancePropertyCategory()) { - case PRIMITIVE: - PrimitivePropertyValue primitivePropertyValue = (PrimitivePropertyValue) value; - actualValue = primitivePropertyValue.getPrimitiveValue(); - // All nodes are Referenceables at this time so they all have qualifiedName - if (propertyName.equals(OpenMetadataProperty.QUALIFIED_NAME.name)) { - if (actualValue != null) { - node.setQualifiedName((String) actualValue); - } - } else if (propertyName.equals(OpenMetadataProperty.DISPLAY_NAME.name) || propertyName.equals(OpenMetadataProperty.NAME.name)) { - if (actualValue!=null) { - node.setName((String) actualValue); - } - } else if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - if (actualValue!=null) { - node.setDescription((String) actualValue); - } - // if the node is Taxonomy or TaxonomyAndCanonicalGlossary then it can have a scope attribute - } else if (propertyName.equals(OpenMetadataType.SCOPE_PROPERTY_NAME) && (nodeType == NodeType.Taxonomy || nodeType == NodeType.TaxonomyAndCanonicalGlossary)) { - if (actualValue!=null) { - node.setDescription((String) actualValue); - } - // if the node is CanonicalGlossary or TaxonomyAndCanonicalGlossary then it can have an organisingPrinciple attribute - } else if (propertyName.equals(OpenMetadataType.ORGANIZING_PRINCIPLE_PROPERTY_NAME) && (nodeType == NodeType.CanonicalGlossary || nodeType == NodeType.TaxonomyAndCanonicalGlossary)) { - if (actualValue!=null) { - node.setDescription((String) actualValue); - } - } else if (!mapPrimitiveToNode(node, propertyName, actualValue)) { - // there are properties we are not aware of, as they have been added by a subtype, put them in the extended properties - if (null==node.getExtendedProperties()) { - node.setExtendedProperties(new HashMap()); - } - node.getExtendedProperties().put(propertyName, actualValue); - } - break; - case ENUM: - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) value; - if (!mapEnumToNode(node, propertyName, enumPropertyValue)) { - // there are properties we are not aware of, as they have been added by a subtype, put them in the extended properties - if (null==node.getExtendedProperties()) { - node.setExtendedProperties(new HashMap()); - } - node.getExtendedProperties().put(propertyName, enumPropertyValue); - } - - break; - case MAP: - MapPropertyValue mapPropertyValue = (MapPropertyValue) value; - InstanceProperties instancePropertyForMap = mapPropertyValue.getMapValues(); - // All nodes as Referenceables at this time so they all have additionalProperties. - if (propertyName.equals(OpenMetadataProperty.ADDITIONAL_PROPERTIES.name)) { - // Only support Map at this time. - Map actualMap = new HashMap<>(); - Iterator iter = instancePropertyForMap.getPropertyNames(); - while (iter.hasNext()) { - String mapkey = iter.next(); - PrimitivePropertyValue primitivePropertyMapValue = (PrimitivePropertyValue) instancePropertyForMap.getPropertyValue(mapkey); - String mapvalue = primitivePropertyMapValue.getPrimitiveValue().toString(); - actualMap.put(mapkey, mapvalue); - } - node.setAdditionalProperties(actualMap); - } else if (!mapMapToNode(node, propertyName, mapPropertyValue)) { - // there are properties we are not aware of, as they have been added by a subtype, put them in the extended properties - if (null==node.getExtendedProperties()) { - node.setExtendedProperties(new HashMap<>()); - } - node.getExtendedProperties().put(propertyName, mapPropertyValue); - } - break; - case ARRAY: - if (null==node.getExtendedProperties()) { - node.setExtendedProperties(new HashMap<>()); - } - node.getExtendedProperties().put(propertyName, value); - break; - case STRUCT: - if (null==node.getExtendedProperties()) { - node.setExtendedProperties(new HashMap<>()); - } - node.getExtendedProperties().put(propertyName, value); - case UNKNOWN: - // Error ? - if (null==node.getExtendedProperties()) { - node.setExtendedProperties(new HashMap<>()); - } - node.getExtendedProperties().put(propertyName, value); - break; - } - - } // end while - } - /** - * Extract and delete the qualifiedName property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @param propertyName name of the property to remove from the instanceProperties - * @return string name or null - */ - protected String removePropertyByNameFromInstanceProperties(InstanceProperties instanceProperties, String propertyName) - { - final String methodName = "removeQualifiedName"; - - if (instanceProperties != null) - { - return repositoryHelper.removeStringProperty(genericHandler.getServiceName(), - OpenMetadataProperty.QUALIFIED_NAME.name, - instanceProperties, - methodName); - } - - return null; - } - /** - * Map an omrs entityDetail primitive property to a Subject Area Node property. - * The child class is expected to override this method if the type has primitive properties - * @param node the node to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if it was a property we were expecting , otherwise false; - */ - protected boolean mapPrimitiveToNode(N node, String propertyName, Object value) { - return false; - } - /** - * Map an omrs entityDetail enum property to a Subject Area Node property. - * The child class is expected to override this method if the type has enum properties - * @param node the node to be updated - * @param propertyName the omrs property name - * @param enumPropertyValue the omrs enum property value - * @return true if it was a property we were expecting , otherwise false; - */ - protected boolean mapEnumToNode(N node, String propertyName, EnumPropertyValue enumPropertyValue) { - return false; - } - /** - * Map an omrs entityDetail map property to a Subject Area Node property. - * The child class is expected to override this method if the type has map properties - * @param node the node to be updated - * @param propertyName the omrs property name - * @param mapPropertyValue the omrs map property value - * @return true if it was a property we were expecting , otherwise false; - */ - protected boolean mapMapToNode(N node, String propertyName, MapPropertyValue mapPropertyValue) { - return false; - } - - /** - * Map the effectivity dates from node to the InstanceProperties - * @param node source of the effectivity - * @param instanceProperties instance properties to update - */ - private void mapNodeEffectivityToInstanceProperties(N node, InstanceProperties instanceProperties) { - - Long effectiveFromTime = node.getEffectiveFromTime(); - Long effectiveToTime = node.getEffectiveToTime(); - if (effectiveFromTime != null ) { - instanceProperties.setEffectiveFromTime(new Date(effectiveFromTime)); - } - if (effectiveToTime != null) { - instanceProperties.setEffectiveToTime(new Date(effectiveToTime)); - } - } - private void mapOmrsClassificationsToNode(EntityDetail omrsEntityDetail, N node) { - List omrsclassifications = omrsEntityDetail.getClassifications(); - if (CollectionUtils.isNotEmpty(omrsclassifications)) { - ClassificationFactory classficationFactory = new ClassificationFactory(genericHandler); - List - existingClassifications = node.getClassifications(); - if (existingClassifications == null) { - existingClassifications = new ArrayList<>(); - } - for (Classification omrsClassification : omrsclassifications) { - String omrsClassificationName = omrsClassification.getName(); - org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification = classficationFactory.getOMASClassification(omrsClassificationName, omrsClassification); - if (omasClassification != null) { - // this is a classification we know about. - updateNodeWithClassification(node, omasClassification); - // need to add this classification to the classifications - existingClassifications.add(omasClassification); - } - } - node.setClassifications(existingClassifications); - } - } - - /** - * Update Node with classification - * This method should be overridden by types of node if they want to use the Classification as an in lined property - * @param node node to update - * @param omasClassification classification - * @return flag true if the classification has been dealt with - */ - abstract boolean updateNodeWithClassification(N node, org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification); - - /** - * This method is supplied a list of OMAS classifications and a supplied entityDetail object. The OMAS Classifications are converted to OMRS classifications and then then - * used to classify the EntityDetail. - * @param entityDetail supplied entityDetail object - * @param omasClassifications supplied OMAS Classifications - */ - private void populateOmrsEntityWithBeanClassifications(EntityDetail entityDetail, List omasClassifications) { - if (omasClassifications!= null && omasClassifications.size()>0) { - ArrayList omrsClassifications = new ArrayList(); - for (org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification : omasClassifications) { - - ClassificationFactory classificationFactory = new ClassificationFactory(genericHandler); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification omrsClassification = classificationFactory.getOMRSClassification(omasClassification); - //classificationFactory.getOMASClassification(omrsClassificationName,omrsClassification); - - - omrsClassifications.add(omrsClassification); - } - entityDetail.setClassifications(omrsClassifications); - } - } - - /** - * Map a Node (a Subject Area OMAS) concept to an EntityDetail (an OMRS concept) - * - * Note that this does not map the readonly flag to the provenance, the caller needs - * to handle this if required. Readonly flag is only for update / delete and restore processing - * can proceed, in these cases the omrs entity should be looked up first, so this mapping would - * not be called. - * - * @param node supplied node, which is a Subject Area Concept - * @return EntityDetail, which is an OMRS concept - */ - public EntityDetail toEntityDetail(N node) { - String methodName = "mapNodeToEntityDetail"; - - EntityDetail omrsEntityDetail = new EntityDetail(); - SystemAttributes systemAttributes = node.getSystemAttributes(); - if (systemAttributes!=null) { - if (systemAttributes.getCreatedBy()!=null) - omrsEntityDetail.setCreatedBy(systemAttributes.getCreatedBy()); - if (systemAttributes.getUpdatedBy()!=null) - omrsEntityDetail.setUpdatedBy(systemAttributes.getUpdatedBy()); - if (systemAttributes.getCreateTime()!=null) - omrsEntityDetail.setCreateTime(new Date(systemAttributes.getCreateTime())); - if (systemAttributes.getUpdateTime()!=null) - omrsEntityDetail.setUpdateTime(new Date(systemAttributes.getUpdateTime())); - if (systemAttributes.getVersion()!=null) - omrsEntityDetail.setVersion(systemAttributes.getVersion()); - if (systemAttributes.getGUID()!=null) - omrsEntityDetail.setGUID(systemAttributes.getGUID()); - if (systemAttributes.getStatus()!=null) { - InstanceStatus instanceStatus = SubjectAreaUtils.convertStatusToInstanceStatus(systemAttributes.getStatus()); - omrsEntityDetail.setStatus(instanceStatus); - } - } - - InstanceProperties instanceProperties = new InstanceProperties(); - mapNodeEffectivityToInstanceProperties(node, instanceProperties); - // map the Referencable node properties to instanceproperties - if (node.getQualifiedName()!=null) { - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(), instanceProperties, OpenMetadataProperty.QUALIFIED_NAME.name, node.getQualifiedName(), methodName); - } - if (node.getName()!=null) { - if (node.getNodeType() == NodeType.Project || node.getNodeType() == NodeType.GlossaryProject) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, node.getName(), OpenMetadataProperty.NAME.name); - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(), instanceProperties, OpenMetadataProperty.NAME.name, node.getName(), methodName); - } else { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, node.getName(), OpenMetadataProperty.DISPLAY_NAME.name); - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(), instanceProperties, OpenMetadataProperty.DISPLAY_NAME.name, node.getName(), methodName); - } - } - - if (node.getDescription()!=null) { SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, node.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - repositoryHelper.addStringPropertyToInstance(genericHandler.getServiceName(), instanceProperties, OpenMetadataProperty.DESCRIPTION.name, node.getDescription(), methodName); - } - // if there are additionalProperties then we should honour them and send them through to omrs. - if (node.getAdditionalProperties()!=null) { - populateAdditionalProperties(node, instanceProperties); - } - // TODO assume we do not need tp populate extended properties here. Or do we need to maintain them in the Node - - // map the other node properties to instanceproperties - mapNodeToInstanceProperties(node, instanceProperties); - - omrsEntityDetail.setProperties(instanceProperties); - // set the type in the entity - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - - String typeName = getTypeName(); - TypeDef typeDef = archiveAccessor.getEntityDefByName(typeName); - InstanceType template = SubjectAreaUtils.createTemplateFromTypeDef(typeDef); - InstanceType instanceType = new InstanceType(template); - omrsEntityDetail.setType(instanceType); - - // map the classifications - - List omasClassifications = node.getClassifications(); - - List inlinedOmasClassifications = getInlinedClassifications(node); - omasClassifications.addAll(inlinedOmasClassifications); - - if (!omasClassifications.isEmpty() ) { - populateOmrsEntityWithBeanClassifications(omrsEntityDetail, omasClassifications); - } - return omrsEntityDetail; - } - - @Override - public abstract String getTypeName(); - - /** - * get the EntityTypeDef Guid - * This method should be overridden to provide the appropriate guid for the type. - * - * @return the guid of the entity typedef - */ - @Override - public String getTypeDefGuid() { - TypeDef typeDef = repositoryHelper.getTypeDefByName(genericHandler.getServiceName(), - getTypeName()); - String guid = null; - if (typeDef != null) { - guid = typeDef.getGUID(); - } - return guid; - } - - protected void populateAdditionalProperties(N node, InstanceProperties instanceProperties) { - Map map =node.getAdditionalProperties(); - MapPropertyValue mapPropertyValue = new MapPropertyValue(); - - for (String key:map.keySet()) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValue.setPrimitiveValue(map.get(key)); - mapPropertyValue.setMapValue(key,primitivePropertyValue); - } - - instanceProperties.setProperty(OpenMetadataProperty.ADDITIONAL_PROPERTIES.name, mapPropertyValue); - } - - /** - * A Classification either exists in the classifications associated with a node or as an inlined attribute (these are properties / attributes of a node that correspond to OMRS Classifications). - * This method should be overridden by a child class if it has inlined attributes that correspond to an OMRS classifications. - * @param node supplied node - * @return inlined classifications. - */ - abstract List getInlinedClassifications(N node); - - /** - * Map the supplied Node to omrs InstanceProperties. - * Subclasses are expected to override this method to provide logic to map their Node properties to instanceProperties - * @param node supplied node - * @param instanceProperties equivalent instance properties to the Node - */ - protected void mapNodeToInstanceProperties(N node, InstanceProperties instanceProperties) { - - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/GlossaryMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/GlossaryMapper.java deleted file mode 100644 index afc5e7e938e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/GlossaryMapper.java +++ /dev/null @@ -1,184 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.CanonicalVocabulary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Taxonomy; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.CanonicalGlossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.CanonicalTaxonomy; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; - -/** - * Mapping methods to map between Glossary (or a subtype of Glossary) and EntityDetail. - * These mapping methods map classifications and attributes that directly map to OMRS. - */ -@SubjectAreaMapper -public class GlossaryMapper extends EntityDetailMapper { - private static final Logger log = LoggerFactory.getLogger(GlossaryMapper.class); - private static final String className = GlossaryMapper.class.getName(); - - public GlossaryMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map EntityDetail to Glossary or a sub type of Glossary - * - * @param entityDetail the supplied EntityDetail - * @return Glossary the equivalent Glossary to the supplied entityDetail. - */ - @Override - public Glossary map(EntityDetail entityDetail) { - // construct the right type of node. - Glossary glossary = new Glossary(); - List omrsClassifications = entityDetail.getClassifications(); - if (omrsClassifications != null) { - for (org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification omrsClassification : omrsClassifications) { - boolean isTaxonomy = false; - boolean iscanonicalvocabulary = false; - - if (repositoryHelper.isTypeOf(genericHandler.getServiceName(), OpenMetadataType.TAXONOMY_CLASSIFICATION_TYPE_NAME, omrsClassification.getName())) { - isTaxonomy = true; - } - if (repositoryHelper.isTypeOf(genericHandler.getServiceName(), OpenMetadataType.CANONICAL_VOCAB_CLASSIFICATION_TYPE_NAME, omrsClassification.getName())) { - iscanonicalvocabulary = true; - } - if (iscanonicalvocabulary && isTaxonomy) { - glossary = new CanonicalTaxonomy(); - } else if (iscanonicalvocabulary) { - glossary = new CanonicalGlossary(); - } else if (isTaxonomy) { - glossary = new org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Taxonomy(); - } - } - } - mapEntityDetailToNode(glossary, entityDetail); - return glossary; - } - - @Override - public EntityDetail map(Glossary node) throws InvalidParameterException { - return super.toEntityDetail(node); - } - - @Override - protected List getInlinedClassifications(Glossary node) { - List inlinedClassifications = new ArrayList<>(); - if (node.getNodeType() == NodeType.TaxonomyAndCanonicalGlossary) { - CanonicalTaxonomy canonicalTaxonomy = (CanonicalTaxonomy) node; - - Taxonomy taxonomyClassification = new Taxonomy(); - taxonomyClassification.setOrganizingPrinciple(canonicalTaxonomy.getOrganizingPrinciple()); - inlinedClassifications.add(taxonomyClassification); - CanonicalVocabulary canonicalVocabulary = new CanonicalVocabulary(); - canonicalVocabulary.setScope(canonicalTaxonomy.getScope()); - inlinedClassifications.add(canonicalVocabulary); - // add to inlined classifications - } else if (node.getNodeType() == NodeType.Taxonomy) { - org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Taxonomy taxonomy = (org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Taxonomy) node; - - Taxonomy taxonomyClassification = new Taxonomy(); - taxonomyClassification.setOrganizingPrinciple(taxonomy.getOrganizingPrinciple()); - inlinedClassifications.add(taxonomyClassification); - - } else if (node.getNodeType() == NodeType.CanonicalGlossary) { - CanonicalGlossary canonicalGlossary = (CanonicalGlossary) node; - CanonicalVocabulary canonicalVocabulary = new CanonicalVocabulary(); - canonicalVocabulary.setScope(canonicalGlossary.getScope()); - inlinedClassifications.add(canonicalVocabulary); - } - return inlinedClassifications; - } - - /** - * Map a primitive omrs property to the glossary object. - * - * @param glossary the glossary to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the Node, otherwise false - */ - @Override - protected boolean mapPrimitiveToNode(Glossary glossary, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = true; - if (propertyName.equals(OpenMetadataType.LANGUAGE_PROPERTY_NAME)) { - glossary.setLanguage(stringValue); - } else if (propertyName.equals(OpenMetadataProperty.USAGE.name)) { - glossary.setUsage(stringValue); - } else { - foundProperty = false; - } - return foundProperty; - } - - /** - * Map the supplied Node to omrs InstanceProperties. - * - * @param node supplied node - * @param instanceProperties equivalent instance properties to the Node - */ - @Override - protected void mapNodeToInstanceProperties(Glossary node, InstanceProperties instanceProperties) { - Glossary glossary = (Glossary) node; - if (glossary.getLanguage() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, glossary.getLanguage(), OpenMetadataType.LANGUAGE_PROPERTY_NAME); - } - if (glossary.getUsage() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, glossary.getUsage(), OpenMetadataProperty.USAGE.name); - } - if (node.getName() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, node.getName(), OpenMetadataProperty.DISPLAY_NAME.name); - } - } - - @Override - protected boolean updateNodeWithClassification(Glossary glossary, Classification omasClassification) { - boolean handled = false; - - final String classificationName = omasClassification.getClassificationName(); - //TODO do additional properties for classification subtypes. - - NodeType existingNodeType = glossary.getNodeType(); - if (existingNodeType == null) { - existingNodeType = NodeType.Glossary; - } - if (existingNodeType == NodeType.Glossary && repositoryHelper.isTypeOf(genericHandler.getServiceName(), OpenMetadataType.TAXONOMY_CLASSIFICATION_TYPE_NAME, classificationName)) { - glossary.setNodeType(NodeType.Taxonomy); - handled = true; - } else if (existingNodeType == NodeType.CanonicalGlossary && repositoryHelper.isTypeOf(genericHandler.getServiceName(), OpenMetadataType.TAXONOMY_CLASSIFICATION_TYPE_NAME, classificationName)) { - glossary.setNodeType(NodeType.TaxonomyAndCanonicalGlossary); - handled = true; - } else if (existingNodeType == NodeType.Glossary && repositoryHelper.isTypeOf(genericHandler.getServiceName(), OpenMetadataType.CANONICAL_VOCAB_CLASSIFICATION_TYPE_NAME, classificationName)) { - glossary.setNodeType(NodeType.CanonicalGlossary); - handled = true; - } else if (existingNodeType == NodeType.Taxonomy && repositoryHelper.isTypeOf(genericHandler.getServiceName(), OpenMetadataType.CANONICAL_VOCAB_CLASSIFICATION_TYPE_NAME, classificationName)) { - glossary.setNodeType(NodeType.TaxonomyAndCanonicalGlossary); - handled = true; - } else { - glossary.setNodeType(existingNodeType); - handled = true; - } - return handled; - } - - @Override - public String getTypeName() { - return OpenMetadataType.GLOSSARY_TYPE_NAME; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/ProjectMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/ProjectMapper.java deleted file mode 100644 index 31776c12ddb..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/ProjectMapper.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.GlossaryProject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** - * Mapping methods to map between Project (or a subtype of Project) and EntityDetail. - * These mapping methods map classifications and attributes that directly map to OMRS. - * - */ -@SubjectAreaMapper -public class ProjectMapper extends EntityDetailMapper { - private static final Logger log = LoggerFactory.getLogger( ProjectMapper.class); - private static final String className = ProjectMapper.class.getName(); - public static final String PROJECT = "Project"; - public static final String GLOSSARY_PROJECT = "GlossaryProject"; - - - public ProjectMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map EntityDetail to Project or a sub type of Project - * @param entityDetail the supplied EntityDetail - * @return Project the equivalent Project to the supplied entityDetail. - */ - public Project map(EntityDetail entityDetail) { - // construct the right type of node. - Project project = new Project(); - List omrsClassifications = entityDetail.getClassifications(); - if (omrsClassifications !=null) { - for (org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification omrsClassification : omrsClassifications) { - - if (repositoryHelper.isTypeOf(genericHandler.getServiceName(), GLOSSARY_PROJECT, omrsClassification.getName())) { - project = new GlossaryProject(); - } else { - project = new Project(); - } - } - } - mapEntityDetailToNode(project,entityDetail); - return project; - } - - @Override - public EntityDetail map(Project node) throws InvalidParameterException { - return super.toEntityDetail(node); - } - - @Override - protected List getInlinedClassifications(Project node) { - List inlinedClassifications = new ArrayList<>(); - if (node.getNodeType() == NodeType.GlossaryProject) { - org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.GlossaryProject glossaryProjectClassification =new org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.GlossaryProject(); - // add to inlined classifications - inlinedClassifications.add(glossaryProjectClassification); - } - return inlinedClassifications; - } - - /** - * Map a primitive omrs property to the Project object. - * @param project the Project to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the Node, otherwise false - */ - @Override - protected boolean mapPrimitiveToNode(Project project, String propertyName, Object value) { - boolean foundProperty = true; - if (propertyName.equals("startDate")) { - Date dateValue = (Date) value; - project.setStartDate(dateValue); - } else if (propertyName.equals("plannedEndDate")) { - Date dateValue = (Date)value; - project.setPlannedEndDate(dateValue); - } else if (propertyName.equals("status")) { - String stringValue = (String) value; - project.setStatus(stringValue); - } else { - foundProperty =false; - } - - return foundProperty; - } - - /** - * Map the supplied Node to omrs InstanceProperties. - * @param project supplied node - * @param instanceProperties equivalent instance properties to the Node - */ - @Override - protected void mapNodeToInstanceProperties(Project project, InstanceProperties instanceProperties) { - if (project.getStatus()!=null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, project.getStatus(), "status"); - } - if (project.getStartDate()!=null) { - SubjectAreaUtils.setDatePropertyInInstanceProperties(instanceProperties, project.getStartDate(), "startDate"); - } - if (project.getPlannedEndDate()!=null) { - SubjectAreaUtils.setDatePropertyInInstanceProperties(instanceProperties, project.getPlannedEndDate(), "plannedEndDate"); - } - } - - @Override - protected boolean updateNodeWithClassification(Project project, org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification omasClassification) { - boolean handled = false; - - final String classificationName = omasClassification.getClassificationName(); - //TODO do additional properties for classification subtypes. - - NodeType existingNodeType = project.getNodeType(); - if (existingNodeType==null) { - existingNodeType=NodeType.Project; - } - String sourceName = genericHandler.getServiceName(); - if (existingNodeType == NodeType.Project && repositoryHelper.isTypeOf(sourceName, GLOSSARY_PROJECT,classificationName)) { - project.setNodeType(NodeType.GlossaryProject); - handled=true; - } else { - project.setNodeType(existingNodeType); - handled=true; - } - return handled; - } - @Override - public String getTypeName(){ - return PROJECT; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/TermMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/TermMapper.java deleted file mode 100644 index f07de6f4be0..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/TermMapper.java +++ /dev/null @@ -1,184 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.GovernanceClassifications; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; - - -/** - * Static mapping methods to map between the Term and the generated OMRSBean for GlossaryTerm. - */ -@SubjectAreaMapper -public class TermMapper extends EntityDetailMapper { - private static final Logger log = LoggerFactory.getLogger( TermMapper.class); - private static final String className = TermMapper.class.getName(); - public static final String GLOSSARY_TERM = "GlossaryTerm"; - - public TermMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map (convert) EntityDetail to Term or a sub type of Term - * @param entityDetail the supplied EntityDetail - * @return Term the equivalent Term to the supplied entityDetail. - */ - public Term map(EntityDetail entityDetail) { - Term term = new Term(); - mapEntityDetailToNode(term,entityDetail); - return term; - } - - @Override - public EntityDetail map(Term node) throws InvalidParameterException { - return toEntityDetail(node); - } - - /** - * Map a primitive omrs property to the term object. - * @param term the term to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the Node, otherwise false - */ - @Override - protected boolean mapPrimitiveToNode(Term term, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = true; - if (propertyName.equals(OpenMetadataProperty.SUMMARY.name)) { - term.setSummary(stringValue); - } else if (propertyName.equals(OpenMetadataProperty.ABBREVIATION.name)) { - term.setAbbreviation(stringValue); - } else if (propertyName.equals(OpenMetadataProperty.EXAMPLES.name)) { - term.setExamples(stringValue); - } else if (propertyName.equals(OpenMetadataProperty.USAGE.name)) { - term.setUsage(stringValue); - } else { - foundProperty =false; - } - return foundProperty; - } - /** - * Map the supplied Node to omrs InstanceProperties. - * @param term supplied node - * @param instanceProperties equivalent instance properties to the Node - */ - @Override - protected void mapNodeToInstanceProperties(Term term, InstanceProperties instanceProperties) { - if (term.getSummary()!=null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, term.getSummary(), OpenMetadataProperty.SUMMARY.name); - } - if (term.getAbbreviation()!=null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, term.getAbbreviation(), OpenMetadataProperty.ABBREVIATION.name); - } - if (term.getExamples()!=null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, term.getExamples(), OpenMetadataProperty.EXAMPLES.name); - } - if (term.getUsage()!=null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, term.getUsage(), OpenMetadataProperty.USAGE.name); - } - if (term.getName()!=null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, term.getName(), OpenMetadataProperty.DISPLAY_NAME.name); - } - } - - @Override - protected boolean updateNodeWithClassification(Term term, Classification omasClassification) { - boolean handled = false; - GovernanceClassifications governanceClassifications = term.getGovernanceClassifications(); - if (governanceClassifications ==null) { - governanceClassifications = new GovernanceClassifications(); - } - final String classificationName = omasClassification.getClassificationName(); - - String sourceName = genericHandler.getServiceName(); - //TODO do additional properties for classification subtypes. - if (repositoryHelper.isTypeOf(sourceName,classificationName,"Confidentiality")) { - governanceClassifications.setConfidentiality((Confidentiality) omasClassification); - term.setGovernanceClassifications(governanceClassifications); - handled =true; - } else if (repositoryHelper.isTypeOf(sourceName,classificationName,"Confidence")) { - governanceClassifications.setConfidence((Confidence) omasClassification); - term.setGovernanceClassifications(governanceClassifications); - handled =true; - } else if (repositoryHelper.isTypeOf(sourceName,classificationName,"Criticality")) { - governanceClassifications.setCriticality((Criticality) omasClassification); - term.setGovernanceClassifications(governanceClassifications); - handled =true; - } else if (repositoryHelper.isTypeOf(sourceName,classificationName,"Retention")) { - governanceClassifications.setRetention((Retention) omasClassification); - term.setGovernanceClassifications(governanceClassifications); - handled =true; - } else if (repositoryHelper.isTypeOf(sourceName,classificationName,"SpineObject")) { - term.setSpineObject(true); - handled =true; - } else if (repositoryHelper.isTypeOf(sourceName,classificationName,"SpineAttribute")) { - term.setSpineAttribute(true); - handled =true; - } else if (repositoryHelper.isTypeOf(sourceName,classificationName,"ObjectIdentifier")) { - term.setObjectIdentifier(true); - handled =true; - } - - // TODO activity - return handled; - } - /** - * A Classification either exists in the classifications associated with a node or as an inlined attribute (these are properties / attributes of a node that correspond to OMRS Classifications) - * @param term supplied term - * @return inlined classifications. - */ - @Override - protected List getInlinedClassifications(Term term) { - List inlinedClassifications = new ArrayList<>(); - GovernanceClassifications governanceClassifications = term.getGovernanceClassifications(); - if (governanceClassifications !=null) { - Criticality criticality = governanceClassifications.getCriticality(); - Confidence confidence = governanceClassifications.getConfidence(); - Confidentiality confidentiality =governanceClassifications.getConfidentiality(); - Retention retention = governanceClassifications.getRetention(); - if (criticality != null) { - inlinedClassifications.add(criticality); - } - if (confidence!=null) { - inlinedClassifications.add(confidence); - } - if (confidentiality!=null) { - inlinedClassifications.add(confidentiality); - } - if (retention!=null) { - inlinedClassifications.add(retention); - } - } - //TODO do additional properties for classification subtypes. - if (term.isSpineObject()) { - inlinedClassifications.add(new SpineObject()); - } - if ( term.isSpineAttribute()) { - inlinedClassifications.add(new SpineAttribute()); - } - if (term.isObjectIdentifier()) { - inlinedClassifications.add(new ObjectIdentifier()); - } - return inlinedClassifications; - } - @Override - public String getTypeName(){ - return GLOSSARY_TERM; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/package-info.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/package-info.java deleted file mode 100644 index ad6a9b0c699..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Subject Area Entity Mappers between OMAS Subject Area beans and EntityDetail OMRS representations. - */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities; diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/NodeTypeMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/NodeTypeMapper.java deleted file mode 100644 index 07fd5698cba..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/NodeTypeMapper.java +++ /dev/null @@ -1,70 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; - - -/** - * Static mapping methods to map between the node type and the Entity Type - */ -public class NodeTypeMapper { - - /** - * Map nodeType to entity type guid. - * - * The nodeType is the type of node that is exposed in the nodeType API. The subject Area OMAs needs to convert - * the node type into a guid of an entity type so it can be used to call omrs. - * - * The supplied NodeType is mapped to an EntityType name : - *
    - *
  • The NodeType name can match the EntityType name - e.g. Glossary
  • - *
  • The NodeType name may need to be renamed to the appropriate entity type e.g. Term
  • - *
  • The NodeType name may map to en entity type with a classification e.g. Taxonomy
  • - *
- * @param nodeType nodeType this is the type of node that is exposed in the nodetype API - * @return entity Type guid. - */ - static public String mapNodeTypeToEntityTypeGuid(NodeType nodeType) { - String entityTypeName = nodeType.name(); - if (nodeType.name().equals("Term") ||nodeType.name().equals("Activity")) { - entityTypeName = "GlossaryTerm"; - } else if (nodeType.name().equals("Category") || nodeType.name().equals("SubjectAreaDefinition")) { - entityTypeName = "GlossaryCategory"; - } else if (nodeType.name().equals("Taxonomy") || nodeType.name().equals("CanonicalGlossary") || nodeType.name().equals("TaxonomyAndCanonicalGlossary")) { - entityTypeName = "Glossary"; - } else if (nodeType.name().equals("GlossaryProject")) { - entityTypeName = "Project"; - } - return OpenMetadataTypesArchiveAccessor.getInstance().getEntityDefByName(entityTypeName).getGUID(); - } - /** - * Map NodeType name to entity type name. - * - * The nodeType name is the name of the type of node that is exposed in the nodeType API. The subject Area OMAS needs to convert - * the node type nameinto a name of an entity type so it can be used to call omrs. - * - * The supplied NodeType nameis mapped to an EntityType name : - *
    - *
  • The NodeType name can match the EntityType name - e.g. Glossary
  • - *
  • The NodeType name may need to be renamed to the appropriate entity type e.g. Term
  • - *
  • The NodeType name may map to en entity type with a classification e.g. Taxonomy
  • - *
- * @param nodeTypeName nodeType name this is the type of node that is exposed in the nodetype API - * @return entity Type name. - */ - static public String mapNodeTypeNameToEntityTypeName(String nodeTypeName) { - String entityTypeName = nodeTypeName; - if ( nodeTypeName.equals("Term") || nodeTypeName.equals("Activity")) { - entityTypeName = "GlossaryTerm"; - } else if ( nodeTypeName.equals("Category") || nodeTypeName.equals("SubjectAreaDefinition")) { - entityTypeName = "GlossaryCategory"; - } else if ( nodeTypeName.equals("Taxonomy") || nodeTypeName.equals("CanonicalGlossary") || nodeTypeName.equals("TaxonomyAndCanonicalGlossary")) { - entityTypeName = "Glossary"; - } else if ( nodeTypeName.equals("GlossaryProject")) { - entityTypeName = "Project"; - } - return entityTypeName; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/RelationshipTypeMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/RelationshipTypeMapper.java deleted file mode 100644 index 00d22c9c58d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/RelationshipTypeMapper.java +++ /dev/null @@ -1,86 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * Static mapping methods to map between the omas relationship Type and omrs relationship type. - */ -public class RelationshipTypeMapper { - private static final Logger log = LoggerFactory.getLogger( RelationshipTypeMapper.class); - private static final String className = RelationshipTypeMapper.class.getName(); - - /** - * Map omas RelationshipType to omrs relationship type guid. - * - * The omasRelationshipType is the type of node that is exposed in the omasRelationshipType API. The subject Area OMAS needs to convert - * the OMAS RelationshipType into a guid of an relationship type so it can be used to call omrs. - * @param operation operation being attempted - * @param omasRelationshipType omasRelationshipType this is the type of relationship that is exposed in the RelationshipType as part of the OMAS API. - * - * @return relationship Type guid. - * @throws InvalidParameterException Invalid parameter error found - */ - static public String mapOMASRelationshipTypeToOMRSRelationshipTypeGuid(String operation, RelationshipType omasRelationshipType) throws InvalidParameterException { - String guid = null; - if (omasRelationshipType == null) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.INVALID_RELATIONSHIPTYPES_FOR_GRAPH.getMessageDefinition(); - - String invalidPropertyName = "relationshipFilter"; - messageDefinition.setMessageParameters(invalidPropertyName, null); - throw new InvalidParameterException(messageDefinition, - className, - operation, - invalidPropertyName, - null); - } else if (omasRelationshipType == null) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.UNKNOWN_RELATIONSHIPTYPE_REQUESTED_FOR_GRAPH.getMessageDefinition(); - - String invalidPropertyName = "relationshipFilter"; - messageDefinition.setMessageParameters(invalidPropertyName, RelationshipType.Unknown.name()); - throw new InvalidParameterException(messageDefinition, - className, - operation, - invalidPropertyName, - RelationshipType.Unknown.name()); - } else { - String relationshipTypeName = omasRelationshipType.name(); - if (omasRelationshipType.equals(RelationshipType.HasA)) { - relationshipTypeName = "TermHASARelationship"; - } else if (omasRelationshipType.equals(RelationshipType.IsA)) { - relationshipTypeName = "ISARelationship"; - } else if (omasRelationshipType.equals(RelationshipType.IsATypeOfDeprecated)) { - relationshipTypeName = "TermISATypeOFRelationship"; - } else if (omasRelationshipType.equals(RelationshipType.IsATypeOf)) { - relationshipTypeName = "IsATypeOfRelationship"; - } else if (omasRelationshipType.equals(RelationshipType.TypedBy)) { - relationshipTypeName = "TermTYPEDBYRelationship"; - } - - RelationshipDef relationshipDef = OpenMetadataTypesArchiveAccessor.getInstance().getRelationshipDefByName(relationshipTypeName); - if (relationshipDef == null) { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.INVALID_RELATIONSHIPTYPES_FOR_GRAPH.getMessageDefinition(); - - String invalidPropertyName = "relationshipFilter"; - messageDefinition.setMessageParameters(invalidPropertyName, relationshipTypeName); - throw new InvalidParameterException(messageDefinition, - className, - operation, - invalidPropertyName, - relationshipTypeName); - } else { - guid = relationshipDef.getGUID(); - } - } - return guid; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/package-info.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/package-info.java deleted file mode 100644 index 2962fa121c1..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Subject Area Graph Mappers between OMAS Subject Area beans and OMRS representations. - */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph; diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/package-info.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/package-info.java deleted file mode 100644 index aa52e2a2bac..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Subject Area Entity Mappers between OMAS Subject Area beans and OMRS representations. - */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers; diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/AntonymMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/AntonymMapper.java deleted file mode 100644 index 5bcf9de5485..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/AntonymMapper.java +++ /dev/null @@ -1,105 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Antonym; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the antonym and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class AntonymMapper extends RelationshipMapper { - public static final String ANTONYM = "Antonym"; - - public AntonymMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param antonym supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(Antonym antonym, InstanceProperties instanceProperties) { - if (antonym.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, antonym.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (antonym.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, antonym.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (antonym.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, antonym.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (antonym.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, antonym.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (antonym.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, antonym.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the antonym object. - * - * @param antonym the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(Antonym antonym, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals("description")) { - antonym.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - antonym.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - antonym.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - antonym.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(Antonym antonym, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - antonym.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return ANTONYM; - } - - @Override - protected Antonym getRelationshipInstance() { - return new Antonym(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/CategoryAnchorMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/CategoryAnchorMapper.java deleted file mode 100644 index 533ce8804c0..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/CategoryAnchorMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.CategoryAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; - - -/** - * Mapping methods to map between the categoryAnchor and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class CategoryAnchorMapper extends RelationshipMapper { - public static final String CATEGORY_ANCHOR = "CategoryAnchor"; - - public CategoryAnchorMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - @Override - public String getTypeName() { - return CATEGORY_ANCHOR; - } - - @Override - protected CategoryAnchor getRelationshipInstance() { - return new CategoryAnchor(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/CategoryHierarchyLinkMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/CategoryHierarchyLinkMapper.java deleted file mode 100644 index 028b4e53e9a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/CategoryHierarchyLinkMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.CategoryHierarchyLink; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; - -/** - * Mapping methods to map between the categoryHierarchyLink and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class CategoryHierarchyLinkMapper extends RelationshipMapper { - public static final String CATEGORY_HIERARCHY_LINK = "CategoryHierarchyLink"; - - public CategoryHierarchyLinkMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Get the TypeDefName associated with this Relationship - * - * @return name of the type def - */ - @Override - public String getTypeName() { - return CATEGORY_HIERARCHY_LINK; - } - - @Override - protected CategoryHierarchyLink getRelationshipInstance() { - return new CategoryHierarchyLink(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/IsARelationshipMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/IsARelationshipMapper.java deleted file mode 100644 index 0ec87af3a73..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/IsARelationshipMapper.java +++ /dev/null @@ -1,105 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.IsA; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the iSARelationship and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class IsARelationshipMapper extends RelationshipMapper { - public static final String ISA_RELATIONSHIP = "ISARelationship"; - - public IsARelationshipMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param iSARelationship supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(IsA iSARelationship, InstanceProperties instanceProperties) { - if (iSARelationship.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, iSARelationship.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (iSARelationship.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, iSARelationship.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (iSARelationship.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, iSARelationship.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (iSARelationship.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, iSARelationship.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (iSARelationship.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, iSARelationship.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the iSARelationship object. - * - * @param iSARelationship the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(IsA iSARelationship, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - iSARelationship.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - iSARelationship.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - iSARelationship.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - iSARelationship.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(IsA iSARelationship, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - iSARelationship.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return ISA_RELATIONSHIP; - } - - @Override - protected IsA getRelationshipInstance() { - return new IsA(); - } - - } diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/IsATypeOfMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/IsATypeOfMapper.java deleted file mode 100644 index 1c84b9de3dd..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/IsATypeOfMapper.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.IsATypeOf; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the isATypeOf and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class IsATypeOfMapper extends RelationshipMapper { - private static final String IS_A_TYPE_OF_RELATIONSHIP = "IsATypeOfRelationship"; - - public IsATypeOfMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param isATypeOf supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(IsATypeOf isATypeOf, InstanceProperties instanceProperties) { - if (isATypeOf.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, isATypeOf.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (isATypeOf.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, isATypeOf.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (isATypeOf.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, isATypeOf.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (isATypeOf.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, isATypeOf.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the IsATypeOf object. - * - * @param isATypeOf the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(IsATypeOf isATypeOf, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - isATypeOf.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - isATypeOf.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - isATypeOf.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(IsATypeOf isATypeOf, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - isATypeOf.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return IS_A_TYPE_OF_RELATIONSHIP; - } - - @Override - protected IsATypeOf getRelationshipInstance() { - return new IsATypeOf(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/PreferredTermMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/PreferredTermMapper.java deleted file mode 100644 index 655a78b2478..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/PreferredTermMapper.java +++ /dev/null @@ -1,105 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.PreferredTerm; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the preferredTerm and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class PreferredTermMapper extends RelationshipMapper { - public static final String PREFERRED_TERM = "PreferredTerm"; - - public PreferredTermMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param preferredTerm supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(PreferredTerm preferredTerm, InstanceProperties instanceProperties) { - if (preferredTerm.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, preferredTerm.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (preferredTerm.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, preferredTerm.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (preferredTerm.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, preferredTerm.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (preferredTerm.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, preferredTerm.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (preferredTerm.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, preferredTerm.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the preferredTerm object. - * - * @param preferredTerm the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(PreferredTerm preferredTerm, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - preferredTerm.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - preferredTerm.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - preferredTerm.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - preferredTerm.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(PreferredTerm preferredTerm, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - preferredTerm.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return PREFERRED_TERM; - } - - @Override - protected PreferredTerm getRelationshipInstance() { - return new PreferredTerm(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ProjectScopeMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ProjectScopeMapper.java deleted file mode 100644 index dae495a5007..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ProjectScopeMapper.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.ProjectScope; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the ProjectScope and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class ProjectScopeMapper extends RelationshipMapper { - public static final String PROJECT_SCOPE = "ProjectScope"; - - public ProjectScopeMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - @Override - public String getTypeName() { - return PROJECT_SCOPE; - } - - @Override - public ProjectScope getRelationshipInstance() { - return new ProjectScope(); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param projectScope supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - public void mapRelationshipToInstanceProperties(ProjectScope projectScope, InstanceProperties instanceProperties) { - if (projectScope.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, projectScope.getDescription(), "description"); - } - } - - /** - * Map a primitive omrs property to the antonym object. - * - * @param projectScope the ProjectScope to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(ProjectScope projectScope, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - projectScope.setDescription(stringValue); - foundProperty = true; - } - - return foundProperty; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/RelatedTermMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/RelatedTermMapper.java deleted file mode 100644 index 7fb15882a31..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/RelatedTermMapper.java +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.RelatedTerm; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the relatedTerm and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class RelatedTermMapper extends RelationshipMapper { - public static final String RELATED_TERM = "RelatedTerm"; - - public RelatedTermMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param relatedTerm supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(RelatedTerm relatedTerm, InstanceProperties instanceProperties) { - if (relatedTerm.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, relatedTerm.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (relatedTerm.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, relatedTerm.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (relatedTerm.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, relatedTerm.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (relatedTerm.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, relatedTerm.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (relatedTerm.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, relatedTerm.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the relatedTerm object. - * - * @param relatedTerm the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(RelatedTerm relatedTerm, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - relatedTerm.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - relatedTerm.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - relatedTerm.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - relatedTerm.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(RelatedTerm relatedTerm, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - relatedTerm.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return RELATED_TERM; - } - - @Override - protected RelatedTerm getRelationshipInstance() { - return new RelatedTerm(); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/RelationshipMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/RelationshipMapper.java deleted file mode 100644 index 2b2e82030d6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/RelationshipMapper.java +++ /dev/null @@ -1,300 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipEnd; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.IRelationshipMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph.NodeTypeMapper; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - - -/** - * Static mapping methods to map between the relationship and the equivalent generated OMRSRelationshipBean - */ -public abstract class RelationshipMapper implements IRelationshipMapper { - protected final OpenMetadataAPIGenericHandler genericHandler; - protected final OMRSRepositoryHelper repositoryHelper; - - public RelationshipMapper(OpenMetadataAPIGenericHandler genericHandler) { - this.genericHandler = genericHandler; - this.repositoryHelper = genericHandler.getRepositoryHelper(); - } - - public R map(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship omrsRelationship) { - R omasRelationship = getRelationshipInstance(); - omasRelationship.setSystemAttributes(SubjectAreaUtils.createSystemAttributes(omrsRelationship)); - EntityProxy proxy1 = omrsRelationship.getEntityOneProxy(); - if (proxy1 != null) { - RelationshipEnd end1 = omasRelationship.getEnd1(); - String guid1 = proxy1.getGUID(); - if (guid1 != null) { - end1.setNodeGuid(guid1); - } - if (proxy1.getUniqueProperties() != null) { - Map map = proxy1.getUniqueProperties().getInstanceProperties(); - PrimitivePropertyValue qualifiedNamePropertyValue = (PrimitivePropertyValue) map.get("qualifiedName"); - if (qualifiedNamePropertyValue != null) { - end1.setNodeQualifiedName(qualifiedNamePropertyValue.getPrimitiveValue().toString()); - } - } - } - EntityProxy proxy2 = omrsRelationship.getEntityTwoProxy(); - if (proxy2 != null) { - RelationshipEnd end2 = omasRelationship.getEnd2(); - String guid2 = proxy2.getGUID(); - if (guid2 != null) { - end2.setNodeGuid(guid2); - } - if (proxy2.getUniqueProperties() != null) { - Map map = proxy2.getUniqueProperties().getInstanceProperties(); - PrimitivePropertyValue qualifiedNamePropertyValue = (PrimitivePropertyValue) map.get("qualifiedName"); - if (qualifiedNamePropertyValue != null) { - end2.setNodeQualifiedName(qualifiedNamePropertyValue.getPrimitiveValue().toString()); - } - } - } - // set readonly - if (omrsRelationship.getInstanceProvenanceType() != InstanceProvenanceType.LOCAL_COHORT) { - omasRelationship.setReadOnly(true); - } - - // Set properties - InstanceProperties relationshipProperties = omrsRelationship.getProperties(); - if (relationshipProperties != null) { - mapRelationshipEffectivityToInstanceProperties(omasRelationship, relationshipProperties); - Iterator omrsPropertyIterator = relationshipProperties.getPropertyNames(); - while (omrsPropertyIterator.hasNext()) { - String propertyName = omrsPropertyIterator.next(); - // this is a property we expect - InstancePropertyValue value = relationshipProperties.getPropertyValue(propertyName); - - // supplied guid matches the expected type - - Object actualValue; - switch (value.getInstancePropertyCategory()) { - case PRIMITIVE: - PrimitivePropertyValue primitivePropertyValue = (PrimitivePropertyValue) value; - actualValue = primitivePropertyValue.getPrimitiveValue(); - - if (!mapPrimitiveToRelationship(omasRelationship, propertyName, actualValue)) { - // there are properties we are not aware of, as they have been added by a subtype, put them in the additionalProperties - if (null == omasRelationship.getAdditionalProperties()) { - omasRelationship.setAdditionalProperties(new HashMap()); - } - omasRelationship.getAdditionalProperties().put(propertyName, actualValue.toString()); - } - break; - case ENUM: - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) value; - if (!mapEnumToRelationship(omasRelationship, propertyName, enumPropertyValue)) { - if (null == omasRelationship.getAdditionalProperties()) { - omasRelationship.setAdditionalProperties(new HashMap()); - } - omasRelationship.getAdditionalProperties().put(propertyName, enumPropertyValue.valueAsString()); - } - - break; - case MAP: - MapPropertyValue mapPropertyValue = (MapPropertyValue) value; - InstanceProperties instancePropertyForMap = mapPropertyValue.getMapValues(); - if (!mapMapToRelationship(omasRelationship, propertyName, instancePropertyForMap)) { - if (null == omasRelationship.getAdditionalProperties()) { - omasRelationship.setAdditionalProperties(new HashMap()); - } - omasRelationship.getAdditionalProperties().put(propertyName, mapPropertyValue.valueAsString()); - } - break; - case ARRAY: - case STRUCT: - case UNKNOWN: - // error - break; - } - - } // end while - } - return omasRelationship; - } - - /** - * Map the instance properties to the relationship - * This method should be overridden by subclasses to map the properties to the relationship. - * - * @param relationship relationship to be updated - * @param instanceProperties properties to use for the update - */ - protected void mapInstancePropertiesToRelationship(R relationship, InstanceProperties instanceProperties) { - } - - /** - * map the effectivity dates from the relationship to the InstanceProperties - * - * @param relationship relationship - * @param instanceProperties instance properties to update - */ - private void mapRelationshipEffectivityToInstanceProperties(R relationship, InstanceProperties instanceProperties) { - Long fromTime = relationship.getEffectiveFromTime(); - Long toTime = relationship.getEffectiveToTime(); - if (fromTime != null) { - instanceProperties.setEffectiveFromTime(new Date(fromTime)); - } - if (toTime != null) { - instanceProperties.setEffectiveToTime(new Date(toTime)); - } - } - - /** - * Map omasRelationship to the omrs relationship equivalent - * - * @param omasRelationship supplied omasRelationship - * @return omrs relationship equivalent - */ - public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship map(R omasRelationship) throws InvalidParameterException { - - - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship omrsRelationship = new org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship(); - InstanceProperties instanceProperties = new InstanceProperties(); - omrsRelationship.setProperties(instanceProperties); - mapRelationshipToInstanceProperties(omasRelationship, instanceProperties); - String proxy1Guid = omasRelationship.getEnd1().getNodeGuid(); - String proxy1NodeTypeName = omasRelationship.getEnd1().getNodeTypeName(); - String proxy1TypeName = NodeTypeMapper.mapNodeTypeNameToEntityTypeName(proxy1NodeTypeName); - InstanceType typeEnd1 = new InstanceType(); - typeEnd1.setTypeDefName(proxy1TypeName); - String proxy1TypeGuid = new InvalidParameterHandler().validateTypeName(proxy1TypeName, - proxy1TypeName, - genericHandler.getServiceName(), - "map end1 " +omasRelationship.getRelationshipType(), - genericHandler.getRepositoryHelper()); - typeEnd1.setTypeDefGUID(proxy1TypeGuid); - - String proxy2Guid = omasRelationship.getEnd2().getNodeGuid(); - String proxy2NodeTypeName = omasRelationship.getEnd2().getNodeTypeName(); - String proxy2TypeName = NodeTypeMapper.mapNodeTypeNameToEntityTypeName(proxy2NodeTypeName); - String proxy2TypeGuid = new InvalidParameterHandler().validateTypeName(proxy2TypeName, - proxy2TypeName, - genericHandler.getServiceName(), - "map end2 " +omasRelationship.getRelationshipType(), - genericHandler.getRepositoryHelper()); - - InstanceType typeEnd2 = new InstanceType(); - typeEnd2.setTypeDefName(proxy2TypeName); - typeEnd2.setTypeDefGUID(proxy2TypeGuid); - - EntityProxy proxy1 = new EntityProxy(); - proxy1.setGUID(proxy1Guid); - - omrsRelationship.setEntityOneProxy(proxy1); - EntityProxy proxy2 = new EntityProxy(); - proxy2.setGUID(proxy2Guid); - omrsRelationship.setEntityTwoProxy(proxy2); - String typeName = getTypeName(); - TypeDef typedef = repositoryHelper.getTypeDefByName(genericHandler.getServiceName(), typeName); - InstanceType type = new InstanceType(); - type.setTypeDefName(typedef.getName()); - type.setTypeDefGUID(typedef.getGUID()); - omrsRelationship.setType(type); - - if (omasRelationship.getSystemAttributes() != null) { - SubjectAreaUtils.populateSystemAttributesForInstanceAuditHeader(omasRelationship.getSystemAttributes(), omrsRelationship); - omrsRelationship.setGUID(omasRelationship.getSystemAttributes().getGUID()); - } - return omrsRelationship; - } - - /** - * get type name - * - * @return the omrs type name. - */ - public abstract String getTypeName(); - - abstract R getRelationshipInstance(); - - /** - * get the relationshipTypeDef Guid - * This method should be overridden to provide the appropriate guid for the type. - * - * @return the guid of the relationship typedef - */ - @Override - public String getTypeDefGuid() { - String guid = null; - TypeDef typeDef = repositoryHelper.getTypeDefByName(genericHandler.getServiceName(), - getTypeName()); - if (typeDef != null) { - guid = typeDef.getGUID(); - } - return guid; - } - - /** - * Map an omrs primitive property to a Subject Area relationship property. - * The child class is expected to override this method if the type has primitive properties - * - * @param relationship the relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if it was a property we were expecting , otherwise false; - */ - protected boolean mapPrimitiveToRelationship(R relationship, String propertyName, Object value) { - return false; - } - - - /** - * Map an omrs enum property to a Subject Area relationship property. - * The child class is expected to override this method if the type has enum properties - * - * @param relationship the relationship to be updated - * @param propertyName the omrs property name - * @param enumPropertyValue the omrs enum property value - * @return true if it was a property we were expecting , otherwise false; - */ - protected boolean mapEnumToRelationship(R relationship, String propertyName, EnumPropertyValue enumPropertyValue) { - return false; - } - - /** - * Map an omrs map property to a Subject Area relationship property. - * The child class is expected to override this method if the type has map properties - * - * @param omasRelationship the relationship to be updated - * @param propertyName the omrs property name - * @param instancePropertyForMap the omrs map property value - * @return true if it was a property we were expecting , otherwise false; - */ - protected boolean mapMapToRelationship(R omasRelationship, String propertyName, InstanceProperties instancePropertyForMap) { - return false; - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * This method should be overridden to populate the instance properties - * - * @param omasRelationship supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - protected void mapRelationshipToInstanceProperties(R omasRelationship, InstanceProperties instanceProperties) { - - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ReplacementTermMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ReplacementTermMapper.java deleted file mode 100644 index f686dbc8b4a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ReplacementTermMapper.java +++ /dev/null @@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.ReplacementTerm; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the replacementTerm and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class ReplacementTermMapper extends RelationshipMapper { - public static final String REPLACEMENT_TERM = "ReplacementTerm"; - - public ReplacementTermMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param replacementTerm supplied relationship - * @param properties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(ReplacementTerm replacementTerm, InstanceProperties properties) { - if (replacementTerm.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, replacementTerm.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (replacementTerm.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, replacementTerm.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (replacementTerm.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, replacementTerm.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (replacementTerm.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, replacementTerm.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (replacementTerm.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(properties, replacementTerm.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the replacementTerm object. - * - * @param replacementTerm the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(ReplacementTerm replacementTerm, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - replacementTerm.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - replacementTerm.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - replacementTerm.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - replacementTerm.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(ReplacementTerm replacementTerm, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - replacementTerm.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return REPLACEMENT_TERM; - } - - @Override - protected ReplacementTerm getRelationshipInstance() { - return new ReplacementTerm(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/SemanticAssignmentMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/SemanticAssignmentMapper.java deleted file mode 100644 index ccc1747c9e8..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/SemanticAssignmentMapper.java +++ /dev/null @@ -1,119 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermAssignmentStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.SemanticAssignment; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; - -import java.util.Map; - - -/** - * Mapping methods to map between the semanticAssignment and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class SemanticAssignmentMapper extends RelationshipMapper { - public static final String SEMANTIC_ASSIGNMENT = "SemanticAssignment"; - - public SemanticAssignmentMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param semanticAssignment supplied relationship - * @param properties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(SemanticAssignment semanticAssignment, InstanceProperties properties) { - if (semanticAssignment.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, semanticAssignment.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (semanticAssignment.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, semanticAssignment.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (semanticAssignment.getConfidence() != null) { - SubjectAreaUtils.setIntegerPropertyInInstanceProperties(properties, semanticAssignment.getConfidence(), OpenMetadataProperty.CONFIDENCE.name); - } - if (semanticAssignment.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, semanticAssignment.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (semanticAssignment.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(properties, semanticAssignment.getSource(), OpenMetadataProperty.SOURCE.name); - } - - Map instancePropertyMap = properties.getInstanceProperties(); - InstancePropertyValue instancePropertyValue = instancePropertyMap.get(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - if (instancePropertyValue != null) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - TermAssignmentStatus status = TermAssignmentStatus.valueOf(enumPropertyValue.getSymbolicName()); - semanticAssignment.setStatus(status); - } - } - - /** - * Map a primitive omrs property to the semanticAssignment object. - * - * @param semanticAssignment the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(SemanticAssignment semanticAssignment, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - semanticAssignment.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - semanticAssignment.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.CONFIDENCE.name)) { - semanticAssignment.setConfidence((Integer) value); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - semanticAssignment.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - semanticAssignment.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(SemanticAssignment semanticAssignment, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermAssignmentStatus status = TermAssignmentStatus.valueOf(enumPropertyValue.getSymbolicName()); - semanticAssignment.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return SEMANTIC_ASSIGNMENT; - } - - @Override - protected SemanticAssignment getRelationshipInstance() { - return new SemanticAssignment(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/SynonymMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/SynonymMapper.java deleted file mode 100644 index 69be3fd4707..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/SynonymMapper.java +++ /dev/null @@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Synonym; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the synonym and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class SynonymMapper extends RelationshipMapper { - public static final String SYNONYM = "Synonym"; - - public SynonymMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param synonym supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(Synonym synonym, InstanceProperties instanceProperties) { - if (synonym.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, synonym.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (synonym.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, synonym.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (synonym.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, synonym.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (synonym.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, synonym.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (synonym.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, synonym.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the synonym object. - * - * @param synonym the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(Synonym synonym, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - synonym.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - synonym.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - synonym.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - synonym.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(Synonym synonym, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - synonym.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return SYNONYM; - } - - @Override - protected Synonym getRelationshipInstance() { - return new Synonym(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermAnchorMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermAnchorMapper.java deleted file mode 100644 index 9a0f03932fe..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermAnchorMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.TermAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; - - -/** - * Mapping methods to map between the termAnchor and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class TermAnchorMapper extends RelationshipMapper { - public static final String TERM_ANCHOR = "TermAnchor"; - - public TermAnchorMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - @Override - public String getTypeName() { - return TERM_ANCHOR; - } - - @Override - protected TermAnchor getRelationshipInstance() { - return new TermAnchor(); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermCategorizationMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermCategorizationMapper.java deleted file mode 100644 index dbc69a7721f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermCategorizationMapper.java +++ /dev/null @@ -1,83 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Categorization; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the termCategorization and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class TermCategorizationMapper extends RelationshipMapper { - public static final String TERM_CATEGORIZATION = "TermCategorization"; - - public TermCategorizationMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param termCategorization supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(Categorization termCategorization, InstanceProperties instanceProperties) { - if (termCategorization.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, termCategorization.getDescription(), "description"); - } - if (termCategorization.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, termCategorization.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the termCategorization object. - * - * @param termCategorization the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(Categorization termCategorization, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - termCategorization.setDescription(stringValue); - foundProperty = true; - } - - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(Categorization termCategorization, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - termCategorization.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return TERM_CATEGORIZATION; - } - - @Override - protected Categorization getRelationshipInstance() { - return new Categorization(); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermHasARelationshipMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermHasARelationshipMapper.java deleted file mode 100644 index 9b16b36e899..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermHasARelationshipMapper.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.HasA; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the termHASARelationship and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class TermHasARelationshipMapper extends RelationshipMapper { - public static final String TERM_HASA_RELATIONSHIP = "TermHASARelationship"; - - public TermHasARelationshipMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied omas relationship to omrs InstanceProperties. - * - * @param termHasARelationship supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(HasA termHasARelationship, InstanceProperties instanceProperties) { - if (termHasARelationship.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, termHasARelationship.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (termHasARelationship.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, termHasARelationship.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (termHasARelationship.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, termHasARelationship.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (termHasARelationship.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, termHasARelationship.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the termHASARelationship object. - * - * @param termHasARelationship the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(HasA termHasARelationship, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - termHasARelationship.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - termHasARelationship.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - termHasARelationship.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(HasA termHasARelationship, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - termHasARelationship.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return TERM_HASA_RELATIONSHIP; - } - - @Override - protected HasA getRelationshipInstance() { - return new HasA(); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermIsATypeOfRelationshipDeprecatedMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermIsATypeOfRelationshipDeprecatedMapper.java deleted file mode 100644 index 7b5d9085555..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermIsATypeOfRelationshipDeprecatedMapper.java +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.IsATypeOfDeprecated; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the termISATypeOFRelationship and the equivalent omrs Relationship. - * - * @deprecated use IsATypeOfRelationship not TermISATypeOFRelationship - */ -@Deprecated -@SubjectAreaMapper -public class TermIsATypeOfRelationshipDeprecatedMapper extends RelationshipMapper { - private static final String TERM_ISA_TYPE_OF_DEPRECATED_RELATIONSHIP = "TermISATypeOFRelationship"; - - public TermIsATypeOfRelationshipDeprecatedMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * @deprecated - * @param isATypeOfDeprecated supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Deprecated - @Override - protected void mapRelationshipToInstanceProperties(IsATypeOfDeprecated isATypeOfDeprecated, InstanceProperties instanceProperties) { - if (isATypeOfDeprecated.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, isATypeOfDeprecated.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (isATypeOfDeprecated.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, isATypeOfDeprecated.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (isATypeOfDeprecated.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, isATypeOfDeprecated.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (isATypeOfDeprecated.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, isATypeOfDeprecated.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the termISATypeOFRelationship object. - * - * @deprecated - * @param isATypeOfDeprecated the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Deprecated - @Override - protected boolean mapPrimitiveToRelationship(IsATypeOfDeprecated isATypeOfDeprecated, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - isATypeOfDeprecated.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - isATypeOfDeprecated.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - isATypeOfDeprecated.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - @Deprecated - @Override - protected boolean mapEnumToRelationship(IsATypeOfDeprecated termIsATypeOFRelationship, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - termIsATypeOFRelationship.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - @Deprecated - @Override - public String getTypeName() { - return TERM_ISA_TYPE_OF_DEPRECATED_RELATIONSHIP; - } - @Deprecated - @Override - protected IsATypeOfDeprecated getRelationshipInstance() { - return new IsATypeOfDeprecated(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermTypedByRelationshipMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermTypedByRelationshipMapper.java deleted file mode 100644 index 44cf3843f97..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TermTypedByRelationshipMapper.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.TypedBy; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the termTYPEDBYRelationship and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class TermTypedByRelationshipMapper extends RelationshipMapper { - public static final String TERM_TYPED_BY_RELATIONSHIP = "TermTYPEDBYRelationship"; - - public TermTypedByRelationshipMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param termTYPEDBYRelationship supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(TypedBy termTYPEDBYRelationship, InstanceProperties instanceProperties) { - if (termTYPEDBYRelationship.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, termTYPEDBYRelationship.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (termTYPEDBYRelationship.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, termTYPEDBYRelationship.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (termTYPEDBYRelationship.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, termTYPEDBYRelationship.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (termTYPEDBYRelationship.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, termTYPEDBYRelationship.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the termTYPEDBYRelationship object. - * - * @param termTYPEDBYRelationship the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(TypedBy termTYPEDBYRelationship, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - termTYPEDBYRelationship.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - termTYPEDBYRelationship.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - termTYPEDBYRelationship.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(TypedBy termTYPEDBYRelationship, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - termTYPEDBYRelationship.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return TERM_TYPED_BY_RELATIONSHIP; - } - - @Override - protected TypedBy getRelationshipInstance() { - return new TypedBy(); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TranslationMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TranslationMapper.java deleted file mode 100644 index 534ea7cbf1d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TranslationMapper.java +++ /dev/null @@ -1,91 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Translation; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the translation and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class TranslationMapper extends RelationshipMapper { - public static final String TRANSLATION = "Translation"; - - public TranslationMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param translation supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(Translation translation, InstanceProperties instanceProperties) { - if (translation.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, translation.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (translation.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, translation.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (translation.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, translation.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (translation.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, translation.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (translation.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, translation.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the translation object. - * - * @param translation the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(Translation translation, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - translation.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - translation.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - translation.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - translation.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return TRANSLATION; - } - - @Override - protected Translation getRelationshipInstance() { - return new Translation(); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/UsedInContextMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/UsedInContextMapper.java deleted file mode 100644 index 43a5513f16d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/UsedInContextMapper.java +++ /dev/null @@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.UsedInContext; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the usedInContext and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class UsedInContextMapper extends RelationshipMapper { - public static final String USED_IN_CONTEXT = "UsedInContext"; - - public UsedInContextMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param usedInContext supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(UsedInContext usedInContext, InstanceProperties instanceProperties) { - if (usedInContext.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, usedInContext.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (usedInContext.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, usedInContext.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (usedInContext.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, usedInContext.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (usedInContext.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, usedInContext.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (usedInContext.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, usedInContext.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the usedInContext object. - * - * @param usedInContext the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(UsedInContext usedInContext, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - usedInContext.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - usedInContext.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - usedInContext.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - usedInContext.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(UsedInContext usedInContext, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - usedInContext.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return USED_IN_CONTEXT; - } - - @Override - protected UsedInContext getRelationshipInstance() { - return new UsedInContext(); - } - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ValidValueMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ValidValueMapper.java deleted file mode 100644 index 89d79f86a42..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/ValidValueMapper.java +++ /dev/null @@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.ValidValue; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.SubjectAreaMapper; -import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -/** - * Mapping methods to map between the validValue and the equivalent omrs Relationship. - */ -@SubjectAreaMapper -public class ValidValueMapper extends RelationshipMapper { - public static final String VALID_VALUE = "ValidValue"; - - public ValidValueMapper(OpenMetadataAPIGenericHandler genericHandler){ - super(genericHandler); - } - - /** - * Map the supplied relationship to omrs InstanceProperties. - * - * @param validValue supplied relationship - * @param instanceProperties equivalent instance properties to the relationship - */ - @Override - protected void mapRelationshipToInstanceProperties(ValidValue validValue, InstanceProperties instanceProperties) { - if (validValue.getDescription() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, validValue.getDescription(), OpenMetadataProperty.DESCRIPTION.name); - } - if (validValue.getExpression() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, validValue.getExpression(), OpenMetadataProperty.EXPRESSION.name); - } - if (validValue.getSteward() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, validValue.getSteward(), OpenMetadataProperty.STEWARD.name); - } - if (validValue.getSource() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, validValue.getSource(), OpenMetadataProperty.SOURCE.name); - } - if (validValue.getStatus() != null) { - SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, validValue.getStatus(), OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name); - } - } - - /** - * Map a primitive omrs property to the validValue object. - * - * @param validValue the omas relationship to be updated - * @param propertyName the omrs property name - * @param value the omrs primitive property value - * @return true if the propertyName was recognised and mapped to the relationship, otherwise false - */ - @Override - protected boolean mapPrimitiveToRelationship(ValidValue validValue, String propertyName, Object value) { - String stringValue = (String) value; - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.DESCRIPTION.name)) { - validValue.setDescription(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.EXPRESSION.name)) { - validValue.setExpression(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.STEWARD.name)) { - validValue.setSteward(stringValue); - foundProperty = true; - } - if (propertyName.equals(OpenMetadataProperty.SOURCE.name)) { - validValue.setSource(stringValue); - foundProperty = true; - } - return foundProperty; - } - - @Override - protected boolean mapEnumToRelationship(ValidValue validValue, String propertyName, EnumPropertyValue enumPropertyValue) { - boolean foundProperty = false; - if (propertyName.equals(OpenMetadataProperty.TERM_RELATIONSHIP_STATUS.name)) { - TermRelationshipStatus status = TermRelationshipStatus.valueOf(enumPropertyValue.getSymbolicName()); - validValue.setStatus(status); - foundProperty = true; - } - return foundProperty; - } - - @Override - public String getTypeName() { - return VALID_VALUE; - } - - @Override - protected ValidValue getRelationshipInstance() { - return new ValidValue(); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/package-info.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/package-info.java deleted file mode 100644 index 903b6a2d34e..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Subject Area Mappers between OMAS Subject Area beans and OMRS relationship representations. - */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaCategoryRESTServices.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaCategoryRESTServices.java deleted file mode 100644 index 92e54418bf0..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaCategoryRESTServices.java +++ /dev/null @@ -1,408 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaCategoryHandler; -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaTermHandler; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.LoggerFactory; - -import java.util.Date; - - -/** - * The SubjectAreaRESTServicesInstance provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides glossary authoring interfaces for subject area experts. - */ - -public class SubjectAreaCategoryRESTServices extends SubjectAreaRESTServicesInstance { - private static final String className = SubjectAreaTermHandler.class.getName(); - private static final SubjectAreaInstanceHandler instanceHandler = new SubjectAreaInstanceHandler(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SubjectAreaCategoryRESTServices.class), - instanceHandler.getServiceName()); - - /** - * Default constructor - */ - public SubjectAreaCategoryRESTServices() { - //SubjectAreaRESTServicesInstance registers this omas. - } - - /** - * Create a Category. There is specialization of a Category that can also be created using this operation. - * To create this specialization, you should specify a nodeType other than Category in the supplied category. - *

- * Valid nodeTypes for this request are: - *

    - *
  • SubjectAreaDefinition to create a Category that represents a subject area
  • - *
  • Category to create a category that is not a subject area
  • - *
- * - * The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is - * unique. If this qualifiedName is not specified then one will be generated as GlossaryCategory concatenated with the guid. - * - *

- * Failure to create the Categories classifications, link to its glossary or its icon, results in the create failing and the category being deleted - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedCategory category to create - * @return response, when successful contains the created category. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse createCategory(String serverName, String userId, Category suppliedCategory) { - final String methodName = "createCategory"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler categoryHandler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - response = categoryHandler.createCategory(userId, instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, methodName), suppliedCategory); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get a Category - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get. This could be a guid for a SubjectAreaDefintion, which is type of category - * @return response which when successful contains the category with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategory(String serverName, String userId, String guid) { - final String methodName = "getCategoryByGuid"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - response = handler.getCategoryByGuid(userId, guid); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Category - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Category property values (this does not include the CategorySummary content). When not specified, all terms are returned. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of Glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
- */ - public SubjectAreaOMASAPIResponse findCategory(String serverName, - String userId, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - String sequencingOrder, - String sequencingProperty) { - - final String methodName = "findCategory"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty, handler.getMaxPageSize()); - response = handler.findCategory(userId, findRequest, exactValue, ignoreCase ); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Get Category relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return the relationships associated with the requested Category userId - * - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryRelationships(String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - ) { - - final String methodName = "getCategoryRelationships"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - response = handler.getCategoryRelationships(userId, guid, findRequest); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Update a Category - *

- * Status is not updated using this call. - * The category parent can be updated with this call. For isReplace a null category parent will remove the existing parent relationship. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the category to update - * @param suppliedCategory category to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateCategory(String serverName, String userId, String guid, Category suppliedCategory, boolean isReplace) { - final String methodName = "updateCategory"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - response = handler.updateCategory(userId, instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, methodName), guid, suppliedCategory, isReplace); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Category or SubjectAreaDefinition instance - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the category instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the category will not exist after the operation. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the category to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
  • EntityNotDeletedException a soft delete was issued but the category was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteCategory(String serverName, String userId, String guid) { - final String methodName = "deleteCategory"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - response = handler.deleteCategory(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Category or a SubjectAreaDefinition - * - * Restore allows the deleted Category to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to restore - * @return response which when successful contains the restored category - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreCategory(String serverName, String userId, String guid) { - final String methodName = "restoreCategory"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - response = handler.restoreCategory(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get the terms that are categorized by this Category - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression to match the categorized Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of terms is categorized by this Category - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- **/ - public SubjectAreaOMASAPIResponse getCategorizedTerms(String serverName, String userId, String guid,String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategorizedTerms"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - response = handler.getCategorizedTerms(userId, guid, searchCriteria, exactValue, ignoreCase, instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName), startingFrom , pageSize); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Get this Category's child Categories. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the parent category - * @param searchCriteria String expression matching child Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of child categories filtered by the search criteria if one is supplied. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- **/ - public SubjectAreaOMASAPIResponse getCategoryChildren(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategoryChildren"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaCategoryHandler handler = instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName); - response = handler.getCategoryChildren(userId, guid, searchCriteria, exactValue, ignoreCase, startingFrom, pageSize); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaConfigRESTServices.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaConfigRESTServices.java deleted file mode 100644 index 650a99bb63f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaConfigRESTServices.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaConfigHandler; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.slf4j.LoggerFactory; - -/** - * The SubjectAreaTermRESTServices provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS) for Terms. This interface provides term authoring interfaces for subject area experts. - */ - -public class SubjectAreaConfigRESTServices extends SubjectAreaRESTServicesInstance { - private static final SubjectAreaInstanceHandler instanceHandler = new SubjectAreaInstanceHandler(); - private static final String className = SubjectAreaConfigRESTServices.class.getName(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SubjectAreaConfigRESTServices.class), - instanceHandler.getServiceName()); - - /** - * Default constructor - */ - public SubjectAreaConfigRESTServices() { - //SubjectAreaRESTServicesInstance registers this omas. - } - - /** - * get the configuration - * @param serverName server name - * @param userId userid of the caller - * @return the configuration - */ - public SubjectAreaOMASAPIResponse getConfig(String serverName, String userId) { - final String methodName = "getConfig"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaConfigHandler handler = instanceHandler.getSubjectAreaConfigHandler(userId, serverName, methodName); - response = handler.getConfig(userId); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaGlossaryRESTServices.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaGlossaryRESTServices.java deleted file mode 100644 index 2a80cd42ea7..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaGlossaryRESTServices.java +++ /dev/null @@ -1,439 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaGlossaryHandler; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.LoggerFactory; - -import java.util.Date; - - -/** - * The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides glossary authoring interfaces for subject area experts. - */ - -public class SubjectAreaGlossaryRESTServices extends SubjectAreaRESTServicesInstance { - private static final SubjectAreaInstanceHandler instanceHandler = new SubjectAreaInstanceHandler(); - private static final String className = SubjectAreaGlossaryRESTServices.class.getName(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SubjectAreaGlossaryRESTServices.class), - instanceHandler.getServiceName()); - - /** - * Default constructor - */ - public SubjectAreaGlossaryRESTServices() { - } - - /** - * Create a Glossary. There are specializations of glossaries that can also be created using this operation. - * To create a specialization, you should specify a nodeType other than Glossary in the supplied glossary. - *

- * Glossaries with the same name can be confusing. Best practise is to createGlossaries that have unique names. - * This Create call does not police that glossary names are unique. So it is possible to create Glossaries with the same name as each other. - * - *

- * Valid nodeTypes for this request are: - *

    - *
  • Taxonomy to create a Taxonomy
  • - *
  • CanonicalGlossary to create a canonical glossary
  • - *
  • TaxonomyAndCanonicalGlossary to create a glossary that is both a taxonomy and a canonical glossary
  • - *
  • Glossary to create a glossary that is not a taxonomy or a canonical glossary
  • - *
- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedGlossary Glossary to create - * @return response, when successful contains the created glossary. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createGlossary(String serverName, String userId, Glossary suppliedGlossary) { - final String methodName = "createGlossary"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - response = handler.createGlossary(userId, suppliedGlossary); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get a glossary by guid. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to get - * @return response which when successful contains the glossary with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getGlossaryByGuid(String serverName, String userId, String guid) { - final String methodName = "getGlossaryByGuid"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - response = handler.getGlossaryByGuid(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Glossary - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Glossary property values. If not specified then all glossaries are returned. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of Glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findGlossary(String serverName, - String userId, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - String sequencingOrder, - String sequencingProperty) { - - final String methodName = "findGlossary"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty, handler.getMaxPageSize()); - response = handler.findGlossary(userId, findRequest, exactValue, ignoreCase); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get Glossary relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return the relationships associated with the requested Glossary guid - * - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getGlossaryRelationships(String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty) { - String methodName = "getGlossaryRelationships"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - response = handler.getGlossaryRelationships(userId, guid, findRequest); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Glossary - *

- * If the caller has chosen to incorporate the glossary name in their Glossary Terms or Categories qualified name, renaming the glossary will cause those - * qualified names to mismatch the Glossary name. - * If the caller has chosen to incorporate the glossary qualifiedName in their Glossary Terms or Categories qualified name, changing the qualified name of the glossary will cause those - * qualified names to mismatch the Glossary name. - * Status is not updated using this call. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to update - * @param suppliedGlossary glossary to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateGlossary(String serverName, String userId, String guid, Glossary suppliedGlossary, boolean isReplace) { - final String methodName = "updateGlossary"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - response = handler.updateGlossary(userId, guid, suppliedGlossary, isReplace); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Delete a Glossary instance - *

- * The deletion of a glossary is only allowed if there is no glossary content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the glossary instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the glossary will not exist after the operation. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
  • EntityNotDeletedException a soft delete was issued but the glossary was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteGlossary(String serverName, String userId, String guid) { - final String methodName = "deleteGlossary"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - response = handler.deleteGlossary(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Restore a Glossary - *

- * Restore allows the deleted Glossary to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to restore - * @return response which when successful contains the restored glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreGlossary(String serverName, String userId, String guid) { - final String methodName = "restoreGlossary"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - response = handler.restoreGlossary(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get terms that are owned by this glossary - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression matching child Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the terms returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @param pageSize the maximum number of elements that can be returned on this request. - * - * @return A list of terms owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - public SubjectAreaOMASAPIResponse getGlossaryTerms(String serverName, - String userId, - String guid, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - String sequencingOrder, - String sequencingProperty) { - final String methodName = "getGlossaryTerms"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty, handler.getMaxPageSize()); - response = handler.getTerms(userId, guid,instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName), findRequest, exactValue, ignoreCase); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get the Categories owned by this glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression matching child Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the categories returned as they were at this time. null indicates at the current time. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of categories owned by the glossary - * - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - public SubjectAreaOMASAPIResponse getGlossaryCategories(String serverName, - String userId, - String guid, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Boolean onlyTop, - Integer startingFrom, Integer pageSize, String sequencingOrder, String sequencingProperty) { - final String methodName = "getCategories"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGlossaryHandler handler = instanceHandler.getSubjectAreaGlossaryHandler(userId, serverName, methodName); - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty, handler.getMaxPageSize()); - response = handler.getCategories(userId, guid, findRequest, exactValue, ignoreCase, onlyTop, instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName)); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaGraphRESTServices.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaGraphRESTServices.java deleted file mode 100644 index 5c16504959f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaGraphRESTServices.java +++ /dev/null @@ -1,95 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaGraphHandler; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.slf4j.LoggerFactory; - -import java.util.Date; - - -/** - * The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides glossary authoring interfaces for subject area experts. - */ - -public class SubjectAreaGraphRESTServices extends SubjectAreaRESTServicesInstance { - private static final String className = SubjectAreaGraphRESTServices.class.getName(); - private static final SubjectAreaInstanceHandler instanceHandler = new SubjectAreaInstanceHandler(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SubjectAreaGraphRESTServices.class), - instanceHandler.getServiceName()); - - /** - * Default constructor - */ - public SubjectAreaGraphRESTServices() {} - - /** - * Get the graph of nodes and relationships radiating out from a node. - * - * Return the nodes and relationships that radiate out from the supplied node (identified by a GUID). - * The results are scoped by types of relationships, types of nodes and classifications as well as level. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid the starting point of the query. - * @param nodeFilterStr Comma separated list of node names to include in the query results. Null means include - * all entities found, irrespective of their type. - * @param relationshipFilterStr comma separated list of relationship names to include in the query results. Null means include - * all relationships found, irrespective of their type. - * @param asOfTime Requests a historical query of the relationships for the entity. Null means return the - * present values. - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * @param level the number of the relationships (relationships) out from the starting node that the query will traverse to - * gather results. If not specified then it defaults to 3. - * @return A graph of nodeTypes. - * - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - public SubjectAreaOMASAPIResponse getGraph(String serverName, - String userId, - String guid, - Date asOfTime, - String nodeFilterStr, - String relationshipFilterStr, - StatusFilter statusFilter, // may need to extend this for controlled terms - Integer level ) { - - final String methodName = "getGraph"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaGraphHandler handler = instanceHandler.getSubjectAreaGraphHandler(userId, serverName, methodName); - response = handler.getGraph( - userId, - guid, - asOfTime, - nodeFilterStr, - relationshipFilterStr, - statusFilter, // may need to extend this for controlled terms - level); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaInstanceHandler.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaInstanceHandler.java deleted file mode 100644 index 6615ba20877..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaInstanceHandler.java +++ /dev/null @@ -1,235 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - -import org.odpi.openmetadata.accessservices.subjectarea.handlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.server.SubjectAreaRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * CommunityProfileInstanceHandler retrieves information from the instance map for the - * access service instances. The instance map is thread-safe. Instances are added - * and removed by the CommunityProfileAdmin class. - */ -class SubjectAreaInstanceHandler extends OMASServiceInstanceHandler -{ - /** - * Default constructor registers the access service - */ - SubjectAreaInstanceHandler() - { - super(AccessServiceDescription.SUBJECT_AREA_OMAS.getAccessServiceFullName()); - - SubjectAreaRegistration.registerAccessService(); - } - - - /** - * Retrieve the specific handler for the access service. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - SubjectAreaGlossaryHandler getSubjectAreaGlossaryHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - SubjectAreaServicesInstance instance = (SubjectAreaServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getGlossaryHandler(); - } - - return null; - } - - /** - * Retrieve the specific handler for the access service. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - SubjectAreaProjectHandler getSubjectAreaProjectHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - SubjectAreaServicesInstance instance = (SubjectAreaServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getProjectHandler(); - } - - return null; - } - /** - * Retrieve the specific handler for the access service. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - SubjectAreaTermHandler getSubjectAreaTermHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - SubjectAreaServicesInstance instance = (SubjectAreaServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getTermHandler(); - } - - return null; - } - /** - * Retrieve the specific handler for the access service. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - SubjectAreaCategoryHandler getSubjectAreaCategoryHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - SubjectAreaServicesInstance instance = (SubjectAreaServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getCategoryHandler(); - } - - return null; - } - /** - * Retrieve the specific handler for the access service. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - SubjectAreaGraphHandler getSubjectAreaGraphHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - SubjectAreaServicesInstance instance = (SubjectAreaServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getGraphHandler(); - } - - return null; - } - - /** - * Retrieve the specific handler for the access service. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - SubjectAreaRelationshipHandler getSubjectAreaRelationshipHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SubjectAreaServicesInstance instance = (SubjectAreaServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getRelationshipHandler(); - } - - return null; - } - /** - * Retrieve the specific handler for the access service. - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - SubjectAreaConfigHandler getSubjectAreaConfigHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - SubjectAreaServicesInstance instance = (SubjectAreaServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getConfigHandler(); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaProjectRESTServices.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaProjectRESTServices.java deleted file mode 100644 index efab86c2d81..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaProjectRESTServices.java +++ /dev/null @@ -1,388 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaProjectHandler; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.LoggerFactory; - -import java.util.Date; - - -/** - * The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides Project authoring interfaces for subject area experts. - */ - -public class SubjectAreaProjectRESTServices extends SubjectAreaRESTServicesInstance { - private static final String className = SubjectAreaProjectRESTServices.class.getName(); - private static final SubjectAreaInstanceHandler instanceHandler = new SubjectAreaInstanceHandler(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SubjectAreaProjectRESTServices.class), - instanceHandler.getServiceName()); - - /** - * Default constructor - */ - public SubjectAreaProjectRESTServices() {} - - /** - * Create a Project. - * - * Projects with the same name can be confusing. Best practise is to create projects that have unique names. - * This Create call does not police that Project names are unique. So it is possible to create projects with the same name as each other. - * - * Projects that are created using this call will be ProjectProjects. - *

- - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedProject Project to create - * @return response, when successful contains the created Project. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised.
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createProject(String serverName, String userId, Project suppliedProject) { - final String methodName = "createProject"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response= new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); - response = handler.createProject(userId,suppliedProject); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get a Project by guid. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to get - * @return response which when successful contains the Project with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getProjectByGuid(String serverName, String userId, String guid) { - final String methodName = "getProjectByGuid"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response= new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); - response = handler.getProjectByGuid(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Project - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Project property values. If not specified then all projects are returned. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the projects returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of projects meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - public SubjectAreaOMASAPIResponse findProject(String serverName, - String userId, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty) { - - final String methodName = "findProject"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response= new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(searchCriteria); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - response = handler.findProject(userId,findRequest, exactValue,ignoreCase); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Get Project relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return the relationships associated with the requested Project guid - * - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getProjectRelationships(String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty) { - String methodName = "getProjectRelationships"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - response = handler.getProjectRelationships(userId, guid, findRequest); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - -// /** -// * Get the terms in this project. -// * -// * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant -// * @param userId unique identifier for requesting user, under which the request is performed -// * @param guid guid of the Project -// * @param startingFrom the starting element number for this set of results. This is used when retrieving elements -// * beyond the first page of results. Zero means the results start from the first element. -// * @param pageSize the maximum number of elements that can be returned on this request. -// * @return a response which when successful contains the Project Terms -// * when not successful the following Exception responses can occur -// *
    -// *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • -// *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • -// *
  • InvalidParameterException one of the parameters is null or invalid.
  • -// *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • -// *
-// */ -// public SubjectAreaOMASAPIResponse getProjectTerms(String serverName, -// String userId, -// String guid, -// Integer startingFrom, -// Integer pageSize) { -// String methodName = "getProjectTerms"; -// if (log.isDebugEnabled()) { -// log.debug("==> Method: " + methodName + ",userId=" + userId ); -// } -// SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); -// AuditLog auditLog = null; -// try { -// auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); -// SubjectAreaProjectHandler projectHandler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); -// response = projectHandler.getProjectTerms(userId, guid, instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName), startingFrom, pageSize); -// } catch (OCFCheckedExceptionBase e) { -// response.setExceptionInfo(e, className); -// } catch (Exception exception) { -// response = getResponseForException(exception, auditLog, className, methodName); -// } -// if (log.isDebugEnabled()) { -// log.debug("<== successful method : " + methodName + ",userId=" + userId + ", response =" + response); -// } -// -// return response; -// } - - /** - * Update a Project - *

- * If the caller has chosen to incorporate the Project name in their Project Terms or Categories qualified name, renaming the Project will cause those - * qualified names to mismatch the Project name. - * If the caller has chosen to incorporate the Project qualifiedName in their Project Terms or Categories qualified name, changing the qualified name of the Project will cause those - * qualified names to mismatch the Project name. - * Status is not updated using this call. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to update - * @param suppliedProject Project to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated Project - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateProject(String serverName, String userId, String guid, Project suppliedProject, boolean isReplace) { - final String methodName = "updateProject"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); - response = handler.updateProject(userId, guid, suppliedProject,isReplace); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Project instance - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the Project instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the Project will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the Project was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteProject(String serverName, String userId, String guid) { - final String methodName = "deleteProject"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); - response = handler.deleteProject(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Project - * - * Restore allows the deleted Project to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to restore - * @return response which when successful contains the restored Project - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreProject(String serverName, String userId, String guid) { - final String methodName = "restoreProject"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response= new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName); - response = handler.restoreProject(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaRESTServicesInstance.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaRESTServicesInstance.java deleted file mode 100644 index a95754faf5f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaRESTServicesInstance.java +++ /dev/null @@ -1,369 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaAuditCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaRelationshipHandler; -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaTermHandler; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.IRelationshipMapper; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.TermHasARelationshipMapper; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Date; - - -/** - * SubjectAreaRESTServicesInstance caches references to OMRS objects for a specific server. - * It is also responsible for registering itself in the instance map. - */ - -public class SubjectAreaRESTServicesInstance { - private static final String className = SubjectAreaRelationshipHandler.class.getName(); - - // The OMRSAPIHelper allows the junits to mock out the omrs layer - protected static SubjectAreaInstanceHandler instanceHandler = new SubjectAreaInstanceHandler(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SubjectAreaRESTServicesInstance.class), - instanceHandler.getServiceName()); - - /** - * Default constructor - */ - public SubjectAreaRESTServicesInstance() { - } - - /** - * Create a relationship (relationship), which is a link between two Nodes. - *

- * - * @param {@link Relationship} type of object for response - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param restAPIName name of the rest API - * @param userId userId under which the request is performed - * @param clazz mapper Class - * @param relationship relationship to create - * @return response, when successful contains the created relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported. - *
- */ - protected SubjectAreaOMASAPIResponse createRelationship(String serverName, - String restAPIName, - String userId, - Class> clazz, - R relationship) - { - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - SubjectAreaRelationshipHandler handler = instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, restAPIName); - response = handler.createRelationship(restAPIName, userId, clazz, relationship); - if (response.results().size() >0) { - // if required attempt to create spine objects orientated classifications on the ends - // typed by should have spine attribute and spine object - // hasa should have spine attribute and spine object - // isatypeof should have spine object and spine object - // isatypeofdeprecated is deprecated - // isa is not to do with spine objects. - Relationship createdRelationship = response.results().get(0); - final String relationshipName = createdRelationship.getName(); - SubjectAreaTermHandler termHandler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, restAPIName); - String end1Guid = createdRelationship.getEnd1().getNodeGuid(); - String end2Guid = createdRelationship.getEnd2().getNodeGuid(); - - if (relationshipName.equals(RelationshipType.HasA.name()) || relationshipName.equals(RelationshipType.TypedBy.name())) { - SubjectAreaOMASAPIResponse end1TermResponse = termHandler.getTermByGuid(userId, end1Guid); - SubjectAreaOMASAPIResponse end2TermResponse = termHandler.getTermByGuid(userId, end2Guid); - Term end1Term = end1TermResponse.results().get(0); - Term end2Term = end2TermResponse.results().get(0); - - if (!end1Term.isSpineObject()) { - end1Term.setSpineObject(true); - // ignore the response -as the repository may not set spine objects - termHandler.updateTerm(userId,end1Guid, end1Term, handler, false); - } - if (!end2Term.isSpineAttribute()) { - end2Term.setSpineAttribute(true); - // ignore the response -as the repository may not set spine attributes - termHandler.updateTerm(userId,end2Guid, end2Term, handler,false); - } - } else if (relationshipName.equals(RelationshipType.IsATypeOf.name())) { - SubjectAreaOMASAPIResponse end1TermResponse = termHandler.getTermByGuid(userId, end1Guid); - SubjectAreaOMASAPIResponse end2TermResponse = termHandler.getTermByGuid(userId, end2Guid); - Term end1Term = end1TermResponse.results().get(0); - Term end2Term = end2TermResponse.results().get(0); - if (!end1Term.isSpineObject()) { - end1Term.setSpineObject(true); - // ignore the response -as the repository may not set spine objects - termHandler.updateTerm(userId,end1Guid, end1Term, handler, false); - } - if (!end2Term.isSpineObject()) { - // ignore the response -as the repository may not set spine objects - end2Term.setSpineObject(true); - termHandler.updateTerm(userId, end2Guid, end2Term, handler,false); - } - } - - } - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get a relationship (relationship) - * - * @param {@link Relationship} type of object for response - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param restAPIName name of the rest API - * @param userId unique identifier for requesting user, under which the request is performed - * @param clazz mapper Class - * @param guid guid of the relationship to get - * @return response which when successful contains the relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - protected SubjectAreaOMASAPIResponse getRelationship(String serverName, - String restAPIName, - String userId, - Class> clazz, - String guid) - { - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - SubjectAreaRelationshipHandler handler = instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, restAPIName); - response = handler.getRelationship(restAPIName, userId, clazz, guid); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a relationship. - *

- * - * @param {@link Relationship} type of object for response - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param restAPIName rest api name - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param clazz mapper Class - * @param relationship the relationship to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - protected SubjectAreaOMASAPIResponse updateRelationship(String serverName, - String restAPIName, - String userId, - String guid, - Class> clazz, - L relationship, - boolean isReplace) - { - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - SubjectAreaRelationshipHandler handler = instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, restAPIName); - response = handler.updateRelationship(restAPIName, userId, guid, clazz, relationship, isReplace); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a relationship (relationship) - * - * @param {@link Relationship} type of object for response - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param restAPIName rest API name - * @param userId unique identifier for requesting user, under which the request is performed - * @param clazz mapper Class - * @param guid guid of the HAS A relationship to delete - * @return response for a soft delete, the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteRelationship(String serverName, - String restAPIName, - String userId, - Class> clazz, - String guid) - { - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - SubjectAreaRelationshipHandler handler = instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, restAPIName); - response = handler.deleteRelationship(restAPIName, userId, clazz, guid); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a relationship (relationship). - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param {@link Relationship} type of object for response - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param restAPIName name of the rest API - * @param userId unique identifier for requesting user, under which the request is performed - * @param clazz mapper Class - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - *
  • EntityNotPurgedException a hard delete was issued but the relationship was not purged
  • - *
- */ - protected SubjectAreaOMASAPIResponse restoreRelationship(String serverName, - String restAPIName, - String userId, - Class> clazz, - String guid) - { - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - SubjectAreaRelationshipHandler handler = instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, restAPIName); - response = handler.restoreRelationship(restAPIName, userId, clazz, guid); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - protected FindRequest getFindRequest(String searchCriteria, Date asOfTime, Integer startingFrom, Integer pageSize, String sequencingOrderName, String sequencingProperty, Integer handlerMaxPageSize) { - FindRequest findRequest = new FindRequest(); - SequencingOrder sequencingOrder = SequencingOrder.ANY; - for (SequencingOrder possibleSequence: SequencingOrder.values()) { - if (possibleSequence.name().equals(sequencingOrderName)) { - sequencingOrder=possibleSequence; - } - - } - findRequest.setSearchCriteria(searchCriteria); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - if (pageSize == null){ - findRequest.setPageSize(handlerMaxPageSize); - } else { - findRequest.setPageSize(pageSize); - } - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - return findRequest; - } - /** - * Get the appropriate response from the supplied Exception - * - * @param exception - supplied exception - * @param auditLog - ffdc (may be null if unable to initialize) - * @param className - calling class's Name - * @param restAPIName - calling method's name - * @return response corresponding to the exception. - */ - protected SubjectAreaOMASAPIResponse getResponseForException(Exception exception, AuditLog auditLog, String className, String restAPIName) { - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - if (exception instanceof OCFCheckedExceptionBase) { - response.setExceptionInfo((OCFCheckedExceptionBase) exception, className); - } else { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(); - messageDefinition.setMessageParameters(exception.getMessage()); - SubjectAreaCheckedException checkedException = new SubjectAreaCheckedException(messageDefinition, className, restAPIName, exception); - response.setExceptionInfo(checkedException, className); - if (auditLog != null) { - auditLog.logException(restAPIName, - SubjectAreaAuditCode.UNEXPECTED_EXCEPTION.getMessageDefinition(exception.getClass().getName(), restAPIName, exception.getMessage()), - exception); - } - } - return response; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaRelationshipRESTServices.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaRelationshipRESTServices.java deleted file mode 100644 index bd9cf10643b..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaRelationshipRESTServices.java +++ /dev/null @@ -1,1979 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.*; - - -/** - * TheSubjectAreaTermRESTServices provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS) for Terms. This interface provides relationship authoring interfaces for subject area experts. - */ - -public class SubjectAreaRelationshipRESTServices extends SubjectAreaRESTServicesInstance { - - /** - * Default constructor - */ - public SubjectAreaRelationshipRESTServices() { - //SubjectAreaRESTServicesInstance registers this omas. - } - - /** - * Create a Hasa is the relationship between a spine object and a spine attribute. - * Note that this method does not error if the relationship ends are not spine objects or spine attributes. - * This allows the user to create terms then make them spine objects and spine attributes at a later stage. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termHasARelationship the HASA relationship - * @return response, when successful contains the created Hasa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTermHasARelationship(String serverName, String userId, HasA termHasARelationship) { - String restAPIName = "createTermHasARelationship"; - return createRelationship(serverName, restAPIName, userId, TermHasARelationshipMapper.class, termHasARelationship); - } - - - /** - * Get a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HAS A relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermHasARelationship(String serverName, String userId, String guid) { - - String restAPIName = "getTermHasARelationship"; - return getRelationship(serverName, restAPIName, userId, TermHasARelationshipMapper.class, guid); - } - - /** - * Update a Hasa is the relationship between a spine object and a spine attribute. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param termHasARelationship the HASA relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated Hasa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTermHasARelationship(String serverName, String userId, String guid, HasA termHasARelationship, boolean isReplace) { - String restAPIName = "updateTermHasARelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, TermHasARelationshipMapper.class, termHasARelationship, isReplace); - } - - /** - * Delete a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HAS A relationship to delete - * - * @return response for a soft delete, the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteTermHasARelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteTermHasARelationship"; - return deleteRelationship(serverName, restAPIName, userId, TermHasARelationshipMapper.class, guid); - } - - /** - * Restore a Term HAS A relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreTermHasARelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreTermHasARelationship"; - return restoreRelationship(serverName, restAPIName, userId, TermHasARelationshipMapper.class, guid); - } - - /** - * Create a RelatedTerm. A Related Term is a link between two similar Terms. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param relatedTermRelationship the RelatedTerm relationship - * @return response, when successful contains the restored Related Term relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createRelatedTerm(String serverName, String userId, RelatedTerm relatedTermRelationship) { - String restAPIName = "createRelatedTerm"; - return createRelationship(serverName, restAPIName, userId, RelatedTermMapper.class, relatedTermRelationship); - } - - /** - * Get a related Term relationship. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to get - * @return response which when successful contains the related term relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getRelatedTerm(String serverName, String userId, String guid) { - String restAPIName = "getRelatedTerm"; - return getRelationship(serverName, restAPIName, userId, RelatedTermMapper.class, guid); - } - - /** - * Update a Related Term relationship. A Related Term is a link between two similar Terms. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param relatedTermRelationship the related term relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated RelatedTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateRelatedTerm(String serverName, String userId, String guid, RelatedTerm relatedTermRelationship, boolean isReplace) { - String restAPIName = "updateRelatedTerm"; - return updateRelationship(serverName, restAPIName, userId, guid, RelatedTermMapper.class, relatedTermRelationship, isReplace); - } - - /** - * Delete a Related Term relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Related term relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteRelatedTerm(String serverName, String userId, String guid) { - String restAPIName = "deleteRelatedTerm"; - return deleteRelationship(serverName, restAPIName, userId, RelatedTermMapper.class, guid); - } - - /** - * Restore a related Term relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreRelatedTerm(String serverName, String userId, String guid) { - String restAPIName = "restoreRelatedTerm"; - return restoreRelationship(serverName, restAPIName, userId, RelatedTermMapper.class, guid); - } - - /** - * Create a synonym relationship, which is a link between glossary terms that have the same meaning. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param synonym the Synonym relationship - * @return response, when successful contains the created synonym relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported. - *
- */ - public SubjectAreaOMASAPIResponse createSynonym(String serverName, String userId, Synonym synonym) { - String restAPIName = "createSynonym"; - return createRelationship(serverName, restAPIName, userId, SynonymMapper.class, synonym); - } - - /** - * Get a synonym relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termCategorization relationship to get - * @return response which when successful contains the termCategorization relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getSynonymRelationship(String serverName, String userId, String guid) { - String restAPIName = "getSynonymRelationship"; - return getRelationship(serverName, restAPIName, userId, SynonymMapper.class, guid); - } - - /** - * Update a Synonym relationship which is a link between glossary terms that have the same meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param synonym the Synonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated SynonymRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateSynonymRelationship(String serverName, String userId, String guid, Synonym synonym, boolean isReplace) { - String restAPIName = "updateSynonymRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, SynonymMapper.class, synonym, isReplace); - } - - /** - * Delete a Synonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteSynonymRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteSynonymRelationship"; - return deleteRelationship(serverName, restAPIName, userId, SynonymMapper.class, guid); - } - - /** - * Restore a synonym relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreSynonym(String serverName, String userId, String guid) { - String restAPIName = "restoreSynonym"; - return restoreRelationship(serverName, restAPIName, userId, SynonymMapper.class, guid); - } - - /** - * Create an antonym relationship, which is a link between glossary terms that have the opposite meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param antonym the Antonym relationship - * @return response, when successful contains the created antonym relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createAntonym(String serverName, String userId, Antonym antonym) { - String restAPIName = "createAntonym"; - return createRelationship(serverName, restAPIName, userId, AntonymMapper.class, antonym); - } - - /** - * Get a antonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to get - * @return response which when successful contains the antonym relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getAntonymRelationship(String serverName, String userId, String guid) { - String restAPIName = "getAntonymRelationship"; - return getRelationship(serverName, restAPIName, userId, AntonymMapper.class, guid); - } - - /** - * Update a Antonym relationship which is a link between glossary terms that have the opposite meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param antonym the Antonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated AntonymRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateAntonymRelationship(String serverName, String userId, String guid, Antonym antonym, boolean isReplace) { - String restAPIName = "updateAntonymRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, AntonymMapper.class, antonym, isReplace); - } - - /** - * Delete a Antonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteAntonymRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteAntonymRelationship"; - return deleteRelationship(serverName, restAPIName, userId, AntonymMapper.class, guid); - } - - /** - * Restore an antonym relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreAntonym(String serverName, String userId, String guid) { - String restAPIName = "restoreAntonym"; - return restoreRelationship(serverName, restAPIName, userId, AntonymMapper.class, guid); - } - - /** - * Create a translationRelationship relationship, which is a link between glossary terms to provide different natural language translationRelationship of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param translationRelationship the Translation relationship - * @return response, when successful contains the created translationRelationship relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTranslation(String serverName, String userId, Translation translationRelationship) { - String restAPIName = "createTranslation"; - return createRelationship(serverName, restAPIName, userId, TranslationMapper.class, translationRelationship); - } - - /** - * Get a translation relationshiptranslation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the translation relationship to get - * @return response which when successful contains the translation relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTranslationRelationship(String serverName, String userId, String guid) { - String restAPIName = "getTranslationRelationship"; - return getRelationship(serverName, restAPIName, userId, TranslationMapper.class, guid); - } - - /** - * Update a Translation relationship translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param translationRelationship the Translation relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated TranslationRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTranslationRelationship(String serverName, String userId, String guid, Translation translationRelationship, boolean isReplace) { - String restAPIName = "updateTranslationRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, TranslationMapper.class, translationRelationship, isReplace); - } - - /** - * Delete a Translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteTranslationRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteTranslationRelationship"; - return deleteRelationship(serverName, restAPIName, userId, TranslationMapper.class, guid); - } - - /** - * Restore a translation relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreTranslation(String serverName, String userId, String guid) { - String restAPIName = "restoreTranslation"; - return restoreRelationship(serverName, restAPIName, userId, TranslationMapper.class, guid); - } - - /** - * Create a usedInContextRelationship relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param usedInContextRelationship the UsedInContext relationship - * @return response, when successful contains the created usedInContextRelationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createUsedInContext(String serverName, String userId, UsedInContext usedInContextRelationship) { - String restAPIName = "createUsedInContext"; - return createRelationship(serverName, restAPIName, userId, UsedInContextMapper.class, usedInContextRelationship); - } - - /** - * Get a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the usedInContext relationship to get - * @return response which when successful contains the usedInContext relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getUsedInContextRelationship(String serverName, String userId, String guid) { - String restAPIName = "getUsedInContextRelationship"; - return getRelationship(serverName, restAPIName, userId, UsedInContextMapper.class, guid); - } - - /** - * Update a UsedInContext relationship which is a link between glossary terms, where one describes the context where the other one is valid to use. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param usedInContextRelationship the UsedInContext relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated UsedInContextRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateUsedInContextRelationship(String serverName, String userId, String guid, UsedInContext usedInContextRelationship, boolean isReplace) { - String restAPIName = "updateUsedInContextRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, UsedInContextMapper.class, usedInContextRelationship, isReplace); - } - - /** - * Delete a UsedInContext relationship which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteUsedInContextRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteUsedInContextRelationship"; - return deleteRelationship(serverName, restAPIName, userId, UsedInContextMapper.class, guid); - } - - /** - * Restore a used in context relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreUsedInContext(String serverName, String userId, String guid) { - String restAPIName = "restoreUsedInContext"; - return restoreRelationship(serverName, restAPIName, userId, UsedInContextMapper.class, guid); - } - - /** - * Create a preferredTermRelationship relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param preferredTermRelationship the preferred Term relationship - * @return response, when successful contains the created preferredTermRelationship relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createPreferredTerm(String serverName, String userId, PreferredTerm preferredTermRelationship) { - String restAPIName = "createPreferredTerm"; - return createRelationship(serverName, restAPIName, userId, PreferredTermMapper.class, preferredTermRelationship); - } - - /** - * Get a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the preferredTerm relationship to get - * @return response which when successful contains the preferredTerm relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getPreferredTermRelationship(String serverName, String userId, String guid) { - String restAPIName = "getPreferredTermRelationship"; - return getRelationship(serverName, restAPIName, userId, PreferredTermMapper.class, guid); - } - - /** - * Update a PreferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param preferredTermRelationship the PreferredTerm relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated PreferredTermRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • FunctionNotSupportedException Function not supported - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updatePreferredTermRelationship(String serverName, String userId, String guid, PreferredTerm preferredTermRelationship, boolean isReplace) { - String restAPIName = "updatePreferredTermRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, PreferredTermMapper.class, preferredTermRelationship, isReplace); - } - - /** - * Delete a PreferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deletePreferredTermRelationship(String serverName, String userId, String guid) { - String restAPIName = "deletePreferredTermRelationship"; - return deleteRelationship(serverName, restAPIName, userId, PreferredTermMapper.class, guid); - } - - /** - * Restore a preferred term relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restorePreferredTerm(String serverName, String userId, String guid) { - String restAPIName = "restorePreferredTerm"; - return restoreRelationship(serverName, restAPIName, userId, PreferredTermMapper.class, guid); - } - - /** - * Create a validValueRelationship relationship, which is a link between glossary terms that have the same meaning. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param validValueRelationship the ValidValue relationship - * @return response, when successful contains the created validValueRelationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createValidValue(String serverName, String userId, ValidValue validValueRelationship) { - String restAPIName = "createValidValue"; - return createRelationship(serverName, restAPIName, userId, ValidValueMapper.class, validValueRelationship); - } - - /** - * Get a validValue relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the validValue relationship to get - * @return response which when successful contains the validValue relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getValidValueRelationship(String serverName, String userId, String guid) { - String restAPIName = "getValidValueRelationship"; - return getRelationship(serverName, restAPIName, userId, ValidValueMapper.class, guid); - } - - /** - * Update a ValidValue relationship which is a link between glossary terms that have the same meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param validValueRelationship the ValidValue relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated ValidValueRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateValidValueRelationship(String serverName, String userId, String guid, ValidValue validValueRelationship, boolean isReplace) { - String restAPIName = "updateValidValueRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, ValidValueMapper.class, validValueRelationship, isReplace); - } - - /** - * Delete a ValidValue relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteValidValueRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteValidValueRelationship"; - return deleteRelationship(serverName, restAPIName, userId, ValidValueMapper.class, guid); - } - - /** - * Restore a valid value relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreValidValue(String serverName, String userId, String guid) { - String restAPIName = "restoreValidValue"; - return restoreRelationship(serverName, restAPIName, userId, ValidValueMapper.class, guid); - } - - /** - * Create a replacementTermRelationship relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param replacementTermRelationship the ReplacementTerm relationship - * @return response, when successful contains the created replacementTermRelationship relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createReplacementTerm(String serverName, String userId, ReplacementTerm replacementTermRelationship) { - String restAPIName = "createReplacementTerm"; - return createRelationship(serverName, restAPIName, userId, ReplacementTermMapper.class, replacementTermRelationship); - } - - /** - * Get a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the replacementTerm relationship to get - * @return response which when successful contains the replacementTerm relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getReplacementTerm(String serverName, String userId, String guid) { - String restAPIName = "getReplacementTerm"; - return getRelationship(serverName, restAPIName, userId, ReplacementTermMapper.class, guid); - } - - /** - * Update a ReplacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param replacementTermRelationship the ReplacementTerm relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated ReplacementRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateReplacementTerm(String serverName, String userId, String guid, ReplacementTerm replacementTermRelationship, boolean isReplace) { - String restAPIName = "updateReplacementTerm"; - return updateRelationship(serverName, restAPIName, userId, guid, ReplacementTermMapper.class, replacementTermRelationship, isReplace); - } - - /** - * Delete a ReplacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteReplacementTerm(String serverName, String userId, String guid) { - String restAPIName = "deleteReplacementTerm"; - return deleteRelationship(serverName, restAPIName, userId, ReplacementTermMapper.class, guid); - } - - /** - * Restore a replacement term relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreReplacementTerm(String serverName, String userId, String guid) { - String restAPIName = "restoreReplacementTerm"; - return restoreRelationship(serverName, restAPIName, userId, ReplacementTermMapper.class, guid); - } - - /** - * Create a termTypedByRelationship relationship, which is a link between a spine attribute and its type. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termTypedByRelationship the TypedBy relationship - * @return response, when successful contains the created termTypedByRelationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTermTypedByRelationship(String serverName, String userId, TypedBy termTypedByRelationship) { - String restAPIName = "createTermTypedByRelationship"; - return createRelationship(serverName, restAPIName, userId, TermTypedByRelationshipMapper.class, termTypedByRelationship); - } - - /** - * Get a termTypedByRelationship relationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termTypedByRelationship relationship to get - * @return response which when successful contains the termTypedByRelationship relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermTypedByRelationship(String serverName, String userId, String guid) { - String restAPIName = "getTermTypedByRelationship"; - return getRelationship(serverName, restAPIName, userId, TermTypedByRelationshipMapper.class, guid); - } - - /** - * Update a TypedBy relationship, which is a link between a spine attribute and its type. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param termTypedByRelationship the TypedBy relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated TypedBy - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTermTypedByRelationship(String serverName, String userId, String guid, TypedBy termTypedByRelationship, boolean isReplace) { - String restAPIName = "updateTermTypedByRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, TermTypedByRelationshipMapper.class, termTypedByRelationship, isReplace); - } - - /** - * Delete a TypedBy relationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TypedBy relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteTermTypedByRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteTermTypedByRelationship"; - return deleteRelationship(serverName, restAPIName, userId, TermTypedByRelationshipMapper.class, guid); - } - - /** - * Restore a replacement term relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreTermTypedByRelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreTermTypedByRelationship"; - return restoreRelationship(serverName, restAPIName, userId, TermTypedByRelationshipMapper.class, guid); - } - - /** - * Create a iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param iSARelationship the Isa relationship - * @return response, when successful contains the created iSARelationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createIsARelationship(String serverName, String userId, IsA iSARelationship) { - String restAPIName = "createIsARelationship"; - return createRelationship(serverName, restAPIName, userId, IsARelationshipMapper.class, iSARelationship); - } - - /** - * Get a iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the iSARelationship relationship to get - * @return response which when successful contains the iSARelationship relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getIsARelationship(String serverName, String userId, String guid) { - String restAPIName = "getIsARelationship"; - return getRelationship(serverName, restAPIName, userId, IsARelationshipMapper.class, guid); - } - - /** - * Update a Isa relationship, which is a link between a more general glossary term and a more specific definition. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param iSARelationship the Isa relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated Isa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateIsARelationship(String serverName, String userId, String guid, IsA iSARelationship, boolean isReplace) { - String restAPIName = "updateIsARelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, IsARelationshipMapper.class, iSARelationship, isReplace); - } - - /** - * Delete a Isa relationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Isa relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteIsARelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteIsARelationship"; - return deleteRelationship(serverName, restAPIName, userId, IsARelationshipMapper.class, guid); - } - - /** - * Restore a is a relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreIsARelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreIsARelationship"; - return restoreRelationship(serverName, restAPIName, userId, IsARelationshipMapper.class, guid); - } - - /** - * Create a IsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - *

- * @deprecated IsATypeOfDeprecated is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param IsATypeOfDeprecated the IsaTypeOf relationship - * @return response, when successful contains the created IsATypeOfDeprecated relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - @Deprecated - public SubjectAreaOMASAPIResponse createIsATypeOfDeprecated(String serverName, String userId, IsATypeOfDeprecated IsATypeOfDeprecated) { - String restAPIName = "createIsATypeOfDeprecated"; - return createRelationship(serverName, restAPIName, userId, TermIsATypeOfRelationshipDeprecatedMapper.class, IsATypeOfDeprecated); - } - - /** - * Get a IsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOfDeprecated relationship to get - * @return response which when successful contains the IsATypeOfDeprecated relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - @Deprecated - public SubjectAreaOMASAPIResponse getIsATypeOfDeprecated(String serverName, String userId, String guid) { - String restAPIName = "getIsATypeOfDeprecated"; - return getRelationship(serverName, restAPIName, userId, TermIsATypeOfRelationshipDeprecatedMapper.class, guid); - } - - /** - * Update a IsaTypeOf relationship, which is an inheritance relationship between two spine objects. - *

- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param IsATypeOfDeprecated the IsaTypeOf relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated IsaTypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - @Deprecated - public SubjectAreaOMASAPIResponse updateIsATypeOfDeprecated(String serverName, String userId, String guid, IsATypeOfDeprecated IsATypeOfDeprecated, boolean isReplace) { - String restAPIName = "updateIsATypeOfDeprecated"; - return updateRelationship(serverName, restAPIName, userId, guid, TermIsATypeOfRelationshipDeprecatedMapper.class, IsATypeOfDeprecated, isReplace); - } - - /** - * Delete a IsaTypeOf relationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsaTypeOf relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - @Deprecated - public SubjectAreaOMASAPIResponse deleteIsATypeOfDeprecatedRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteIsATypeOfDeprecatedRelationship"; - return deleteRelationship(serverName, restAPIName, userId, TermIsATypeOfRelationshipDeprecatedMapper.class, guid); - } - - /** - * Restore a is IsaTypeOf relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - @Deprecated - public SubjectAreaOMASAPIResponse restoreIsATypeOfDeprecated(String serverName, String userId, String guid) { - String restAPIName = "restoreIsATypeOfDeprecated"; - return restoreRelationship(serverName, restAPIName, userId, TermIsATypeOfRelationshipDeprecatedMapper.class, guid); - } - - /** - * Create a is a type of relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param IsATypeOf the is a type of relationship - * @return response, when successful contains the created IsATypeOf Relationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createIsATypeOf(String serverName, String userId, IsATypeOf IsATypeOf) { - String restAPIName = "createIsATypeOf"; - return createRelationship(serverName, restAPIName, userId, IsATypeOfMapper.class, IsATypeOf); - } - - /** - * Get a is a type of relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf relationship to get - * @return response which when successful contains the IsATypeOf relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getIsATypeOf(String serverName, String userId, String guid) { - String restAPIName = "getIsATypeOf"; - return getRelationship(serverName, restAPIName, userId, IsATypeOfMapper.class, guid); - } - - /** - * Update a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param IsATypeOf the IsATypeOf relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated IsaTypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateIsATypeOf(String serverName, String userId, String guid, IsATypeOf IsATypeOf, boolean isReplace) { - String restAPIName = "updateIsATypeOf"; - return updateRelationship(serverName, restAPIName, userId, guid, IsATypeOfMapper.class, IsATypeOf, isReplace); - } - - /** - * Delete a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteIIsATypeOf(String serverName, String userId, String guid) { - String restAPIName = "deleteIsATypeOf"; - return deleteRelationship(serverName, restAPIName, userId, IsATypeOfMapper.class, guid); - } - - /** - * Restore a is IsATypeOf relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreIsATypeOf(String serverName, String userId, String guid) { - String restAPIName = "restoreIsATypeOf"; - return restoreRelationship(serverName, restAPIName, userId, IsATypeOfMapper.class, guid); - } - - /** - * Create a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termCategorizationRelationship the TermCategorizationRelationship relationship - * @return response, when successful contains the created termCategorizationRelationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTermCategorizationRelationship(String serverName, String userId, Categorization termCategorizationRelationship) { - String restAPIName = "createTermCategorizationRelationship"; - return createRelationship(serverName, restAPIName, userId, TermCategorizationMapper.class, termCategorizationRelationship); - } - - /** - * Get a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termCategorizationRelationship relationship to get - * @return response which when successful contains the termCategorizationRelationship relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermCategorizationRelationship(String serverName, String userId, String guid) { - String restAPIName = "getTermCategorizationRelationship"; - return getRelationship(serverName, restAPIName, userId, TermCategorizationMapper.class, guid); - } - - /** - * Update a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param termCategorizationRelationship the termCategorization relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated Isa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTermCategorizationRelationship(String serverName, String userId, String guid, Categorization termCategorizationRelationship, Boolean isReplace) { - String restAPIName = "updateTermCategorizationRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, TermCategorizationMapper.class, termCategorizationRelationship, isReplace); - } - - - /** - * Delete a TermCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorizationRelationship relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteTermCategorizationRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteTermCategorizationRelationship"; - return deleteRelationship(serverName, restAPIName, userId, TermCategorizationMapper.class, guid); - } - - /** - * Restore a TermCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * Restore allows the deleted TermCategorization Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorization Relationship to delete - * @return response which when successful contains the restored TermCategorization - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreTermCategorizationRelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreTermCategorizationRelationship"; - return restoreRelationship(serverName, restAPIName, userId, TermCategorizationMapper.class, guid); - } - - // No modification of CategoryAnchor exists, because this is an anchoring relationship - - /** - * Get a termAnchor Relationship. A relationship between a Glossary and a Term. This relationship allows terms to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termAnchor Relationship to get - * @return response which when successful contains the termAnchorRelationship relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermAnchorRelationship(String serverName, String userId, String guid) { - String restAPIName = "getTermAnchorRelationship"; - return getRelationship(serverName, restAPIName, userId, TermAnchorMapper.class, guid); - } - // No modification of CategoryAnchor exists, because this is an anchoring relationship - - - /** - * Get a categoryAnchor Relationship. A relationship between a Glossary and a Category. This relationship allows terms to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the categoryAnchor Relationship to get - * @return response which when successful contains the categoryAnchorRelationship relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryAnchorRelationship(String serverName, String userId, String guid) { - String restAPIName = "getCategoryAnchorRelationship"; - return getRelationship(serverName, restAPIName, userId, CategoryAnchorMapper.class, guid); - } - - /** - * Create a projectScope relationship, which is a link between the project content and the project. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param projectScope the Synonym relationship - * @return response, restored projectScope relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function is not supported. - *
- */ - public SubjectAreaOMASAPIResponse createProjectScopeRelationship(String serverName, String userId, ProjectScope projectScope) { - String restAPIName = "createProjectScope"; - return createRelationship(serverName, restAPIName, userId, ProjectScopeMapper.class, projectScope); - } - - /** - * Get a projectScope relationship, which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termCategorization relationship to get - * @return response which when successful contains the termCategorization relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getProjectScopeRelationship(String serverName, String userId, String guid) { - String restAPIName = "getProjectScopeRelationship"; - return getRelationship(serverName, restAPIName, userId, ProjectScopeMapper.class, guid); - } - - /** - * Update a ProjectScope relationship which is a link between the project content and the project. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param projectScope the ProjectScope relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated ProjectScopeRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateProjectScopeRelationship(String serverName, String userId, String guid, ProjectScope projectScope, boolean isReplace) { - String restAPIName = "updateProjectScopeRelationship"; - return updateRelationship(serverName, restAPIName, userId, guid, ProjectScopeMapper.class, projectScope, isReplace); - } - - /** - * Delete a ProjectScope relationship, which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScope relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse deleteProjectScopeRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteProjectScopeRelationship"; - return deleteRelationship(serverName, restAPIName, userId, ProjectScopeMapper.class, guid); - } - - /** - * Restore a projectScope relationship, which is a link between the project content and the project. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function is not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreProjectScopeRelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreProjectScopeRelationship"; - return restoreRelationship(serverName, restAPIName, userId, ProjectScopeMapper.class, guid); - } - - /** - * Create a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @return response, when successful contains the created categoryHierarchyLink relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createCategoryHierarchyLink(String serverName, String userId, CategoryHierarchyLink categoryHierarchyLink) { - String restAPIName = "createCategoryHierarchyLink"; - return createRelationship(serverName, restAPIName, userId, CategoryHierarchyLinkMapper.class, categoryHierarchyLink); - } - - /** - * Get a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to get - * @return response which when successful contains the CategoryHierarchyLink relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryHierarchyLink(String serverName, String userId, String guid) { - String restAPIName = "getCategoryHierarchyLink"; - return getRelationship(serverName, restAPIName, userId, CategoryHierarchyLinkMapper.class, guid); - } - /** - * Update a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated categoryHierarchyLink - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateCategoryHierarchyLink(String serverName, String userId, String guid, CategoryHierarchyLink categoryHierarchyLink, Boolean isReplace) { - String restAPIName = "updateCategoryHierarchyLink"; - return updateRelationship(serverName, restAPIName, userId, guid, CategoryHierarchyLinkMapper.class, categoryHierarchyLink, isReplace); - } - - /** - * Delete a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteCategoryHierarchyLink(String serverName, String userId, String guid) { - String restAPIName = "deleteCategoryHierarchyLink"; - return deleteRelationship(serverName, restAPIName, userId, CategoryHierarchyLinkMapper.class, guid); - } - - /** - * Restore a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - *

- * Restore allows the deleted CategoryHierarchyLink Relationship to be made active again. Restore allows deletes to be undone. - * Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to delete - * @return response which when successful contains the restored CategoryHierarchyLink - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreCategoryHierarchyLink(String serverName, String userId, String guid) { - String restAPIName = "restoreCategoryHierarchyLink"; - return restoreRelationship(serverName, restAPIName, userId, CategoryHierarchyLinkMapper.class, guid); - } - /** - * Get a SemanticAssignment relationship, Links a glossary term to another element such as an asset or schema element to define its meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the SemanticAssignment relationship to get - * @return response which when successful contains the SemanticAssignment relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getSemanticAssignmentRelationship(String serverName, String userId, String guid) { - String restAPIName = "getSemanticAssignmentRelationship"; - return getRelationship(serverName, restAPIName, userId, SemanticAssignmentMapper.class, guid); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaServicesInstance.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaServicesInstance.java deleted file mode 100644 index 18e41f63d7a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaServicesInstance.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.handlers.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; -import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler; - -/** - * SubjectAreaRESTServicesInstance caches references to OMRS objects for a specific server. - * It is also responsible for registering itself in the instance map. - */ - -public class SubjectAreaServicesInstance extends OMASServiceInstance { - private static final AccessServiceDescription myDescription = AccessServiceDescription.SUBJECT_AREA_OMAS; - - private final SubjectAreaGlossaryHandler glossaryHandler; - private final SubjectAreaProjectHandler projectHandler; - private final SubjectAreaTermHandler termHandler; - private final SubjectAreaCategoryHandler categoryHandler; - private final SubjectAreaRelationshipHandler relationshipHandler; - private final SubjectAreaGraphHandler graphHandler; - private final SubjectAreaConfigHandler configHandler; - - - /** - * Set up the local repository connector that will service the REST Calls. - * - * @param repositoryConnector link to the repository responsible for servicing the REST calls. - * @param auditLog logging destination - * @param localServerUserId userId used for server initiated actions - * @param maxPageSize max number of results to return on single request. - * @throws NewInstanceException a problem occurred during initialization - */ - public SubjectAreaServicesInstance(OMRSRepositoryConnector repositoryConnector, - AuditLog auditLog, - String localServerUserId, - int maxPageSize) throws NewInstanceException { - super(myDescription.getAccessServiceFullName(), - repositoryConnector, - auditLog, - localServerUserId, - maxPageSize); - - // repositoryHandler is set in the super class if OMRS is active - if (repositoryHandler == null) { - final String methodName = "new ServiceInstance"; - throw new NewInstanceException(SubjectAreaErrorCode.OMRS_NOT_INITIALIZED.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - } - OpenMetadataAPIGenericHandler genericHandler = new OpenMetadataAPIGenericHandler<>( - null, - Glossary.class, // default to Glossary for now - serviceName, - serverName, - invalidParameterHandler, - repositoryHandler, - repositoryHelper, - localServerUserId, - securityVerifier, - supportedZones, - defaultZones, - publishZones, - auditLog); - - this.glossaryHandler = new SubjectAreaGlossaryHandler(genericHandler, maxPageSize); - - this.termHandler = new SubjectAreaTermHandler(genericHandler, maxPageSize); - - this.categoryHandler = new SubjectAreaCategoryHandler(genericHandler, maxPageSize); - - this.projectHandler = new SubjectAreaProjectHandler(genericHandler, maxPageSize); - - this.graphHandler = new SubjectAreaGraphHandler(genericHandler, maxPageSize); - - this.relationshipHandler = new SubjectAreaRelationshipHandler(genericHandler, maxPageSize); - - this.configHandler = new SubjectAreaConfigHandler(genericHandler, maxPageSize); - -} - - /** - * Return the handler for glossary requests. - * - * @return handler object - */ - public SubjectAreaGlossaryHandler getGlossaryHandler() { - return glossaryHandler; - } - - /** - * Return the handler for project requests. - * - * @return handler object - */ - public SubjectAreaProjectHandler getProjectHandler() { - return projectHandler; - } - - /** - * Return the handler for term requests. - * - * @return handler object - */ - public SubjectAreaTermHandler getTermHandler() { - return termHandler; - } - - /** - * Return the handler for category requests. - * - * @return handler object - */ - public SubjectAreaCategoryHandler getCategoryHandler() { - return categoryHandler; - } - - /** - * Return the handler for relationship requests. - * - * @return handler object - */ - public SubjectAreaRelationshipHandler getRelationshipHandler() { - return relationshipHandler; - } - - /** - * Return the handler for graph requests. - * - * @return handler object - */ - public SubjectAreaGraphHandler getGraphHandler() { - return graphHandler; - } - - /** - * Return the handler for config requests. - * - * @return handler object - */ - public SubjectAreaConfigHandler getConfigHandler() { - return configHandler; - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaTermRESTServices.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaTermRESTServices.java deleted file mode 100644 index ed9f5d284e6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/SubjectAreaTermRESTServices.java +++ /dev/null @@ -1,375 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; - -import org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaTermHandler; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.LoggerFactory; - -import java.util.Date; - -/** - * The SubjectAreaTermRESTServices provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS) for Terms. This interface provides term authoring interfaces for subject area experts. - */ - -public class SubjectAreaTermRESTServices extends SubjectAreaRESTServicesInstance { - private static final SubjectAreaInstanceHandler instanceHandler = new SubjectAreaInstanceHandler(); - private static final String className = SubjectAreaTermRESTServices.class.getName(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SubjectAreaTermRESTServices.class), - instanceHandler.getServiceName()); - - /** - * Default constructor - */ - public SubjectAreaTermRESTServices() { - //SubjectAreaRESTServicesInstance registers this omas. - } - - /** - * Create a Term - *

- * The name needs to be specified - as this is the main identifier for the term. The name should be unique for canonical glossaries. This API does not police the uniqueness in this case. - *

- * The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is - * unique. If this qualifiedName is not specified then one will be generated as GlossaryTerm concatenated with the guid. - *

- * Failure to create the Terms classifications, link to its glossary or its icon, results in the create failing and the term being deleted - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId - * @param suppliedTerm term to create - * @return response, when successful contains the created term. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request. - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service. - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised - *
  • ClassificationException Error processing a classification - *
  • StatusNotSupportedException A status value is not supported - *
- */ - public SubjectAreaOMASAPIResponse createTerm(String serverName, String userId, Term suppliedTerm) { - final String methodName = "createTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - response = handler.createTerm(userId, instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, methodName), suppliedTerm); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get a Term - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to get - * @return response which when successful contains the term with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermByGuid(String serverName, String userId, String guid) { - final String methodName = "getTermByGuid"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - response = handler.getTermByGuid(userId, guid); - - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get Term relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return the relationships associated with the requested Term guid - * - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermRelationships(String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - ) { - String methodName = "getTermRelationships"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - response = handler.getTermRelationships(userId, guid, findRequest); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Term - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Term property values (this does not include the TermSummary content). When not specified, all terms are returned. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of Terms meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - public SubjectAreaOMASAPIResponse findTerm(String serverName, String userId, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - String sequencingOrder, - String sequencingProperty) { - - final String methodName = "findTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty, handler.getMaxPageSize()); - response = handler.findTerm(userId, findRequest,exactValue, ignoreCase); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Term - *

- * Status is not updated using this call. - * The Categories categorising this Term can be amended using this call; this means that the termCategorization relationships are removed and/or added in this call. - * For an update (rather than a replace) with no categories supplied, no changes are made to the termCategorizations; otherwise the - * supplied categorizing Categories will replace the existing ones. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the term to update - * @param suppliedTerm term to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. The GovernanceClassification content is always replaced. - * @return a response which when successful contains the updated term - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTerm(String serverName, String userId, String guid, Term suppliedTerm, boolean isReplace) - { - final String methodName = "updateTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - response = handler.updateTerm(userId, guid, suppliedTerm, instanceHandler.getSubjectAreaRelationshipHandler(userId, serverName, methodName), isReplace); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Term instance - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the term instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the term will not exist after the operation. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the term to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the term was not deleted.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteTerm(String serverName, String userId, String guid) - { - final String methodName = "deleteTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - response = handler.deleteTerm(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Restore a Term - * - * Restore allows the deleted Term to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to delete - * @return response which when successful contains the restored term - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreTerm(String serverName, String userId, String guid) { - final String methodName = "restoreTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - response = handler.restoreTerm(userId, guid); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Get the Categories categorizing this Term. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of categories categorizing this Term - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermCategories(String serverName, String userId, String guid, Integer startingFrom, Integer pageSize) { - - final String methodName = "getTermCategories"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaTermHandler handler = instanceHandler.getSubjectAreaTermHandler(userId, serverName, methodName); - if (pageSize == null) { - pageSize = handler.getMaxPageSize(); - } - - response = handler.getTermCategories(userId, guid, instanceHandler.getSubjectAreaCategoryHandler(userId, serverName, methodName), startingFrom, pageSize); - } catch (OCFCheckedExceptionBase e) { - response.setExceptionInfo(e, className); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/package-info.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/package-info.java deleted file mode 100644 index 5f909f818b1..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/services/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Subject Area server rest service implementation - */ -package org.odpi.openmetadata.accessservices.subjectarea.server.services; diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utilities/ClassificationGroupByOperation.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utilities/ClassificationGroupByOperation.java deleted file mode 100644 index 50fcc8c4757..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utilities/ClassificationGroupByOperation.java +++ /dev/null @@ -1,99 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.utilities; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Classification; - -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - - -/** - * A list of exiting classifications are compared with a list of requested Classifications, and the classifications are grouped into whether they - * need to be added (if they are requested but do not exist), removed (if they are not requested but already exist) or updated if they exist and are requested. - * This class only effects the relevant classifictions; a set of classification names - so that other classifications that may by in the existing Classification - * List are not effected. - */ -public class ClassificationGroupByOperation -{ - Map existingMap = new HashMap<>(); - Map requestedMap = new HashMap<>(); - List add = new ArrayList<>(); - List remove = new ArrayList<>(); - List update = new ArrayList<>(); - - /** - * Constructor - * @param relevantClassificationNames - this is a Set of relevant classifications names, - * @param existing This is expected to be a non null list of Classifications that already exist in the repository - * @param requested This is expected to be a non null list of clssifications that are the desired state for the classifications - */ - public ClassificationGroupByOperation(SetrelevantClassificationNames, Set existing, Set requested) { - Set existingNames =null; - if (!existing.isEmpty()) { - existingNames = existing.stream().map(Classification::getClassificationName).collect(Collectors.toSet()); - existingMap = existing.stream().collect(Collectors.toMap(Classification::getClassificationName, - Function.identity())); - } - Set requestedNames =null; - if (!requested.isEmpty()) { - requestedNames =requested.stream().map(Classification::getClassificationName).collect(Collectors.toSet()); - requestedMap = requested.stream().collect(Collectors.toMap(Classification::getClassificationName, - Function.identity())); - } - if (existingNames== null && requestedNames != null) { - // add all the requested names - add = new ArrayList<>(requested); - } - if (requestedNames== null && existingNames != null) { - // remove the classifications we care about. - - Set intersection = new HashSet(relevantClassificationNames); // use the copy constructor - intersection.retainAll(existingNames); - remove = new ArrayList<>(intersection); - } - if (existingNames!= null && requestedNames!= null) { - for (String existingName : existingNames) { - if (requestedNames.contains(existingName)) { - // update - update.add(requestedMap.get(existingName)); - } else { - // remove only if a relevant classification - if (relevantClassificationNames.contains(existingName)) { - remove.add(existingName); - } - } - } - for (String requestedName : requestedNames) { - if (!existingNames.contains(requestedName)) { - // add - add.add(requestedMap.get(requestedName)); - } - } - } - } - - /** - * List of classifications to be added - * @return List of classifications to be added - */ - public List getAddClassifications() { - return this.add; - } - /** - * List of classification names to removed - * @return List of classification names to be removed - */ - public List getRemoveClassifications() { - - return this.remove; - } - /** - * List of classifications to be updated - * @return List of classifications to be updated - */ - public List getUpdateClassifications() { - return this.update; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utilities/SubjectAreaUtils.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utilities/SubjectAreaUtils.java deleted file mode 100644 index 359c1709d08..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/utilities/SubjectAreaUtils.java +++ /dev/null @@ -1,322 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.utilities; - - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.IconSummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.NodeSummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.CategoryAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.TermAnchor; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Date; -import java.util.HashSet; -import java.util.Set; - -/** - * Subject Area OMAS utilities. - */ -public class SubjectAreaUtils { - - private static final Logger log = LoggerFactory.getLogger(SubjectAreaUtils.class); - - private static final String className = SubjectAreaUtils.class.getName(); - - public static InstanceType createTemplateFromTypeDef(TypeDef typeDef) { - InstanceType template = new InstanceType(); - template.setTypeDefName(typeDef.getName()); - template.setTypeDefCategory(typeDef.getCategory()); - template.setTypeDefGUID(typeDef.getGUID()); - template.setTypeDefVersion(typeDef.getVersion()); - - return template; - } - - /** - * Convert a Category to a CategorySummary - * - * @param category to convert - * @param relationship {@link Relationship} - * @return CategorySummary - */ - public static CategorySummary extractCategorySummaryFromCategory(Category category, Relationship relationship) { - CategorySummary categorySummary = new CategorySummary(); - extractNodeSummary(category, relationship, categorySummary); - return categorySummary; - } - - private static void extractNodeSummary(Node node, Relationship relationship, NodeSummary nodeSummary) { - nodeSummary.setQualifiedName(node.getQualifiedName()); - nodeSummary.setName(node.getName()); - nodeSummary.setGuid(node.getSystemAttributes().getGUID()); - nodeSummary.setFromEffectivityTime(node.getEffectiveFromTime()); - nodeSummary.setToEffectivityTime(node.getEffectiveToTime()); - nodeSummary.setRelationshipguid(relationship.getGuid()); - nodeSummary.setFromRelationshipEffectivityTime(relationship.getEffectiveFromTime()); - nodeSummary.setToRelationshipEffectivityTime(relationship.getEffectiveToTime()); - } - - - - /** - * Extract Glossary Summary - * - * @param glossary the glossary that is to be summarised - * @param relationship the relationship to the glossary, which feeds part of the node summary - * @return Glossary Summary or null - */ - public static GlossarySummary extractGlossarySummaryFromGlossary(Glossary glossary, Relationship relationship) { - if (glossary == null) return null; - GlossarySummary glossarySummary = new GlossarySummary(); - extractNodeSummary(glossary, relationship, glossarySummary); - return glossarySummary; - } - - /** - * Get glossary guid from anchors - * - * @param relationship - {@link TermAnchor} or {@link CategoryAnchor} - * @return glossaryGuid - * */ - public static String getGlossaryGuidFromAnchor(Relationship relationship) { - String glossaryGuid = null; - if (relationship instanceof TermAnchor || relationship instanceof CategoryAnchor) { - glossaryGuid = relationship.getEnd1().getNodeGuid(); - } - return glossaryGuid; - } - - public static void checkStatusNotDeleted(Status status, SubjectAreaErrorCode errorCode) throws InvalidParameterException { - final String methodName = "checkStatusNotDeleted"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - if (status.equals(Status.DELETED)) { - String propertyName = "Status"; - String propertyValue = Status.DELETED.name(); - ExceptionMessageDefinition messageDefinition = errorCode.getMessageDefinition(propertyName,propertyValue); - throw new InvalidParameterException(messageDefinition, - className, - methodName, - propertyName, - propertyValue); - } - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - } - - public static Status convertInstanceStatusToStatus(InstanceStatus instanceStatus) { - Status status = null; - - if (instanceStatus == null) { - //default to ACTIVE - status = Status.ACTIVE; - } else { - switch (instanceStatus) { - case ACTIVE: - status = Status.ACTIVE; - break; - case DELETED: - status = Status.DELETED; - break; - case DRAFT: - status = Status.DRAFT; - break; - case UNKNOWN: - status = Status.UNKNOWN; - break; - case PREPARED: - status = Status.PREPARED; - break; - case PROPOSED: - status = Status.PROPOSED; - break; - case APPROVED: - status = Status.APPROVED; - break; - } - - } - return status; - } - - public static InstanceStatus convertStatusToInstanceStatus(Status status) { - InstanceStatus instanceStatus = null; - if (status == null) { - //default to ACTIVE - instanceStatus = InstanceStatus.ACTIVE; - } else { - switch (status) { - case ACTIVE: - instanceStatus = InstanceStatus.ACTIVE; - break; - case DELETED: - instanceStatus = InstanceStatus.DELETED; - break; - case DRAFT: - instanceStatus = InstanceStatus.DRAFT; - break; - case UNKNOWN: - instanceStatus = InstanceStatus.UNKNOWN; - break; - case PREPARED: - instanceStatus = InstanceStatus.PREPARED; - break; - case PROPOSED: - instanceStatus = InstanceStatus.PROPOSED; - break; - case APPROVED: - instanceStatus = InstanceStatus.APPROVED; - break; - } - } - return instanceStatus; - } - - /** - * create SystemAttributes instance from an insance header object - * - * @param instanceHeader omrs instance header - * @return SystemAttributes - */ - public static SystemAttributes createSystemAttributes(InstanceHeader instanceHeader) { - //set core attributes - SystemAttributes systemAttributes = new SystemAttributes(); - - InstanceStatus instanceStatus = instanceHeader.getStatus(); - Status omas_status = SubjectAreaUtils.convertInstanceStatusToStatus(instanceStatus); - systemAttributes.setStatus(omas_status); - - systemAttributes.setCreatedBy(instanceHeader.getCreatedBy()); - systemAttributes.setUpdatedBy(instanceHeader.getUpdatedBy()); - Date createTimeDate = instanceHeader.getCreateTime(); - Long createTimeLong =null; - if (createTimeDate != null) { - createTimeLong = createTimeDate.getTime(); - } - systemAttributes.setCreateTime(createTimeLong); - Date updateTimeDate = instanceHeader.getUpdateTime(); - Long updateTimeLong =null; - if (updateTimeDate != null) { - updateTimeLong = updateTimeDate.getTime(); - } - systemAttributes.setUpdateTime(updateTimeLong); - systemAttributes.setVersion(instanceHeader.getVersion()); - systemAttributes.setGUID(instanceHeader.getGUID()); - return systemAttributes; - } - - public static void populateSystemAttributesForInstanceAuditHeader(SystemAttributes systemAttributes, InstanceAuditHeader instanceAuditHeader) { - if (systemAttributes != null) { - if (systemAttributes.getCreatedBy() != null) - instanceAuditHeader.setCreatedBy(systemAttributes.getCreatedBy()); - if (systemAttributes.getUpdatedBy() != null) - instanceAuditHeader.setUpdatedBy(systemAttributes.getUpdatedBy()); - if (systemAttributes.getCreateTime() != null) - instanceAuditHeader.setCreateTime(new Date(systemAttributes.getCreateTime())); - if (systemAttributes.getUpdateTime() != null) - instanceAuditHeader.setUpdateTime(new Date(systemAttributes.getUpdateTime())); - if (systemAttributes.getVersion() != null) - instanceAuditHeader.setVersion(systemAttributes.getVersion()); - } - } - - /** - * Set the String value into the InstanceProperties. - * - * @param instanceProperties supplied instanceproperties - * @param stringValue string value - * @param propertyName property name. - */ - public static void setStringPropertyInInstanceProperties(InstanceProperties instanceProperties, String stringValue, String propertyName) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValue.setPrimitiveValue(stringValue); - instanceProperties.setProperty(propertyName, primitivePropertyValue); - } - - /** - * Set the Integer value into the InstanceProperties. - * - * @param instanceProperties supplied instanceproperties - * @param integerValue integer value - * @param propertyName property name. - */ - public static void setIntegerPropertyInInstanceProperties(InstanceProperties instanceProperties, Integer integerValue, String propertyName) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT); - primitivePropertyValue.setPrimitiveValue(integerValue); - instanceProperties.setProperty(propertyName, primitivePropertyValue); - } - - /** - * set the Date value into the InstanceProperties - * - * @param instanceProperties supplied instanceproperties - * @param date Datew value - * @param propertyName property name - */ - public static void setDatePropertyInInstanceProperties(InstanceProperties instanceProperties, Date date, String propertyName) { - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_DATE); - Long timestamp = date.getTime(); - primitivePropertyValue.setPrimitiveValue(timestamp); - instanceProperties.setProperty(propertyName, primitivePropertyValue); - } - - /** - * Set icon summaries from related media relationships by issuing a call to omrs using the related media guid - which is at one end of the relationship. - * - * Note that we should only return the icons that are effective - by checking the effective From and To dates against the current time - * @param userId userid under which to issue to the get of the related media - * @param guid to get associated icons from - * @return response with Set of IconSummary objects or an Exception response. - */ - public SubjectAreaOMASAPIResponse getIconSummarySet(String userId, String guid) { - // if there are no icons then return an empty set - - //TODO implement icon logic - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - Set icons = new HashSet<>(); - response.addAllResults(icons); - return response; - } - - /** - * Set status values into instance properties. - * - * @param instanceProperties supplied instanceproperties - * @param status Status value - * @param propertyName property name - */ - public static void setStatusPropertyInInstanceProperties(InstanceProperties instanceProperties, TermRelationshipStatus status, String propertyName) { - EnumPropertyValue enumPropertyValue = new EnumPropertyValue(); - enumPropertyValue.setOrdinal(status.getOrdinal()); - enumPropertyValue.setSymbolicName(status.getName()); - instanceProperties.setProperty(propertyName, enumPropertyValue); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/TestRelationshipTypeMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/TestRelationshipTypeMapper.java deleted file mode 100644 index 6cc4414b41b..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/graph/TestRelationshipTypeMapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.graph; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - - -public class TestRelationshipTypeMapper { - @Test - public void testMapOMASRelationshipTypeToOMRSRelationshipTypeGuid() throws InvalidParameterException { - try { - RelationshipTypeMapper.mapOMASRelationshipTypeToOMRSRelationshipTypeGuid("operation", null); - assertTrue(false, "Expected null to fail"); - } catch (InvalidParameterException e) { - // we expect to get here - } - for (RelationshipType relationshipType : RelationshipType.values()) { - if (relationshipType == RelationshipType.Unknown) { - try { - RelationshipTypeMapper.mapOMASRelationshipTypeToOMRSRelationshipTypeGuid("operation", relationshipType); - assertTrue(false, "Expected unknown to fail"); - } catch (InvalidParameterException e) { - // we expect to get here - } - } else { - String guid = RelationshipTypeMapper.mapOMASRelationshipTypeToOMRSRelationshipTypeGuid("operation", relationshipType); - assertTrue(guid != null, "guid should not be null"); - } - } - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TestSynonymMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TestSynonymMapper.java deleted file mode 100644 index ca879e7839a..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/relationships/TestSynonymMapper.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Synonym; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.testng.annotations.Test; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - -/** - * Test Synonym mapper - */ -public class TestSynonymMapper -{ - public static final String DESC = " ssss"; - @Test - public void testSynonymMapper1() - { -// Synonym synonym = new Synonym(); -// -// String beforeDescription = DESC; -// synonym.setDescription(beforeDescription); -// // TODO mock the helper ? -// SynonymMapper mapper = new SynonymMapper(null); -// Relationship relationship = mapper.mapLineToRelationship(synonym); -// Synonym afterSynonym = (Synonym) mapper.mapRelationshipToLine(relationship); -// assertNotNull(afterSynonym); -// assertEquals(DESC,afterSynonym.getDescription()); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/build.gradle b/open-metadata-implementation/access-services/subject-area/subject-area-spring/build.gradle deleted file mode 100644 index 2c2ed2bf365..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-server') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'org.springframework:spring-web' - implementation 'io.swagger.core.v3:swagger-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Subject Area OMAS with Spring' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaCategoryRESTResource.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaCategoryRESTResource.java deleted file mode 100644 index 0f9399471f6..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaCategoryRESTResource.java +++ /dev/null @@ -1,304 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaCategoryRESTServices; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - -/** - * The SubjectAreaRESTServicesInstance provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides category authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") -@Tag(name = "Metadata Access Server: Subject Area OMAS", description = "The Subject Area OMAS supports subject matter experts who are documenting their knowledge about a particular subject. This includes glossary terms, reference data, validation rules.", - externalDocs = @ExternalDocumentation(description = "Further Information", - url = "https://egeria-project.org/services/omas/subject-area/overview/")) -public class SubjectAreaCategoryRESTResource { - private final SubjectAreaCategoryRESTServices restAPI = new SubjectAreaCategoryRESTServices(); - - /** - * Default constructor - */ - public SubjectAreaCategoryRESTResource() { - - } - - /** - * Create a Category. There is specialization of a Category that can also be created using this operation. - * To create this specialization, you should specify a nodeType other than Category in the supplied category. - *

- * Valid nodeTypes for this request are: - *

    - *
  • SubjectAreaDefinition to create a Category that represents a subject area
  • - *
  • Category to create a category that is not a subject area
  • - *
- *

- * The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is - * unique. If this qualifiedName is not specified then one will be generated as GlossaryCategory concatenated with the guid. - * - *

- * Failure to create the Categories classifications, link to its glossary or its icon, results in the create failing and the category being deleted - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedCategory category to create - * @return response, when successful contains the created category. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/categories") - public SubjectAreaOMASAPIResponse createCategory(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Category suppliedCategory) { - return restAPI.createCategory(serverName, userId, suppliedCategory); - } - - /** - * Get a Category - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get - * @return response, when successful contains the category associated with the requested guid. - * n not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/categories/{guid}") - public SubjectAreaOMASAPIResponse getCategoryByGuid(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getCategory(serverName, userId, guid); - } - - /** - * Find Category - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Category property values (this does not include the GlossarySummary content). - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the categories returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of Categories meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/categories") - public SubjectAreaOMASAPIResponse findCategory(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) String sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.findCategory(serverName, userId, searchCriteria, exactValue, ignoreCase,asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Category relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the category relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/categories/{guid}/relationships") - public SubjectAreaOMASAPIResponse getCategoryRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false) Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getCategoryRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Update a Category - *

- * Status is not updated using this call. - * The category parent can be updated with this call. For isReplace a null category parent will remove the existing parent relationship. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the category to update - * @param suppliedCategory category to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/categories/{guid}") - public SubjectAreaOMASAPIResponse updateCategory(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Category suppliedCategory, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateCategory(serverName, userId, guid, suppliedCategory, isReplace); - } - - /** - * Delete a Category or SubjectAreaDefinition instance - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the category instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the category will not exist after the operation. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the category to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
  • EntityNotDeletedException a soft delete was issued but the category was not deleted.
  • - *
  • EntityNotPurgedException a hard delete was issued but the category was not purged
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/categories/{guid}") - public SubjectAreaOMASAPIResponse deleteCategory(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteCategory(serverName, userId, guid); - } - - /** - * Restore a Category - *

- * Restore allows the deleted Category to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to restore - * @return response which when successful contains the restored category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/categories/{guid}") - public SubjectAreaOMASAPIResponse restoreCategory(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreCategory(serverName, userId, guid); - } - - /** - * Get the terms that are categorized by this Category - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression to match the categorized Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of terms is categorized by this Category - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/categories/{guid}/terms") - public SubjectAreaOMASAPIResponse getCategorizedTerms(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - return restAPI.getCategorizedTerms(serverName, userId, guid, searchCriteria, exactValue, ignoreCase,startingFrom, pageSize); - } - - /** - * Get this Category's child Categories. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the parent category - * @param searchCriteria String expression matching child Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of child categories filtered by the search criteria if one is supplied. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- **/ - @GetMapping(path = "/users/{userId}/categories/{guid}/categories") - public SubjectAreaOMASAPIResponse getCategoryChildren(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - - return restAPI.getCategoryChildren(serverName, userId, guid, searchCriteria, exactValue, ignoreCase,startingFrom, pageSize); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaGlossaryRESTResource.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaGlossaryRESTResource.java deleted file mode 100644 index e4d62d2257d..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaGlossaryRESTResource.java +++ /dev/null @@ -1,314 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaGlossaryRESTServices; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - -/** - * The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides glossary authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") -@Tag(name = "Metadata Access Server: Subject Area OMAS", description = "The Subject Area OMAS supports subject matter experts who are documenting their knowledge about a particular subject. This includes glossary terms, reference data, validation rules.", - externalDocs = @ExternalDocumentation(description = "Further Information", - url = "https://egeria-project.org/services/omas/subject-area/overview/")) -public class SubjectAreaGlossaryRESTResource { - private final SubjectAreaGlossaryRESTServices restAPI = new SubjectAreaGlossaryRESTServices(); - - /** - * Default constructor - */ - public SubjectAreaGlossaryRESTResource() { - - } - - /** - * Create a Glossary. There are specializations of glossaries that can also be created using this operation. - * To create a specialization, you should specify a nodeType other than Glossary in the supplied glossary. - *

- * Valid nodeTypes for this request are: - *

    - *
  • Taxonomy to create a Taxonomy
  • - *
  • CanonicalGlossary to create a canonical glossary
  • - *
  • TaxonomyAndCanonicalGlossary to create a glossary that is both a taxonomy and a canonical glosary
  • - *
  • Glossary to create a glossary that is not a taxonomy or a canonical glossary
  • - *
- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedGlossary Glossary to create - * @return response, when successful contains the created glossary. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/glossaries") - public SubjectAreaOMASAPIResponse createGlossary(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Glossary suppliedGlossary) { - return restAPI.createGlossary(serverName, userId, suppliedGlossary); - } - - /** - * Get a glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the glossary to get - * @return response which when successful contains the glossary with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/glossaries/{guid}") - public SubjectAreaOMASAPIResponse getGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getGlossaryByGuid(serverName, userId, guid); - } - - /** - * Find Glossary - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Glossary property values. If not specified then all glossaries are returned. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/glossaries") - public SubjectAreaOMASAPIResponse findGlossary(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) String sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.findGlossary(serverName, userId, searchCriteria, exactValue, ignoreCase, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Glossary relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the glossary relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/glossaries/{guid}/relationships") - public SubjectAreaOMASAPIResponse getGlossaryRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getGlossaryRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Update a Glossary - *

- * If the caller has chosen to incorporate the glossary name in their Glossary Terms or Categories qualified name, renaming the glossary will cause those - * qualified names to mismatch the Glossary name. - * If the caller has chosen to incorporate the glossary qualifiedName in their Glossary Terms or Categories qualified name, changing the qualified name of the glossary will cause those - * qualified names to mismatch the Glossary name. - * Status is not updated using this call. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to update - * @param glossary glossary to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/glossaries/{guid}") - public SubjectAreaOMASAPIResponse updateGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Glossary glossary, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateGlossary(serverName, userId, guid, glossary, isReplace); - } - - /** - * Delete a Glossary instance - *

- * The deletion of a glossary is only allowed if there is no glossary content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the glossary instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the glossary will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
  • EntityNotDeletedException a soft delete was issued but the glossary was not deleted.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/glossaries/{guid}") - public SubjectAreaOMASAPIResponse deleteGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid){ - return restAPI.deleteGlossary(serverName, userId, guid); - } - - /** - * Restore a Glossary - *

- * Restore allows the deleted Glossary to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to restore - * @return response which when successful contains the restored glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/glossaries/{guid}") - public SubjectAreaOMASAPIResponse restoreGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreGlossary(serverName, userId, guid); - } - - /** - * Get terms that are owned by this glossary. The server has a maximum page size defined, the number of terms returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param asOfTime the terms returned as they were at this time. null indicates at the current time. - * @param searchCriteria String expression matching child Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize Return the maximum number of elements that can be returned on this request. - * @return A list of terms owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - @GetMapping(path = "/users/{userId}/glossaries/{guid}/terms") - public SubjectAreaOMASAPIResponse getGlossaryTerms(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) String sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty) { - return restAPI.getGlossaryTerms(serverName, userId, guid, searchCriteria, exactValue, ignoreCase,asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get the Categories owned by this glossary. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to get terms - * @param searchCriteria String expression matching child Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the categories returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @return A list of categories owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - @GetMapping(path = "/users/{userId}/glossaries/{guid}/categories") - public SubjectAreaOMASAPIResponse getGlossaryCategories(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "onlyTop", required = false, defaultValue = "true") Boolean onlyTop, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) String sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getGlossaryCategories(serverName, userId, guid, searchCriteria, exactValue, ignoreCase, asOfTime, onlyTop, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaGraphRESTResource.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaGraphRESTResource.java deleted file mode 100644 index 3100742e3c2..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaGraphRESTResource.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaGraphRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - - -/** - * The SubjectAreaRESTServicesInstance provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides term authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") -@Tag(name="Metadata Access Server: Subject Area OMAS", description="The Subject Area OMAS supports subject matter experts who are documenting their knowledge about a particular subject. This includes glossary terms, reference data, validation rules.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omas/subject-area/overview/")) -public class SubjectAreaGraphRESTResource { - private final SubjectAreaGraphRESTServices restAPI = new SubjectAreaGraphRESTServices(); - /** - * Default constructor - */ - public SubjectAreaGraphRESTResource() { - - } - - /** - * Get the graph of nodes and relationships radiating out from a node. - * - * Return the nodes and relationships that radiate out from the supplied node (identified by a GUID). - * The results are scoped by types of relationships, types of nodes and classifications as well as level. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid the starting point of the query. - * @param nodeFilterStr Comma separated list of node names to include in the query results. Null means include - * all entities found, irrespective of their type. - * @param relationshipFilterStr comma separated list of relationship names to include in the query results. Null means include - * all relationships found, irrespective of their type. - * @param asOfTime Requests a historical query of the relationships for the entity. Null means return the - * present values. - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * @param level the number of the relationships (relationships) out from the starting node that the query will traverse to - * gather results. If not specified then it defaults to 3. - * @return A graph of nodeTypes. - * - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - @GetMapping( path = "/users/{userId}/nodes/{guid}") - public SubjectAreaOMASAPIResponse getGraph(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required=false) Date asOfTime, - @RequestParam(value = "nodeFilter", required=false)String nodeFilterStr, - @RequestParam(value = "relationshipFilter", required=false)String relationshipFilterStr, - @RequestParam(value = "statusFilter", required=false)StatusFilter statusFilter, // may need to extend this for controlled terms - @RequestParam(value = "level", required=false) Integer level ) { - - return restAPI.getGraph(serverName,userId,guid,asOfTime,nodeFilterStr,relationshipFilterStr,statusFilter,level); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaProjectRESTResource.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaProjectRESTResource.java deleted file mode 100644 index d932a8d7f7f..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaProjectRESTResource.java +++ /dev/null @@ -1,248 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaProjectRESTServices; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - -/** - * The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides Project authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") -@Tag(name = "Metadata Access Server: Subject Area OMAS", description = "The Subject Area OMAS supports subject matter experts who are documenting their knowledge about a particular subject. This includes glossary terms, reference data, validation rules.", - externalDocs = @ExternalDocumentation(description = "Further Information", - url = "https://egeria-project.org/services/omas/subject-area/overview/")) -public class SubjectAreaProjectRESTResource { - private final SubjectAreaProjectRESTServices restAPI = new SubjectAreaProjectRESTServices(); - - /** - * Default constructor - */ - public SubjectAreaProjectRESTResource() { } - - /** - * Create a Project. - *

- * Projects with the same name can be confusing. Best practise is to create projects that have unique names. - * This Create call does not police that Project names are unique. So it is possible to create projects with the same name as each other. - *

- * Projects that are created using this call will be GlossaryProjects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedProject Project to create - * @return response, when successful contains the created Project. - * when not successful the following Exception responses can occur - * UserNotAuthorizedException the requesting user is not authorized to issue this request. - * MetadataServerUncontactableException not able to communicate with a Metadata respository service. - * InvalidParameterException one of the parameters is null or invalid. - * UnrecognizedGUIDException the supplied guid was not recognised - * ClassificationException Error processing a classification - * StatusNotSupportedException A status value is not supported - */ - @PostMapping(path = "/users/{userId}/projects") - public SubjectAreaOMASAPIResponse createProject(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Project suppliedProject) { - return restAPI.createProject(serverName, userId, suppliedProject); - } - - /** - * Get a Project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the Project to get - * @return response which when successful contains the Project with the requested guid - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
- */ - @GetMapping(path = "/users/{userId}/projects/{guid}") - public SubjectAreaOMASAPIResponse getProject(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getProjectByGuid(serverName, userId, guid); - } - - /** - * Find Project - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Project property values. If not specified then all projects are returned. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the projects returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of projects meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/projects") - public SubjectAreaOMASAPIResponse findProject(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.findProject(serverName, userId, searchCriteria, exactValue, ignoreCase, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Project relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the Project relationships - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - - - @GetMapping(path = "/users/{userId}/projects/{guid}/relationships") - public SubjectAreaOMASAPIResponse getProjectRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getProjectRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Update a Project - *

- * If the caller has chosen to incorporate the Project name in their Project Terms or Categories qualified name, renaming the Project will cause those - * qualified names to mismatch the Project name. - * If the caller has chosen to incorporate the Project qualifiedName in their Project Terms or Categories qualified name, changing the qualified name of the Project will cause those - * qualified names to mismatch the Project name. - * Status is not updated using this call. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to update - * @param Project Project to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated Project - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - @PutMapping(path = "/users/{userId}/projects/{guid}") - public SubjectAreaOMASAPIResponse updateProject(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Project Project, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateProject(serverName, userId, guid, Project, isReplace); - } - - /** - * Delete a Project instance - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the Project instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the Project will not exist after the operation. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the Project was not deleted.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/projects/{guid}") - public SubjectAreaOMASAPIResponse deleteProject(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteProject(serverName, userId, guid); - } - - /** - * Restore a Project - *

- * Restore allows the deleted Project to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project to restore - * @return response which when successful contains the restored Project - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - @PostMapping(path = "/users/{userId}/projects/{guid}") - public SubjectAreaOMASAPIResponse restoreProject(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.restoreProject(serverName, userId, guid); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaRESTResourceConfig.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaRESTResourceConfig.java deleted file mode 100644 index 5bbfb0215e2..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaRESTResourceConfig.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaConfigRESTServices; -import org.springframework.web.bind.annotation.*; - - -/** - * The SubjectAreaRESTServicesInstance provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides term authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") -@Tag(name = "Metadata Access Server: Subject Area OMAS", description = "The Subject Area OMAS supports subject matter experts who are documenting their knowledge about a particular subject. This includes glossary terms, reference data, validation rules.", - externalDocs = @ExternalDocumentation(description = "Further Information", - url = "https://egeria-project.org/services/omas/subject-area/overview/")) -public class SubjectAreaRESTResourceConfig { - private final SubjectAreaConfigRESTServices restAPI = new SubjectAreaConfigRESTServices(); - - /** - * Default constructor - */ - public SubjectAreaRESTResourceConfig() { - - } - - /** - * Get the config - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @return response which when successful contains the configuration - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - @GetMapping(path = "/users/{userId}/configs/current") - public SubjectAreaOMASAPIResponse getConfig(@PathVariable String serverName, - @PathVariable String userId) { - return restAPI.getConfig(serverName, userId); - } - - -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaRelationshipRESTResource.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaRelationshipRESTResource.java deleted file mode 100644 index 89566b91cc1..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaRelationshipRESTResource.java +++ /dev/null @@ -1,1991 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaRelationshipRESTServices; -import org.springframework.web.bind.annotation.*; - - - -/** - * The SubjectAreaRESTServicesInstance provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides relationship authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") -@Tag(name = "Metadata Access Server: Subject Area OMAS", description = "The Subject Area OMAS supports subject matter experts who are documenting their knowledge about a particular subject. This includes glossary terms, reference data, validation rules.", - externalDocs = @ExternalDocumentation(description = "Further Information", - url = "https://egeria-project.org/services/omas/subject-area/overview/")) -public class SubjectAreaRelationshipRESTResource { - private final SubjectAreaRelationshipRESTServices restAPI = new SubjectAreaRelationshipRESTServices(); - - /** - * Default constructor - */ - public SubjectAreaRelationshipRESTResource() { - - } - - /** - * Create a TermHASARelationship is the relationship between a spine object and a spine attribute. - * Note that this method does not error if the relationship ends are not spine objects or spine attributes. - * This allows the user to create terms then make them spine objects and spine attributes at a later stage. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termHasARelationship the HASA relationship - * @return response, when successful contains the created TermHASARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/has-as") - public SubjectAreaOMASAPIResponse createTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - - @RequestBody HasA termHasARelationship) { - return restAPI.createTermHasARelationship(serverName, userId, termHasARelationship); - } - - /** - * Get a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HAS A relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/has-as/{guid}") - public SubjectAreaOMASAPIResponse getTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermHasARelationship(serverName, userId, guid); - } - - /** - * Update a TermHasARelationship is the relationship between a spine object and a spine attribute. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param termHasARelationship the HASA relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created TermHasARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/has-as/{guid}") - public SubjectAreaOMASAPIResponse updateTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody HasA termHasARelationship, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateTermHasARelationship(serverName, userId, guid, termHasARelationship, isReplace); - } - - /** - * Delete a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HAS A relationship to delete - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/has-as/{guid}") - public SubjectAreaOMASAPIResponse deleteTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteTermHasARelationship(serverName, userId, guid); - } - - /** - * Restore a has a relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/has-as/{guid}") - public SubjectAreaOMASAPIResponse restoreTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTermHasARelationship(serverName, userId, guid); - } - - /** - * Create a RelatedTerm. A Related Term is a link between two similar Terms. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param relatedTermRelationship the RelatedTerm relationship - * @return response, when successful contains the created Related Term relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/related-terms") - public SubjectAreaOMASAPIResponse createRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody RelatedTerm relatedTermRelationship) { - return restAPI.createRelatedTerm(serverName, userId, relatedTermRelationship); - } - - /** - * Get a related Term relationship. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to get - * @return response which when successful contains the related term relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/related-terms/{guid}") - public SubjectAreaOMASAPIResponse getRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getRelatedTerm(serverName, userId, guid); - } - - /** - * Update a Related Term relationship. A Related Term is a link between two similar Terms. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param relatedTermRelationship the related term relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created RelatedTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/related-terms/{guid}") - public SubjectAreaOMASAPIResponse updateRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody RelatedTerm relatedTermRelationship, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateRelatedTerm(serverName, userId, guid, relatedTermRelationship, isReplace); - } - - /** - * Delete a Related Term relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Related term relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/related-terms/{guid}") - public SubjectAreaOMASAPIResponse deleteRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteRelatedTerm(serverName, userId, guid); - } - - /** - * Restore a related Term relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/related-terms/{guid}") - public SubjectAreaOMASAPIResponse restoreRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreRelatedTerm(serverName, userId, guid); - } - - /** - * Create a synonym relationship, which is a link between glossary terms that have the same meaning. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param synonym the Synonym relationship - * @return response, when successful contains the created synonym relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/synonyms") - public SubjectAreaOMASAPIResponse createSynonym(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Synonym synonym) { - return restAPI.createSynonym(serverName, userId, synonym); - } - - /** - * Get a synonym relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the synonym relationship to get - * @return response which when successful contains the synonym relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/synonyms/{guid}") - public SubjectAreaOMASAPIResponse getSynonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getSynonymRelationship(serverName, userId, guid); - } - - /** - * Update a Synonym relationship which is a link between glossary terms that have the same meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param synonym the synonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created SynonymRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/synonyms/{guid}") - public SubjectAreaOMASAPIResponse updateSynonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Synonym synonym, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateSynonymRelationship(serverName, userId, guid, synonym, isReplace); - } - - /** - * Delete a Synonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/synonyms/{guid}") - public SubjectAreaOMASAPIResponse deleteSynonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteSynonymRelationship(serverName, userId, guid); - } - - /** - * Restore a Synonym - *

- * Restore allows the deleted Synonym to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym to delete - * @return response which when successful contains the restored Synonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/synonyms/{guid}") - public SubjectAreaOMASAPIResponse restoreSynonym(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreSynonym(serverName, userId, guid); - } - - /** - * Create an antonym relationship, which is a link between glossary terms that have the opposite meaning. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param antonym the Antonym relationship - * @return response, when successful contains the created antonym relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/antonyms") - public SubjectAreaOMASAPIResponse createAntonym(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Antonym antonym) { - return restAPI.createAntonym(serverName, userId, antonym); - } - - /** - * Get a antonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to get - * @return response which when successful contains the antonym relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/antonyms/{guid}") - public SubjectAreaOMASAPIResponse getAntonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getAntonymRelationship(serverName, userId, guid); - } - - /** - * Update a Antonym relationship which is a link between glossary terms that have the opposite meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param antonym the antonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created AntonymRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/antonyms/{guid}") - public SubjectAreaOMASAPIResponse updateAntonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Antonym antonym, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateAntonymRelationship(serverName, userId, guid, antonym, isReplace); - } - - /** - * Delete a Antonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/antonyms/{guid}") - public SubjectAreaOMASAPIResponse deleteAntonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteAntonymRelationship(serverName, userId, guid); - } - - /** - * Restore a Antonym - *

- * Restore allows the deleted Antonym to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym to delete - * @return response which when successful contains the restored Antonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/antonyms/{guid}") - public SubjectAreaOMASAPIResponse restoreAntonym(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreAntonym(serverName, userId, guid); - } - - /** - * Create a translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param translation the Translation relationship - * @return response, when successful contains the created translation relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/translations") - public SubjectAreaOMASAPIResponse createTranslation(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Translation translation) { - return restAPI.createTranslation(serverName, userId, translation); - } - - /** - * Get a translation relationshiptranslation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the translation relationship to get - * @return response which when successful contains the translation relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/translations/{guid}") - public SubjectAreaOMASAPIResponse getTranslationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTranslationRelationship(serverName, userId, guid); - } - - /** - * Update a Translation relationship translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param translation the translation relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created TranslationRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/translations/{guid}") - public SubjectAreaOMASAPIResponse updateTranslationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Translation translation, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateTranslationRelationship(serverName, userId, guid, translation, isReplace); - } - - /** - * Delete a Translation relationshiptranslation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/translations/{guid}") - public SubjectAreaOMASAPIResponse deleteTranslationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteTranslationRelationship(serverName, userId, guid); - } - - /** - * Restore a Translation - *

- * Restore allows the deleted Translation to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation to delete - * @return response which when successful contains the restored Translation - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/translations/{guid}") - public SubjectAreaOMASAPIResponse restoreTranslation(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTranslation(serverName, userId, guid); - } - - /** - * Create a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param usedInContext the UsedInContext relationship - * @return response, when successful contains the created usedInContext relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/used-in-contexts") - public SubjectAreaOMASAPIResponse createusedInContext(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody UsedInContext usedInContext) { - return restAPI.createUsedInContext(serverName, userId, usedInContext); - } - - /** - * Get a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the usedInContext relationship to get - * @return response which when successful contains the usedInContext relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse getUsedInContextRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getUsedInContextRelationship(serverName, userId, guid); - } - - /** - * Update a UsedInContext relationship which is a link between glossary terms, where one describes the context where the other one is valid to use. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param usedInContext the used in context relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created UsedInContextRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse updateUsedInContextRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody UsedInContext usedInContext, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateUsedInContextRelationship(serverName, userId, guid, usedInContext, isReplace); - } - - /** - * Delete a UsedInContext relationship which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse deleteUsedInContextRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteUsedInContextRelationship(serverName, userId, guid); - } - - /** - * Restore a UsedInContext - *

- * Restore allows the deleted UsedInContext to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext to delete - * @return response which when successful contains the restored UsedInContext - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse restoreUsedInContext(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreUsedInContext(serverName, userId, guid); - } - - /** - * Create a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param preferredTerm the preferred term relationship - * @return response, when successful contains the created preferredTerm relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/preferred-terms") - public SubjectAreaOMASAPIResponse createPreferredTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody PreferredTerm preferredTerm) { - return restAPI.createPreferredTerm(serverName, userId, preferredTerm); - } - - /** - * Get a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the preferredTerm relationship to get - * @return response which when successful contains the preferredTerm relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse getPreferredTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getPreferredTermRelationship(serverName, userId, guid); - } - - /** - * Update a PreferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param preferredTerm the preferred term relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created PreferredTermRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse updatePreferredTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody PreferredTerm preferredTerm, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updatePreferredTermRelationship(serverName, userId, guid, preferredTerm, isReplace); - } - - /** - * Delete a PreferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse deletePreferredTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deletePreferredTermRelationship(serverName, userId, guid); - } - - /** - * Restore a PreferredTerm - *

- * Restore allows the deleted PreferredTerm to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm to delete - * @return response which when successful contains the restored PreferredTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse restorePreferredTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restorePreferredTerm(serverName, userId, guid); - } - - - /** - * Create a validValue relationship, which is a link between glossary terms that have the same meaning. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param validValue the ValidValue relationship - * @return response, when successful contains the created validValue relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/valid-values") - public SubjectAreaOMASAPIResponse createValidValue(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody ValidValue validValue) { - return restAPI.createValidValue(serverName, userId, validValue); - } - - /** - * Get a validValue relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the validValue relationship to get - * @return response which when successful contains the validValue relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/valid-values/{guid}") - public SubjectAreaOMASAPIResponse getValidValueRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getValidValueRelationship(serverName, userId, guid); - } - - /** - * Update a ValidValue relationship which is a link between glossary terms that have the same meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param validValue the valid value relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created ValidValueRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/valid-values/{guid}") - public SubjectAreaOMASAPIResponse updateValidValueRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody ValidValue validValue, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateValidValueRelationship(serverName, userId, guid, validValue, isReplace); - } - - - /** - * Delete a ValidValue relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/valid-values/{guid}") - public SubjectAreaOMASAPIResponse deleteValidValueRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteValidValueRelationship(serverName, userId, guid); - } - - /** - * Restore a ValidValue - *

- * Restore allows the deleted ValidValue to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue to delete - * @return response which when successful contains the restored ValidValue - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/valid-values/{guid}") - public SubjectAreaOMASAPIResponse restoreValidValue(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreValidValue(serverName, userId, guid); - } - - /** - * Create a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param replacementTerm the ReplacementTerm relationship - * @return response, when successful contains the created replacementTerm relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/replacement-terms") - public SubjectAreaOMASAPIResponse createReplacementTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody ReplacementTerm replacementTerm) { - return restAPI.createReplacementTerm(serverName, userId, replacementTerm); - } - - /** - * Get a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the replacementTerm relationship to get - * @return response which when successful contains the replacementTerm relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse getReplacementTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getReplacementTerm(serverName, userId, guid); - } - - /** - * Update a ReplacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param replacementTerm the replacement term relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created ReplacementTermRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse updateReplacementTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody ReplacementTerm replacementTerm, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateReplacementTerm(serverName, userId, guid, replacementTerm, isReplace); - } - - /** - * Delete a ReplacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse deleteReplacementTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteReplacementTerm(serverName, userId, guid); - } - - /** - * Restore a ReplacementTerm - *

- * Restore allows the deleted ReplacementTerm to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm to delete - * @return response which when successful contains the restored ReplacementTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse restoreReplacementTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreReplacementTerm(serverName, userId, guid); - } - - /** - * Create a termTypedByRelationship, which is a link between a spine attribute and its type. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termTypedByRelationship the TermTypedByRelationship - * @return response, when successful contains the created termTypedByRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/typed-bys") - public SubjectAreaOMASAPIResponse createtermTypedByRelationship(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody TypedBy termTypedByRelationship) { - return restAPI.createTermTypedByRelationship(serverName, userId, termTypedByRelationship); - } - - /** - * Get a termTypedByRelationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termTypedByRelationship to get - * @return response which when successful contains the termTypedByRelationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse getTypedByRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermTypedByRelationship(serverName, userId, guid); - } - - /** - * Update a TermTypedByRelationship, which is a link between a spine attribute and its type. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param termTypedByRelationship the typed by relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created TermTypedByRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse updateTermTypedByRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody TypedBy termTypedByRelationship, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateTermTypedByRelationship(serverName, userId, guid, termTypedByRelationship, isReplace); - } - - /** - * Delete a TermTypedByRelationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermTypedByRelationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse deleteTypedByRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteTermTypedByRelationship(serverName, userId, guid); - } - - /** - * Restore a Term TYPED BY relationship - *

- * Restore allows the deleted TermTypedBy to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermTypedBy to delete - * @return response which when successful contains the restored TermTypedBy - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse restoreTermTypedByRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTermTypedByRelationship(serverName, userId, guid); - } - - /** - * Create a iSARelationship, which is a link between a more general glossary term and a more specific definition. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param iSARelationship the IsARelationship - * @return response, when successful contains the created iSARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/is-as") - public SubjectAreaOMASAPIResponse createiSARelationship(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody IsA iSARelationship) { - return restAPI.createIsARelationship(serverName, userId, iSARelationship); - } - - /** - * Get a iSARelationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the iSARelationship to get - * @return response which when successful contains the iSARelationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/is-as/{guid}") - public SubjectAreaOMASAPIResponse getIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getIsARelationship(serverName, userId, guid); - } - - /** - * Update a IsARelationship, which is a link between a more general glossary term and a more specific definition. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param isa the is-a relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created IsARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/is-as/{guid}") - public SubjectAreaOMASAPIResponse updateIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody IsA isa, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateIsARelationship(serverName, userId, guid, isa, isReplace); - } - - /** - * Delete a IsARelationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsARelationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/is-as/{guid}") - public SubjectAreaOMASAPIResponse deleteTermIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteIsARelationship(serverName, userId, guid); - } - - /** - * Restore a Isa Relationship - *

- * Restore allows the deleted Isa Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Isa Relationship to delete - * @return response which when successful contains the restored IsaRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/is-as/{guid}") - public SubjectAreaOMASAPIResponse restoreIsaRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreIsARelationship(serverName, userId, guid); - } - - /** - * Create a termIsATypeOfRelationship, which is an inheritance relationship between two spine objects. - * - *

- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termIsATypeOfRelationship the TermIsATypeOfRelationship - * @return response, when successful contains the created termIsATypeOfRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/is-a-type-of-deprecateds") - public SubjectAreaOMASAPIResponse createTermIsATypeOfRelationship(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody IsATypeOfDeprecated termIsATypeOfRelationship) { - return restAPI.createIsATypeOfDeprecated(serverName, userId, termIsATypeOfRelationship); - } - - /** - * Get a termIsATypeOfRelationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termIsATypeOfRelationship to get - * @return response which when successful contains the termIsATypeOfRelationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse getTermIsATypeOfRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getIsATypeOfDeprecated(serverName, userId, guid); - } - - /** - * Update a termIsATypeOfRelationship, which is an inheritance relationship between two spine objects. - *

- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param isatypeof the is-a-type-of-deprecated relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created IsARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse updateIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody IsATypeOfDeprecated isatypeof, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateIsATypeOfDeprecated(serverName, userId, guid, isatypeof, isReplace); - } - - - /** - * Delete a TermIsATypeOf Relationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermIsATypeOfRelationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse deleteTermIsaTypeOfRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteIsATypeOfDeprecatedRelationship(serverName, userId, guid); - } - - /** - * Restore a TermIsATypeOf Relationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - *

- * Restore allows the deleted Is a Type Of Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @deprecated - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Term Is a Type Of Relationship to delete - * @return response which when successful contains the restored TermIsaTypeOfRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - - @PostMapping(path = "/users/{userId}/relationships/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse restoreTermIsaTypeOfRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreIsATypeOfDeprecated(serverName, userId, guid); - } - - /** - * Create a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param IsATypeOf the IsATypeOf - * @return response, when successful contains the created IsATypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/is-a-type-ofs") - public SubjectAreaOMASAPIResponse createIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody IsATypeOf IsATypeOf) { - return restAPI.createIsATypeOf(serverName, userId, IsATypeOf); - } - - - /** - * Get a IsATypeOf, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf to get - * @return response which when successful contains the IsATypeOf with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse getIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getIsATypeOf(serverName, userId, guid); - } - - /** - * Update a IsATypeOf, which is an inheritance relationship between two spine objects. - *

- * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param IsATypeOf the is-a-type-ofs relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created IsATypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse updateIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody IsATypeOf IsATypeOf, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateIsATypeOf(serverName, userId, guid, IsATypeOf, isReplace); - } - - - /** - * Delete a IsATypeOf, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse deleteTermIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteIIsATypeOf(serverName, userId, guid); - } - - /** - * Restore a 'object inheritances' Relationship - * - *

- * Restore allows the deleted 'object inheritances' Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Term Is a Type Of Relationship to delete - * @return response which when successful contains the restoredIsATypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - - @PostMapping(path = "/users/{userId}/relationships/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse restoreTermIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreIsATypeOf(serverName, userId, guid); - } - - /** - * Create a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termCategorizationRelationship the TermCategorizationRelationship - * @return response, when successful contains the created termCategorizationRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/term-categorizations") - public SubjectAreaOMASAPIResponse createTermCategorization(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Categorization termCategorizationRelationship) { - return restAPI.createTermCategorizationRelationship(serverName, userId, termCategorizationRelationship); - } - - /** - * Get a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termCategorizationRelationship to get - * @return response which when successful contains the termCategorizationRelationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse getTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermCategorizationRelationship(serverName, userId, guid); - } - - /** - * Update a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param isatypeof the is-a-type-of relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created termCategorization Relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse updateTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Categorization isatypeof, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateTermCategorizationRelationship(serverName, userId, guid, isatypeof, isReplace); - } - - - /** - * Delete a TermCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorizationRelationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse deleteTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteTermCategorizationRelationship(serverName, userId, guid); - } - - /** - * Restore a TermCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * Restore allows the deleted TermCategorization Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Term Is a Type Of Relationship to delete - * @return response which when successful contains the restored TermCategorization - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse restoreTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTermCategorizationRelationship(serverName, userId, guid); - } - - // No modification of TermAnchor exists, because this is an anchoring relationship - - - /** - * Get a termAnchor Relationship. A relationship between a Glossary and a Term. This relationship allows terms to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termAnchor Relationship to get - * @return response which when successful contains the termAnchorRelationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/term-anchor/{guid}") - public SubjectAreaOMASAPIResponse getTermAnchorRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermAnchorRelationship(serverName, userId, guid); - - } - - // No modification of CategoryAnchor exists, because this is an anchoring relationship - - - /** - * Get a categoryAnchor Relationship. A relationship between a Glossary and a Category. This relationship allows terms to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the categoryAnchor Relationship to get - * @return response which when successful contains the categoryAnchorRelationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/category-anchor/{guid}") - public SubjectAreaOMASAPIResponse getCategoryAnchor(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getCategoryAnchorRelationship(serverName, userId, guid); - } - - /** - * Create a project scope relationship, which is a link between the project content and the project. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param projectScope the Project scope relationship - * @return response, when successful contains the created project scope relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/project-scopes") - public SubjectAreaOMASAPIResponse createProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody ProjectScope projectScope) { - return restAPI.createProjectScopeRelationship(serverName, userId, projectScope); - } - - /** - * Get a project scope relationship, which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the project scope relationship to get - * @return response which when successful contains the project scope relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse getProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getProjectScopeRelationship(serverName, userId, guid); - } - - /** - * Update a Project scope relationship which is a link between the project content and the project. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param projectScope the projectScope relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created ProjectScopeRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse updateProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody ProjectScope projectScope, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateProjectScopeRelationship(serverName, userId, guid, projectScope, isReplace); - } - - /** - * Delete a Project scope relationship which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project scope relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse deleteProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteProjectScopeRelationship(serverName, userId, guid); - } - - /** - * Restore a ProjectScope, which is a link between the project content and the project. - *

- * Restore allows the deleted ProjectScopeRelationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScopeRelationship to delete - * @return response which when successful contains the restored ProjectScopeRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse restoreProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreProjectScopeRelationship(serverName, userId, guid); - } - - /** - * Get a SemanticAssignment relationship, Links a glossary term to another element such as an asset or schema element to define its meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the SemanticAssignment relationship to get - * @return response which when successful contains the SemanticAssignment relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/semantic-assignments/{guid}") - public SubjectAreaOMASAPIResponse getSemanticAssignmentRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getSemanticAssignmentRelationship(serverName, userId, guid); - } - - /** - * Create a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @return response, when successful contains the created categoryHierarchyLink relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/category-hierarchy-link") - public SubjectAreaOMASAPIResponse createCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody CategoryHierarchyLink categoryHierarchyLink) { - return restAPI.createCategoryHierarchyLink(serverName, userId, categoryHierarchyLink); - } - - /** - * Get a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to get - * @return response which when successful contains the CategoryHierarchyLink relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/relationships/category-hierarchy-link/{guid}") - public SubjectAreaOMASAPIResponse getCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getCategoryHierarchyLink(serverName, userId, guid); - } - - /** - * Update a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated categoryHierarchyLink - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/users/{userId}/relationships/category-hierarchy-link/{guid}") - public SubjectAreaOMASAPIResponse updateCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody CategoryHierarchyLink categoryHierarchyLink, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateCategoryHierarchyLink(serverName, userId, guid, categoryHierarchyLink, isReplace); - } - - /** - * Delete a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/relationships/category-hierarchy-link/{guid}") - public SubjectAreaOMASAPIResponse deleteCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteCategoryHierarchyLink(serverName, userId, guid); - } - - /** - * Restore a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - *

- * Restore allows the deleted CategoryHierarchyLink Relationship to be made active again. Restore allows deletes to be undone. - * Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to delete - * @return response which when successful contains the restored CategoryHierarchyLink - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/users/{userId}/relationships/category-hierarchy-link/{guid}") - public SubjectAreaOMASAPIResponse restoreCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreCategoryHierarchyLink(serverName, userId, guid); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaTermRESTResource.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaTermRESTResource.java deleted file mode 100644 index cc201c0fa72..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaTermRESTResource.java +++ /dev/null @@ -1,276 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaTermRESTServices; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - - -/** - * The SubjectAreaRESTServicesInstance provides the server-side implementation of the SubjectArea Open Metadata - * Access Service (OMAS). This interface provides term authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") -@Tag(name = "Metadata Access Server: Subject Area OMAS", description = "The Subject Area OMAS supports subject matter experts who are documenting their knowledge about a particular subject. This includes glossary terms, reference data, validation rules.", - externalDocs = @ExternalDocumentation(description = "Further Information", - url = "https://egeria-project.org/services/omas/subject-area/overview/")) -public class SubjectAreaTermRESTResource { - private final SubjectAreaTermRESTServices restAPI = new SubjectAreaTermRESTServices(); - - /** - * Default constructor - */ - public SubjectAreaTermRESTResource() { - - } - - /** - * Create a Term - *

- * The name needs to be specified - as this is the main identifier for the term. The name should be unique for canonical glossaries. This API does not police the uniqueness in this case. - *

- * The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is - * unique. If this qualifiedName is not specified then one will be generated as GlossaryTerm concatenated with the guid. - *

- * Failure to create the Terms classifications, link to its glossary or its icon, results in the create failing and the term being deleted - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId - * @param suppliedTerm term to create - * @return response, when successful contains the created term. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request. - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service. - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised - *
  • ClassificationException Error processing a classification - *
  • StatusNotSupportedException A status value is not supported - *
- */ - @PostMapping(path = "/users/{userId}/terms") - public SubjectAreaOMASAPIResponse createTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Term suppliedTerm) { - return restAPI.createTerm(serverName, userId, suppliedTerm); - } - - /** - * Get a Term - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to get - * @return response which when successful contains the term with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
- */ - @GetMapping(path = "/users/{userId}/terms/{guid}") - public SubjectAreaOMASAPIResponse getTermByGuid(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermByGuid(serverName, userId, guid); - } - - /** - * Find Term - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param searchCriteria String expression matching Term property values (this does not include the GlossarySummary content). When not specified, all terms are returned. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of Terms meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - @GetMapping(path = "/users/{userId}/terms") - public SubjectAreaOMASAPIResponse findTerm(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) String sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.findTerm(serverName, userId, searchCriteria, exactValue, ignoreCase, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Term relationships - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the term relationships - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - - - @GetMapping(path = "/users/{userId}/terms/{guid}/relationships") - public SubjectAreaOMASAPIResponse getTermRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - - ) { - return restAPI.getTermRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Update a Term - *

- * Status is not updated using this call. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the term to update - * @param suppliedTerm term to be updated - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. The GovernanceClassification content is always replaced. - * @return a response which when successful contains the updated term - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - @PutMapping(path = "/users/{userId}/terms/{guid}") - public SubjectAreaOMASAPIResponse updateTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Term suppliedTerm, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateTerm(serverName, userId, guid, suppliedTerm, isReplace); - } - - /** - * Delete a Term instance - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the term instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the term will not exist after the operation. - * when not successful the following Exception responses can occur - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the term to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the term was not deleted.
  • - *
- */ - @DeleteMapping(path = "/users/{userId}/terms/{guid}") - public SubjectAreaOMASAPIResponse deleteTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteTerm(serverName, userId, guid); - } - - /** - * Restore a Term - *

- * Restore allows the deleted Term to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the term to delete - * @return response which when successful contains the restored term - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - @PostMapping(path = "/users/{userId}/terms/{guid}") - public SubjectAreaOMASAPIResponse restoreTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTerm(serverName, userId, guid); - } - - /** - * Get the Categories categorizing this Term. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of categories categorizing this Term - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/users/{userId}/terms/{guid}/categories") - public SubjectAreaOMASAPIResponse getTermCategories(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - - return restAPI.getTermCategories(serverName, userId, guid, startingFrom, pageSize); - } -} diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/package-info.java b/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/package-info.java deleted file mode 100644 index ec78ba858e4..00000000000 --- a/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These are the Java clients for the Asset Consumer OMAS. - */ -/** - * Subject area spring server APIs. - */ -package org.odpi.openmetadata.accessservices.subjectarea.server.spring; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/README.md b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/README.md deleted file mode 100644 index 045a77f15cf..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/README.md +++ /dev/null @@ -1,12 +0,0 @@ - - - - -In order for the connector to start the dependencies for elasticsearch and elasticsearch-rest-client have to be to be provided at runtime otherwise the initialization will fail. - ----- -* Return to [Integration Connectors module](..) - ----- -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/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/build.gradle deleted file mode 100644 index 6d39ef2be77..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/build.gradle +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') - compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') - compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') - compileOnly project(':open-metadata-implementation:frameworks:open-integration-framework') -// compileOnly project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-api') - compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-connectors-api') - implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-factory') - implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:spring-rest-client-connector') - compileOnly project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - compileOnly 'org.elasticsearch.client:elasticsearch-rest-client' - implementation 'co.elastic.clients:elasticsearch-java' -// compileOnly 'org.elasticsearch:elasticsearch' - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'org.slf4j:slf4j-api' -} - -description = 'Elasticsearch connector for the search solution' - -java { - withJavadocJar() -} - -test { - useTestNG() - // This will default to standard search pattern - see https://docs.gradle.org/current/userguide/java_testing.html#sec:test_detection - scanForTestClasses = false -} diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationConnector.java deleted file mode 100644 index 1dd7d2e55dd..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationConnector.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.adapters.connectors.integration.elasticsearch; - - -import co.elastic.clients.elasticsearch.ElasticsearchClient; -import co.elastic.clients.json.jackson.JacksonJsonpMapper; -import co.elastic.clients.transport.ElasticsearchTransport; -import co.elastic.clients.transport.rest_client.RestClientTransport; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import org.apache.http.HttpHost; -import org.elasticsearch.client.RestClient; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogEvent; -import org.odpi.openmetadata.adapters.connectors.integration.elasticsearch.ffdc.ElasticsearchIntegrationConnectorAuditCode; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; -import org.odpi.openmetadata.integrationservices.search.connector.SearchIntegratorConnector; -import org.odpi.openmetadata.integrationservices.search.connector.SearchIntegratorContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.Map; -import java.util.Objects; - -import static org.odpi.openmetadata.adapters.connectors.integration.elasticsearch.ffdc.ElasticsearchIntegratorErrorCode.BAD_CONFIG; - - -/** - * ElasticsearchIntegrationConnector provides common methods for the connector in this module. - */ -public class ElasticsearchIntegrationConnector extends SearchIntegratorConnector { - private static final Logger log = LoggerFactory.getLogger(ElasticsearchIntegrationConnector.class); - private static final ObjectWriter OBJECT_WRITER = new ObjectMapper().writer(); - private static final String INDEX_NAME = "indexName"; - private static final String ASSETS_INDEX_NAME = "assets"; - - private String targetRootURL = null; - private String targetRootProtocol = null; - private SearchIntegratorContext myContext = null; - private ElasticsearchClient client; - private String indexName = "test"; - - /** - * Initialize the connector. - * - * @param connectorInstanceId - unique id for the connector instance - useful for messages etc - * @param connectionProperties - POJO for the configuration used to create the connector. - */ - @Override - public void initialize(String connectorInstanceId, ConnectionProperties connectionProperties) { - super.initialize(connectorInstanceId, connectionProperties); - - org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties endpoint = connectionProperties.getEndpoint(); - - if (endpoint != null) { - targetRootURL = endpoint.getAddress(); - targetRootProtocol = endpoint.getProtocol(); - - } - - Map configurationProperties = connectionProperties.getConfigurationProperties(); - - String configuredIndexName = (String) configurationProperties.get(INDEX_NAME); - this.indexName = Objects.requireNonNullElse(configuredIndexName, ASSETS_INDEX_NAME); - } - - - /** - * Indicates that the connector is completely configured and can begin processing. - * This call can be used to register with non-blocking services. - * - * @throws ConnectorCheckedException there is a problem within the connector. - */ - @Override - public synchronized void start() throws ConnectorCheckedException { - super.start(); - - final String methodName = "start"; - - initializeElasticSearchClient(methodName); - - myContext = super.getContext(); - - } - - /** - *

- * - * @throws ConnectorCheckedException there is a problem with the connector. It is not able to refresh the metadata. - */ - @Override - public synchronized void refresh() throws ConnectorCheckedException { - final String methodName = "refresh"; - } - - - /** - * Shutdown monitoring - * - * @throws ConnectorCheckedException something failed in the super class - */ - @Override - public synchronized void disconnect() throws ConnectorCheckedException { - final String methodName = "disconnect"; - - log.debug("disconnecting"); - if (auditLog != null) { - auditLog.logMessage(methodName, - ElasticsearchIntegrationConnectorAuditCode.CONNECTOR_STOPPING.getMessageDefinition(connectorName)); - } - - super.disconnect(); - } - - public void initializeElasticSearchClient(String callingMethodName) throws ConnectorCheckedException { - String[] urlParts = targetRootURL.split(":"); - String hostname = urlParts[0]; - int port; - try { - port = Integer.parseInt(urlParts[1]); - } catch (NumberFormatException e) { - log.debug("received exception trying to determine port " + e.getMessage()); - throw new ConnectorCheckedException(BAD_CONFIG.getMessageDefinition("port", "targetRootURL", callingMethodName, e.getMessage()), this.getClass().getName(), - callingMethodName); - } - RestClient restClient = RestClient.builder(new HttpHost(hostname, port, targetRootProtocol)).build(); - ElasticsearchTransport transport = new RestClientTransport(restClient, new JacksonJsonpMapper()); - client = new ElasticsearchClient(transport); - - } - - /** - * Save the events received from asset catalog to the Elasticsearch service - * - * @param assetCatalogEvent the event which contains the asset - */ - @Override - public void saveAsset(AssetCatalogEvent assetCatalogEvent) { - Asset asset = assetCatalogEvent.getAsset(); - if (asset == null) { - return; - } - if (asset.getGUID() == null) { - return; - } - log.debug("saving to elasticsearch {}", asset); - try { - String jsonAsset = OBJECT_WRITER.writeValueAsString(asset); - client.index(s-> s.index(jsonAsset).index(indexName).id(asset.getGUID())); - - } catch (IOException ioException) { - String actionDescription = "The client could not write to the Elasticsearch cluster"; - auditLog.logException(actionDescription, ElasticsearchIntegrationConnectorAuditCode.IO_EXCEPTION.getMessageDefinition(), ioException); - } - } -} 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 deleted file mode 100644 index d3e715dbdb0..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationProvider.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.adapters.connectors.integration.elasticsearch; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; -import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType; -import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorProvider; - -import java.util.ArrayList; -import java.util.List; - - -/** - * OpenAPIMonitorIntegrationProvider is the base class provider for the open API integration connector. - */ -public class ElasticsearchIntegrationProvider extends IntegrationConnectorProvider -{ - private static final String connectorTypeGUID = "4cf65dbf-0808-4968-819b-6a49a9fe537a"; - private static final String connectorTypeQualifiedName = "Egeria:IntegrationConnector:ElasticsearchIntegrationProvider"; - private static final String connectorTypeDisplayName = "Search Integration Connector"; - private static final String connectorTypeDescription = "Connector used to connect to a Elasticsearch instance and store metadata for search operations"; - - static final String TEMPLATE_QUALIFIED_NAME_CONFIGURATION_PROPERTY = "templateQualifiedName"; - - - /** - * Constructor used to initialize the ConnectorProvider with the Java class name of the specific - * store implementation. - */ - public ElasticsearchIntegrationProvider() - { - super(); - - super.setConnectorClassName(ElasticsearchIntegrationConnector.class.getName()); - - ConnectorType connectorType = new ConnectorType(); - connectorType.setType(ConnectorType.getConnectorTypeType()); - connectorType.setGUID(connectorTypeGUID); - connectorType.setQualifiedName(connectorTypeQualifiedName); - connectorType.setDisplayName(connectorTypeDisplayName); - connectorType.setDescription(connectorTypeDescription); - connectorType.setConnectorProviderClassName(this.getClass().getName()); - - List recognizedConfigurationProperties = new ArrayList<>(); - recognizedConfigurationProperties.add(TEMPLATE_QUALIFIED_NAME_CONFIGURATION_PROPERTY); - - connectorType.setRecognizedConfigurationProperties(recognizedConfigurationProperties); - connectorType.setSupportedAssetTypeName(supportedAssetTypeName); - connectorType.setDeployedImplementationType(DeployedImplementationType.SEARCH_INTEGRATION_CONNECTOR.getDeployedImplementationType()); - - super.connectorTypeBean = connectorType; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/ElasticsearchIntegrationConnectorAuditCode.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/ElasticsearchIntegrationConnectorAuditCode.java deleted file mode 100644 index 39df9e746a7..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/ElasticsearchIntegrationConnectorAuditCode.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.connectors.integration.elasticsearch.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - - -/** - * The ElasticsearchIntegrationConnectorAuditCode 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 ElasticsearchIntegrationConnectorAuditCode implements AuditLogMessageSet { - - /** - * ELASTICSEARCH-INTEGRATION-CONNECTOR-0001 - The {0} integration connector has stopped its monitoring and is shutting down - */ - CONNECTOR_STOPPING("ELASTICSEARCH-INTEGRATION-CONNECTOR-0001", - AuditLogRecordSeverityLevel.INFO, - "The {0} integration connector has stopped its monitoring and is shutting down", - "The connector is disconnecting.", - "No action is required unless there are errors that follow indicating that there were problems shutting down."), - - - /** - * ELASTICSEARCH-INTEGRATION-CONNECTOR-0002 - The {0} integration connector could not save data to Elasticsearch - */ - IO_EXCEPTION("ELASTICSEARCH-INTEGRATION-CONNECTOR-0002", - AuditLogRecordSeverityLevel.ERROR, - "The {0} integration connector could not save data to Elasticsearch", - "The connector is disconnecting.", - "Verify the integrity of the ElasticSearch cluster and the client connection."); - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor for ElasticsearchIntegrationConnectorAuditCode expects to be passed one of the enumeration rows defined in - * ElasticsearchIntegrationConnectorAuditCode above. For example: - *

- * ElasticsearchIntegrationConnectorAuditCode auditCode = ElasticsearchIntegrationConnectorAuditCode.CONNECTOR_STOPPING; - *

- * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique identifier 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 - */ - ElasticsearchIntegrationConnectorAuditCode(String messageId, - AuditLogRecordSeverityLevel 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 "ElasticsearchIntegrationConnectorAuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/ElasticsearchIntegratorErrorCode.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/ElasticsearchIntegratorErrorCode.java deleted file mode 100644 index 66457cef404..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/ElasticsearchIntegratorErrorCode.java +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.connectors.integration.elasticsearch.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - -/** - * The ElasticsearchIntegratorErrorCode error code is used to define first failure data capture (FFDC) for errors that - * occur when working with the Integration Services. It is used in conjunction with all exceptions, - * both Checked and Runtime (unchecked). - *

- * 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 user should correct the error
  • - *
- */ -public enum ElasticsearchIntegratorErrorCode implements ExceptionMessageSet { - - BAD_CONFIG(400, "ELASTICSEARCH-CONNECTOR-400-001", - "The config for the Elasticsearch connector (OMAS) has been passed an invalid value of {0} in the {1} property. The resulting exception of {2} included the following message: {3}", - "The config is not valid.", - "Correct the configuration and restart the service."); - - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - ElasticsearchIntegratorErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/package-info.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/package-info.java deleted file mode 100644 index ba4d46dbee3..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ffdc/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/* 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 basic file integration connectors. OpenAPIIntegrationConnectorAuditCode contains the - * messages for the audit log and the OpenAPIIntegrationConnectorErrorCode contains the messages for any exceptions - * that are thrown by the connectors. - */ -package org.odpi.openmetadata.adapters.connectors.integration.elasticsearch.ffdc; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/package-info.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/package-info.java deleted file mode 100644 index 52615e91141..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * TODO - */ -package org.odpi.openmetadata.adapters.connectors.integration.elasticsearch; diff --git a/open-metadata-implementation/governance-server-services/README.md b/open-metadata-implementation/governance-server-services/README.md index 9f4f45bf04e..ea059b5eb2d 100644 --- a/open-metadata-implementation/governance-server-services/README.md +++ b/open-metadata-implementation/governance-server-services/README.md @@ -12,9 +12,6 @@ More information about Governance Servers in general can be found in the [Admini However, each of the services below provide the principle service for a particular type of governance server. -* **[data-engine-proxy-services](data-engine-proxy-services)** - bridge between data engines and the - [Data Engine OMAS](https://egeria-project.org/services/omas/data-engine/overview). - * **[integration-daemon-services](integration-daemon-services)** - metadata exchange with third party tools. * **[engine-host-services](engine-host-services)** - running governance engines. diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/README.md b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/README.md deleted file mode 100644 index d3905c62f97..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/README.md +++ /dev/null @@ -1,20 +0,0 @@ - - - -![InDev](../../../images/egeria-content-status-in-development.png#pagewidth) - -# Data Engine Proxy Services - -The Data Engine Proxy Services provide the principle subsystem of the -[Data Engine Proxy](https://egeria-project.org/concepts/data-engine-proxy) server. - -* [Documentation](https://egeria-project.org/services/data-engine-proxy-services) - - ----- -* Return to the [Governance Servers](..). - - ----- -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/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/README.md b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/README.md deleted file mode 100644 index cfc457d9137..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/README.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -[![javadoc](https://javadoc.io/badge2/org.odpi.egeria/data-engine-proxy-connector/javadoc.svg)](https://javadoc.io/doc/org.odpi.egeria/data-engine-proxy-connector) - -# Data Engine Proxy Connector - -The Data Engine Proxy Connector defines the interfaces that need to be implemented in -order for a data engine to integrate through the [Data Engine Proxy Services](../README.md). - -In essence these are the following: - -- a data engine connector provider, implemented by extending `DataEngineConnectorProviderBase`. -- a data engine connector, implemented by extending `DataEngineConnectorBase`. - -The methods in `DataEngineConnectorBase` should be overridden to implement those set / retrieval -operations according to the specifics of your own data engine. Not all data engines will -necessarily provide all of these methods, so you only need to override those that the data engine -is capable of handling. The un-overridden methods will simply do nothing (set) or return null (read) -by default. - -## Polling connector - -Currently only polling-based connectors have an interface defined. The key methods used in a connector -for polling are as follows: - -- `getChangesLastSynced` to indicate when the changes were last synced by the connector (or null if - this is the very first time sync is occurring). -- `getOldestChangeSince` to indicate the date and time of the oldest change the connector knows about - since the provided date and time. This is used to efficiently skip over any periods where no changes - were made. (If there is no change since the specified date and time, it should return null.) -- `setChangesLastSynced` to persist the date and time when the changes were last synchronized by the - connector. - -At least one `getChangedXYZ` method should also be implemented to actually retrieve that type of -data engine information and provide it to the proxy. Not all connectors will necessarily provide all -of the types, so it may not be necessary to override all of these methods. (Most important from the -perspective of data processing is probably `getChangedProcesses`.) - ----- -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/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/build.gradle b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/build.gradle deleted file mode 100644 index e24623169d8..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-api') - implementation 'org.slf4j:slf4j-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Data Engine Proxy Connector' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineConnectorBase.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineConnectorBase.java deleted file mode 100644 index bb1da1fa8ae..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineConnectorBase.java +++ /dev/null @@ -1,158 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.connectors; - -import org.odpi.openmetadata.accessservices.dataengine.model.*; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBase; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Collections; -import java.util.Date; -import java.util.List; - -/** - * Base implementation of a Data Engine Connector, implementing all the required methods any Data Engine Connector - * is expected to provide (via the DataEngineInterface). It is an abstract class as on its own it does absolutely - * nothing, and therefore a Data Engine Connector needs to extend it and override at least one of the methods to - * actually do something. - */ -public abstract class DataEngineConnectorBase extends ConnectorBase implements DataEngineInterface { - - private static final Logger log = LoggerFactory.getLogger(DataEngineConnectorBase.class); - - /** - * Default constructor - */ - public DataEngineConnectorBase() { super(); } - - /** - * Indicates whether the data engine requires polling (true) or is capable of notifying of changes on its own - * (false). - * - * @return boolean - */ - @Override - public boolean requiresPolling() { return true; } - - @Override - public String getProcessingStateSyncKey() { - log.warn("DataEngineConnectorBase::getProcessingStateSyncKey() is not overridden (unimplemented)."); - return null; - } - - /** - * Retrieve the date and time at which changes were last synchronized. - * - * @return Date - */ - @Override - public Date getChangesLastSynced() throws ConnectorCheckedException, PropertyServerException { - if (requiresPolling()) { - log.warn("DataEngineConnectorBase::getChangesLastSynced() is not overridden (unimplemented), yet the connector requires polling."); - } - return null; - } - - /** - * Persist the date and time at which changes were last successfully synchronized. - * - * @param time the time to record for the last synchronization - */ - @Override - public void setChangesLastSynced(Date time) throws ConnectorCheckedException, PropertyServerException { - if (requiresPolling()) { - log.warn("DataEngineConnectorBase::setChangesLastSynced(Date) is not overridden (unimplemented), yet the connector requires polling."); - } - } - - /** - * {@inheritDoc} - */ - @Override - public Date getOldestChangeSince(Date time) throws ConnectorCheckedException, PropertyServerException { - if (requiresPolling()) { - log.warn("DataEngineConnectorBase::getOldestChangeSince(Date) is not overridden (unimplemented), yet the connector requires polling."); - } - return null; - } - - /** - * Retrieve a list of the changed schema types between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - @Override - public List getChangedSchemaTypes(Date from, Date to) throws ConnectorCheckedException, PropertyServerException { - if (requiresPolling()) { - log.debug("DataEngineConnectorBase::getChangedSchemaTypes(Date, Date) is not overridden (unimplemented)."); - } - return Collections.emptyList(); - } - - /** - * Retrieve a list of the changed data stores between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - @Override - public List getChangedDataStores(Date from, Date to) throws ConnectorCheckedException, PropertyServerException { - if (requiresPolling()) { - log.debug("DataEngineConnectorBase::getChangedDataStores(Date, Date) is not overridden (unimplemented)."); - } - return Collections.emptyList(); - } - - /** - * Retrieve a list of the changed processes between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - @Override - public List getChangedProcesses(Date from, Date to) throws ConnectorCheckedException, PropertyServerException { - if (requiresPolling()) { - log.debug("DataEngineConnectorBase::getChangedProcesses(Date, Date) is not overridden (unimplemented)."); - } - return Collections.emptyList(); - } - - /** - * Retrieve a list of the changed process hierarchies between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - @Override - public List getChangedProcessHierarchies(Date from, Date to) throws ConnectorCheckedException, PropertyServerException{ - if (requiresPolling()) { - log.debug("DataEngineConnectorBase::getChangedProcessHierarchies(Date, Date) is not overridden (unimplemented)."); - } - return Collections.emptyList(); - } - - /** - * Retrieve a list of the changed data flows between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - @Override - public List getChangedDataFlows(Date from, Date to) throws ConnectorCheckedException, PropertyServerException { - if (requiresPolling()) { - log.debug("DataEngineConnectorBase::getChangedDataFlows(Date, Date) is not overridden (unimplemented)."); - } - return Collections.emptyList(); - } - -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineConnectorProviderBase.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineConnectorProviderBase.java deleted file mode 100644 index be31fba299b..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineConnectorProviderBase.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.connectors; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase; - -/** - * The DataEngineConnectorProviderBase provides a base class for the connector provider supporting Data Engine Connectors. - * It adds no function but provides a placeholder for additional function if needed for the creation of - * any Data Engine connectors. - * - * It extends ConnectorProviderBase which does the creation of connector instances. The subclasses of - * DataEngineConnectorProviderBase must initialize ConnectorProviderBase with the Java class - * name of the Data Engine Connector implementation (by calling super.setConnectorClassName(className)). - * Then the connector provider will work. - */ -public abstract class DataEngineConnectorProviderBase extends ConnectorProviderBase { - - /** - * Default Constructor - */ - public DataEngineConnectorProviderBase() { - /* - * Nothing to do - */ - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineInterface.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineInterface.java deleted file mode 100644 index e8723245f95..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/DataEngineInterface.java +++ /dev/null @@ -1,116 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * This is the interface for the generic operations on data virtualization solutions - */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.connectors; - -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; - -import java.util.Date; -import java.util.List; - -/** - * Required methods expected to be implemented by any Data Engine Connector. - */ -public interface DataEngineInterface { - - /** - * Retrieve the details about the data engine to which we are connected. - * - * @return SoftwareCapability - */ - Engine getDataEngineDetails(); - - /** - * Indicates whether the data engine requires polling (true) or is capable of notifying of changes on its own - * (false). - * - * @return boolean - */ - boolean requiresPolling(); - - /** - * Gets processing state sync key. - * - * @return the processing state sync key - */ - String getProcessingStateSyncKey(); - - /** - * Retrieve the date and time at which changes were last synchronized. - * - * @return Date - */ - Date getChangesLastSynced() throws ConnectorCheckedException, PropertyServerException; - - /** - * Persist the date and time at which changes were last successfully synchronized. - * - * @param time the time to record for the last synchronization - */ - void setChangesLastSynced(Date time) throws ConnectorCheckedException, PropertyServerException; - - /** - * Retrieve the date of the oldest change since the time specified, or if there were no changes since the time - * specified return null. - * - * @param time the time from which to look for the oldest change - * @return Date - */ - Date getOldestChangeSince(Date time) throws ConnectorCheckedException, PropertyServerException; - - /** - * Retrieve a list of the changed schema types between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - List getChangedSchemaTypes(Date from, Date to) throws ConnectorCheckedException, PropertyServerException; - - - /** - * Retrieve a list of the changed data stores between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - List getChangedDataStores(Date from, Date to) throws ConnectorCheckedException, PropertyServerException; - - /** - * Retrieve a list of the changed processes between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - List getChangedProcesses(Date from, Date to) throws ConnectorCheckedException, PropertyServerException; - - /** - * Retrieve a list of the changed process hierarchies between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - List getChangedProcessHierarchies(Date from, Date to) throws ConnectorCheckedException, PropertyServerException; - - /** - * Retrieve a list of the changed data flows between the dates and times provided. - * - * @param from the date and time from which to look for changes (exclusive) - * @param to the date and time up to which to look for changes (inclusive) - * @return {@code List} - */ - List getChangedDataFlows(Date from, Date to) throws ConnectorCheckedException, PropertyServerException; - -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/package-info.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/package-info.java deleted file mode 100644 index f10927193d8..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-connector/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/connectors/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The data engine proxy package of governance daemon connectors provides the definitions and interfaces - * to describe what data engines must implement in order to integrate with the Data Engine Proxy Services. - */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.connectors; diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/README.md b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/README.md deleted file mode 100644 index ee034c263d5..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/README.md +++ /dev/null @@ -1,81 +0,0 @@ - - - -[![javadoc](https://javadoc.io/badge2/org.odpi.egeria/data-engine-proxy-services-server/javadoc.svg)](https://javadoc.io/doc/org.odpi.egeria/data-engine-proxy-services-server) - -# Data Engine Proxy Services Server - -The Data Engine Proxy Services Server implements the data engine proxy logic, making use -of the methods defined through a [Data Engine Proxy Connector](../data-engine-proxy-connector). - -In essence, this is to carry out the following: - -1. Setup connectivity to a [Data Engine OMAS](../../../access-services/data-engine). (See below section [Configuring interface type for Data Engine OMAS](#configuring-interface-type-for-data-engine-omas)) -1. Setup connectivity to a data engine, through the configured data engine connection of - a [Data Engine Proxy Connector](../data-engine-proxy-connector). -1. Ensure an `Engine` exists to represent this data engine via the Data Engine OMAS. -1. Poll the data engine every defined interval (60 seconds by default) for any changes: - 1. First send any changed `SchemaType`s via the Data Engine OMAS. - 1. Then send any changed `PortImplementation`s via the Data Engine OMAS. - 1. Then send any changed `PortAlias`s via the Data Engine OMAS. - 1. Then send any changed `Process`es via the Data Engine OMAS. - 1. Finally send any changed `DataFlow`s via the Data Engine OMAS. - -The sequence of changes is important to ensure that we build up the information from the -bottom up, so that necessary pre-requisites for various relationships can be created via -the Data Engine OMAS before attempting to create the relationships themselves. - -## Proxy polling configuration - -The polling done by the proxy can be optimized through the following settings: - -- `pollIntervalInSeconds` defines how many seconds to sleep between polling intervals (and defaults - to one minute (`60` seconds)) -- `batchWindowInSeconds` defines the maximum span through which changes will be searched. This defaults - to one day (`86400` seconds). - -Based on these settings, the polling operates as follows: - -1. Retrieves the last synchronization date from the connector (using its `getChangesLastSynced` method). -1. Retrieves the oldest change since (1) using the connector's `getOldestChangeSince` method. - 1. If there are changes, calculates a change window as the date and time from (2) + the `batchWindowInSeconds`. - 1. If there are not changes, retains the date and time retrieved from (1). -1. Calculates the current date and time. - 1. If there are changes, determines the lesser of this and (2i). - 1. If there are not changes, retains the current date and time. -1. Retrieves changes (in the order specified above) where (2) < change <= (4). - -These settings and logic ensure that: - -- When there are a large quantity of changes (eg. during an initial synchronization), at - most only changes within the `batchWindowInSeconds` are ever picked up and processed at - one time by the connector. This ensures its resource usage can be limited, and it can - continually checkpoint its synchronization in smaller blocks. -- When there are no changes, the connector can "jump" forward immediately to the latest date - and time as its last synchronization point. This ensures the polling does not go sequentially - block-by-block and take longer than necessary when there are no changes to be processed over - various time-spans (eg. weekends, during which the servers may have been offline for maintenance). - -As a result, you may want to tweak these settings further: - -- Reducing `batchWindowInSeconds` if you expect there are huge volumes of changes that occur - even within a day, you might want to reduce this to hourly or perhaps even less. - -## Configuring interface type for Data Engine OMAS - -By default the Data Engine Proxy services server will use HTTP REST java client to communicate the changes with Data Engine OMAS. Following settings are required to configure the client: - -- `accessServiceRootURL` URL location of the platform hosting Data Engine OMAS -- `accessServiceServerName` name of the server hosting Data Engine OMAS - -Since Data Engine OMAS also supports events based interface, if you prefer this transport mechanism you can choose to use events client implementation by setting 'eventsClientEnabled' to 'true'. - -- `eventsClientEnabled` defines if events client should be used to communicate to Data Engine OMAS. (default is 'false') - -> Note: if you set 'eventsClientEnabled' to 'true' behind the scenes HTTP REST client is still initially used to fetch the connectivity details and topic address from the target Data Engine OMAS server configuration. - - - ----- -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/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/build.gradle b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/build.gradle deleted file mode 100644 index ff43b0246c3..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:governance-server-services:data-engine-proxy-services:data-engine-proxy-connector') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-client') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'org.apache.commons:commons-collections4' - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') - implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-topic-connectors') - implementation project(':open-metadata-implementation:common-services:multi-tenant') -} - -description = 'Data Engine Proxy Services Server-side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/admin/DataEngineProxyOperationalServices.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/admin/DataEngineProxyOperationalServices.java deleted file mode 100644 index 58210662693..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/admin/DataEngineProxyOperationalServices.java +++ /dev/null @@ -1,244 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.admin; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineEventClient; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineRESTConfigurationClient; -import org.odpi.openmetadata.accessservices.dataengine.connectors.intopic.DataEngineInTopicClientConnector; -import org.odpi.openmetadata.adminservices.configuration.properties.DataEngineProxyConfig; -import org.odpi.openmetadata.adminservices.configuration.registration.GovernanceServicesDescription; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.ConnectionResponse; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.EmbeddedConnection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.VirtualConnection; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyAuditCode; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyErrorCode; -import org.odpi.openmetadata.governanceservers.dataengineproxy.connectors.DataEngineConnectorBase; -import org.odpi.openmetadata.governanceservers.dataengineproxy.processor.DataEngineProxyService; -import org.odpi.openmetadata.governanceservers.dataengineproxy.rest.DataEngineProxyServerInstance; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * DataEngineProxyOperationalServices is responsible for controlling the startup and shutdown of - * of the Data Engine Proxies. - */ -public class DataEngineProxyOperationalServices { - - private String localServerName; - private String localServerId; - private String localServerUserId; - private String localServerPassword; - - private OMRSAuditLog auditLog; - private DataEngineConnectorBase dataEngineConnector; - private DataEngineProxyService dataEngineProxyService; - private DataEngineInTopicClientConnector dataEngineTopicConnector; - private DataEngineProxyServerInstance dataEngineProxyServerInstance; - - /** - * Constructor used at server startup. - * - * @param localServerName name of the local server - * @param localServerId ID of the local server - * @param localServerUserId user id for this server to use if processing inbound messages - * @param localServerPassword password for this server to use if processing inbound messages - */ - public DataEngineProxyOperationalServices(String localServerName, - String localServerId, - String localServerUserId, - String localServerPassword) { - this.localServerName = localServerName; - this.localServerId = localServerId; - this.localServerUserId = localServerUserId; - this.localServerPassword = localServerPassword; - } - - /** - * Initialize the data engine proxy server - * - * @param dataEngineProxyConfig Data Engine proxy server configuration. - * @param auditLog Audit Log instance. - * @throws OMAGConfigurationErrorException there is no data engine (or OMAS) defined for this server, - * or the requested data engine (or OMAS) is not recognized or is not configured properly. - */ - public void initialize(DataEngineProxyConfig dataEngineProxyConfig, OMRSAuditLog auditLog) throws OMAGConfigurationErrorException { - - final String methodName = "initialize"; - - this.auditLog = auditLog; - auditLog.logMessage(methodName, DataEngineProxyAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - if (dataEngineProxyConfig == null) { - throw new OMAGConfigurationErrorException( - DataEngineProxyErrorCode.NO_CONFIG_DOC.getMessageDefinition(localServerName), - this.getClass().getName(), - methodName - ); - } else if (dataEngineProxyConfig.getAccessServiceRootURL() == null) { - throw new OMAGConfigurationErrorException( - DataEngineProxyErrorCode.NO_OMAS_SERVER_URL.getMessageDefinition(localServerName), - this.getClass().getName(), - methodName - ); - } else if (dataEngineProxyConfig.getAccessServiceServerName() == null) { - throw new OMAGConfigurationErrorException( - DataEngineProxyErrorCode.NO_OMAS_SERVER_NAME.getMessageDefinition(localServerName), - this.getClass().getName(), - methodName - ); - } - - /* - * Create the OMAS client - */ - - DataEngineClient dataEngineClient; - - try { - if ((localServerName != null) && (localServerPassword != null)) { - dataEngineClient = new DataEngineRESTConfigurationClient(dataEngineProxyConfig.getAccessServiceServerName(), - dataEngineProxyConfig.getAccessServiceRootURL(), - localServerUserId, - localServerPassword); - } else { - dataEngineClient = new DataEngineRESTConfigurationClient(dataEngineProxyConfig.getAccessServiceServerName(), - dataEngineProxyConfig.getAccessServiceRootURL()); - } - - } catch (InvalidParameterException error) { - throw new OMAGConfigurationErrorException( - DataEngineProxyErrorCode.UNKNOWN_ERROR.getMessageDefinition(), - this.getClass().getName(), - methodName, - error - ); - } - - // Check if events interface should be enabled, otherwise we do not start the connector and configure the events client - if (dataEngineProxyConfig.isEventsClientEnabled()) { - - try { - - // Configure and start the topic connector - ConnectionResponse connectionResponse = ((DataEngineRESTConfigurationClient) dataEngineClient).getInTopicConnection(dataEngineProxyConfig.getAccessServiceServerName(), localServerUserId); - - ConnectorBroker connectorBroker = new ConnectorBroker(auditLog); - VirtualConnection virtualConnection = (VirtualConnection)connectionResponse.getConnection(); - - // Replace connection configuration properties relevant to the server hosting the client connector - // In this case it is important to set the kafka consumer `group.id` property - List embeddedConnections = new ArrayList<>(); - virtualConnection.getEmbeddedConnections().forEach(embeddedConnection -> { - Connection connection = embeddedConnection.getEmbeddedConnection(); - Map cp = connection.getConfigurationProperties(); - cp.put("local.server.id", localServerId); // -> maps to `group.id` in OCF - connection.setConfigurationProperties(cp); - embeddedConnection.setEmbeddedConnection(connection); - embeddedConnections.add(embeddedConnection); - }); - virtualConnection.setEmbeddedConnections(embeddedConnections); - - dataEngineTopicConnector = (DataEngineInTopicClientConnector) connectorBroker.getConnector(virtualConnection); - dataEngineTopicConnector.start(); - dataEngineClient = new DataEngineEventClient(dataEngineTopicConnector); - - } catch (ConnectionCheckedException | ConnectorCheckedException | PropertyServerException | UserNotAuthorizedException | InvalidParameterException e) { - throw new OMAGConfigurationErrorException( - DataEngineProxyErrorCode.ERROR_INITIALIZING_CLIENT_CONNECTION.getMessageDefinition(), - this.getClass().getName(), - methodName, - e - ); - } - } - - // Configure the connector - Connection dataEngineConnection = dataEngineProxyConfig.getDataEngineConnection(); - if (dataEngineConnection != null) { - try { - ConnectorBroker connectorBroker = new ConnectorBroker(auditLog); - dataEngineConnector = (DataEngineConnectorBase) connectorBroker.getConnector(dataEngineConnection); - dataEngineConnector.start(); - // If the config says we should poll for changes, do so via a new thread - dataEngineProxyService = new DataEngineProxyService( - dataEngineConnector, - localServerUserId, - dataEngineProxyConfig, - dataEngineClient, - auditLog - ); - dataEngineProxyService.initialize(); - this.dataEngineProxyServerInstance = new - DataEngineProxyServerInstance( - localServerName, - GovernanceServicesDescription.DATA_ENGINE_PROXY_SERVICES.getServiceName(), - 100, - dataEngineProxyService); - // TODO: otherwise we likely need to look for and process events - } catch (ConnectorCheckedException | ConnectionCheckedException | UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - throw new OMAGConfigurationErrorException( - DataEngineProxyErrorCode.ERROR_INITIALIZING_CONNECTION.getMessageDefinition(), - this.getClass().getName(), - methodName, - e - ); - } finally { - if (dataEngineProxyService != null) { - dataEngineProxyService.stop(); - } - } - } - - if (dataEngineConnector != null && dataEngineConnector.isActive()) { - this.auditLog.logMessage(methodName, DataEngineProxyAuditCode.SERVICE_INITIALIZED.getMessageDefinition(dataEngineConnector.getConnection().getConnectorType().getConnectorProviderClassName())); - } else { - throw new OMAGConfigurationErrorException( - DataEngineProxyErrorCode.NO_CONFIG_DOC.getMessageDefinition(localServerName), - this.getClass().getName(), - methodName - ); - } - - } - - /** - * Shutdown the Data Engine Proxy Services. - * - * @return boolean indicated whether the disconnect was successful. - */ - public boolean disconnect() { - final String methodName = "disconnect"; - try { - // Stop the change polling thread, if there is one and it is active - if (dataEngineProxyService != null) { - dataEngineProxyService.stop(); - } - // Disconnect the data engine connector - if (dataEngineConnector != null) { - dataEngineConnector.disconnect(); - } - // Disconnect the topic connector if initialized previously - if (dataEngineTopicConnector != null) { - dataEngineTopicConnector.disconnect(); - } - auditLog.logMessage(methodName, DataEngineProxyAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(localServerName)); - return true; - } catch (Exception e) { - auditLog.logException(methodName, DataEngineProxyAuditCode.ERROR_SHUTDOWN.getMessageDefinition(), e); - return false; - } - } - -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/admin/package-info.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/admin/package-info.java deleted file mode 100644 index d9e582ab836..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/admin/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The admin package provides the implementation of the base-level logic of the Data Engine Proxy Service. - */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.admin; diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyAuditCode.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyAuditCode.java deleted file mode 100644 index 6dbf3dc4884..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyAuditCode.java +++ /dev/null @@ -1,132 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog; - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - -/** - * The DataEngineProxyAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *
    - *
  • Log Message id - 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 DataEngineProxyAuditCode implements AuditLogMessageSet { - - SERVICE_INITIALIZING("DATA-ENGINE-PROXY-0001", - AuditLogRecordSeverityLevel.INFO, - "The Data Engine Proxy is initializing a new server instance", - "The local server has started up a new instance of the Data Engine Proxy.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_INITIALIZED("DATA-ENGINE-PROXY-0005", - AuditLogRecordSeverityLevel.INFO, - "The Data Engine Proxy has initialized a new instance for server {0}", - "The local server has completed initialization of a new instance.", - "No action is required. This is part of the normal operation of the service."), - INIT_POLLING("DATA-ENGINE-PROXY-0006", - AuditLogRecordSeverityLevel.INFO, - "The Data Engine Proxy is initializing polling for changes", - "The local server has started up a new change poller for the Data Engine Proxy.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_SHUTDOWN("DATA-ENGINE-PROXY-0007", - AuditLogRecordSeverityLevel.INFO, - "The Data Engine Proxy is shutting down its instance for server {0}", - "The local server has requested shut down of a Data Engine Proxy instance.", - "No action is required. This is part of the normal operation of the service."), - ERROR_SHUTDOWN("DATA-ENGINE-PROXY-0008", - AuditLogRecordSeverityLevel.EXCEPTION, - "The service is not shutdown properly.", - "The connection could not be shutdown.", - "Try again. "), - POLLING("DATA-ENGINE-PROXY-0009", - AuditLogRecordSeverityLevel.INFO, - "The Data Engine Proxy is polling for changes between {0} and {1}", - "The local server is looking for changes since the last poll interval.", - "No action is required. This is part of the normal operation of the service."), - USER_NOT_AUTHORIZED("DATA-ENGINE-PROXY-0011", - AuditLogRecordSeverityLevel.ERROR, - "The user is not authorized for the Data Engine OMAS operation: {0}", - "The system is unable to process the operation due to the user not being authorized to do so.", - "Check your OMAS configuration and user authorizations."), - POLLING_TYPE_START("DATA-ENGINE-PROXY-0012", - AuditLogRecordSeverityLevel.INFO, - "The Data Engine Proxy is polling for changes to {0}", - "The local server is looking for changes to the specified information since the last poll interval.", - "No action is required. This is part of the normal operation of the service."), - POLLING_TYPE_FINISH("DATA-ENGINE-PROXY-0013", - AuditLogRecordSeverityLevel.INFO, - "The Data Engine Proxy has completed polling for changes to {0}", - "The local server has completed looking for changes to the specified type since the last poll interval.", - "No action is required. This is part of the normal operation of the service."), - RUNTIME_EXCEPTION("DATA-ENGINE-PROXY-0014", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Data Engine Proxy processing interrupted due to runtime error.", - "The system was unable to complete processing because the sub-system error. System will attempt to retry the process if possible.", - "Check diagnostic message from audit log to determine the cause if the problem persists."), - - ; - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor for OMRSAuditCode expects to be passed one of the enumeration rows defined in - * OMRSAuditCode above. For example: - *

- * OMRSAuditCode auditCode = OMRSAuditCode.SERVER_NOT_AVAILABLE; - *

- * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique id for the message - * @param severity - the 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 - */ - DataEngineProxyAuditCode(String messageId, AuditLogRecordSeverityLevel severity, String message, - String systemAction, String userAction) { - this.logMessageId = messageId; - this.severity = severity; - this.logMessage = message; - this.systemAction = systemAction; - this.userAction = userAction; - } - - /** - * {@inheritDoc} - */ - @Override - public AuditLogMessageDefinition getMessageDefinition() { - return new AuditLogMessageDefinition(logMessageId, - severity, - logMessage, - systemAction, - userAction); - } - - /** - * {@inheritDoc} - */ - @Override - public AuditLogMessageDefinition getMessageDefinition(String ...params) { - AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(logMessageId, - severity, - logMessage, - systemAction, - userAction); - messageDefinition.setMessageParameters(params); - return messageDefinition; - } - -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyErrorCode.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyErrorCode.java deleted file mode 100644 index 5f386590edc..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyErrorCode.java +++ /dev/null @@ -1,133 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - -/** - * The DataEngineProxyErrorCode is used to define first failure data capture (FFDC) for errors that occur when working - * with the Data Engine Proxy. 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 Id - 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 DataEngineProxyErrorCode implements ExceptionMessageSet { - - NO_CONFIG_DOC(500, "DATA-ENGINE-PROXY-500-001", - "Data Engine proxy {0} is not configured with a configuration document", - "The server is not able to retrieve its configuration. It fails to start.", - "Add the configuration document for this data engine proxy."), - NO_OMAS_SERVER_URL(500, "DATA-ENGINE-PROXY-500-002", - "Data Engine proxy {0} is not configured with the platform URL root for the Data Engine OMAS", - "The server is not able to retrieve its configuration. It fails to start.", - "Add the configuration for the platform URL root to this data engine proxy's configuration document."), - NO_OMAS_SERVER_NAME(500, "DATA-ENGINE-PROXY-500-003", - "Data Engine proxy {0} is not configured with the name for the server running the Data Engine OMAS", - "The server is not able to retrieve its configuration. It fails to start.", - "Add the configuration for the server name to this data engine proxy's configuration document."), - ERROR_INITIALIZING_CONNECTION(500, "DATA-ENGINE-PROXY-500-005", - "Unable to initialize the Data Engine connection", - "The connection could not be initialized.", - "Review the exception and resolve the configuration. "), - ERROR_INITIALIZING_CLIENT_CONNECTION(500, "DATA-ENGINE-PROXY-500-006", - "Unable to initialize the Data Engine client connection", - "The client connection could not be initialized.", - "Review the exception and resolve the configuration."), - UNKNOWN_ERROR(500, "DATA-ENGINE-PROXY-500-008", - "An unknown error occurred", - "The system is unable to process the operation due to an unknown runtime error.", - "Check your OMAS configuration and server logs to troubleshoot."), - ; - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - DataEngineProxyErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyException.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyException.java deleted file mode 100644 index 43801a07dbc..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyException.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; - -import java.io.Serial; - - -/** - * DataEngineProxyException provides a checked exception for reporting errors found when using - * the Data Engine Proxy. - */ -public class DataEngineProxyException extends OCFCheckedExceptionBase -{ - @Serial - private static final long serialVersionUID = 1L; - - /** - * @param httpCode - http response code to use if this exception flows over a rest call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - */ - public DataEngineProxyException(int httpCode, - String className, - String actionDescription, - String errorMessage, - String systemAction, - String userAction) { - super(httpCode, - className, - actionDescription, - errorMessage, - null, - null, - systemAction, - userAction, - null, - null); - } - - - /** - * This is the constructor used for creating a ConnectionCheckedException that resulted from a previous error. - * - * @param httpCode - http response code to use if this exception flows over a rest call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - * @param caughtError - the error that resulted in this exception. - */ - public DataEngineProxyException(int httpCode, - String className, - String actionDescription, - String errorMessage, - String systemAction, - String userAction, - Throwable caughtError) { - super(httpCode, - className, - actionDescription, - errorMessage, - null, - null, - systemAction, - userAction, - caughtError.getClass().getName(), - null); - - } -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/package-info.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/package-info.java deleted file mode 100644 index 99c3c801da8..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The auditlog package provides the definition of any messages that are used for auditing the operation of the - * Data Engine Proxy Services. - */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog; diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/model/ProcessLoadResponse.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/model/ProcessLoadResponse.java deleted file mode 100644 index 2ea2f4187ae..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/model/ProcessLoadResponse.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.model; - -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -public class ProcessLoadResponse extends FFDCResponseBase{ -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/package-info.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/package-info.java deleted file mode 100644 index e5bfc345908..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The data engine proxy package provides the definitions and interfaces to describe the Data Engine - * Proxy Services and enable it to be configured. - */ -package org.odpi.openmetadata.governanceservers.dataengineproxy; diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/processor/DataEngineProxyService.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/processor/DataEngineProxyService.java deleted file mode 100644 index f1b6ee4db80..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/processor/DataEngineProxyService.java +++ /dev/null @@ -1,337 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.processor; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.MapUtils; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; -import org.odpi.openmetadata.accessservices.dataengine.model.Referenceable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.adminservices.configuration.properties.DataEngineProxyConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFRuntimeException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyAuditCode; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyErrorCode; -import org.odpi.openmetadata.governanceservers.dataengineproxy.connectors.DataEngineConnectorBase; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; - -import java.time.Instant; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicBoolean; - -/** - * Class to handle periodically polling a Data Engine for changes, for those data engines that do not - * provide any event-based mechanism to notify on changes. - */ -public class DataEngineProxyService implements Runnable { - - private final OMRSAuditLog auditLog; - private final DataEngineProxyConfig dataEngineProxyConfig; - private final DataEngineClient dataEngineOMASClient; - private final DataEngineConnectorBase connector; - private final String userId; - - private final AtomicBoolean running = new AtomicBoolean(false); - - public void initialize() throws ConnectorCheckedException, UserNotAuthorizedException, InvalidParameterException, PropertyServerException { - - final String methodName = "start"; - this.auditLog.logMessage(methodName, DataEngineProxyAuditCode.INIT_POLLING.getMessageDefinition()); - - // Retrieve the base information from the connector - if (connector != null) { - Engine dataEngineDetails = connector.getDataEngineDetails(); - dataEngineOMASClient.createExternalDataEngine(userId, dataEngineDetails); - dataEngineOMASClient.setExternalSourceName(dataEngineDetails.getQualifiedName()); - if (connector.requiresPolling()) { - Thread worker = new Thread(this); - worker.setName(DataEngineProxyService.class.getName()); - worker.start(); - } - } - } - - public void stop() { - running.set(false); - } - - /** - * Default constructor - * - * @param connector Data Engine Connector through which to connect to the data engine to poll - * @param userId the user ID used to poll for changes against the connector - * @param dataEngineProxyConfig configuration of the Data Engine (Proxy) - * @param dataEngineOMASClient Data Engine OMAS client through which to push any changes into Egeria - * @param auditLog audit log through which to record activities - */ - public DataEngineProxyService(DataEngineConnectorBase connector, - String userId, - DataEngineProxyConfig dataEngineProxyConfig, - DataEngineClient dataEngineOMASClient, - OMRSAuditLog auditLog) { - this.connector = connector; - this.userId = userId; - this.dataEngineProxyConfig = dataEngineProxyConfig; - this.dataEngineOMASClient = dataEngineOMASClient; - this.auditLog = auditLog; - - } - - /** - * Poll for Process changes. - */ - @Override - public void run() { - - final String methodName = "ProcessPollThread::run"; - - running.set(true); - while (running.get()) { - try { - // Start with the last change synchronization date and time - Date changesLastSynced = connector.getChangesLastSynced(); - - // Then look for the oldest change available in the Data Engine since that time - Date oldestSinceSync = connector.getOldestChangeSince(changesLastSynced); - Date changesCutoff = new Date(); - if (oldestSinceSync == null) { - // If there were no changes since the last sync time, default to the last sync time - oldestSinceSync = changesLastSynced; - } else { - // If there are any changes since that last sync time, calculate a batch window from that oldest - // change to the maximum amount of time to include in a batch - long window = oldestSinceSync.getTime() + (dataEngineProxyConfig.getBatchWindowInSeconds() * 1000L); - long now = changesCutoff.getTime(); - // We will look for changes up to that batch window size or the current moment, whichever is sooner - changesCutoff = new Date(Math.min(window, now)); - } - - ensureSourceNameIsSet(); - - this.auditLog.logMessage(methodName, - DataEngineProxyAuditCode.POLLING.getMessageDefinition( - oldestSinceSync == null ? "0" : oldestSinceSync.toString(), - changesCutoff.toString() - )); - - // Send the changes, and ordering here is important - upsertSchemaTypes(oldestSinceSync, changesCutoff); - upsertDataStores(oldestSinceSync, changesCutoff); - upsertProcesses(oldestSinceSync, changesCutoff); - upsertProcessHierarchies(oldestSinceSync, changesCutoff); - upsertDataFlows(oldestSinceSync, changesCutoff); - - // Update the timestamp at which changes were last synced - connector.setChangesLastSynced(changesCutoff); - - // Sleep for the poll interval before continuing with the next poll - sleep(); - } catch (PropertyServerException e) { - // Potentially recoverable error. Retry. - this.auditLog.logException(methodName, DataEngineProxyAuditCode.RUNTIME_EXCEPTION.getMessageDefinition(), e); - sleep(); - } catch (UserNotAuthorizedException | InvalidParameterException | ConnectorCheckedException e) { - // Interrupt processing and propagate runtime error. - this.auditLog.logException(methodName, DataEngineProxyAuditCode.RUNTIME_EXCEPTION.getMessageDefinition(), e); - throw new OCFRuntimeException(DataEngineProxyErrorCode.UNKNOWN_ERROR.getMessageDefinition(), this.getClass().getName(), methodName, e); - } - } - - } - - public void load() { - final String methodName = "load"; - Date now = Date.from(Instant.now()); - try { - - ensureSourceNameIsSet(); - upsertSchemaTypes(now, now); - upsertDataStores(now, now); - upsertProcesses(now, now); - upsertProcessHierarchies(now, now); - upsertDataFlows(now, now); - - upsertProcessingState(now); - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException | ConnectorCheckedException e) { - this.auditLog.logException(methodName, DataEngineProxyAuditCode.RUNTIME_EXCEPTION.getMessageDefinition(), e); - } - } - - public void pollProcessChanges(String processId) { - /* - * TODO - * */ - } - - private void upsertProcessingState(Date changesCutoff) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException, ConnectorCheckedException { - String processingStateKey = connector.getProcessingStateSyncKey(); - Map properties = Collections.singletonMap(processingStateKey, changesCutoff.getTime()); - dataEngineOMASClient.upsertProcessingState(userId, properties); - } - - private Date getProcessingState() throws PropertyServerException { - String processingStateKey = connector.getProcessingStateSyncKey(); - - Map processingState = dataEngineOMASClient.getProcessingState(userId); - if(MapUtils.isNotEmpty(processingState)) { - Long lastSync = processingState.get(processingStateKey); - return new Date(lastSync); - } - return null; - } - - /** - * Sleep until the next polling interval comes. - */ - private void sleep() { - try { - Thread.sleep(dataEngineProxyConfig.getPollIntervalInSeconds() * 1000L); - } catch (InterruptedException e) { - this.auditLog.logException("sleep", DataEngineProxyAuditCode.RUNTIME_EXCEPTION.getMessageDefinition(), e); - } - } - - private void ensureSourceNameIsSet() { - if (dataEngineOMASClient.getExternalSourceName() == null) { - dataEngineOMASClient.setExternalSourceName(connector.getDataEngineDetails().getQualifiedName()); - } - } - - private void upsertSchemaTypes(Date changesLastSynced, - Date changesCutoff) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException { - String methodName = "upsertSchemaTypes"; - String type = "SchemaTypes"; - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_START.getMessageDefinition(type)); - List changedSchemaTypes = connector.getChangedSchemaTypes(changesLastSynced, changesCutoff); - if (changedSchemaTypes != null) { - for (SchemaType changedSchemaType : changedSchemaTypes) { - dataEngineOMASClient.createOrUpdateSchemaType(userId, changedSchemaType); - } - } - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_FINISH.getMessageDefinition(type)); - } - - private void upsertDataStores(Date changesLastSynced, - Date changesCutoff) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException { - String methodName = "upsertDataStores"; - String type = "DataStores"; - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_START.getMessageDefinition(type)); - // get list of incomplete relational tables & data files - List changedDataStores = connector.getChangedDataStores(changesLastSynced, changesCutoff); - if (CollectionUtils.isNotEmpty(changedDataStores)) { - for (Object changedDataStore : changedDataStores) { - if (changedDataStore instanceof DataFile) { - dataEngineOMASClient.upsertDataFile(userId, (DataFile) changedDataStore); - } - if (changedDataStore instanceof Database) { - Database database = (Database) changedDataStore; - // create the database only if it's incomplete - // will also create database schemas and relational table - if (database.getIncomplete()) { - dataEngineOMASClient.upsertDatabase(userId, database); - } else { - // create the database schema only if it's incomplete - if (database.getDatabaseSchema().getIncomplete()) { - dataEngineOMASClient.upsertDatabaseSchema(userId, database.getDatabaseSchema(), database.getQualifiedName()); - } - // create the table separately if the database was not created - dataEngineOMASClient.upsertRelationalTable(userId, database.getTables().get(0), - database.getDatabaseSchema().getQualifiedName()); - } - } - } - } - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_FINISH.getMessageDefinition(type)); - } - - private void upsertProcesses(Date changesLastSynced, - Date changesCutoff) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException { - String methodName = "upsertProcesses"; - String type = "Processes"; - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_START.getMessageDefinition(type)); - List changedProcesses = connector.getChangedProcesses(changesLastSynced, changesCutoff); - if (changedProcesses != null && !changedProcesses.isEmpty()) { - for (Process changedProcess : changedProcesses) { - // We split up the process details (1) and data flows (2) into separate calls to achieve optimal processing in DE OMAS. - // (1) Send process details - dataEngineOMASClient.createOrUpdateProcess(userId, changedProcess); - - List dataFlows = changedProcess.getDataFlows(); - if (dataFlows != null) { - // (2) Send data flows - dataEngineOMASClient.addDataFlows(userId, dataFlows); - } - } - - } - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_FINISH.getMessageDefinition(type)); - } - - private void upsertProcessHierarchies(Date changesLastSynced, - Date changesCutoff) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException { - String methodName = "upsertProcessHierarchies"; - String type = "ProcessHierarchies"; - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_START.getMessageDefinition(type)); - List changedProcessHierarchies = connector.getChangedProcessHierarchies(changesLastSynced, changesCutoff); - if (changedProcessHierarchies != null) { - for (ProcessHierarchy changedProcessHierarchy : changedProcessHierarchies) { - dataEngineOMASClient.addProcessHierarchy(userId, changedProcessHierarchy); - } - } - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_FINISH.getMessageDefinition(type)); - } - - private void upsertDataFlows(Date changesLastSynced, - Date changesCutoff) throws - InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException { - String methodName = "upsertDataFlows"; - String type = "DataFlows"; - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_START.getMessageDefinition(type)); - List changedDataFlows = connector.getChangedDataFlows(changesLastSynced, changesCutoff); - if (CollectionUtils.isNotEmpty(changedDataFlows)) { - if (dataEngineProxyConfig.isEventsClientEnabled()) { - for (DataFlow changedDataFlow : changedDataFlows) { - // If we are using the event-based interface, send the data flows one-by-one rather than as - // an array - dataEngineOMASClient.addDataFlows(userId, Collections.singletonList(changedDataFlow)); - } - } else { - dataEngineOMASClient.addDataFlows(userId, changedDataFlows); - } - } - auditLog.logMessage(methodName, DataEngineProxyAuditCode.POLLING_TYPE_FINISH.getMessageDefinition(type)); - } - -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/processor/package-info.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/processor/package-info.java deleted file mode 100644 index 4c603777ab4..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/processor/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The processor package provides the implementation of the processing logic of the Data Engine Proxy Services. - * For example, DataEngineProxyService implements the pull-based change detection and integration of metadata - * from data engine's that do not have a push-based mechanism through which to communicate the changes themselves. - */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.processor; diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyInstanceHandler.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyInstanceHandler.java deleted file mode 100644 index 49ea8fdec3f..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyInstanceHandler.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.rest; - -import org.odpi.openmetadata.adminservices.configuration.registration.GovernanceServicesDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyException; -import org.odpi.openmetadata.governanceservers.dataengineproxy.processor.DataEngineProxyService; - - -/** - * DataEngineProxyInstanceHandler retrieves information from the instance map for the - * * Data Engine Proxy. The instance map is thread-safe. Instances are added - * * and removed by the DataEngineProxyOperationalServices class. - */ -class DataEngineProxyInstanceHandler extends OMAGServerServiceInstanceHandler { - - /** - * Default constructor registers the governance server - */ - DataEngineProxyInstanceHandler() { - super(GovernanceServicesDescription.DATA_ENGINE_PROXY_SERVICES.getServiceName()); - } - - - /** - * Retrieve the handler for the Data Engine Proxy Services - * - * @param userId calling user - * @param serverName name of the server tied to the request - * @param serviceOperationName name of the REST API call (typically the top-level methodName) - * @return handler for use by the requested instance - * @throws InvalidParameterException no available instance for the requested server - * @throws UserNotAuthorizedException user does not have access to the requested server - * @throws PropertyServerException the service name is not known - indicating a logic error - */ - public DataEngineProxyService getDataEngineProxyService(String userId, - String serverName, - String serviceOperationName) - throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException, DataEngineProxyException { - - DataEngineProxyServerInstance instance = (DataEngineProxyServerInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName); - - if (instance != null) { - return instance.getDataEngineProxyService(); - } - - return null; - } -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyRestService.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyRestService.java deleted file mode 100644 index 7b5ae987024..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyRestService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.rest; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyException; -import org.odpi.openmetadata.governanceservers.dataengineproxy.model.ProcessLoadResponse; -import org.odpi.openmetadata.governanceservers.dataengineproxy.processor.DataEngineProxyService; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.atomic.AtomicBoolean; - -public class DataEngineProxyRestService { - - private final DataEngineProxyInstanceHandler instanceHandler = new DataEngineProxyInstanceHandler(); - AtomicBoolean isRunning = new AtomicBoolean(false); - - public ProcessLoadResponse load(String serverName, String userId) { - String serviceOperationName = "DataEngineProxy"; - try { - if (isRunning.get()) { - return new ProcessLoadResponse(); - } - DataEngineProxyService dataEngineProxyService = instanceHandler.getDataEngineProxyService(userId, serverName, serviceOperationName); - isRunning.set(true); - CompletableFuture.runAsync(dataEngineProxyService::load).thenAccept(result -> isRunning.set(false)); - - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException | DataEngineProxyException e) { - ProcessLoadResponse response = new ProcessLoadResponse(); - response.setRelatedHTTPCode(e.getReportedHTTPCode()); - response.setExceptionClassName(e.getClass().getName()); - response.setExceptionErrorMessage(e.getReportedErrorMessage()); - response.setExceptionSystemAction(e.getReportedSystemAction()); - response.setExceptionUserAction(e.getReportedUserAction()); - return response; - } - return new ProcessLoadResponse(); - - } - - public ProcessLoadResponse getProcessChanges(String serverName, String userId, String processId) { - String serviceOperationName = "DataEngineProxy"; - try { - DataEngineProxyService dataEngineProxyService = instanceHandler.getDataEngineProxyService(userId, serverName, serviceOperationName); - dataEngineProxyService.pollProcessChanges(processId); - } catch (PropertyServerException | UserNotAuthorizedException | InvalidParameterException | DataEngineProxyException e) { - ProcessLoadResponse response = new ProcessLoadResponse(); - response.setRelatedHTTPCode(e.getReportedHTTPCode()); - response.setExceptionClassName(e.getClass().getName()); - response.setExceptionErrorMessage(e.getReportedErrorMessage()); - response.setExceptionSystemAction(e.getReportedSystemAction()); - response.setExceptionUserAction(e.getReportedUserAction()); - return response; - } - return new ProcessLoadResponse(); - } -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyServerInstance.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyServerInstance.java deleted file mode 100644 index 9a284b56fc9..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/rest/DataEngineProxyServerInstance.java +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy.rest; - -import org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstance; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyErrorCode; -import org.odpi.openmetadata.governanceservers.dataengineproxy.auditlog.DataEngineProxyException; -import org.odpi.openmetadata.governanceservers.dataengineproxy.processor.DataEngineProxyService; - -public class DataEngineProxyServerInstance extends OMAGServerServiceInstance { - - DataEngineProxyService dataEngineInstanceHandler; - - public DataEngineProxyServerInstance(String serverName, - String serviceName, - int maxPageSize, - DataEngineProxyService dataEngineProxyService) { - super(serverName, serviceName, maxPageSize); - this.dataEngineInstanceHandler = dataEngineProxyService; - } - - /** - * Return the DataEngineProxyService. - * - * @return DataEngineProxyService. - */ - DataEngineProxyService getDataEngineProxyService() throws DataEngineProxyException { - final String methodName = "getDataEngineProxyService"; - if (this.dataEngineInstanceHandler == null) { - DataEngineProxyErrorCode errorCode = DataEngineProxyErrorCode.ERROR_INITIALIZING_CONNECTION; - String errorMessage = errorCode.getMessageDefinition(serverName).toString(); - throw new DataEngineProxyException(errorCode.getMessageDefinition().getHttpErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getMessageDefinition().getSystemAction(), - errorCode.getMessageDefinition().getUserAction()); - } - return dataEngineInstanceHandler; - } -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/build.gradle b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/build.gradle deleted file mode 100644 index c3cf4f42aa1..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation 'org.springframework:spring-web' - implementation 'org.springframework:spring-context' - implementation 'org.apache.commons:commons-collections4' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'io.swagger.core.v3:swagger-annotations' - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:governance-server-services:data-engine-proxy-services:data-engine-proxy-services-server') - -} - -description = 'Data Engine Proxy Services Spring' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/DataEngineProxyServicesResource.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/DataEngineProxyServicesResource.java deleted file mode 100644 index c6c2ebd49b0..00000000000 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/DataEngineProxyServicesResource.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.dataengineproxy; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.governanceservers.dataengineproxy.model.ProcessLoadResponse; -import org.odpi.openmetadata.governanceservers.dataengineproxy.rest.DataEngineProxyRestService; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/data-engine-proxy/users/{userId}") -@Tag(name = "Data Engine Proxy Service", - description = "The Data Engine Proxy Service offers a rest interface to trigger processing by data engine proxy.", - externalDocs = @ExternalDocumentation(description = "Further Information", url = "https://egeria-project.org/services/data-engine-proxy-services")) -public class DataEngineProxyServicesResource { - - DataEngineProxyRestService dataEngineProxyRestService = new DataEngineProxyRestService(); - - @GetMapping("/load") - - @Operation(summary="load", - description="Force an explicit load of metadata from the connected Data Engine", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/concepts/data-engine-proxy/")) - - public ProcessLoadResponse load(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId) - { - return dataEngineProxyRestService.load(serverName, userId); - } - -/* @PostMapping("/load-process/{processId}") - public ProcessLoadResponse loadProcess(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("processId") String processId) { - return dataEngineProxyRestService.getProcessChanges(serverName, userId, processId); - }*/ -} diff --git a/open-metadata-implementation/governance-server-services/docs/README.md b/open-metadata-implementation/governance-server-services/docs/README.md index 0fe0e45cf45..5fbc843e685 100644 --- a/open-metadata-implementation/governance-server-services/docs/README.md +++ b/open-metadata-implementation/governance-server-services/docs/README.md @@ -16,7 +16,6 @@ The table below shows the different types of governance servers and the OMAS the |:-------------------------|:-------------------------------------------------------------------------|:--------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Integration Daemon | Manages the capture of metadata through configured integration services. | [Integration Daemon Services](../integration-daemon-services) | [Governance Server OMAS](../../access-services/governance-server) provides support for retrieving governance engine definitions. The [integration services](../../integration-services) define the OMASs that support each type of integration connector. | | Engine Host | Manages governance engines. | [Engine Host Services](../engine-host-services) | [Governance Server OMAS](../../access-services/governance-server) provides support for retrieving governance engine definitions. The [engine services](../../engine-services) define the OMASs that support each type of governance engine. | -| Data Engine Proxy Server | Manages capture of metadata from a data engine. | [Data Engine Proxy Services](../data-engine-proxy-services) | [Data Engine OMAS](../../access-services/data-engine) | | Lineage Warehouse Server | Provides a historic reporting warehouse for lineage. | [Lineage Warehouse Services](../lineage-warehouse-services) | [Asset Lineage OMAS](../../access-services/asset-lineage) | ## Further information diff --git a/open-metadata-implementation/integration-services/search-integrator/README.md b/open-metadata-implementation/integration-services/search-integrator/README.md deleted file mode 100644 index 45338e07aeb..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/README.md +++ /dev/null @@ -1,20 +0,0 @@ - - - -![InDev](../../../images/egeria-content-status-in-development.png#pagewidth) - - -# Search Integrator Open Metadata Integration Service (OMIS) - -The Search Integrator OMIS manages the maintenance of search indexes. - -* [Documentation](https://egeria-project.org/services/omis/search-integrator/overview) - ----- - -* Return to the [Integration Services](..) - - ----- -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/integration-services/search-integrator/search-integrator-api/README.md b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/README.md deleted file mode 100644 index d7957b43dc0..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Search Integrator API - ----- -Return to the [integration service overview](..) - ----- -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/integration-services/search-integrator/search-integrator-api/build.gradle b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/build.gradle deleted file mode 100644 index d21721f44e6..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:open-integration-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-client') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -description = 'Search Integrator OMIS API' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/api/SearchIntegratorAPI.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/api/SearchIntegratorAPI.java deleted file mode 100644 index d80d51e0ac3..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/api/SearchIntegratorAPI.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.integrationservices.search.api; - -import org.odpi.openmetadata.commonservices.ffdc.properties.ConnectorReport; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - - -/** - * SearchIntegratorAPI is the interface to validate that a connector is suitable to run in the Search Integrator OMIS. - * It validates that it implements the correct interfaces and returns the connector type for the connector. - */ -public interface SearchIntegratorAPI -{ - /** - * Validate the connector and return its connector type. - * - * @param userId calling user - * @param connectorProviderClassName name of a specific connector or null for all connectors - * - * @return connector report for this connector - * - * @throws InvalidParameterException the connector provider class name is not a valid connector fo this service - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException there was a problem detected by the integration service - */ - ConnectorReport validateConnector(String userId, - String connectorProviderClassName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorConnector.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorConnector.java deleted file mode 100644 index c957b290ef7..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorConnector.java +++ /dev/null @@ -1,86 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.integrationservices.search.connector; - -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogEvent; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorBase; -import org.odpi.openmetadata.integrationservices.search.ffdc.SearchIntegratorAuditCode; -import org.odpi.openmetadata.integrationservices.search.ffdc.SearchIntegratorErrorCode; - -/** - * SearchIntegratorConnector is the base class for an integration connector that is managed by the - * Search Integrator OMIS. - */ -public abstract class SearchIntegratorConnector extends IntegrationConnectorBase implements SearchIntegratorOMISConnector -{ - private SearchIntegratorContext context = null; - - - /** - * Constructor - */ - public SearchIntegratorConnector() - { - super(); - System.out.println("calling constructor"); - } - - - /** - * Constructor - * - * @param context integration context - */ - public SearchIntegratorConnector(SearchIntegratorContext context) - { - super.setContext(context); - this.context = context; - } - - /** - * Set up the context for this connector. It is called by the context manager. - * - * @param context context for this connector's private use. - */ - public synchronized void setContext(SearchIntegratorContext context) - { - super.setContext(context); - this.context = context; - } - - /** - * Return the context for this connector. It is called by the connector. - * - * @return context for this connector's private use. - * @throws ConnectorCheckedException internal issue setting up context - */ - public synchronized SearchIntegratorContext getContext() throws ConnectorCheckedException - { - final String methodName = "getContext"; - - if (context != null) - { - return this.context; - } - else - { - if (auditLog != null) - { - auditLog.logMessage(methodName, SearchIntegratorAuditCode.NULL_CONTEXT.getMessageDefinition(connectorName)); - } - - throw new ConnectorCheckedException(SearchIntegratorErrorCode.NULL_CONTEXT.getMessageDefinition(connectorName), - this.getClass().getName(), - methodName); - } - } - - /** - * Save the events received from asset catalog to the Elasticsearch service - * - * @param assetCatalogEvent the event which contains the asset - */ - public abstract void saveAsset(AssetCatalogEvent assetCatalogEvent); -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorContext.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorContext.java deleted file mode 100644 index aa19d37a075..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorContext.java +++ /dev/null @@ -1,78 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.integrationservices.search.connector; - -import org.odpi.openmetadata.accessservices.assetcatalog.eventclient.AssetCatalogEventClient; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; -import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; - -/** - * SearchIntegratorContext provides a wrapper around the Asset Catalog OMAS client. - * It provides the simplified interface to open metadata needed by the SearchIntegratorConnector. - */ -public class SearchIntegratorContext extends IntegrationContext -{ - private final String integrationServiceName; - private final AuditLog auditLog; - private final AssetCatalogEventClient eventClient; - - - /** - * Create a new context for a connector. - * - * @param connectorId unique identifier of the connector (used to configure the event listener) - * @param connectorName name of connector from config - * @param connectorUserId userId for the connector - * @param serverName name of the integration daemon - * @param openIntegrationClient client for calling the metadata server - * @param openMetadataStoreClient client for calling the metadata server - * @param assetCatalogEventClient client to access the Asset Catalog OMAS out topic - * @param generateIntegrationReport should the connector generate an integration reports? - * @param permittedSynchronization the direction of integration permitted by the integration connector - * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is - * null). - * @param externalSourceGUID unique identifier of the software server capability for the asset manager - * @param externalSourceName unique name of the software server capability for the asset manager - * @param integrationServiceName name of this service - * @param maxPageSize max number of elements that can be returned on a query - * @param auditLog logging destination - */ - public SearchIntegratorContext(String connectorId, - String connectorName, - String connectorUserId, - String serverName, - OpenIntegrationClient openIntegrationClient, - OpenMetadataClient openMetadataStoreClient, - AssetCatalogEventClient assetCatalogEventClient, - boolean generateIntegrationReport, - PermittedSynchronization permittedSynchronization, - String integrationConnectorGUID, - String externalSourceGUID, - String externalSourceName, - String integrationServiceName, - int maxPageSize, - AuditLog auditLog) { - - super(connectorId, - connectorName, - connectorUserId, - serverName, - openIntegrationClient, - openMetadataStoreClient, - generateIntegrationReport, - permittedSynchronization, - externalSourceGUID, - externalSourceName, - integrationConnectorGUID, - auditLog, - maxPageSize); - - this.integrationServiceName = integrationServiceName; - this.auditLog = auditLog; - this.eventClient = assetCatalogEventClient; - } -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorOMISConnector.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorOMISConnector.java deleted file mode 100644 index 1ace1749408..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorOMISConnector.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.integrationservices.search.connector; - -/** - * A marker interface to identify the OMIS that this connector works with. - */ -public interface SearchIntegratorOMISConnector -{ -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/package-info.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/package-info.java deleted file mode 100644 index 3be2ed45e09..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the interfaces and base classes to use when writing an integration connector for the Search Integrator OMIS. - */ -package org.odpi.openmetadata.integrationservices.search.connector; \ No newline at end of file diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java deleted file mode 100644 index a5fba6ea98c..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.integrationservices.search.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - - -/** - * The SearchIntegratorAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *
    - *
  • Log Message Id - 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 SearchIntegratorAuditCode implements AuditLogMessageSet -{ - /** - * OMIS-SEARCH-INTEGRATOR-0001 - The search integrator context manager is being initialized for calls to server {0} on platform {1} - */ - CONTEXT_INITIALIZING("OMIS-SEARCH-INTEGRATOR-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The search integrator context manager is being initialized for calls to server {0} on platform {1}", - "The search Integrator OMIS is initializing its context manager.", - "Verify that the start up sequence goes on to initialize the context for each connector configured for this service."), - - /** - * OMIS-SEARCH-INTEGRATOR-0002 - Creating context for integration connector {0} ({1}) connecting to third party technology {2} and service options of {3} - */ - CONNECTOR_CONTEXT_INITIALIZING("OMIS-SEARCH-INTEGRATOR-0002", - AuditLogRecordSeverityLevel.STARTUP, - "Creating context for integration connector {0} ({1}) connecting to third party technology {2} and service options of {3}", - "A new context is created for an integration connector. This acts as a client to the open metadata repositories " + - "enabling the integration connector to synchronize open metadata with the third party technology's metadata", - "Verify that this connector is being started with the correct configuration."), - - /** - * OMIS-SEARCH-INTEGRATOR-0003 - Integration connector {0} has a null context - */ - NULL_CONTEXT("OMIS-SEARCH-INTEGRATOR-0003", - AuditLogRecordSeverityLevel.ERROR, - "Integration connector {0} has a null context", - "The integration connector is running but does not have a context. This is a timing issue in the integration daemon.", - "Gather information about the connector's configuration, the types of metadata it was integrating, the audit log messages " + - "from the integration daemon and its partner metadata server. Then contact the Egeria community to get help."), - - /** - * OMIS-SEARCH-INTEGRATOR-0004 - Integration connector {0} has an exception while attempting to register an Asset Catalog event listener - */ - REGISTER_CATALOG_LISTENER_ERROR("OMIS-SEARCH-INTEGRATOR-0004", - AuditLogRecordSeverityLevel.ERROR, - "Integration connector {0} has an exception while attempting to register an Asset Catalog event listener", - "The integration connector is running, but does not have a listener", - "Gather information about the connector's configuration, the types of metadata it was integrating, the audit log messages " + - "from the integration daemon and its partner metadata server. Then contact the Egeria community to get help.") - - ; - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - /** - * The constructor for SearchIntegratorAuditCode expects to be passed one of the enumeration rows defined in - * SearchIntegratorAuditCode above. * - * This will expand out to the 5 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 - */ - SearchIntegratorAuditCode(String messageId, - AuditLogRecordSeverityLevel 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 "AuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorErrorCode.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorErrorCode.java deleted file mode 100644 index 60f3f3cd325..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorErrorCode.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.integrationservices.search.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - -/** - * The SearchIntegratorErrorCode error code is used to define first failure data capture (FFDC) for errors that - * occur when working with the Integration Services. It is used in conjunction with all exceptions, - * both Checked and Runtime (unchecked). - *

- * 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 Id - 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 user should correct the error
  • - *
- */ -public enum SearchIntegratorErrorCode implements ExceptionMessageSet -{ - /** - * OMIS-SEARCH-INTEGRATOR-400-001 - Integration connector {0} is not of the correct type to run in the {1} integration service. It must inherit from {2} - */ - INVALID_CONNECTOR(400, "OMIS-SEARCH-INTEGRATOR-400-001", - "Integration connector {0} is not of the correct type to run in the {1} integration service. It must inherit from {2}", - "The integration service fails to start and this in turn causes the integration daemon to fail.", - "The connector was configured through the administration calls for the integration service." + - "Either move it to an appropriate integration service or update the connector implementation " + - "to inherit from the correct class."), - - /** - * OMIS-SEARCH-INTEGRATOR-500-001 - Integration connector {0} has a null context - */ - NULL_CONTEXT(400, "OMIS-SEARCH-INTEGRATOR-500-001", - "Integration connector {0} has a null context", - "The integration connector is running but does not have a context. This is a timing issue in the integration daemon.", - "Gather information about the connector's configuration, the types of metadata it was integrating, the audit log messages " + - "from the integration daemon and its partner metadata server. Then contact the Egeria community to get help."), - ; - - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - SearchIntegratorErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/README.md b/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/README.md deleted file mode 100644 index ea8a0fc6f49..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/README.md +++ /dev/null @@ -1,8 +0,0 @@ - - - -# Search Integrator OMIS Client - ----- -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/integration-services/search-integrator/search-integrator-client/build.gradle b/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/build.gradle deleted file mode 100644 index a85b17c72d5..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-api') - implementation project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-api') - implementation 'org.springframework:spring-core' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -description = 'Search Integrator Client-side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/src/main/java/org/odpi/openmetadata/integrationservices/search/client/SearchIntegrator.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/src/main/java/org/odpi/openmetadata/integrationservices/search/client/SearchIntegrator.java deleted file mode 100644 index 0f26794e90d..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-client/src/main/java/org/odpi/openmetadata/integrationservices/search/client/SearchIntegrator.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.integrationservices.search.client; - -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.properties.ConnectorReport; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorReportResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.integrationservices.search.api.SearchIntegratorAPI; - -/** - * SearchIntegrator is the client library for the Search Integrator OMIS's REST API. - */ -public class SearchIntegrator implements SearchIntegratorAPI -{ - private FFDCRESTClient restClient; /* Initialized in constructor */ - private String serverName; - private String serverPlatformRootURL; - - private InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * @param auditLog logging destination - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public SearchIntegrator(String serverName, - String serverPlatformRootURL, - AuditLog auditLog) throws InvalidParameterException - { - this.serverName = serverName; - this.serverPlatformRootURL = serverPlatformRootURL; - - this.restClient = new FFDCRESTClient(serverName, serverPlatformRootURL, auditLog); - } - - - /** - * Create a new client with no authentication embedded in the HTTP request. - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public SearchIntegrator(String serverName, - String serverPlatformRootURL) throws InvalidParameterException - { - this.serverName = serverName; - this.serverPlatformRootURL = serverPlatformRootURL; - - this.restClient = new FFDCRESTClient(serverName, serverPlatformRootURL); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * @param userId caller's userId embedded in all HTTP requests - * @param password caller's userId embedded in all HTTP requests - * @param auditLog logging destination - * - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public SearchIntegrator(String serverName, - String serverPlatformRootURL, - String userId, - String password, - AuditLog auditLog) throws InvalidParameterException - { - this.serverName = serverName; - this.serverPlatformRootURL = serverPlatformRootURL; - - this.restClient = new FFDCRESTClient(serverName, serverPlatformRootURL, userId, password, auditLog); - } - - - /** - * Create a new client that passes userId and password in each HTTP request. This is the - * userId/password of the calling server. The end user's userId is sent on each request. - * - * @param serverName name of the server to connect to - * @param serverPlatformRootURL the network address of the server running the OMAS REST services - * @param userId caller's userId embedded in all HTTP requests - * @param password caller's userId embedded in all HTTP requests - * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. - */ - public SearchIntegrator(String serverName, - String serverPlatformRootURL, - String userId, - String password) throws InvalidParameterException - { - this.serverName = serverName; - this.serverPlatformRootURL = serverPlatformRootURL; - - this.restClient = new FFDCRESTClient(serverName, serverPlatformRootURL, userId, password); - } - - - /** - * Validate the connector and return its connector type. - * - * @param userId calling user - * @param connectorProviderClassName name of a specific connector or null for all connectors - * - * @return connector report for this connector - * - * @throws InvalidParameterException the connector provider class name is not a valid connector fo this service - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException there was a problem detected by the integration service - */ - public ConnectorReport validateConnector(String userId, - String connectorProviderClassName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - final String methodName = "validateConnector"; - final String nameParameter = "connectorProviderClassName"; - final String urlTemplate = "/servers/{0}/open-metadata/integration-services/search-integrator/users/{1}/validate-connector"; - - invalidParameterHandler.validateUserId(userId, methodName); - invalidParameterHandler.validateName(connectorProviderClassName, nameParameter, methodName); - - ConnectorReportResponse restResult = restClient.callOCFConnectorReportGetRESTCall(methodName, - serverPlatformRootURL + urlTemplate, - serverName, - userId, - connectorProviderClassName); - - return restResult.getConnectorReport(); - } -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/README.md b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/README.md deleted file mode 100644 index 8068f0b454e..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Search Integrator Server-side - -The Search Integrator integration service's server-side implementation provides -the implementation of the context manager. The context manager sets the context in an integration -connector just before `start()` is called. - - ----- -Return to the [integration service overview](..) - ----- -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/integration-services/search-integrator/search-integrator-server/build.gradle b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/build.gradle deleted file mode 100644 index 70d959fbff4..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:governance-action-framework') - implementation project(':open-metadata-implementation:frameworks:open-integration-framework') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') - implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-api') - implementation project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-client') - implementation project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-api') - implementation project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-registration') - implementation project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-server') - implementation project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-client') - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - implementation project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-client') - implementation 'org.slf4j:slf4j-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Search Integrator OMIS Server-side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/AssetCatalogOutTopicEventListener.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/AssetCatalogOutTopicEventListener.java deleted file mode 100644 index 8e2181c22af..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/AssetCatalogOutTopicEventListener.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.integrationservices.search.contextmanager; - -import org.odpi.openmetadata.accessservices.assetcatalog.api.AssetCatalogEventListener; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogEvent; -import org.odpi.openmetadata.integrationservices.search.connector.SearchIntegratorConnector; - -public class AssetCatalogOutTopicEventListener implements AssetCatalogEventListener { - - private SearchIntegratorConnector searchIntegratorConnector; - - public SearchIntegratorConnector getSearchIntegratorConnector() { - return searchIntegratorConnector; - } - - public void setSearchIntegratorConnector(SearchIntegratorConnector searchIntegratorConnector) { - this.searchIntegratorConnector = searchIntegratorConnector; - } - - @Override - public void processEvent(AssetCatalogEvent event) { - searchIntegratorConnector.saveAsset(event); - } -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java deleted file mode 100644 index db52e37ae63..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java +++ /dev/null @@ -1,206 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.integrationservices.search.contextmanager; - -import org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog; -import org.odpi.openmetadata.accessservices.assetcatalog.OpenIntegrationServiceClient; -import org.odpi.openmetadata.accessservices.assetcatalog.OpenMetadataStoreClient; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.accessservices.assetcatalog.eventclient.AssetCatalogEventClient; -import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector; -import org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager; -import org.odpi.openmetadata.adminservices.configuration.registration.IntegrationServiceDescription; -import org.odpi.openmetadata.integrationservices.search.connector.SearchIntegratorConnector; -import org.odpi.openmetadata.integrationservices.search.connector.SearchIntegratorContext; -import org.odpi.openmetadata.integrationservices.search.ffdc.SearchIntegratorAuditCode; -import org.odpi.openmetadata.integrationservices.search.ffdc.SearchIntegratorErrorCode; - -import java.util.Map; - - -/** - * SearchIntegratorContextManager provides the bridge between the integration daemon services and - * the specific implementation of an integration service - */ -public class SearchIntegratorContextManager extends IntegrationContextManager { - private AssetCatalogEventClient assetCatalogEventClient; - private AssetCatalogOutTopicEventListener eventListener; - - /** - * Default constructor - */ - public SearchIntegratorContextManager() { - super(); - } - - /** - * Initialize server properties for the context manager. - * - * @param partnerOMASServerName name of the server to connect to - * @param partnerOMASPlatformRootURL the network address of the server running the OMAS REST services - * @param userId caller's userId embedded in all HTTP requests - * @param password caller's userId embedded in all HTTP requests - * @param serviceOptions options from the integration service's configuration - * @param maxPageSize maximum number of results that can be returned on a single REST call - * @param auditLog logging destination - */ - public void initializeContextManager(String partnerOMASServerName, - String partnerOMASPlatformRootURL, - String userId, - String password, - Map serviceOptions, - int maxPageSize, - AuditLog auditLog) { - - super.initializeContextManager(partnerOMASServerName, partnerOMASPlatformRootURL, userId, password, serviceOptions, maxPageSize, auditLog); - - final String methodName = "initializeContextManager"; - - auditLog.logMessage(methodName, - SearchIntegratorAuditCode.CONTEXT_INITIALIZING.getMessageDefinition(partnerOMASServerName, partnerOMASPlatformRootURL)); - } - - - /** - * Suggestion for subclass to create client(s) to partner OMAS. - * - * @param maxPageSize maximum value allowed for page size - * @throws InvalidParameterException the subclass is not able to create one of its clients - */ - @Override - public void createClients(int maxPageSize) throws InvalidParameterException - { - final String methodName = "createClients"; - super.openIntegrationClient = new OpenIntegrationServiceClient(partnerOMASServerName, partnerOMASPlatformRootURL, maxPageSize); - super.openMetadataStoreClient = new OpenMetadataStoreClient(partnerOMASServerName, partnerOMASPlatformRootURL, maxPageSize); - - AssetCatalog restClient; - if (localServerPassword == null) { - restClient = new AssetCatalog(partnerOMASServerName, partnerOMASPlatformRootURL); - } else { - restClient = new AssetCatalog(partnerOMASServerName, - partnerOMASPlatformRootURL, - localServerUserId, - localServerPassword); - } - - assetCatalogEventClient = new AssetCatalogEventClient(partnerOMASServerName, - partnerOMASPlatformRootURL, - restClient, - maxPageSize, - auditLog, - localServerUserId); - - eventListener = new AssetCatalogOutTopicEventListener(); - - try { - assetCatalogEventClient.registerListener(localServerUserId, eventListener); - } catch (ConnectionCheckedException | ConnectorCheckedException | PropertyServerException | UserNotAuthorizedException e) { - auditLog.logException(methodName,SearchIntegratorAuditCode.REGISTER_CATALOG_LISTENER_ERROR.getMessageDefinition(IntegrationServiceDescription.SEARCH_INTEGRATOR_OMIS.getIntegrationServiceFullName()),e); - } - } - - - - /** - * Set up the context in the supplied connector. This is called between initialize() and start() on the connector. - * - * @param connectorId unique identifier of the connector (used to configure the event listener) - * @param connectorName name of connector from config - * @param connectorUserId userId for the connector - * @param integrationConnector connector created from connection integration service configuration - * @param integrationConnectorGUID unique identifier of the integration connector entity (only set if working with integration groups) - * @param permittedSynchronization controls the direction(s) that metadata is allowed to flow - * @param generateIntegrationReport should the connector generate an integration reports? - * @param metadataSourceQualifiedName unique name of the software server capability that represents the metadata source. - * - * @return the new integration context - * @throws InvalidParameterException the connector is not of the correct type - * @throws UserNotAuthorizedException user not authorized to issue this request - * @throws PropertyServerException problem accessing the property server - */ - @Override - public IntegrationContext setContext(String connectorId, - String connectorName, - String connectorUserId, - IntegrationConnector integrationConnector, - String integrationConnectorGUID, - PermittedSynchronization permittedSynchronization, - boolean generateIntegrationReport, - String metadataSourceQualifiedName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - final String methodName = "setContext"; - - String permittedSynchronizationName = PermittedSynchronization.BOTH_DIRECTIONS.getName(); - String serviceOptionsString = "null"; - - if (permittedSynchronization != null) { - permittedSynchronizationName = permittedSynchronization.getName(); - } - - if (serviceOptions != null) { - serviceOptionsString = serviceOptions.toString(); - } - - if (integrationConnector instanceof SearchIntegratorConnector serviceSpecificConnector) - { - auditLog.logMessage(methodName, - SearchIntegratorAuditCode.CONNECTOR_CONTEXT_INITIALIZING.getMessageDefinition(connectorName, - connectorId, - metadataSourceQualifiedName, - permittedSynchronizationName, - serviceOptionsString)); - - String externalSourceGUID = this.setUpMetadataSource(metadataSourceQualifiedName, - null, - null, - null); - String externalSourceName = metadataSourceQualifiedName; - if (externalSourceGUID == null) { - externalSourceName = null; - } - - eventListener.setSearchIntegratorConnector(serviceSpecificConnector); - - SearchIntegratorContext integratorContext = new SearchIntegratorContext(connectorId, - connectorName, - connectorUserId, - partnerOMASServerName, - openIntegrationClient, - openMetadataStoreClient, - assetCatalogEventClient, - generateIntegrationReport, - permittedSynchronization, - integrationConnectorGUID, - externalSourceGUID, - externalSourceName, - IntegrationServiceDescription.SEARCH_INTEGRATOR_OMIS.getIntegrationServiceFullName(), - maxPageSize, - auditLog); - serviceSpecificConnector.setContext(integratorContext); - integrationConnector.setConnectorName(connectorName); - - return integratorContext; - - } else { - final String parameterName = "integrationConnector"; - - throw new InvalidParameterException( - SearchIntegratorErrorCode.INVALID_CONNECTOR.getMessageDefinition(connectorName, - IntegrationServiceDescription.SEARCH_INTEGRATOR_OMIS.getIntegrationServiceFullName(), - SearchIntegratorConnector.class.getCanonicalName()), - this.getClass().getName(), - methodName, - parameterName); - } - } -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/rest/SearchIntegratorRESTServices.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/rest/SearchIntegratorRESTServices.java deleted file mode 100644 index 3b7f35fb8fb..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/rest/SearchIntegratorRESTServices.java +++ /dev/null @@ -1,91 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.integrationservices.search.rest; - -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.properties.ConnectorReport; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorReportResponse; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.adminservices.configuration.registration.IntegrationServiceDescription; -import org.odpi.openmetadata.governanceservers.integrationdaemonservices.registration.IntegrationServiceRegistry; -import org.odpi.openmetadata.governanceservers.integrationdaemonservices.server.IntegrationDaemonInstanceHandler; -import org.odpi.openmetadata.integrationservices.search.connector.SearchIntegratorConnector; -import org.odpi.openmetadata.integrationservices.search.connector.SearchIntegratorOMISConnector; -import org.odpi.openmetadata.integrationservices.search.contextmanager.SearchIntegratorContextManager; -import org.slf4j.LoggerFactory; - - -/** - * SearchIntegratorRESTServices provides the ability to validate that a connector will run successfully in this integration service. - * It is a convenience method for configuration tools. - */ -public class SearchIntegratorRESTServices -{ - private static final IntegrationDaemonInstanceHandler instanceHandler = new IntegrationDaemonInstanceHandler(); - - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(SearchIntegratorRESTServices.class), - instanceHandler.getServiceName()); - private final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - - - /** - * The constructor registers this service with the integration daemon. It is called with the spring module is - * picked up by the component scan and instantiated. - */ - public SearchIntegratorRESTServices() - { - IntegrationServiceRegistry.registerIntegrationService(IntegrationServiceDescription.SEARCH_INTEGRATOR_OMIS, - SearchIntegratorContextManager.class.getName(), - SearchIntegratorOMISConnector.class.getName()); - } - - - /** - * Validate the connector and return its connector type. - * - * @param serverName integration daemon server name - * @param userId calling user - * @param connectorProviderClassName name of a specific connector or null for all connectors - * - * @return connector type or - * - * InvalidParameterException the connector provider class name is not a valid connector fo this service - * UserNotAuthorizedException user not authorized to issue this request - * PropertyServerException there was a problem detected by the integration service - */ - public ConnectorReportResponse validateConnector(String serverName, - String userId, - String connectorProviderClassName) - { - final String methodName = "validateConnector"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - ConnectorReportResponse response = new ConnectorReportResponse(); - AuditLog auditLog = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - ConnectorReport connectorReport = instanceHandler.validateConnector(connectorProviderClassName, - SearchIntegratorConnector.class, - IntegrationServiceDescription.SEARCH_INTEGRATOR_OMIS.getIntegrationServiceFullName()); - - if (connectorReport != null) - { - response.setConnectorReport(connectorReport); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/README.md b/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/README.md deleted file mode 100644 index a9e45d87ebe..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Search integration Daemon Services with Spring - -The integration daemon services with Spring module uses Spring to implement a REST API -for the integration daemon server. - ----- -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/integration-services/search-integrator/search-integrator-spring/build.gradle b/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/build.gradle deleted file mode 100644 index cdd4b322017..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-server') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'org.springframework:spring-web' - implementation 'io.swagger.core.v3:swagger-annotations' -} - -description = 'Search Integrator OMIS with Spring' - -java { - withJavadocJar() -} - -test { - useTestNG() - // This will default to standard search pattern - see https://docs.gradle.org/current/userguide/java_testing.html#sec:test_detection - scanForTestClasses = false -} diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/src/main/java/org/odpi/openmetadata/integrationservices/search/server/spring/SearchIntegratorResource.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/src/main/java/org/odpi/openmetadata/integrationservices/search/server/spring/SearchIntegratorResource.java deleted file mode 100644 index 47cc673da2b..00000000000 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-spring/src/main/java/org/odpi/openmetadata/integrationservices/search/server/spring/SearchIntegratorResource.java +++ /dev/null @@ -1,60 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.integrationservices.search.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorReportResponse; -import org.odpi.openmetadata.integrationservices.search.rest.SearchIntegratorRESTServices; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -/** - * SearchIntegratorResource provides the server-side catcher for REST calls using Spring. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/integration-services/search-integrator/users/{userId}") - -@Tag(name="Integration Daemon: Search Integrator OMIS", description="Supports the detection and creation of metadata for file systems and file servers.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omis/search-integrator/overview/")) - -public class SearchIntegratorResource -{ - private final SearchIntegratorRESTServices restAPI = new SearchIntegratorRESTServices(); - - - /** - * Validate the connector and return its connector type. The integration service does not need to - * be running in the integration daemon in order for this call to be successful. It only needs to be registered with the - * integration daemon. - * - * @param serverName integration daemon server name - * @param userId calling user - * @param connectorProviderClassName name of a specific connector or null for all connectors - * - * @return connector type or - * InvalidParameterException the connector provider class name is not a valid connector fo this service - * UserNotAuthorizedException user not authorized to issue this request - * PropertyServerException there was a problem detected by the integration service - */ - @GetMapping(path = "/validate-connector/{connectorProviderClassName}") - - @Operation(summary="validateConnector", - description="Validate the connector and return its connector type. The integration service does not need to" + - " be running in the integration daemon in order for this call to be successful. " + - " The integration service only needs to be registered with the integration daemon.", - externalDocs=@ExternalDocumentation(description="Integration Connectors", - url="https://egeria-project.org/concepts/integration-connector")) - - public ConnectorReportResponse validateConnector(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String connectorProviderClassName) - { - return restAPI.validateConnector(serverName, userId, connectorProviderClassName); - } -} diff --git a/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle b/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle index 816a571c48e..2cb361bab3d 100644 --- a/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle +++ b/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle @@ -60,18 +60,10 @@ dependencies { runtimeOnly project(':open-metadata-implementation:view-services:reference-data:reference-data-spring') runtimeOnly project(':open-metadata-implementation:view-services:template-manager:template-manager-spring') runtimeOnly project(':open-metadata-implementation:view-services:valid-metadata:valid-metadata-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:rex-view:rex-view-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:tex-view:tex-view-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:dino-view:dino-view-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:server-author-view:server-author-view-spring') + runtimeOnly project(':open-metadata-implementation:access-services:security-manager:security-manager-spring') runtimeOnly project(':open-metadata-implementation:access-services:data-manager:data-manager-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:glossary-view:glossary-view-spring') runtimeOnly project(':open-metadata-implementation:access-services:asset-lineage:asset-lineage-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:data-engine:data-engine-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:subject-area:subject-area-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:asset-catalog:omas-asset-catalog-spring') runtimeOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-spring') runtimeOnly project(':open-metadata-implementation:access-services:governance-engine:governance-engine-spring') runtimeOnly project(':open-metadata-implementation:access-services:governance-server:governance-server-spring') @@ -100,14 +92,12 @@ dependencies { runtimeOnly project(':open-metadata-implementation:integration-services:analytics-integrator:analytics-integrator-spring') runtimeOnly project(':open-metadata-implementation:integration-services:api-integrator:api-integrator-spring') runtimeOnly project(':open-metadata-implementation:integration-services:catalog-integrator:catalog-integrator-spring') - // runtimeOnly project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-spring') runtimeOnly project(':open-metadata-implementation:integration-services:topic-integrator:topic-integrator-spring') runtimeOnly project(':open-metadata-implementation:repository-services:repository-services-spring') runtimeOnly project(':open-metadata-conformance-suite:open-metadata-conformance-suite-spring') runtimeOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-spring') runtimeOnly project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-spring') runtimeOnly project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-spring') - // runtimeOnly project(':open-metadata-implementation:governance-server-services:data-engine-proxy-services:data-engine-proxy-services-spring') runtimeOnly project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-spring') runtimeOnly project(':open-metadata-implementation:governance-server-services:engine-host-services:engine-host-services-spring') runtimeOnly project(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-services-spring') diff --git a/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle b/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle index c5b5c0dc9c5..0a23d4af4a7 100644 --- a/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle +++ b/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle @@ -50,7 +50,6 @@ dependencies { runtimeOnly project(':open-metadata-implementation:view-services:collection-manager:collection-manager-spring') runtimeOnly project(':open-metadata-implementation:view-services:data-discovery:data-discovery-spring') runtimeOnly project(':open-metadata-implementation:view-services:feedback-manager:feedback-manager-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-spring') runtimeOnly project(':open-metadata-implementation:view-services:glossary-browser:glossary-browser-spring') runtimeOnly project(':open-metadata-implementation:view-services:glossary-manager:glossary-manager-spring') runtimeOnly project(':open-metadata-implementation:view-services:action-author:action-author-spring') @@ -60,17 +59,9 @@ dependencies { runtimeOnly project(':open-metadata-implementation:view-services:my-profile:my-profile-spring') runtimeOnly project(':open-metadata-implementation:view-services:template-manager:template-manager-spring') runtimeOnly project(':open-metadata-implementation:view-services:valid-metadata:valid-metadata-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:rex-view:rex-view-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:tex-view:tex-view-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:dino-view:dino-view-spring') -// runtimeOnly project(':open-metadata-implementation:view-services:server-author-view:server-author-view-spring') runtimeOnly project(':open-metadata-implementation:access-services:security-manager:security-manager-spring') runtimeOnly project(':open-metadata-implementation:access-services:data-manager:data-manager-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:glossary-view:glossary-view-spring') runtimeOnly project(':open-metadata-implementation:access-services:asset-lineage:asset-lineage-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:data-engine:data-engine-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:subject-area:subject-area-spring') -// runtimeOnly project(':open-metadata-implementation:access-services:asset-catalog:omas-asset-catalog-spring') runtimeOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-spring') runtimeOnly project(':open-metadata-implementation:access-services:governance-engine:governance-engine-spring') runtimeOnly project(':open-metadata-implementation:access-services:governance-server:governance-server-spring') @@ -99,14 +90,12 @@ dependencies { runtimeOnly project(':open-metadata-implementation:integration-services:analytics-integrator:analytics-integrator-spring') runtimeOnly project(':open-metadata-implementation:integration-services:api-integrator:api-integrator-spring') runtimeOnly project(':open-metadata-implementation:integration-services:catalog-integrator:catalog-integrator-spring') -// runtimeOnly project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-spring') runtimeOnly project(':open-metadata-implementation:integration-services:topic-integrator:topic-integrator-spring') runtimeOnly project(':open-metadata-implementation:repository-services:repository-services-spring') runtimeOnly project(':open-metadata-conformance-suite:open-metadata-conformance-suite-spring') runtimeOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-spring') runtimeOnly project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-spring') runtimeOnly project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-spring') -// runtimeOnly project(':open-metadata-implementation:governance-server-services:data-engine-proxy-services:data-engine-proxy-services-spring') runtimeOnly project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-spring') runtimeOnly project(':open-metadata-implementation:governance-server-services:engine-host-services:engine-host-services-spring') runtimeOnly project(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-services-spring') diff --git a/open-metadata-implementation/user-interfaces/README.md b/open-metadata-implementation/user-interfaces/README.md deleted file mode 100644 index af890205ae2..00000000000 --- a/open-metadata-implementation/user-interfaces/README.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -![InDev](../../images/egeria-content-status-in-development.png#pagewidth) - -# Open Metadata User Interface - -Egeria provides a basic user interface (UI) to demonstrate the power of the open -metadata and governance capabilities. They are fully functional as -far as the standards go, and could be used by a small company. However, -it is likely that commercial offerings will offer a richer user experience, -particularly for a larger organization. - -There are 2 User Interfaces : - -* The **[Presentation Server](.https://egeria-project.org/concepts/presentation-server)** is a multi-tenant server that serves a user interface - it issues rest calls downstream primarily to view - servers. All the code for the Presentation Server has been moved to [Egeria React UI Git repository](https://github.com/odpi/egeria-react-ui) - -* [UI Application](ui-chassis) the user interface platform. The Server side of the user interface is maintained in the [ui-chassis](ui-chassis) module. -The client side has been moved to [Egeria UI Git repository](https://github.com/odpi/egeria-ui) - - ----- -Return to [open-metadata-implementation](..). - ----- -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/user-interfaces/presentation-server/README.md b/open-metadata-implementation/user-interfaces/presentation-server/README.md deleted file mode 100644 index 6b42a7fd822..00000000000 --- a/open-metadata-implementation/user-interfaces/presentation-server/README.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Presentation Server - -The **Presentation Server** is a multi-tenant server that serves a user interface - it issues rest calls downstream primarily to view -servers. - -All the code for the Presentation Server has been moved to [Egeria React UI Git repository](https://github.com/odpi/egeria-react-ui) - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/README.md b/open-metadata-implementation/user-interfaces/ui-chassis/README.md deleted file mode 100644 index c2a49db6c04..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/README.md +++ /dev/null @@ -1,19 +0,0 @@ - - - -# User Interface (UI) Chassis - -The UI chassis is written using [Spring Boot](https://spring.io/projects/spring-boot). -and manages the REST APIs' endpoint. Calls to the ui chassis result in rest calls -to appropriate Open Metadata or Governance Services. - -Since this is a Spring Boot application, it can be -[customized using the application.properties](https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html) -file found in the `resources` directory and using environment variables. - -The ui chassis code is here: -* **[ui-chassis-spring](ui-chassis-spring)** - ui chassis using Spring. - ----- -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/user-interfaces/ui-chassis/ui-chassis-spring/README.md b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/README.md deleted file mode 100644 index 233bd7e867e..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# ui-chassis-spring - -In the application properties file rules can be defined based on which the edges of the lineage graph will be inverted. -A rule must contain an edge type and can also contain the source node type and destination node type for further restrictions. -Eg: - -``` -lineage-display-config: - rules: - - - edgeType: SemanticAssignment - destinationNodeType: GlossaryTerm - sourceNodeType: GlossaryCategory -``` - -In this example a rule is defined which will invert all the edges from the lineage graph of type SemanticAssignment -and have the destination node type GlossaryTerm and source node type GlossaryCategory. - -[0] - [https://github.com/odpi/egeria-ui](https://github.com/odpi/egeria-ui) - -# Start - -Start the base server for the `ui-chassis-spring`. - -```bash -$ git clone https://github.com/odpi/egeria-ui -$ cd egeria-ui -$ npm install -$ npm run build --api-url=http://api.production # or npm run start --api-url=http://api.production -``` - -```bash -$ mvn spring-boot:run -Dspring-boot.run.folders=/path/to/libs/ -Dspring-boot.run.arguments="--omas.server.name= --omas.server.url= --open.lineage.server.url= --open.lineage.server.name= --server.ssl.trust-store=/path/to/truststore.p12 --cors.allowed-origins=*" -``` - -# Start in development mode - -```bash -$ git clone https://github.com/odpi/egeria-ui -$ cd egeria-ui -$ npm install -$ npm run start --api-url=http://api.production # will start a static server on http://localhost:8081 - -$ cd egeria/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/ -$ mvn spring-boot:run -Dspring-boot.run.folders=/path/to/libs/ -Dspring-boot.run.arguments="--omas.server.name= --omas.server.url= --open.lineage.server.url= --open.lineage.server.name= --server.ssl.trust-store=/path/to/truststore.p12 --cors.allowed-origins=*" -``` - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/build.gradle b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/build.gradle deleted file mode 100644 index 9e91936c852..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/build.gradle +++ /dev/null @@ -1,111 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id 'io.freefair.lombok' - id 'org.springframework.boot' -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-data-redis' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.boot:spring-boot-test' - implementation 'org.springframework.security:spring-security-ldap' - implementation 'org.springframework.security:spring-security-oauth2-jose' - implementation 'com.nimbusds:nimbus-jose-jwt' - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - implementation 'org.springframework.security:spring-security-crypto' - implementation 'io.lettuce:lettuce-core' - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-client') - runtimeOnly project(':open-metadata-implementation:access-services:subject-area:subject-area-client') - runtimeOnly 'ch.qos.logback:logback-classic' - implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:repository-services:repository-services-client') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation 'org.springframework.boot:spring-boot-autoconfigure' - implementation 'org.springframework:spring-webmvc' - implementation 'org.springframework:spring-context' - implementation 'org.springframework.security:spring-security-config' - implementation 'org.springframework.security:spring-security-core' - implementation 'org.springframework:spring-web' - implementation 'org.apache.tomcat.embed:tomcat-embed-core' - implementation 'org.springframework.boot:spring-boot' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-data-redis' - implementation 'org.springframework.ldap:spring-ldap-core' - runtimeOnly 'io.micrometer:micrometer-registry-prometheus' - runtimeOnly 'jakarta.persistence:jakarta.persistence-api' - implementation 'org.springframework:spring-beans' - testImplementation 'com.fasterxml.jackson.core:jackson-databind' - runtimeOnly 'javax.xml.bind:jaxb-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'org.slf4j:slf4j-api' - implementation 'org.springframework:spring-core' - implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') - implementation 'org.springframework.security:spring-security-web' - runtimeOnly project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - runtimeOnly 'com.fasterxml.jackson.core:jackson-core' - implementation project(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-services-client') - implementation project(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-services-api') - testCompileOnly project(':open-metadata-implementation:common-services:ffdc-services') - compileOnly project(':open-metadata-implementation:common-services:ffdc-services') - implementation 'org.apache.commons:commons-collections4' - testImplementation 'commons-io:commons-io' - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-client') - implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-api') - testCompileOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - compileOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testImplementation 'org.mockito:mockito-junit-jupiter' - testImplementation 'org.mockito:mockito-inline' - testImplementation 'org.mockito:mockito-core' - testImplementation 'junit:junit' - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:view-services:tex-view:tex-view-server') - runtimeOnly project(':open-metadata-implementation:view-services:tex-view:tex-view-spring') - implementation project(':open-metadata-implementation:view-services:rex-view:rex-view-server') - runtimeOnly project(':open-metadata-implementation:view-services:rex-view:rex-view-spring') - implementation project(':open-metadata-implementation:view-services:dino-view:dino-view-server') - runtimeOnly project(':open-metadata-implementation:view-services:dino-view:dino-view-spring') - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - runtimeOnly 'org.springdoc:springdoc-openapi-starter-webmvc-ui' - compileOnly 'io.swagger.core.v3:swagger-annotations-jakarta' - runtimeOnly project(':open-metadata-implementation:user-security:token-manager') -} - -description = 'UI Server Platform Chassis for Spring' - -bootJar { - manifest { - attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher' -// mainClass = 'org.odpi.openmetadata.userinterface.uichassis.springboot.EgeriaUIPlatform' - } -} - -java { - withJavadocJar() -} - - -test { - useJUnitPlatform() -} - -// See https://stackoverflow.com/questions/61197984/bootjar-mavenjar-artifact-wasnt-produced-by-this-build -// Remove the regular (plain) jar & replace with the SpringBoot version -configurations { - [apiElements, runtimeElements].each { - it.outgoing.artifacts.removeIf { - it.buildDependencies.getDependencies(null).contains(jar) - } - it.outgoing.artifact(bootJar) - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/RepositoryExplorer/RepositoryExplorerGuide.md b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/RepositoryExplorer/RepositoryExplorerGuide.md deleted file mode 100644 index a7d87185902..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/RepositoryExplorer/RepositoryExplorerGuide.md +++ /dev/null @@ -1,284 +0,0 @@ - - - - -The **Repository Explorer (Rex)** can help you explore and visualize the metadata in a repository. -It retrieves entities and relationships from the repository and displays them. -A details panel also shows the properties and other information about an object. -Each entity or relationship is added to a network diagram, which shows how they are connected. - -Starting with an initial object - an entity or relationship - Rex enables you to explore the -neighborhood of objects around that initial object. It does so by traversing the relationships -connected to each entity, and allows you to select what types of relationship and types of -neighboring entity you want it to retrieve. You can also filter the traversal by specifying -classifications that the neighboring entities must possess. - -You can repeat this traversal process to assemble a graph of the objects that you are -interested in. - -You don't need to know the available relationship types, entity types or classifications in -advance, because Rex will display what is possible and let you choose. - -In general, one object in the graph is the 'focus'; this is the object from where the next -traversal starts; the focus object is the one that is displayed in the details panel. -You can set which object is the focus by clicking on it in the diagram. If you retrieve an -object from the repository by searching or typing in its GUID, that object automatically -becomes the new focus. - -Rex can retrieve and display objects of the types supported by whichever repository you -connect it to. When you connect it to a repository, Rex will automatically read the type information -from the repository. It uses this information to populate things like the search filters (explained -below). - -Rex is intended as a tool to help targeted exploration of relatively small sets of entities and relationships. -It is not a general graph visualization utility, so it would not be wise to use to construct a large graph. -It is advisable to limit the number of traversals you perform, and avoid performing a traversal that would include -a large number of objects. There are no hard limits on graph size, but it is recommended that exploration is -kept specific and aimed at revealing the structure of relatively small sub-graphs. - -To help with this, Rex provides assistance to help limit what you get back from each traversal. For -example, it provides Traversal Filters that allow you to filter the types of entity and relationship to include. The -Traversal Filters work by types and classifications. They do not support fine-grained (property-based) filtering of -objects within a traversal. This is not a limitation of Rex, rather a reflection of the functions available in the -metadata collection interface. - -If the type-based filtering provided by Rex's Traversal Filters proves to be too coarse-grained, and you find yourself struggling -to select a particular entity within a possible set of neighbors, consider adopting a different approach. For example, -it may be better to with a search for the interesting entity, followed by traversing from that entity. It may be possible -in future to add more sophisticated traversal filters but there would most likely still be repositories that would not support -the full metadata collection interface. - - -**A Typical Workflow:** - -Typically you would perform the following steps: - -* Set the repository server details -* Retrieve one or more initial metadata objects, either using Search or by specifying an object's GUID if you know it -* Explore starting from the initial object, applying filters at each step -* Explore from additional objects or using different filters -* When you have something you want to keep, capture the diagram and history views -* At any point you can Undo the most recent operation (repeatedly) or can clear the whole graph - - -**Set the Repository Server:** - -To get started Rex needs the name and URL of the repository server that you wish to explore. -Enter these details in the "Server Name" and "Server URL Root" fields and press the 'Connect' button. -Immediately below the server input fields, you will see a status message. On first start the message -asks that you enter the server details and press Connect. Rex will use the server -details to request the type information from the repository, which Rex uses to populate its search filters. -If the request to the server completes successfully you should see the message change to "Server OK". -If Rex cannot connect to the server it will display an error message and ask you to check the details and retry. - -Rex does not maintain a long-running connection to the server; each time it needs to get something from the -server it will use the server details you have set. - -**Get some initial metadata:** - -Rex needs an object as the starting point of a traversal. You can retrieve a starting object either by entering a -GUID or by performing a Search, which is explained below. If an object is found it will appear in the diagram. -If no object could be found you will see an alert pop up. - -You can start with either an entity or a relationship - use whichever is most convenient. -Entities are drawn as circles. Relationships are drawn as lines connecting pairs of circles (entities). -Classifications are not shown in the diagram, but any classifications associated with an entity are shown in -the details panel when the entity is selected. - -**Setting the focus object:** - -If one object was retrieved it will automatically be set to the focus, so it will be highlighted and its details will -be displayed in the details panel. -If multiple objects were retrieved they will be shown in the diagram and none will be highlighted. You can select a -focus object in the diagram by clicking on it. The focus object will be highlighted in the diagram -and its details will be shown in the details panel. - -The focus object is highlighted in the primary color for the UI - this is the same color used for things like buttons and -banners. The default primary color is the Egeria 'aqua' color (a pale blue), but this may be changed if a different color -scheme has been applied. Other objects (not the focus) are given a color that reflects the home repository of the object; objects from the -same home repository will be the same color. These 'repository colors' are generally shades of gray. - -If you want to deselect the selected object, click on it again. This can be useful if you want to view the graph with no -object focused, so that all objects are shown in their 'repository colors'. - - -**Traverse to find related metadata:** - -Once there's an initial object in the diagram, you can use the Explore button to retrieve further objects that are -related to the focus object. Rex needs to traverse from an entity, so if you retrieved or selected a relationship, -click on one of its entities before attempting to traverse. -When you traverse, Rex will explore the neighborhood around the selected entity, traversing outward -along the available relationships to find adjacent entities. This process can be repeated to enlarge the graph of -entities and relationships that are displayed. -Rex currently supports a traversal depth of 1 - meaning it will only traverse as far -as the immediate neighbors of the focus entity. It could support deeper traversals, but this would make it harder -to understand the traversal filters - so depth is limited to 1. - -When you press the Explore button, Rex display a set of (optional) traversal filters, that you can set before it -actually performs the traversal. This is to let you decide which relationships and entities will be included in -the traversal. The traversal filters display the number of relationships and entities of each type, that could be -included in the displayed graph. Check the counts and select the types you want. Rex will then only retrieve the -objects you are really interested in. There is more information below under "Traversal Filtering". - - -**Search:** - -The search utility in Rex is fairly basic. It allows you to enter a text string and optionally apply an -entity, relationship or classification filter, which limits the search to one particular type. The classification -filter is not yet enabled, but that capability should be added soon. - -The search utility does not include property-based searching, it is just a text-based search. It therefore relies -on objects having string-type attributes that can be searched. If an object is of a type that has no string-type -attributes then it will not be found by the search. It is possible that property-based searching could be added, -but it is not available yet. - -When you enter a string as search text, it can include regular expression characters. Beware that the level of support -for regular expressions varies between repositories. If you are searching an Egeria graph repository or in-memory -repository, then you have more freedom than you might have with some other repositories. - -If the text you are searching for contains special characters, you will need to literalize the string. As an example, -suppose there are two Assets called asset-qn001 and asset-(qn001). In this example, the parentheses are special -characters, because they affect the processing of the regular expression. - -* If you type asset-qn001 as the search text, the first asset (only) will match. -* If you type asset-(qn001) as the search text, the first asset (only) will match. -* If you type \Qasset-(qn001)\E in as the search text, the second asset (only) will match. - -This example was tested using the Egeria graph repository. Some repositories support broad regular expressions -but others do not. All repositories should support exact, prefix and suffix matches - so you should be able to -use expressions like \Qany.characters.you.like!\E.* - which would literalize the part between \Q and \E as the -beginning of the search expression and permit any other characters to follow it. - -**Traversal Filtering:** - -When you press Explore to expand the neighborhood around an entity, a dialog box will show how many entities and -relationships might be included. The number of occurrences of each type of entity or relationship are shown alongside the type -name. You can decide which types to include in the traversal. This dialog box also shows numbers of classifications -associated with the neighboring entities. - -The filters are separated into three columns - for entity types, relationship types and classifications, respectively. - -Each column operates as follows: - -If none of the types in a column are checked, no filtering is applied to that column. This means that all entity types -will be included in the traversal, or all relationship types. - -If any of the types in a column are checked then filtering is performed. Only the checked types are allowed. If you were -to check ALL the types in the entity or relationship columns you achieve the same as when none of the checkboxes in -those columns are checked (i.e. when there is no filtering). That is, the traversal will include all entities or all -relationships. Note that if you wish to include a relationship to a neighboring entity, you need to enable both the -relationship type and the entity type. This allows you to be very specific about which relationships to traverse. If -there are relationships of the same type to entities of different types, or vice versa, you can independently -select relationship and entity types to achieve finer grain traversal. - -If no classification types are checked there is no classification filtering. This means all entities will be eligible, -regardless of their classifications (if any). Be careful with the classification column - if you check ALL the -classification types it does NOT mean that all entities are eligible - it means only those entities that have at -least one of the checked classifications will be eligible. If there is a neighboring entity that has none of the -classifications it will not be reached. - -**Adding to the graph:** - -If after a number of traversals you realize that you would like to perform an additional traversal from an entity you -visited at an earlier stage, just go back and select the entity from which you want to perform the additional traversal. Then press -the Explore button. You can set the filters to include the types that you would like to add to the graph. - -**Undoing a change:** - -If you realize that you have added things to the graph that you actually do not want, you can use the Undo button to undo -the most recent change. The Undo button can be used repeatedly to unwind back to a state that contains objects you want to -keep. You can then use Explore from this state to add more objects. - -**Clearing the graph:** - -The Clear button will clear the graph diagram, the GUID input field and the details panel. It effectively resets Rex to the -state it was in when the page was first loaded, apart from the search text. - -**Traversal History:** - -At any point during an exploration session you can use the History button to list the operations that resulted -in the graph as it is currently displayed. The traversal history shows the sequence of operations and describes -the type and parameters of each operation and the entities and relationships that were added to the graph by each -operation. The types of operation include retrieval using a GUID, search and traversal. In each case the GUID, -search string or traversal parameters are recorded. - -**Diagram layouts:** - -There is currently one type of diagram - called the 'Network Diagram'. Other types of diagram may be added later. -The Network Diagram is a visualization of the traversed graph, in which entities and relationships are drawn as circles and arcs. -Each entity or relationship is labelled according to Rex's built-in labelling scheme (see below). The GUID (globally unique id) -associated with an instance may be the only way to uniquely identify it, but it is not particularly convenient or memorable. -Rex includes the GUID in the details panel and in the traversal history to help to uniquely identify an instance. - -There are two layout settings within the Network Diagram, that can be selected using the radio button in the top-left corner of -the diagram: - -* Time-based (default) layout. This layout places objects starting at the top of the diagram and working vertically downwards with each - stage of traversal; the more recently visited objects will be located toward the bottom of the diagram. This layout may be helpful while - you are building the diagram. The temporal placement is not rigid - if a relationship connects a pair of entities retrieved in different - stages of the traversal, it will tend to pull them together, possibly distorting the temporal sequence. - -* Proximity-based layout. This layout places objects using a straightforward force-directed graph layout. There is no temporal ordering. - This layout may be preferred when you have finished adding to the diagram and would like to lay it out for display or printing. - -You can switch back and forth between the layout options. - -** Labelling of objects: - -Rex has a built-in labeler that assigns a label to each object (entity or relationship) that is retrieved from the -repository. The labels are used in the diagram and attempts to find a concise, meaningful and hopefully unique label, based on the -properties of the entity or relationship. - -The labelling strategy behaves differently depending on the type of an object. For some types of object there are -not many possible labels, but in the default case Rex will examine the instance properties of the object and choose a label -based on the following precedence order: -* displayName - which should have been set with the expectation that it will be used for display purposes -* name - which should be easier to read than qualified name -* qualifiedName - limited to the last 24 characters as qualified names can be long and the last part is often the best - means of discrimination. - -If you retrieve a relationship (from Get or Search), the entities at the ends of the relationship will be assigned -labels based on the information available - which is limited to the unique properties in the EntityProxy. If such -an entity is subsequently selected (by clicking on it) Rex will retrieve the full entity and if it can identify -a better label, it will update the label associated with the entity in both the diagram and in the details panel. - -**Tips for using Rex:** - -* Rex uses the Metadata Collection API to interrogate the chosen repository. All Egeria repositories support this API, but - some functions of the API are optional, so not all repositories support them. For maximum support for graph - traversals, if possible choose a repository server that has the Egeria graph repository. Remember that Egeria servers can - create reference copies of objects, so you can ask a server with a graph repository about objects that belong to - other repositories in the cohort. - -* Relationship types do not have many attributes; some have no type-defined attributes at all. If you have trouble searching - for a relationship, it may be easier to search for an entity that you believe is connected to the relationship. Alternatively, - use another tool to retrieve the relationship GUID and paste that into Rex and use the Get button. - -* If you are short of screen space, there a couple of things you can do to save space with Rex: - - * One is to click the 'hamburger' menu icon to toggle away the left-hand navigation menu. - - * Another is that, once you have selected the repository server to use and retrieved the first - entity or relationship, you may not need to visit the top part of the screen again, or only infrequently, so - try scrolling until the top edge of the diagram and controls are at the top of the browser page. The controls - have been placed level with the top of the diagram to enable this. - -* At any point during an exploration session you can use the History button to display a dialog that lists where the - exploration started and what steps have been used, to arrive at the graph that is currently displayed. - -* You can save the current diagram as a .png image file, using the button near the top-left of the diagram. - Before capturing the image, consider clicking on the currently selected object to remove the focus color, if you want to - see its home repository color instead. - -* After capturing the history and image, as described above, it is straightforward to copy and paste them into a report -document. - -**Customization:** - -Rex uses a styled set of colors, so it can be re-themed. The important colors are defined as CSS variables in the -shared-styles.js file. They are called --egeria-primary-color and --egeria-secondary-color. -By setting the egeria-primary-color you can achieve different themes. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/TEX-design.drawio b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/TEX-design.drawio deleted file mode 100644 index ce273870ee3..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/TEX-design.drawio +++ /dev/null @@ -1 +0,0 @@ -7H1Xd6PKtu5vOQ8ee607hnuQw6NyzllvCCGEhEAiKP36W0WGQrZsS7LsXr3P6dXGUBQzfDPUrFkvZG5zLBnCdtnQ55L6QmDz4wuZfyEInCIY8B945eReYUnevSAbyty7KbzQU86SdxHzrtrKXDJjN1q6rlrKNn5R1DVNEq3YNcEw9EP8toWuxt+6FWQJudATBRW9OlLm1tK9yhFseL0sKfLSfzPOeN+3EfybvS8xl8JcP0QukYUXMmfouuX+a3PMSSoknk8X97nihd8GEzMkzbrmAbPAjVbTzkhrk8fXaYtr1QvKK+8NsxdU2/tib7bWySeBodvaXIKj4C9k9rBULKm3FUT42wNgOri2tDaq9+uFoqo5XdUN51mSzhe4AgeuC4boMZcBP6Fz9+chGZZ0jFzyvqUk6RvJMk7gFu+3l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91XF3JbqIJZl0nr8sF+OftMlpiVeYhzxHK8d0yWqC0Ls1RpprbO6lMg88imDBBB+lxgbvP3AX4TGPGJxPR5A6utsBqId1SxuB0TZrezemKEXL3tgH7IXfiCQMaKr6FfX8xDtL3vq879Iaw72R120GczUFQrL/gdhs0xJ2zEITbzl47HIf5ZYYAmmxKzKmKkKRg2PiWnw5/qB6ag4G8vy/6Dc/wAs92A86FssW3GCKwgC/12a06UYt/9zCeX/B2Uf2lVMQ7Et13PLPy/AyL9XXH8PKYSC/i4cTb7Vfxdf+OvvWl00Vf3P22JgWDe4mK5/F6r/3hvEsP8+EQQTT7bo+/8eLtO0/Z/nxCWda33KC3DH/wM= \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/design/subject-area/Story board - Subject Area UI.drawio b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/design/subject-area/Story board - Subject Area UI.drawio deleted file mode 100644 index 88d8e54e2fc..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/design/subject-area/Story board - Subject Area UI.drawio +++ /dev/null @@ -1 +0,0 @@ -5LzHkutMlib4NP8yx0AIAlhCa03IHbTWknj6gUfcPyurstqme1OLnrCwG6SDBBzu53ziuOP+hTD9JSzxVGljlnd/wVB2/YWwf8EwDEHo8we0fH9b3sTrt6Fc6uy36V8anPrO/zRCf1r3OsvX//TBbRy7rZ7+c2M6DkOebv+pLV6W8fzPHyvG7j9fdYrL/N8anDTu/r3Vr7Ot+m0lYPw/2sW8Lqu/r/x6k79H+vjvD/+5k7WKs/H8lyaE+wthlnHcfl/1F5N3YPD+Hpff7/H/i6P/7NiSD9v/zhfMXPfaCm+q3WJL/pNN4tj8489Zjrjb/9zwX/C7e85Hx09zteTFT+t73kE36WrbwLhT4CowX9ZbtSf/Tzr2z5sxm+rnTxZv8T/K8ciXIR7S/Gk56xYcYMEB4Z8H/mFqzD+0PN/qofzHC9+qf8jxsMfL9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yyujRUMcyHzmK1R46rgKqechCQWQPBf5EHucoEjaeorFfByoo2HyxtN6Xbice8aqBIZXSCiyiVgaJOua4A2EvloA0nfMyyHH1kWOQ22lu9SaNzwO0sukg9vubQcMLAnvDUZAKBAYoaCn7E4pJBH/VcccoarUcP3ihABFuqCstucmCCJxJlAVsKVdEdkHQfHUx1rjsYYT3XpAS9u1Mqf51kN/EUFfYdHrvJXgAOo9E0Cc3uaGRdDicaW33Xcn7Ud0ROO3yfOIy5z0xyCt1SCQXHpuvMgvnj7+3T5PH5x3ydzJ83MlyvHBm7zLoyHre797bL/30H/eZH4zro3/kXHfSvNNB/fwNRbb/a9V7n3zec/QE= \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/design/subject-area/SubjectAreaMockups.drawio b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/design/subject-area/SubjectAreaMockups.drawio deleted file mode 100644 index a01b83094c8..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/docs/design/subject-area/SubjectAreaMockups.drawio +++ /dev/null @@ -1 +0,0 @@ -7L1Zl6M40zX6W85Fr/V8F12LebhkNBhjwBgb++ZdGDPZzLP59UfCOWdWdXV3ZfUzVHZXVRqDkBRbETtCIek3XMjGRe2VsV6cg/Q3DDmPv+HibxiGYhQD/oFXbvcrLEneL0R1cn646fmCnUzBw0Xk4WqXnIPm1Y1tUaRtUr6+6Bd5Hvjtq2teXRfD69vCIn391tKLgncXbN9L31/dJ+c2friKUuzzF0qQRPHDqxmMvn+ReY83P7Skib1zMby4hEu/4UJdFO39t2wUghR23mO/1MHG59ZCrO6FWGwRG1ur1O/3wuQ/88hTE+ogb/9y0cOhJeVgt52u/qpRpnO5lP/vd/xedO+l3UN//YZRKXgJH4O3UhH87fFKWIC3P1xbBHlQe+njV+CtL799cfl9MeUHd7271qVvr6TJ45VtHEBpZN7cvKJr0ySHV/yk9lMANYilDqAEQ07wcgKQ1cyo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8JxNWY/jTzxluZoqp8GOjRNmpMnLuq7eOhaJufxu9hqX41zocavk7AIcXeeXxvJ/gHBv+4x+88vf/641FUFd/CPuDfTdukqPHQt8/0P/+Yxx3qt56zPu7yf97adoAN4+6fPRoQ7Khthr+e+ceBkNYL/j7lxZB6XZygpyf4wK+2XvFFvxywv/7+NXD838VdnKX+ZC/2N/YeKOrv7KX/Xewl/8bev7HwD1ZV8S2t7PZdrNwmhP5njFxcFRn6u0ofw7/gVFbfq3++p2JIctT43a38Eh7FjHrmfu54Qzygh1DH/1oA9oKy5++Olzj9P5GDfxtbMZz955+cpf/OWYL+O2MP/y7G0v/N2P8Kxh5I5v8qth7/xla1SaoRFdLFiiZPe2joYDyH9Wm1GmQY+Xbv/zet8srwfx9jWex/ZYlxgvgvscRo1xikye6ejAhltPcUtfgf \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/drilldown-of-metadata-entity-pharma.png b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/drilldown-of-metadata-entity-pharma.png deleted file mode 100644 index 0de7d5321f6..00000000000 Binary files a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/drilldown-of-metadata-entity-pharma.png and /dev/null differ diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/EgeriaUIPlatform.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/EgeriaUIPlatform.java deleted file mode 100644 index ae6d7038207..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/EgeriaUIPlatform.java +++ /dev/null @@ -1,112 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.OpenAPIDefinition; -import io.swagger.v3.oas.annotations.info.Contact; -import io.swagger.v3.oas.annotations.info.Info; -import io.swagger.v3.oas.annotations.info.License; -import org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog; -import org.odpi.openmetadata.accessservices.glossaryview.client.GlossaryViewClient; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.client.LineageWarehouseClientWarehouse; -import org.odpi.openmetadata.http.HttpHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; -import org.springframework.core.env.Environment; - -@SpringBootApplication( - scanBasePackages = {"${scan.packages}"} -) - -@OpenAPIDefinition( - info = @Info( - title = "Egeria's Spring Boot based UI RESTful web services API", - version = "5.1-SNAPSHOT", - description = "", - license = @License(name = "Apache-2.0 License", url = "https://www.apache.org/licenses/LICENSE-2.0"), - contact = @Contact(url = "https://egeria-project.org", name = "Egeria Project", - email = "egeria-technical-discuss@lists.lfaidata.foundation") - ), - - externalDocs = @ExternalDocumentation(description = "Egeria documentation", - url="https://egeria-project.org") -) -public class EgeriaUIPlatform { - - private static final Logger LOG = LoggerFactory.getLogger(EgeriaUIPlatform.class); - @Autowired - private Environment env; - - @Value("${strict.ssl}") - Boolean strictSSL; - - @Value("${cors.allowed-origins}") - String[] allowedOrigins; - - public static void main(String[] args) { - SpringApplication.run(EgeriaUIPlatform.class, args); - } - - @Bean - public InitializingBean getInitialize() - { - return () -> { - if (!strictSSL) - { - HttpHelper.noStrictSSL(); - }else if( System.getProperty("javax.net.ssl.trustStore")==null) { - //load the 'javax.net.ssl.trustStore' and - //'javax.net.ssl.trustStorePassword' from application.properties - System.setProperty("javax.net.ssl.trustStore", env.getProperty("server.ssl.trust-store")); - System.setProperty("javax.net.ssl.trustStorePassword", env.getProperty("server.ssl.trust-store-password")); - System.out.println("test"); - } - }; - } - - @Bean - public AssetCatalog getAssetCatalog(@Value("${omas.server.url}") String serverUrl, - @Value("${omas.server.name}") String serverName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - return new AssetCatalog(serverName, serverUrl); - } - - @Bean - public GlossaryViewClient getGlossaryViewClient(@Value("${omas.server.url}") String serverUrl, - @Value("${omas.server.name}") String serverName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - return new GlossaryViewClient(serverName, serverUrl); - } - - @Bean - public LineageWarehouseClientWarehouse getOpenLineage(@Value("${open.lineage.server.url}") String serverUrl, - @Value("${open.lineage.server.name}") String serverName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - return new LineageWarehouseClientWarehouse(serverName, serverUrl); - } - -// @Bean -// public AuthService getAuthService(@Value("${authentication.mode:token}") String authenticationMode) { -// if( "token".equals(authenticationMode) ){ -// return new TokenAuthService(); -// }else if( "redis".equals(authenticationMode) ){ -// return new RedisAuthService(); -// } -// return new SessionAuthService(); -// } -// -// @Bean(value = "tokenClient") -// @ConditionalOnProperty(value = "authentication.mode", havingValue = "token", matchIfMissing = true) -// public TokenClient stateLessTokenClient(){ -// return new TokenClient() { -// }; -// } - -} - - - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/AboutController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/AboutController.java deleted file mode 100644 index 202a6cff82a..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/AboutController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.info.BuildProperties; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.HttpClientErrorException; - -import jakarta.servlet.http.HttpServletRequest; - -@RestController -@RequestMapping("/api/about") -public class AboutController { - - @Autowired( required = false ) - BuildProperties buildProperties; - - @GetMapping - public BuildProperties getBuildProperties(HttpServletRequest request) throws HttpClientErrorException { - return buildProperties; - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/AuthController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/AuthController.java deleted file mode 100644 index f04702d3c32..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/AuthController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.auth.model.LoginRequest; -import org.odpi.openmetadata.userinterface.uichassis.springboot.auth.service.TokenService; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class AuthController { - - private final TokenService tokenService; - private final AuthenticationManager authenticationManager; - - public AuthController(TokenService tokenService, AuthenticationManager authenticationManager) { - this.tokenService = tokenService; - this.authenticationManager = authenticationManager; - } - - @PostMapping("/api/token") - public String token(@RequestBody LoginRequest userLogin) throws AuthenticationException { - Authentication authentication = authenticationManager - .authenticate(new UsernamePasswordAuthenticationToken(userLogin.username(), userLogin.password())); - return tokenService.generateToken(authentication); - } - - @PostMapping(value = "/api/token", params = {"username","password"}) - public String token(@RequestParam String username, @RequestParam String password) throws AuthenticationException { - Authentication authentication = authenticationManager - .authenticate(new UsernamePasswordAuthenticationToken(username, password)); - return tokenService.generateToken(authentication); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/CustomErrorAttributes.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/CustomErrorAttributes.java deleted file mode 100644 index 4b6180f6a45..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/CustomErrorAttributes.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - -import org.springframework.boot.web.error.ErrorAttributeOptions; -import org.springframework.boot.web.servlet.error.DefaultErrorAttributes; -import org.springframework.stereotype.Component; -import org.springframework.web.context.request.WebRequest; - -import java.util.Map; - -@Component -public class CustomErrorAttributes extends DefaultErrorAttributes { - - /** - * - * @param webRequest initial request - * @param errorCode the error code - * @return error attributes to return to client - */ - public Map getErrorAttributes(WebRequest webRequest, UserInterfaceErrorCodes errorCode) { - Map errorAttributes = super.getErrorAttributes(webRequest, - ErrorAttributeOptions.defaults() - ); - errorAttributes.put("message", errorCode.getErrorMessage()); - errorAttributes.put("status", errorCode.getHttpErrorCode()); - errorAttributes.put("userAction", errorCode.getUserAction()); - errorAttributes.put("systemAction", errorCode.getSystemAction()); - errorAttributes.put("errorId", errorCode.getErrorMessageId()); - return errorAttributes; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/ExceptionHandlerController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/ExceptionHandlerController.java deleted file mode 100644 index da84eecce16..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/ExceptionHandlerController.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.BadRequestException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.CategoryNotFoundException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.GlossaryNotFoundException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.LineageNotFoundException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.OpenLineageServiceException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.TermNotFoundException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.client.RestClientException; -import org.springframework.web.context.request.WebRequest; -import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; - -import java.util.Map; - - -@ControllerAdvice -public class ExceptionHandlerController extends ResponseEntityExceptionHandler { - - @Autowired - private CustomErrorAttributes errorAttributes; - - private static final Logger LOG = LoggerFactory.getLogger(ExceptionHandlerController.class); - - /** - * - * @param ex - raised exception to be handled - * @param request - the initial web request - the initial web request - * @return the entity containing the response exception - */ - @ExceptionHandler(value = {MalformedInputException.class}) - protected ResponseEntity handleMalformedInput(MalformedInputException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.MALFORMED_INPUT_EXCEPTION); - return handleExceptionInternal(ex, errorAttributes, - new HttpHeaders(), UserInterfaceErrorCodes.MALFORMED_INPUT_EXCEPTION.getHttpErrorCode(), request); - } - - /** - * - * @param ex - raised exception to be handled - * @param request - the initial web request - * @return the entity containing the response exception - */ - @ExceptionHandler(value = {InvalidParameterException.class, PropertyServerException.class}) - protected ResponseEntity handleAssetCatalogException(OCFCheckedExceptionBase ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - UserInterfaceErrorCodes errorCode = UserInterfaceErrorCodes.INVALID_REQUEST_FOR_ASSET_CATALOG; - if (ex.getReportedHTTPCode() == HttpStatus.NOT_FOUND.value()) { - errorCode = UserInterfaceErrorCodes.ENTITY_NOT_FOUND; - } - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, errorCode); - return handleExceptionInternal(ex, errorAttributes, - new HttpHeaders(), errorCode.getHttpErrorCode(), request); - } - /** - * - * @param ex - raised exception to be handled - * @param request - the initial web request - * @return the entity containing the response exception - */ - @ExceptionHandler(value = {OpenLineageServiceException.class}) - protected ResponseEntity handleOpenLineageClientException(OpenLineageServiceException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.INVALID_REQUEST_FOR_OPEN_LINEAGE); - return handleExceptionInternal(ex, errorAttributes, - new HttpHeaders(), UserInterfaceErrorCodes.INVALID_REQUEST_FOR_OPEN_LINEAGE.getHttpErrorCode(), request); - } - - @ExceptionHandler(value = {LineageNotFoundException.class}) - protected ResponseEntity handleLineageNotFoundException(LineageNotFoundException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.LINEAGE_NOT_FOUND); - return handleExceptionInternal(ex, errorAttributes, - new HttpHeaders(), UserInterfaceErrorCodes.LINEAGE_NOT_FOUND.getHttpErrorCode(), request); - } - - - @ExceptionHandler(value = {BadRequestException.class}) - protected ResponseEntity handleBadRequestException(BadRequestException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, ex.getErrorCode()); - return handleExceptionInternal(ex, errorAttributes, - new HttpHeaders(), ex.getErrorCode().getHttpErrorCode(), request); - } - - /** - * - * @param ex - raised exception to be handled - * @param request - the initial web request - * @return the entity containing the response exception - */ - @ExceptionHandler(value = {RestClientException.class}) - protected ResponseEntity handleResourceException(RestClientException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.RESOURCE_NOT_FOUND); - return handleExceptionInternal(ex, errorAttributes, - new HttpHeaders(), UserInterfaceErrorCodes.RESOURCE_NOT_FOUND.getHttpErrorCode(), request); - } - - /** - * - * @param ex - raised exception to be handled - * @param request - the initial web request - * @return the entity containing the response exception - */ - @ExceptionHandler(value = {UserNotAuthorizedException.class}) - protected ResponseEntity handleUnauthorizedException(UserNotAuthorizedException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.USER_NOT_AUTHORIZED); - return handleExceptionInternal(ex, errorAttributes, new HttpHeaders(), UserInterfaceErrorCodes.USER_NOT_AUTHORIZED.getHttpErrorCode(), request); - } - - - @ExceptionHandler(value = {GlossaryViewOmasException.class}) - protected ResponseEntity handleGlossaryViewOmasException(GlossaryViewOmasException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.INVALID_REQUEST_FOR_GLOSSARY_VIEW); - return handleExceptionInternal(ex, errorAttributes, new HttpHeaders(), - UserInterfaceErrorCodes.INVALID_REQUEST_FOR_GLOSSARY_VIEW.getHttpErrorCode(), request); - } - - @ExceptionHandler(value = {GlossaryNotFoundException.class}) - protected ResponseEntity handleGlossaryViewNotFoundRequestException(GlossaryNotFoundException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.GLOSSARY_NOT_FOUND); - return handleExceptionInternal(ex, errorAttributes, new HttpHeaders(), - UserInterfaceErrorCodes.GLOSSARY_NOT_FOUND.getHttpErrorCode(), request); - } - - @ExceptionHandler(value = {TermNotFoundException.class}) - protected ResponseEntity handleGlossaryViewNotFoundRequestException(TermNotFoundException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.TERM_NOT_FOUND); - return handleExceptionInternal(ex, errorAttributes, new HttpHeaders(), - UserInterfaceErrorCodes.TERM_NOT_FOUND.getHttpErrorCode(), request); - } - - @ExceptionHandler(value = {CategoryNotFoundException.class}) - protected ResponseEntity handleGlossaryViewNotFoundRequestException(CategoryNotFoundException ex, WebRequest request) { - LOG.error(ex.getMessage(), ex); - Map errorAttributes = this.errorAttributes.getErrorAttributes(request, UserInterfaceErrorCodes.CATEGORY_NOT_FOUND); - return handleExceptionInternal(ex, errorAttributes, new HttpHeaders(), - UserInterfaceErrorCodes.CATEGORY_NOT_FOUND.getHttpErrorCode(), request); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/LogoutController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/LogoutController.java deleted file mode 100644 index 846fd1ddf58..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/LogoutController.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - -import jakarta.servlet.http.HttpServletRequest; -import org.odpi.openmetadata.userinterface.uichassis.springboot.auth.TokenClient; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -@RestController -@RequestMapping("/api/logout") -public class LogoutController { - - @Autowired(required = false) - TokenClient tokenClient; - - - @GetMapping - public void logout(HttpServletRequest request) throws HttpClientErrorException { - String token = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()) - .getRequest().getHeader("Authorization"); - if(tokenClient != null && token != null){ - tokenClient.del(token); - } - } - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/MalformedInputException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/MalformedInputException.java deleted file mode 100644 index ab12230bc51..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/MalformedInputException.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - - -public class MalformedInputException extends RuntimeException { - - /** - * - * @param message text to display - * @param e raised parent exception - */ - public MalformedInputException(String message, Exception e) { - super(message, e); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/SecureController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/SecureController.java deleted file mode 100644 index 5a61aa1ecd0..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/SecureController.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.UserNotAuthorizedException; -import org.springframework.security.core.context.SecurityContextHolder; - -/** - * This class provides a method to access the user name from the servlet session. This class should be subclassed so that the user - * can be obtained and then used on omas calls. - */ -public class SecureController { - public static final String PAGE_OFFSET_DEFAULT_VALUE = "0"; - public static final String PAGE_SIZE_DEFAULT_VALUE = "0"; - -// @Autowired -// private AuthService authService; - - /** - * Return user name if there is one or null. Passing null as the user to a rest call should result in a user not authorized error. - * @return userName or null if there is not one - */ - protected String getUser() { - String userName = SecurityContextHolder.getContext().getAuthentication().getName(); - if(userName == null){ - throw new UserNotAuthorizedException("User is not authorized"); - } - return userName; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/UserInterfaceErrorCodes.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/UserInterfaceErrorCodes.java deleted file mode 100644 index b4dc781646f..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/UserInterfaceErrorCodes.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; - -public enum UserInterfaceErrorCodes { - - MALFORMED_INPUT_EXCEPTION(HttpStatus.INTERNAL_SERVER_ERROR, "USER-INTERFACE-500-001", - "The response received from service does not have the expected format.", - "Check the configuration and the response from the service.", - "Please check the request."), - INVALID_REQUEST_FOR_ASSET_CATALOG(HttpStatus.INTERNAL_SERVER_ERROR, "USER-INTERFACE-500-002", - "The request for asset catalog is invalid", - "The system is unable to handle request.", - "Check that the configuration for Asset Catalog is correct."), - RESOURCE_NOT_FOUND(HttpStatus.SERVICE_UNAVAILABLE, "USER-INTERFACE-503-003", - "The resource cannot be accessed", - "Check services are up.", - "Please try again later."), - USER_NOT_AUTHORIZED(HttpStatus.UNAUTHORIZED, "USER-INTERFACE-401-004", - "User is not authorized", - "The system is unable to authorize the user.", - "Check your credentials."), - INVALID_REQUEST_FOR_OPEN_LINEAGE(HttpStatus.INTERNAL_SERVER_ERROR, "USER-INTERFACE-500-005", - "The request for open lineage is invalid", - "The system is unable to handle request.", - "Check that the configuration for Open Lineage is correct."), - INVALID_REQUEST_FOR_GLOSSARY_VIEW(HttpStatus.INTERNAL_SERVER_ERROR, "USER-INTERFACE-500-006", - "The request for glossary view is invalid", - "The system is unable to handle request.", - "Check that the configuration for Glossary View is correct."), - - ENTITY_NOT_FOUND(HttpStatus.NOT_FOUND, "USER-INTERFACE-404-001", - "The entity is not found", - "The system is unable to handle the request.", - "Check that the unique identifier of the entity is correct."), - - LINEAGE_NOT_FOUND(HttpStatus.NOT_FOUND, "USER-INTERFACE-404-002", - "Could not retrieve lineage for the entity", - "The system could not find lineage for the entity.", - "Check that the entity identifier is correct"), - - GLOSSARY_NOT_FOUND(HttpStatus.NOT_FOUND, "USER-INTERFACE-404-003", - "Could not retrieve glossary", - "The system could not find the glossary with the provided identifier.", - "Check that the glossary identifier is correct"), - - TERM_NOT_FOUND(HttpStatus.NOT_FOUND, "USER-INTERFACE-404-004", - "Could not retrieve glossary term", - "The system could not find the glossary term with the provided identifier.", - "Check that the term identifier is correct"), - - CATEGORY_NOT_FOUND(HttpStatus.NOT_FOUND, "USER-INTERFACE-404-005", - "Could not retrieve category", - "The system could not find the category with the provided identifier.", - "Check that the category identifier is correct"), - - REX_SUBGRAPH_NOT_FOUND(HttpStatus.NOT_FOUND, "USER-INTERFACE-404-006", - "Could not retrieve subgraph", - "The system could not find the subgraph with the provided identifier.", - "Check that the identifier is correct"), - - INVALID_SEARCH_REQUEST(HttpStatus.BAD_REQUEST, "USER-INTERFACE-400-001", - "The search request is invalid.", - "The system is unable to process the request with this search request.", - "Check that the provided input is valid."), - - USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST(HttpStatus.BAD_REQUEST, "USER-INTERFACE-400-002", - "Sorry - this username was not authorized to perform the request", - "The user is not authorized to perform the request", - "Check the user name in valid"), - - REX_INVALID_PARAMETER_REQUEST(HttpStatus.BAD_REQUEST, "USER-INTERFACE-400-003", - "Unable to handle request", - "The system is unable to handle the request", - "Check that the input parameters are correct"), - - BAD_TYPE_INFORMATION(HttpStatus.BAD_REQUEST, "USER-INTERFACE-400-004", - "There was a problem with Type information", - "Check the type information", - "Check the type information and retry"), - - BAD_PROPERTY_INFORMATION(HttpStatus.BAD_REQUEST, "USER-INTERFACE-400-005", - "There was a problem with Property information", - "Check the property information", - "Check the Property information and retry"), - - - - OPERATION_NOT_SUPPORTED(HttpStatus.NOT_IMPLEMENTED, "USER-INTERFACE-501-001", - "The UI tried to use an unsupported function", - "The system is unable to handle the request", - "The operation is not available at the moment"); - - private HttpStatus httpErrorCode; - private String errorMessageId; - private String errorMessage; - private String systemAction; - private String userAction; - - private static final Logger log = LoggerFactory.getLogger(UserInterfaceErrorCodes.class); - - - UserInterfaceErrorCodes(HttpStatus httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = userAction; - } - - - public HttpStatus getHttpErrorCode() { - return httpErrorCode; - } - - public String getErrorMessageId() { - return errorMessageId; - } - - public String getErrorMessage() { - return errorMessage; - } - - public String getSystemAction() { - return systemAction; - } - - public String getUserAction() { - return userAction; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/asset/AssetController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/asset/AssetController.java deleted file mode 100644 index eb586c783fe..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/asset/AssetController.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.asset; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.AssetCatalogOMASService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -@RestController -@RequestMapping("/api/assets") -public class AssetController { - - @Autowired - AssetCatalogOMASService assetCatalogOMASService; - - /** - * - * @param searchCriteria the query parameter with the search phrase - * @param types OM types list to search for - * @param sequencingProperty name of the property based on which to sort the result - * @param sequencingOrder PROPERTY_ASCENDING or PROPERTY_DESCENDING - * @param caseSensitive set case sensitive flag - * @param exactMatch set exact match flag - * @param from the offset for the results - * @param pageSize the number of results per page - * @return list of assets - * @throws PropertyServerException if a configuration on the backend - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( path = "/search") - public List searchAssets(@RequestParam("q") String searchCriteria, - @RequestParam("types") List types, - @RequestParam(name = "sequencingProperty", defaultValue = "displayName") - String sequencingProperty, - @RequestParam(name = "sequencingOrder", defaultValue = "PROPERTY_ASCENDING") - SequencingOrder sequencingOrder, - @RequestParam(defaultValue="false") boolean caseSensitive, - @RequestParam(defaultValue="false") boolean exactMatch, - @RequestParam(defaultValue="0") Integer from, - @RequestParam(defaultValue="10") Integer pageSize) - throws PropertyServerException, InvalidParameterException { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - SearchParameters searchParameters = new SearchParameters(); - if (CollectionUtils.isNotEmpty(types)) { - searchParameters.setEntityTypes(types); - } - searchParameters.setPageSize(pageSize); - searchParameters.setFrom(from); - searchParameters.setSequencingProperty(sequencingProperty); - searchParameters.setSequencingOrder(sequencingOrder); - searchParameters.setCaseInsensitive(!caseSensitive); - searchParameters.setExactMatch(exactMatch); - return assetCatalogOMASService.searchAssets(user, searchCriteria, searchParameters); - } - - /** - * - * @param typeName the assets type name to search for - * @return list of assets by type name - * @throws PropertyServerException if a configuration on the backend - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( path = "/search-by-type-name/{typeName}") - public List searchAssetsByTypeName(@PathVariable("typeName") String typeName) - throws PropertyServerException, InvalidParameterException { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - return assetCatalogOMASService.searchAssetsByTypeName(user, typeName); - } - - /** - * - * @param typeGUID the assets type GUID to search for - * @return list of assets by type GUID - * @throws PropertyServerException if a configuration on the backend - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( path = "/search-by-type-guid/{typeGUID}") - public List searchAssetsByTypeGUID( - @PathVariable("typeGUID") String typeGUID) - throws PropertyServerException, InvalidParameterException { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - return assetCatalogOMASService.searchAssetsByTypeGUID(user, typeGUID); - } - - /** - * - * @return the supported types from AssetCatalog OMAS - * @throws PropertyServerException if a configuration on the backend - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( path = "/types") - public List getSupportedTypes() throws PropertyServerException, InvalidParameterException { - String user = SecurityContextHolder.getContext().getAuthentication().getName( ); - return assetCatalogOMASService.getSupportedTypes(user); - } - - /** - * - * @param guid of the Entity to be retrieved - * @return the entity details - * @throws PropertyServerException if a configuration on the backend - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( value = "/{guid}") - public AssetCatalogBean getAsset(@PathVariable("guid") String guid) - throws PropertyServerException, InvalidParameterException { - String user = SecurityContextHolder.getContext().getAuthentication().getName( ); - return assetCatalogOMASService.getAssetDetails(user, guid, "none"); - } - - /** - * - * @param guid of the Entity to be retrieved - * @return the entity context - * @throws PropertyServerException if a configuration on the backend - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( value = "/{guid}/context") - public Elements getAssetContext(@PathVariable("guid") String guid) - throws PropertyServerException, InvalidParameterException { - String user = SecurityContextHolder.getContext().getAuthentication().getName( ); - return assetCatalogOMASService.getAssetContext(user, guid, "none"); - } - - -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/BadRequestException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/BadRequestException.java deleted file mode 100644 index dff4454e4c8..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/BadRequestException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.UserInterfaceErrorCodes; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.client.HttpServerErrorException; - - -@ResponseStatus(HttpStatus.BAD_REQUEST) -public class BadRequestException extends HttpServerErrorException { - - - private UserInterfaceErrorCodes errorCode; - /** - * - * @param errorCode the error ui error code associated with the exception - * @param message text to display to client - */ - public BadRequestException(UserInterfaceErrorCodes errorCode, String message) { - super(HttpStatus.BAD_REQUEST, message); - this.errorCode = errorCode; - } - - public UserInterfaceErrorCodes getErrorCode() { - return errorCode; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/CategoryNotFoundException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/CategoryNotFoundException.java deleted file mode 100644 index 0e1e4370655..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/CategoryNotFoundException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ResponseStatus; - - -@ResponseStatus(HttpStatus.BAD_REQUEST) -public class CategoryNotFoundException extends RuntimeException { - - /** - * - * @param message text to display to client - */ - public CategoryNotFoundException(String message) { - super(message); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/GlossaryNotFoundException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/GlossaryNotFoundException.java deleted file mode 100644 index ecc561ce329..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/GlossaryNotFoundException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ResponseStatus; - - -@ResponseStatus(HttpStatus.BAD_REQUEST) -public class GlossaryNotFoundException extends RuntimeException { - - /** - * - * @param message text to display to client - */ - public GlossaryNotFoundException(String message) { - super(message); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/LineageNotFoundException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/LineageNotFoundException.java deleted file mode 100644 index 3d670cf3b24..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/LineageNotFoundException.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions; - -public class LineageNotFoundException extends RuntimeException { - - public LineageNotFoundException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/OpenLineageServiceException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/OpenLineageServiceException.java deleted file mode 100644 index 1bf268aa56f..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/OpenLineageServiceException.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions; - -public class OpenLineageServiceException extends RuntimeException{ - - public OpenLineageServiceException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/TermNotFoundException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/TermNotFoundException.java deleted file mode 100644 index 49a2e4421fd..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/TermNotFoundException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ResponseStatus; - - -@ResponseStatus(HttpStatus.BAD_REQUEST) -public class TermNotFoundException extends RuntimeException { - - /** - * - * @param message text to display to client - */ - public TermNotFoundException(String message) { - super(message); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/UserNotAuthorizedException.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/UserNotAuthorizedException.java deleted file mode 100644 index b23bf052e98..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/exceptions/UserNotAuthorizedException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.client.HttpServerErrorException; - - -@ResponseStatus(HttpStatus.UNAUTHORIZED) -public class UserNotAuthorizedException extends HttpServerErrorException { - - /** - * - * @param message text to display to client - */ - public UserNotAuthorizedException(String message) { - super(HttpStatus.UNAUTHORIZED, message); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/glossary/GlossaryViewController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/glossary/GlossaryViewController.java deleted file mode 100644 index 274d2f1e6d7..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/glossary/GlossaryViewController.java +++ /dev/null @@ -1,538 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.glossary; - -import org.odpi.openmetadata.accessservices.glossaryview.client.GlossaryViewClient; -import org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException; -import org.odpi.openmetadata.accessservices.glossaryview.rest.ExternalGlossaryLink; -import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryCategory; -import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryTerm; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.SecureController; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.CategoryNotFoundException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.GlossaryNotFoundException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.TermNotFoundException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.List; - -/** - * This controller serves all requests for glossaries, categories and terms. - */ -@RestController -@RequestMapping("/api/glossaries") -public class GlossaryViewController extends SecureController { - - @Autowired - private GlossaryViewClient glossaryViewClient; - - /** - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return all the glossaries - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping - public List getAllGlossaries(@RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getAllGlossaries(userId, from, size); - } - - /** - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return all the glossary terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms") - public List getAllGlossaryTerms( - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getAllGlossaryTerms(userId, from, size); - } - - /** - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return all the glossary categories - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/categories") - public List getAllGlossaryCategories( - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getAllCategories(userId, from, size); - } - - /** - * @param glossaryGUID GUID of the glossary to be retrieved - * @return the glossary with the GUID or null - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/{glossaryGUID}") - public Glossary getGlossary(@PathVariable("glossaryGUID") String glossaryGUID) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - Glossary glossary = glossaryViewClient.getGlossary(userId, glossaryGUID); - if (glossary == null) { - throw new GlossaryNotFoundException("Could not find glossary with guid " + glossaryGUID); - } - return glossary; - } - - /** - * @param glossaryGUID GUID of the glossary - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of categories - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/{glossaryGUID}/categories") - public List getCategories(@PathVariable("glossaryGUID") String glossaryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getCategories(userId, glossaryGUID, from, size); - } - - /** - * @param glossaryGUID GUID of the glossary - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - * */ - @GetMapping("/{glossaryGUID}/terms") - public List getTermsOfGlossary(@PathVariable("glossaryGUID") String glossaryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getTermsOfGlossary(userId, glossaryGUID, from, size); - } - - /** - * @param glossaryGUID GUID of the glossary - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of external glossary links - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - * */ - @GetMapping("/{glossaryGUID}/externalGlossaryLinks") - public List getExternalGlossaryLinksOfGlossary(@PathVariable("glossaryGUID") String glossaryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getExternalGlossaryLinksOfGlossary(userId, glossaryGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @return the term with the GUID - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}") - public GlossaryTerm getAntonyms(@PathVariable("termGUID") String termGUID) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - GlossaryTerm term = glossaryViewClient.getTerm(userId, termGUID); - if (term == null) { - throw new TermNotFoundException("Could not find antonym for term with guid " + termGUID); - } - return term; - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of antonyms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/antonyms") - public List getAntonyms(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getAntonyms(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of terms representing the assigned elements - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/assignedElements") - public List getAssignedElements(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getAssignedElements(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of terms representing the antonyms of the term with GUID - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/attributes") - public List getAttributes(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getAttributes(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of is-a terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/isA") - public List getIsATerms(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getIsA(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of preferred terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/preferredTerms") - public List getPreferredTerms(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getPreferredTerms(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of related terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/relatedTerms") - public List getRelatedTerms(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getRelatedTerms(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of replacement terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/replacementTerms") - public List getReplacementTerms(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getReplacementTerms(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of subtypes terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/subtypes") - public List getSubtypes(@PathVariable("termGUID") String termGUID, @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getSubtypes(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of synonym terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/synonyms") - public List getSynonyms(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getSynonyms(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of translations terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/translations") - public List getTranslations(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getTranslations(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of preferred terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/types") - public List getTypes(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getTypes(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of "used-in-contexts" terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/usedInContext") - public List getUsedInContexts(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getUsedInContexts(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list valid values terms - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/validValues") - public List getValidValues(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getValidValues(userId, termGUID, from, size); - } - - /** - * @param termGUID GUID of the term - * @return term's home glossary - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/homeGlossary") - public Glossary getSynonyms(@PathVariable("termGUID") String termGUID) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - Glossary termHomeGlossary = glossaryViewClient.getTermHomeGlossary(userId, termGUID); - if (termHomeGlossary == null) { - throw new GlossaryNotFoundException("The home glossary was not found for term with guid " + termGUID); - } - return termHomeGlossary; - - } - - /** - * @param termGUID GUID of the term - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - * @return list of term's external glossary links - */ - @GetMapping("/terms/{termGUID}/externalGlossaryLinks") - public List getExternalGlossaryLinksOfTerm(@PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getExternalGlossaryLinksOfTerm(userId, termGUID, from, size); - } - - /** - * @param categoryGUID GUID of the category to be retrieved - * @param request the http servlet request - * @return the glossary category with the GUID or null - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}") - public GlossaryCategory getCategory(@PathVariable("categoryGUID") String categoryGUID, - HttpServletRequest request) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - GlossaryCategory category = glossaryViewClient.getCategory(userId, categoryGUID); - if (category == null) { - throw new CategoryNotFoundException("Could not find the category, please check that the guid is correct " + categoryGUID); - } - return category; - } - - /** - * @param categoryGUID GUID of the category - * @return the home glossary of the category - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/homeGlossary") - public Glossary getCategoryHomeGlossary(@PathVariable("categoryGUID") String categoryGUID) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - Glossary categoryHomeGlossary = glossaryViewClient.getCategoryHomeGlossary(userId, categoryGUID); - if (categoryHomeGlossary == null) { - throw new GlossaryNotFoundException("Could not find the home glossary, please check that the guid is correct " + categoryGUID); - } - return categoryHomeGlossary; - } - - /** - * @param categoryGUID GUID of the category - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return the home glossary of the category - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/subcategories") - public List getSubcategories(@PathVariable("categoryGUID") String categoryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getSubcategories(userId, categoryGUID, from, size); - } - - /** - * @param categoryGUID GUID of the catgitegory - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of terms corresponding to the category - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/terms") - public List getTermsOfCategory(@PathVariable("categoryGUID") String categoryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getTermsOfCategory(userId, categoryGUID, from, size); - } - - /** - * @param categoryGUID GUID of the category - * @param from the index from witch the results to start, used for pagination - * @param size number of results returned, used for pagination - * @return list of a category's external glossary links - * @throws PropertyServerException if a problem occurs while serving the request - * @throws InvalidParameterException if parameter validation fails - * @throws GlossaryViewOmasException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/externalGlossaryLinks") - public List getExternalGlossaryLinks(@PathVariable("categoryGUID") String categoryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) - throws GlossaryViewOmasException, InvalidParameterException, PropertyServerException { - String userId = getUser(); - return glossaryViewClient.getExternalGlossaryLinksOfCategory(userId, categoryGUID, from, size); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/lineage/OpenLineageController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/lineage/OpenLineageController.java deleted file mode 100644 index 9d4a1fe4df8..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/lineage/OpenLineageController.java +++ /dev/null @@ -1,199 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.lineage; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.converters.ScopeEnumConverter; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.ffdc.LineageWarehouseException; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageVertex; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.Scope; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.requests.ElementHierarchyRequest; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.requests.LineageSearchRequest; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.OpenLineageService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.InitBinder; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -/** - * This controller serves all requests for retrieving lineage details, both vertical and horizontal - */ -@RestController -@RequestMapping("/api/lineage") -public class OpenLineageController { - - @Autowired - private OpenLineageService openLineageService; - - /** - * - * @param guid unique identifier of the asset - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the ultimate sources of the asset - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws LineageWarehouseException from the underlying service - */ - @GetMapping( value = "/entities/{guid}/ultimate-source") - public Graph ultimateSourceGraph(@PathVariable("guid") String guid , @RequestParam boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - Graph exportedGraph; - String userId = SecurityContextHolder.getContext().getAuthentication().getName(); - exportedGraph = openLineageService.getUltimateSource(userId, guid, includeProcesses); - return exportedGraph; - } - - /** - * - * @param guid unique identifier of the asset - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the end to end flow - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws LineageWarehouseException from the underlying service - * - * TODO: Remove api request mapping /entities/{guid}/end2end in major release (i.e. v4.x.x) - */ - @GetMapping( value = {"/entities/{guid}/end-to-end", "/entities/{guid}/end2end"}) - @ResponseBody - public Graph endToEndLineage(@PathVariable("guid") String guid, @RequestParam boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - Graph exportedGraph; - String userId = SecurityContextHolder.getContext().getAuthentication().getName(); - exportedGraph = openLineageService.getEndToEndLineage(userId, guid, includeProcesses); - return exportedGraph; - } - - /** - * - * @param guid unique identifier of the asset - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the ultimate destination of the asset - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws LineageWarehouseException from the underlying service - */ - @GetMapping( value = "/entities/{guid}/ultimate-destination") - public Graph ultimateDestination(@PathVariable("guid") String guid, @RequestParam boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - Graph exportedGraph; - String userId = SecurityContextHolder.getContext().getAuthentication().getName(); - exportedGraph = openLineageService.getUltimateDestination(userId, guid, includeProcesses); - return exportedGraph; - } - - - /** - * - * @param guid unique identifier of the glossary term - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the assets linked to the glossary term - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws LineageWarehouseException from the underlying service - */ - @GetMapping( value = "/entities/{guid}/vertical-lineage") - public Graph verticalLineage(@PathVariable("guid") String guid, @RequestParam boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - Graph exportedGraph; - String userId = SecurityContextHolder.getContext().getAuthentication().getName(); - exportedGraph = openLineageService.getVerticalLineage(userId, guid, includeProcesses); - return exportedGraph; - } - - /** - * @param guid of the Entity to be retrieved - * @return the entity details - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws LineageWarehouseException from the underlying service - */ - @GetMapping( value = "entities/{guid}/details") - public LineageVertex getEntityDetails(@PathVariable("guid") String guid) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - return openLineageService.getEntityDetails(user, guid); - } - - /** - * Gets available entities types from lineage repository. - * - * @return the available entities types - */ - @GetMapping( value = "types") - public List getTypes() { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - return openLineageService.getTypes(user); - } - - /** - * Gets nodes names of certain type with display name containing a certain value. - * @param type the type of the nodes name to search for - * @param searchValue the string to be contained in the qualified name of the node - case insensitive - * @param limit the maximum number of node names to retrieve - * - * @return the list of node names - */ - @GetMapping( value = "nodes") - public List getNodes(@RequestParam("type") String type, @RequestParam("name") String searchValue, - @RequestParam("limit") int limit) { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - return openLineageService.getNodes(user, type, searchValue, limit); - } - - /** - * @param searchRequest filtering details for the search - * @return the entity details - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws LineageWarehouseException from the underlying service - */ - @PostMapping( value = "entities/search") - public List search(@RequestBody LineageSearchRequest searchRequest) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - return openLineageService.search(user, searchRequest); - } - - - /** - * Returns a subraph representing the hierarchy of a certain node, based on the request - * - * @param elementHierarchyRequest contains the guid of the queried node and the hierarchyType of the display name of the nodes - * - * @return a subgraph containing all relevant paths, - */ - @PostMapping(value = "elements/hierarchy") - public Graph elementHierarchy(@RequestBody ElementHierarchyRequest elementHierarchyRequest) { - String user = SecurityContextHolder.getContext().getAuthentication().getName(); - return openLineageService.getElementHierarchy(user, elementHierarchyRequest); - } - - /** - * This method is registering a custom converter for View and Scope enums in order to be able to use in url the text of the enum and not the actual name - * @param webdataBinder DataBinder for data binding from web request parameters to JavaBean objects - */ - @InitBinder - public void initBinder(final WebDataBinder webdataBinder) { - webdataBinder.registerCustomEditor(Scope.class, new ScopeEnumConverter()); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/ClassificationExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/ClassificationExplorer.java deleted file mode 100644 index 5ca6582ad87..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/ClassificationExplorer.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - -public class ClassificationExplorer { - - private ClassificationDef classificationDef; - private List inheritedAttributes = new ArrayList<>(); - private List subTypeNames = new ArrayList<>(); - - - public ClassificationExplorer(ClassificationDef def) { - classificationDef = def; - } - - public ClassificationDef getClassificationDef() { return classificationDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public void addSubTypeName(String subTypeName) { - if (subTypeNames == null) { - subTypeNames = new ArrayList<>(); - } - subTypeNames.add(subTypeName); - } - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - if (inheritedAttributes == null) { - inheritedAttributes = new ArrayList<>(); - } - inheritedAttributes.addAll(inheritedAttrs); - } - } - -} - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/EntityExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/EntityExplorer.java deleted file mode 100644 index 1ee32bdd493..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/EntityExplorer.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - -public class EntityExplorer { - - private EntityDef entityDef; - private List inheritedAttributes; - private List subTypeNames; - private List classificationNames; - private List relationshipNames; - private List inheritedRelationshipNames; - private List inheritedClassificationNames; - - - public EntityExplorer(EntityDef def) { - entityDef = def; - inheritedAttributes = new ArrayList<>(); - subTypeNames = new ArrayList<>(); - classificationNames = new ArrayList<>(); - relationshipNames = new ArrayList<>(); - inheritedRelationshipNames = new ArrayList<>(); - inheritedClassificationNames = new ArrayList<>(); - - } - - public EntityDef getEntityDef() { return entityDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public List getClassificationNames() { return classificationNames; } - - public List getRelationshipNames() { return relationshipNames; } - - public List getInheritedRelationshipNames() { return inheritedRelationshipNames; } - - public List getInheritedClassificationNames() { return inheritedClassificationNames; } - - public void addSubTypName(String subTypeName) { - subTypeNames.add(subTypeName); - } - - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - inheritedAttributes.addAll(inheritedAttrs); - } - } - - public void addRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - relationshipNames.add(relationshipTypeName); - } - } - - public void addInheritedRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - inheritedRelationshipNames.add(relationshipTypeName); - } - } - - public void addClassification(String classificationName) { - if (classificationName != null) { - classificationNames.add(classificationName); - } - } - - public void addInheritedClassification(String classificationName) { - if (classificationName != null) { - inheritedClassificationNames.add(classificationName); - } - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RelationshipExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RelationshipExplorer.java deleted file mode 100644 index 122b00a355f..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RelationshipExplorer.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; - - -public class RelationshipExplorer { - - private RelationshipDef relationshipDef; - - - public RelationshipExplorer(RelationshipDef def) { - relationshipDef = def; - } - - public RelationshipDef getRelationshipDef() { return relationshipDef; } -} - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RepositoryExplorerController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RepositoryExplorerController.java deleted file mode 100644 index 0979066adfc..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RepositoryExplorerController.java +++ /dev/null @@ -1,1763 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - -import org.odpi.openmetadata.repositoryservices.clients.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph; -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.AttributeTypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefGallery; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; - - -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityProxyOnlyException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.SecureController; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -import jakarta.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * The RepositoryExplorerController provides the server-side implementation - * of the RepositoryExplorer UI-component (aka Rex) - * - * This view service provides a number of functions that are needed for Rex. - * get type information from a repository server - * returns: a TypeExplorerResponse object - * get an entity by guid from a repository server - * returns: a RexEntityDetailResponse object - * get a relationship by guid from a repository server - * search for entities that match a search string and property filters - * search for relationships that match a search string and property filters - */ -@RestController -public class RepositoryExplorerController extends SecureController -{ - - private static final String USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST = "Sorry - this username was not authorized to perform the request"; - private static final String REPOSITORY_COULD_NOT_BE_REACHED = "The repository could not be reached, please check the server name and URL root and verify that the server is running "; - private static final String REQUEST_HAS_AN_INVALID_PARAMETER = "The request to load type information reported an invalid parameter, please check the server name and URL root parameters"; - private static final String COULD_NOT_FIND_AN_ENTITY_WITH_THE_GUID_SPECIFIED = "The system could not find an entity with the GUID specified - please check the GUID and try again"; - private static final String THE_SYSTEM_COULD_ONLY_FIND_AN_ENTITY_PROXY_USING_THE_GUID_SPECIFIED = "The system could only find an entity proxy using the GUID specified - please check the GUID and try again"; - private static final String THERE_WAS_A_PROBLEM_WITH_TYPE_INFORMATION_PLEASE_CHECK_AND_RETRY = "There was a problem with Type information - please check and retry"; - private static final String THERE_WAS_A_PROBLEM_WITH_PROPERTY_INFORMATION_PLEASE_CHECK_AND_RETRY = "There was a problem with Property information - please check and retry"; - private static final String THE_UI_TRIED_TO_USE_AN_UNSUPPORTED_FUNCTION = "The UI tried to use an unsupported function"; - private static final String INVALID_PARAMETER_IN_REX_REQUEST = "The request body used in the request to /api/instances/rex-traversal contained an invalid parameter or was missing a parameter. Please check the client code."; - private static final String TAG_NAME = "tagName"; - private static final String DATA_FIELD_NAME = "dataFieldName"; - private static final String ATTACHMENT_TYPE = "attachmentType"; - private static final String DISPLAY_NAME = "displayName"; - private static final String QUALIFIED_NAME = "qualifiedName"; - private static final String ENTITY_GUID = "entityGUID"; - private static String className = RepositoryExplorerController.class.getName(); - private static final Logger LOG = LoggerFactory.getLogger(className); - - - String metadataCollectionId; - OMRSMetadataCollection metadataCollection; - - private static final int TRUNCATED_STRING_LENGTH = 24; - - /** - * Default constructor - * - */ - public RepositoryExplorerController() { - metadataCollectionId = null; - metadataCollection = null; - } - - - /* - * This method retrieves all the types from the server in a TypeExplorer object. - * In the RequestBody: - * serverName is the name of the repository server to be interrogated. - * serverURLRoot is the root of the URL to use to connect to the server. - * enterpriseOption is a string "true" or "false" indicating whether to include results from the cohorts to which the server belongs - */ - - @PostMapping( path = "/api/types/rexTypeExplorer") - public TypeExplorerResponse rexTypeExplorer(@RequestBody RexTypesRequestBody body) - { - // Look up types in server and construct TEX - TypeExplorerResponse texResp; - String exceptionMessage; - - String serverName; - String serverURLRoot; - boolean enterpriseOption; - - try { - serverName = body.getServerName(); - serverURLRoot = body.getServerURLRoot(); - enterpriseOption = body.getEnterpriseOption(); - } - catch (Exception e) { - - exceptionMessage = "The request body used in the request to /api/types/rexTypeExplorer contained an invalid parameter or was missing a parameter. Please check the client code."; - // For any of the above exceptions, incorporate the exception message into a response object - texResp = new TypeExplorerResponse(400, exceptionMessage, null); - return texResp; - } - - - String userId = SecurityContextHolder.getContext().getAuthentication().getName(); - - try { - - TypeExplorer tex = this.getTypeExplorer(userId, serverName, serverURLRoot, enterpriseOption); - - if (tex != null) { - - texResp = new TypeExplorerResponse(200, "", tex); - - } else { - - texResp = new TypeExplorerResponse(400, "Could not retrieve type information", null); - } - return texResp; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST; - } - catch (RepositoryErrorException e) { - - exceptionMessage = REPOSITORY_COULD_NOT_BE_REACHED; - } - catch (InvalidParameterException e) { - - exceptionMessage = REQUEST_HAS_AN_INVALID_PARAMETER; - } - - // For any of the above exceptions, incorporate the exception message into a response object - texResp = new TypeExplorerResponse(400, exceptionMessage, null); - - return texResp; - - } - - - - - - private TypeExplorer getTypeExplorer(String userId, - String serverName, - String serverURLRoot, - boolean enterpriseOption) - throws - UserNotAuthorizedException, - RepositoryErrorException, - InvalidParameterException - { - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - if (!enterpriseOption) { - repositoryServicesClient = this.getLocalRepositoryServicesClient(serverName, serverURLRoot); - } - else { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(serverName, serverURLRoot); - } - - TypeExplorer tex = new TypeExplorer(); - - TypeDefGallery typeDefGallery = repositoryServicesClient.getAllTypes(userId); - - List typeDefs = typeDefGallery.getTypeDefs(); - for (TypeDef typeDef : typeDefs) { - TypeDefCategory tdCat = typeDef.getCategory(); - switch (tdCat) { - case ENTITY_DEF: - EntityExplorer eex = new EntityExplorer((EntityDef) typeDef); - tex.addEntityExplorer(typeDef.getName(), eex); - break; - case RELATIONSHIP_DEF: - RelationshipExplorer rex = new RelationshipExplorer((RelationshipDef) typeDef); - tex.addRelationshipExplorer(typeDef.getName(), rex); - break; - case CLASSIFICATION_DEF: - ClassificationExplorer cex = new ClassificationExplorer((ClassificationDef) typeDef); - tex.addClassificationExplorer(typeDef.getName(), cex); - break; - default: - // Ignore this typeDef and continue with next - break; - } - } - - // Include EnumDefs in the TEX - List attributeTypeDefs = typeDefGallery.getAttributeTypeDefs(); - for (AttributeTypeDef attributeTypeDef : attributeTypeDefs) { - AttributeTypeDefCategory tdCat = attributeTypeDef.getCategory(); - switch (tdCat) { - case ENUM_DEF: - tex.addEnumExplorer(attributeTypeDef.getName(), (EnumDef)attributeTypeDef); - break; - default: - // Ignore this AttributeTypeDef and continue with next - break; - } - } - - // All typeDefs processed, resolve linkages and return the TEX object - tex.resolve(); - return tex; - - } - - - /** - * getLocalRepositoryServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * MetadataCollection interface. This client is used when the enterprise option is not set, and will - * connect to the local repository. - * - * @param serverName - * @param serverURLRoot - * @throws InvalidParameterException - */ - private LocalRepositoryServicesClient getLocalRepositoryServicesClient(String serverName, - String serverURLRoot) - throws - InvalidParameterException - { - /* - * The serverName is used as the repositoryName - * The serverURLRoot is used as part of the restURLRoot, along with the serverName - */ - - /* - * The only exception thrown by the CTOR is InvalidParameterException, and this is not caught - * here because we want to surface it to the REST API that called this method so that the - * exception can be wrapped and a suitable indication sent in the REST Response. - */ - String restURLRoot = serverURLRoot + "/servers/" + serverName; - - return new LocalRepositoryServicesClient(serverName, restURLRoot); - } - - /** - * getEnterpriseRepositoryServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * MetadataCollection interface. This client is used when the enterprise option is set, and will - * perform federation. - * - * @param serverName - * @param serverURLRoot - * @throws InvalidParameterException - */ - private EnterpriseRepositoryServicesClient getEnterpriseRepositoryServicesClient(String serverName, - String serverURLRoot) - throws - InvalidParameterException - { - /* - * The serverName is used as the repositoryName - * The serverURLRoot is used as part of the restURLRoot, along with the serverName - */ - - /* - * The only exception thrown by the CTOR is InvalidParameterException, and this is not caught - * here because we want to surface it to the REST API that called this method so that the - * exception can be wrapped and a suitable indication sent in the REST Response. - */ - String restURLRoot = serverURLRoot + "/servers/" + serverName; - - return new EnterpriseRepositoryServicesClient(serverName, restURLRoot); - } - - /* - * This method retrieves the stats affecting a proposed traversal of an instance sub-graph starting from an entity. - * The response is packaged in a RexPreTraversal object which contains types and counts for relationships and - * neighboring entities. - */ - @PostMapping(path = "/api/instances/rex-pre-traversal") - public RexPreTraversalResponse rexPreTraversal(@RequestBody RexTraversalRequestBody body) - { - // Look up types in server and construct TEX - RexPreTraversalResponse rexPreTraversalResponse; - String exceptionMessage; - - // If a filter typeGUID was not selected in the UI then it will not appear in the body. - - String serverName; - String serverURLRoot; - boolean enterpriseOption; - String entityGUID; - Integer depth; - - try { - serverName = body.getServerName(); - serverURLRoot = body.getServerURLRoot(); - enterpriseOption = body.getEnterpriseOption(); - entityGUID = body.getEntityGUID(); - depth = body.getDepth(); - } - catch (Exception e) { - exceptionMessage = "The request body used in the request to /api/instances/rex-pre-traversal contained an invalid parameter or was missing a parameter. Please check the client code."; - // For any of the above exceptions, incorporate the exception message into a response object - rexPreTraversalResponse = new RexPreTraversalResponse(400, exceptionMessage, null); - return rexPreTraversalResponse; - } - - // Pre-traversal the filters are always empty - List entityTypeGUIDs = null; - List relationshipTypeGUIDs = null; - List classificationNames = null; - - - String userId = getUser(); - - try { - - InstanceGraph instGraph = this.getTraversal(userId, serverName, serverURLRoot, enterpriseOption, entityGUID, entityTypeGUIDs, relationshipTypeGUIDs, classificationNames, depth); - - if (instGraph == null) { - String excMsg = "Could not retrieve subgraph for entity with guid"+entityGUID; - rexPreTraversalResponse = new RexPreTraversalResponse(400, excMsg, null); - return rexPreTraversalResponse; - } - // Parse the RexTraversal into a RexPreTraversal for the PreTraversalResponse - RexPreTraversal rexPreTraversal = new RexPreTraversal(); - rexPreTraversal.setEntityGUID(entityGUID); - rexPreTraversal.setDepth(depth); - - // Process entities - Map entityCountsByType = new HashMap<>(); - Map classificationCountsByType = new HashMap<>(); - - processEntities(entityGUID, instGraph, entityCountsByType, classificationCountsByType); - // Process relationships - Map relationshipCountsByType = processRelationships(instGraph); - // Update the rexPreTraversal - rexPreTraversal.setEntityInstanceCounts(entityCountsByType); - rexPreTraversal.setRelationshipInstanceCounts(relationshipCountsByType); - rexPreTraversal.setClassificationInstanceCounts(classificationCountsByType); - - rexPreTraversalResponse = new RexPreTraversalResponse(200, "", rexPreTraversal); - return rexPreTraversalResponse; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST; - } - catch (RepositoryErrorException e) { - - exceptionMessage = REPOSITORY_COULD_NOT_BE_REACHED; - } - catch (InvalidParameterException e) { - - exceptionMessage = REQUEST_HAS_AN_INVALID_PARAMETER; - } - catch (EntityNotKnownException e) { - - exceptionMessage = COULD_NOT_FIND_AN_ENTITY_WITH_THE_GUID_SPECIFIED; - } - catch (EntityProxyOnlyException e) { - - exceptionMessage = THE_SYSTEM_COULD_ONLY_FIND_AN_ENTITY_PROXY_USING_THE_GUID_SPECIFIED; - } - catch (TypeErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_TYPE_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (PropertyErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_PROPERTY_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (FunctionNotSupportedException e) { - - exceptionMessage = THE_UI_TRIED_TO_USE_AN_UNSUPPORTED_FUNCTION; - } - // For any of the above exceptions, incorporate the exception message into a response object - rexPreTraversalResponse = new RexPreTraversalResponse(400, exceptionMessage, null); - - return rexPreTraversalResponse; - - } - - private Map processRelationships(InstanceGraph instGraph) { - List relationships = instGraph.getRelationships(); - Map relationshipCountsByType = new HashMap<>(); - if (relationships != null) { - for (Relationship rel : relationships) { - InstanceType instanceType = rel.getType(); - String typeGUID = instanceType.getTypeDefGUID(); - String typeName = instanceType.getTypeDefName(); - updateCountsByType(relationshipCountsByType, typeGUID, typeName); - } - } - return relationshipCountsByType; - } - - private void processEntities(String entityGUID, InstanceGraph instGraph, Map entityCountsByType, Map classificationCountsByType) { - List entities = instGraph.getEntities(); - if (entities != null) { - for (EntityDetail ent : entities) { - // Process entity type information - /* Skip the entity that the traversal started from. - * Counting the starting entity will distort the counts - */ - if (!ent.getGUID().equals(entityGUID)) { - - InstanceType instanceType = ent.getType(); - String typeGUID = instanceType.getTypeDefGUID(); - String typeName = instanceType.getTypeDefName(); - updateCountsByType(entityCountsByType, typeGUID, typeName); - // Process entity classification information - List classifications = ent.getClassifications(); - if (classifications != null) { - for (Classification classification : classifications) { - String classificationName = classification.getName(); - updateCountsByType(classificationCountsByType, null, classificationName); - } - } - } - } - } - } - - private void updateCountsByType(Map entityCountsByType, String typeGUID, String typeName) { - if (entityCountsByType.get(typeName) == null) { - // First sight of an instance of this type - RexTypeStats stats = new RexTypeStats(typeGUID, 1); - entityCountsByType.put(typeName, stats); - } else { - // Add to the count of instances of this type - Integer existingCount = entityCountsByType.get(typeName).getCount(); - entityCountsByType.get(typeName).setCount(existingCount + 1); - } - } - - @PostMapping(path = "/api/instances/rex-traversal") - public RexTraversalResponse rexTraversal(@RequestBody RexTraversalRequestBody body) - { - - RexTraversalResponse rexTraversalResponse; - String exceptionMessage; - - String serverName; - String serverURLRoot; - boolean enterpriseOption; - String entityGUID; - Integer depth; - Integer gen; - List entityTypeGUIDs; - List relationshipTypeGUIDs; - List classificationNames; - - try { - serverName = body.getServerName(); - serverURLRoot = body.getServerURLRoot(); - enterpriseOption = body.getEnterpriseOption(); - entityGUID = body.getEntityGUID(); - depth = body.getDepth(); - gen = body.getGen(); - entityTypeGUIDs = body.getEntityTypeGUIDs(); - relationshipTypeGUIDs = body.getRelationshipTypeGUIDs(); - classificationNames = body.getClassificationNames(); - } - catch (Exception e) { - exceptionMessage = INVALID_PARAMETER_IN_REX_REQUEST; - // For any of the above exceptions, incorporate the exception message into a response object - rexTraversalResponse = new RexTraversalResponse(400, exceptionMessage, null); - return rexTraversalResponse; - } - - // If a filter typeGUID was not selected in the UI then it will not appear in the body. - - String userId = getUser(); - - try { - - /* - * Because we will want to extract labels based on type we'll need to know the types supported by the repository... - */ - - TypeExplorer typeExplorer = getTypeExplorer(userId, serverName, serverURLRoot, enterpriseOption); - - - InstanceGraph instGraph = this.getTraversal(userId, serverName, serverURLRoot, enterpriseOption, entityGUID, entityTypeGUIDs, relationshipTypeGUIDs, classificationNames, depth); - - if (instGraph != null) { - - RexTraversal rt = new RexTraversal(); - - /* Format the results - * - * The format of the digests in the RexTraversal is as follows: - * a map of entityGUID --> { entityGUID, label, gen } - * a map of relationshipGUID --> { relationshipGUID, end1GUID, end2GUID, idx, label, gen } - */ - - /* - * An InstanceGraph contains relationships and entities that are homed by the repository that - * created the InstanceGraph. The relationships may refer to entities that are not homed by that - * repository, so those entities will not be included in the 'entities' portion of the InstanceGraph. - * Since our RexTraversal needs to be 'complete' - i.e. we have an EntityDigest for each end of - * every relationship, we must generate digests not just from the entities lit, but also spot any - * relationship ends that are NOT in the list and generate a digest for each of them as well. - * Start by processing the homed entities. - * Then process the relationships and check fr each end of each relationship whether we need to - * augment the RexTraversal entityDigestMap. - */ - List entities = instGraph.getEntities(); - Map entityDigestMap = null; - if (entities != null && !entities.isEmpty()) { - entityDigestMap = new HashMap<>(); - for (EntityDetail entityDetail : entities) { - /* - * We need entityGUID, label (computed) and if !preTraversal also include gen - */ - String entGUID = entityDetail.getGUID(); - - // Pass the typeExplorer to the labeller so that it can traverse... - String entLabel = this.chooseLabelForEntity(entityDetail, typeExplorer); - - RexEntityDigest red = new RexEntityDigest(entGUID, entLabel, gen, entityDetail.getMetadataCollectionName()); - entityDigestMap.put(entGUID, red); - } - - } - - List relationships = instGraph.getRelationships(); - Map relationshipDigestMap = null; - if (relationships != null && !relationships.isEmpty()) { - relationshipDigestMap = new HashMap<>(); - for (Relationship relationship : relationships) { - /* - * We need: entityGUID, label (computed) and if !preTraversal also include gen - * relationshipGUID, label (computed), end1GUID, end2GUID, idx (computed), gen - */ - String relGUID = relationship.getGUID(); - String relLabel = this.chooseLabelForRelationship(relationship); - String end1GUID = relationship.getEntityOneProxy().getGUID(); - String end2GUID = relationship.getEntityTwoProxy().getGUID(); - - /* check for proxies... */ - if (entityDigestMap.get(end1GUID) == null) { - /* add a digest for this proxy... */ - EntityProxy end1Proxy = relationship.getEntityOneProxy(); - String end1Label = this.chooseLabelForEntityProxy(end1Proxy, typeExplorer); - RexEntityDigest red = new RexEntityDigest(end1GUID, end1Label, gen, end1Proxy.getMetadataCollectionName()); - entityDigestMap.put(end1GUID, red); - } - if (entityDigestMap.get(end2GUID) == null) { - /* add a digest for this proxy... */ - EntityProxy end2Proxy = relationship.getEntityTwoProxy(); - String end2Label = this.chooseLabelForEntityProxy(end2Proxy, typeExplorer); - RexEntityDigest red = new RexEntityDigest(end2GUID, end2Label, gen, end2Proxy.getMetadataCollectionName()); - entityDigestMap.put(end2GUID, red); - } - - - int idx = 0; - - RexRelationshipDigest rrd = new RexRelationshipDigest(relGUID, relLabel, end1GUID, end2GUID, idx, - gen, relationship.getMetadataCollectionName()); - relationshipDigestMap.put(relGUID, rrd); - } - } - - rt.setEntityGUID(entityGUID); - rt.setDepth(depth); - rt.setGen(gen); - // Instead of using type guids in the traversal (which is to be sent to the browser) use type names instead. - List entityTypeNames = new ArrayList<>(); - if (entityTypeGUIDs != null && !entityTypeGUIDs.isEmpty()) { - for (String entityTypeGUID : entityTypeGUIDs) { - // Convert from typeGIUD to typeName - String entityTypeName = typeExplorer.getEntityTypeName(entityTypeGUID); - entityTypeNames.add(entityTypeName); - } - } - rt.setEntityTypeNames(entityTypeNames); - rt.setRelationshipTypeGUIDs(relationshipTypeGUIDs); - rt.setClassificationNames(classificationNames); - rt.setEntities(entityDigestMap); - rt.setRelationships(relationshipDigestMap); - rt.setServerName(serverName); - - rexTraversalResponse = new RexTraversalResponse(200, "", rt); - - } else { - - String excMsg = "Could not retrieve subgraph for entity with guid" + entityGUID; - rexTraversalResponse = new RexTraversalResponse(400, excMsg, null); - - } - return rexTraversalResponse; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST; - } - catch (RepositoryErrorException e) { - - exceptionMessage = REPOSITORY_COULD_NOT_BE_REACHED; - } - catch (InvalidParameterException e) { - - exceptionMessage = REQUEST_HAS_AN_INVALID_PARAMETER; - } - catch (EntityNotKnownException e) { - - exceptionMessage = COULD_NOT_FIND_AN_ENTITY_WITH_THE_GUID_SPECIFIED; - } - catch (EntityProxyOnlyException e) { - - exceptionMessage = THE_SYSTEM_COULD_ONLY_FIND_AN_ENTITY_PROXY_USING_THE_GUID_SPECIFIED; - } - catch (TypeErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_TYPE_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (PropertyErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_PROPERTY_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (FunctionNotSupportedException e) { - - exceptionMessage = THE_UI_TRIED_TO_USE_AN_UNSUPPORTED_FUNCTION; - } - // For any of the above exceptions, incorporate the exception message into a response object - rexTraversalResponse = new RexTraversalResponse(400, exceptionMessage, null); - - return rexTraversalResponse; - - } - - - - private String chooseLabelForEntity(EntityDetail entityDetail, TypeExplorer typeExplorer) - { - - // By default, use the GUID of the instance. This is not a desirable - // label but if there is really nothing else to use, then the GUID is - // better than nothing at all. Maybe. - String label = entityDetail.getGUID(); - - - - // Find the effective typeName - this is the highest supertype of the instance type - String instanceTypeName = null; - - InstanceType instanceType = entityDetail.getType(); - if (instanceType != null) { - instanceTypeName = instanceType.getTypeDefName(); - } - if (instanceTypeName == null || instanceTypeName.equals("")) { - // Drop out - there is no proper type information for the instance - just adopt the default set above. - return label; - } - - // We know that instanceTypeName is set to something we can use... - - // Traverse the TypeExplorer looking for the highest supertype.. - Map entityTypes = typeExplorer.getEntities(); - - // Get the immediate entity instance type... - EntityExplorer eex = entityTypes.get(instanceTypeName); - TypeDefLink superType = eex.getEntityDef().getSuperType(); - while (superType != null) { - String superTypeName = superType.getName(); - eex = entityTypes.get(superTypeName); - superType = eex.getEntityDef().getSuperType(); - } - // eex is now the effective type entry - TypeDef effectiveTypeDef = eex.getEntityDef(); - - String effTypeName = effectiveTypeDef.getName(); - - switch (effTypeName) { - - case "InformalTag": - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get(TAG_NAME) != null && - entityDetail.getProperties().getInstanceProperties().get(TAG_NAME).valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get(TAG_NAME).valueAsString(); - } - break; - - case "Like": - case "Rating": - if (entityDetail.getCreatedBy() != null) { - label = entityDetail.getCreatedBy(); - } - break; - - case "DataField": - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get(DATA_FIELD_NAME) != null && - entityDetail.getProperties().getInstanceProperties().get(DATA_FIELD_NAME).valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get(DATA_FIELD_NAME).valueAsString(); - } - break; - - case "Annotation": - case "AnnotationReview": - label = instanceTypeName; // use the local type name for anything under these types - break; - - case "LastAttachment": - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get(ATTACHMENT_TYPE) != null && - entityDetail.getProperties().getInstanceProperties().get(ATTACHMENT_TYPE).valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get(ATTACHMENT_TYPE).valueAsString(); - } - break; - - default: - // Anything that is left should be a Referenceable. - // If it has a displayName use that. - // Else if it has a name use that. - // Otherwise if it has a qualifiedName use up to the last TRUNCATED_STRING_LENGTH chars of that. - // If there is not qualifiedName drop through and use GUID (default) - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get(DISPLAY_NAME) != null && - entityDetail.getProperties().getInstanceProperties().get(DISPLAY_NAME).valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get(DISPLAY_NAME).valueAsString(); - } - else if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get("name") != null && - entityDetail.getProperties().getInstanceProperties().get("name").valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get("name").valueAsString(); - } - else if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get(QUALIFIED_NAME) != null) { - - String fullQN = entityDetail.getProperties().getInstanceProperties().get(QUALIFIED_NAME).valueAsString(); - - int lengthQN = fullQN.length(); - if (lengthQN > TRUNCATED_STRING_LENGTH) { - String tailQN = "..." + fullQN.substring(lengthQN-TRUNCATED_STRING_LENGTH, lengthQN); - label = tailQN; - } else { - label = fullQN; - } - } - } - - return label; - - } - - - - private String chooseLabelForEntityProxy(EntityProxy entityProxy, TypeExplorer typeExplorer) - { - - // Refer to the comment in chooseLabelForEntity for labelling strategy - similar applies - // here but implementation caters for the entity only being a proxy. - // By default, use the GUID of the instance. This is not a desirable - // label but if there is really nothing else to use, then the GUID is - // better than nothing at all. Maybe. - String label = entityProxy.getGUID(); - - - // Find the effective typeName - this is the highest supertype of the instance type - String instanceTypeName = null; - - InstanceType instanceType = entityProxy.getType(); - if (instanceType != null) { - instanceTypeName = instanceType.getTypeDefName(); - } - if (instanceTypeName == null || instanceTypeName.equals("")) { - // Drop out - there is no proper type information for the instance - just adopt the default set above. - return label; - } - - // We know that instanceTypeName is set to something we can use... - - // Traverse the TypeExplorer looking for the highest supertype.. - Map entityTypes = typeExplorer.getEntities(); - - // Get the immediate entity instance type... - EntityExplorer eex = entityTypes.get(instanceTypeName); - TypeDefLink superType = eex.getEntityDef().getSuperType(); - while (superType != null) { - String superTypeName = superType.getName(); - eex = entityTypes.get(superTypeName); - superType = eex.getEntityDef().getSuperType(); - } - // eex is now the effective type entry - TypeDef effectiveTypeDef = eex.getEntityDef(); - - String effTypeName = effectiveTypeDef.getName(); - - switch (effTypeName) { - - case "InformalTag": - if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get(TAG_NAME) != null && - entityProxy.getUniqueProperties().getInstanceProperties().get(TAG_NAME).valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get(TAG_NAME).valueAsString(); - - } - break; - - case "Like": - case "Rating": - if (entityProxy.getCreatedBy() != null) { - label = entityProxy.getCreatedBy(); - - } - break; - - case "DataField": - if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get(DATA_FIELD_NAME) != null && - entityProxy.getUniqueProperties().getInstanceProperties().get(DATA_FIELD_NAME).valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get(DATA_FIELD_NAME).valueAsString(); - - } - break; - - case "Annotation": - case "AnnotationReview": - label = instanceTypeName; // use the local type name for anything under these types - break; - - default: - label = getDefaultLabelFromEntityProxy(entityProxy, label); - } - - return label; - - } - - private String getDefaultLabelFromEntityProxy(EntityProxy entityProxy, String label) { - // Anything that is left should be a Referenceable. - // If it has a displayName use that. - // Otherwise if it has a qualifiedName use up to the last TRUNCATED_STRING_LENGTH chars of that. - // If there is not qualifiedName drop through and use GUID (default) - if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get(DISPLAY_NAME) != null && - entityProxy.getUniqueProperties().getInstanceProperties().get(DISPLAY_NAME).valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get(DISPLAY_NAME).valueAsString(); - - } - else if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("name") != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("name").valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get("name").valueAsString(); - - } - else if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get(QUALIFIED_NAME) != null) { - - String fullQN = entityProxy.getUniqueProperties().getInstanceProperties().get(QUALIFIED_NAME).valueAsString(); - - int lengthQN = fullQN.length(); - if (lengthQN > TRUNCATED_STRING_LENGTH) { - String tailQN = "..." + fullQN.substring(lengthQN-TRUNCATED_STRING_LENGTH, lengthQN); - label = tailQN; - } else { - label = fullQN; - } - } - return label; - } - - - private String chooseLabelForRelationship(Relationship relationship) - { - - // By default, use the GUID of the instance. This is not a desirable - // label but if there is really nothing else to use, then the GUID is - // better than nothing at all. Maybe. - String label = relationship.getGUID(); - - String instanceTypeName = null; - - InstanceType instanceType = relationship.getType(); - if (instanceType != null) { - instanceTypeName = instanceType.getTypeDefName(); - } - if (instanceTypeName == null || instanceTypeName.equals("")) { - // Drop out - there is no proper type information for the instance - just adopt the default set above. - return label; - } - - // We know that instanceTypeName is set to something we can use... - - // For now simply label relationships by type name. - label = instanceTypeName; - - return label; - - } - - - - - // The filters work as follows: - // If set to null then no filtering is performed - the typeGUID lists are set to null - // If set to a list of string values then those types are allowed. - // Returns - a completed RexTraversal or null - private InstanceGraph getTraversal(String userId, - String serverName, - String serverURLRoot, - Boolean enterpriseOption, - String entityGUID, - List entityTypeGUIDs, - List relationshipTypeGUIDs, - List classificationNames, - Integer depth - ) - throws - UserNotAuthorizedException, - RepositoryErrorException, - InvalidParameterException, - EntityNotKnownException, - EntityProxyOnlyException, - TypeErrorException, - PropertyErrorException, - FunctionNotSupportedException - { - - String methodName = "getTraversal"; - - - // If no entityGUID is specified or depth is not positive, there is no point in continuing... - - if (entityGUID == null) { - // We have a problem - the entityGUID has not been specified. - // We cannot do a query... - - final String parameterName = ENTITY_GUID; - - throw new InvalidParameterException(RexErrorCode.NO_GUID.getMessageDefinition(entityGUID, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - } - - if (depth < 0 ) { - // We have a problem - the depth is negative. - // In either case we cannot do a query... - - final String parameterName = "depth"; - - throw new InvalidParameterException(RexErrorCode.INVALID_VALUE.getMessageDefinition(depth.toString(), methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - - } - - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - if (!enterpriseOption) { - repositoryServicesClient = this.getLocalRepositoryServicesClient(serverName, serverURLRoot); - } - else { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(serverName, serverURLRoot); - } - - if (depth >0) { - - return repositoryServicesClient.getEntityNeighborhood( - userId, - entityGUID, - entityTypeGUIDs, - relationshipTypeGUIDs, - null, - classificationNames, - null, - depth); - } - - - else { - - /* - * Since depth is 0 - use getEntityDetail instead of neighbourhood - */ - - EntityDetail entityDetail = metadataCollection.getEntityDetail( - userId, - entityGUID); - - if (entityDetail != null) { - - // Construct an InstanceGraph containing just the entityDetail - InstanceGraph instGraph = new InstanceGraph(); - - List entityDetailList = new ArrayList<>(); - entityDetailList.add(entityDetail); - instGraph.setEntities(entityDetailList); - - return instGraph; - - } - - else { - // Entity could not be found - should have already had an exception but just to be sure... - - final String parameterName = ENTITY_GUID; - - throw new InvalidParameterException(RexErrorCode.ENTITY_NOT_KNOWN.getMessageDefinition(entityGUID, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - - } - } - - } - - - - /* - * This method gets an entity detail. - * - * When retrieving a single entity we return the whole EntityDetail object. This is - * because the entity is being used as the user focus object and will be displayed in - * the details pane. - * - * This method has a body because things like serverName etc are for the repo server - they need - * to be unpacked here and used to interrogate the repository's metadata collection interface. - * - * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - */ - @PostMapping( path = "/api/instances/entity") - public RexEntityDetailResponse getEntityDetail(@RequestBody RexEntityRequestBody body) - { - - RexEntityDetailResponse response; - String exceptionMessage; - - String serverName; - String serverURLRoot; - boolean enterpriseOption; - String entityGUID; - - try { - serverName = body.getServerName(); - serverURLRoot = body.getServerURLRoot(); - enterpriseOption = body.getEnterpriseOption(); - entityGUID = body.getEntityGUID(); - } - catch (Exception e) { - exceptionMessage = INVALID_PARAMETER_IN_REX_REQUEST; - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexEntityDetailResponse(400, exceptionMessage, null); - return response; - } - - - String userId = getUser(); - - try { - - EntityDetail entityDetail = this.getEntityDetail(userId, serverName, serverURLRoot, enterpriseOption, entityGUID); - - TypeExplorer typeExplorer = getTypeExplorer(userId, serverName, serverURLRoot, enterpriseOption); - String label = this.chooseLabelForEntity(entityDetail, typeExplorer); - - RexExpandedEntityDetail rexExpEntityDetail = new RexExpandedEntityDetail(entityDetail, label, serverName); - - response = new RexEntityDetailResponse(200, "", rexExpEntityDetail); - - return response; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST; - } - catch (RepositoryErrorException e) { - - exceptionMessage = REPOSITORY_COULD_NOT_BE_REACHED; - } - catch (InvalidParameterException e) { - - exceptionMessage = REQUEST_HAS_AN_INVALID_PARAMETER; - } - catch (EntityNotKnownException e) { - - exceptionMessage = COULD_NOT_FIND_AN_ENTITY_WITH_THE_GUID_SPECIFIED; - } - catch (EntityProxyOnlyException e) { - - exceptionMessage = THE_SYSTEM_COULD_ONLY_FIND_AN_ENTITY_PROXY_USING_THE_GUID_SPECIFIED; - } - - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexEntityDetailResponse(400, exceptionMessage, null); - - return response; - - } - - - - private EntityDetail getEntityDetail(String userId, - String serverName, - String serverURLRoot, - boolean enterpriseOption, - String entityGUID) - throws - UserNotAuthorizedException, - RepositoryErrorException, - InvalidParameterException, - EntityNotKnownException, - EntityProxyOnlyException - - { - - String methodName = "getEntityDetail"; - - if (entityGUID == null) { - // If no entityGUID is specified, there is no point in continuing... - // We have a problem - the entityGUID has not been specified . - // In either case we cannot do a query... - - final String parameterName = ENTITY_GUID; - - throw new InvalidParameterException(RexErrorCode.NO_GUID.getMessageDefinition(entityGUID, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - - } - - if ("trouble-at-mill".equals(entityGUID)) { - // If a stupid entityGUID is specified, there is no point in continuing... - - final String parameterName = ENTITY_GUID; - - throw new InvalidParameterException(RexErrorCode.TROUBLE_AT_MILL.getMessageDefinition(entityGUID, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - - } - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - if (!enterpriseOption) { - repositoryServicesClient = this.getLocalRepositoryServicesClient(serverName, serverURLRoot); - } - else { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(serverName, serverURLRoot); - } - - EntityDetail entityDetail = repositoryServicesClient.getEntityDetail( - userId, - entityGUID); - - if (entityDetail != null) { - - return entityDetail; - - } else { - - // Entity could not be found - should have already had an exception but just to be sure... - - final String parameterName = ENTITY_GUID; - - throw new InvalidParameterException(RexErrorCode.ENTITY_NOT_KNOWN.getMessageDefinition(entityGUID, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - - } - - } - - /* - * This method gets a relationship. - * - * When retrieving a single relationship we return the whole Relationship object. This is - * because the relationship is being used as the user focus object and will be displayed in - * the details pane. - * - * This method has a body because things like serverName etc are for the repo server - they need - * to be unpacked here and used to interrogate the repository's metadata collection interface. - * - * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - */ - @PostMapping( path = "/api/instances/relationship") - public RexRelationshipResponse getRelationship(@RequestBody RexRelationshipRequestBody body) - { - - RexRelationshipResponse response; - String exceptionMessage; - - String serverName; - String serverURLRoot; - boolean enterpriseOption; - String relationshipGUID; - - try { - serverName = body.getServerName(); - serverURLRoot = body.getServerURLRoot(); - enterpriseOption = body.getEnterpriseOption(); - relationshipGUID = body.getRelationshipGUID(); - } - catch (Exception e) { - exceptionMessage = INVALID_PARAMETER_IN_REX_REQUEST; - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexRelationshipResponse(400, exceptionMessage, null); - return response; - } - - - String userId = getUser(); - - try { - - Relationship relationship = this.getRelationship(userId, serverName, serverURLRoot, enterpriseOption, relationshipGUID); - - // Create digests for both ends - - TypeExplorer typeExplorer = getTypeExplorer(userId, serverName, serverURLRoot, enterpriseOption); - EntityProxy entity1 = relationship.getEntityOneProxy(); - EntityProxy entity2 = relationship.getEntityTwoProxy(); - String label1 = this.chooseLabelForEntityProxy(entity1, typeExplorer); - String label2 = this.chooseLabelForEntityProxy(entity2, typeExplorer); - - RexEntityDigest digest1 = new RexEntityDigest(entity1.getGUID(), label1, 0, entity1.getMetadataCollectionName()); - RexEntityDigest digest2 = new RexEntityDigest(entity2.getGUID(), label2, 0, entity2.getMetadataCollectionName()); - - String label = this.chooseLabelForRelationship(relationship); - - RexExpandedRelationship rexExpRelationship = new RexExpandedRelationship(relationship, label, digest1, digest2, serverName); - - response = new RexRelationshipResponse(200, "", rexExpRelationship); - - return response; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST; - } - catch (RepositoryErrorException e) { - - exceptionMessage = REPOSITORY_COULD_NOT_BE_REACHED; - } - catch (InvalidParameterException e) { - - exceptionMessage = REQUEST_HAS_AN_INVALID_PARAMETER; - } - catch (RelationshipNotKnownException e) { - - exceptionMessage = "The system could not find an relationship with the GUID specified - please check the GUID and try again"; - } - - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexRelationshipResponse(400, exceptionMessage, null); - - return response; - - } - - // - - private Relationship getRelationship(String userId, - String serverName, - String serverURLRoot, - boolean enterpriseOption, - String relationshipGUID) - throws - UserNotAuthorizedException, - RepositoryErrorException, - InvalidParameterException, - RelationshipNotKnownException - { - - String methodName = "getRelationship"; - - - if (relationshipGUID == null) { - // If no relationshipGUID is specified, there is no point in continuing... - // We have a problem - the relationshipGUID has not been specified . - // In either case we cannot do a query... - - final String parameterName = "relationshipGUID"; - - throw new InvalidParameterException(RexErrorCode.NO_GUID.getMessageDefinition(relationshipGUID, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - - } - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - if (!enterpriseOption) { - repositoryServicesClient = this.getLocalRepositoryServicesClient(serverName, serverURLRoot); - } - else { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(serverName, serverURLRoot); - } - - Relationship relationship = repositoryServicesClient.getRelationship( - userId, - relationshipGUID); - - if (relationship != null) { - - return relationship; - - } else { - - // Relationship could not be found - should have already had an exception but just to be sure... - - final String parameterName = "relationshipGUID"; - - throw new InvalidParameterException(RexErrorCode.RELATIONSHIP_NOT_KNOWN.getMessageDefinition(relationshipGUID, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - } - - } - - - // SEARCH FUNCTIONS - - /* - * This method searches for entities that match property value - using search text. - * - * - * This method has a body because things like serverName etc are for the repo server - they need - * to be unpacked here and used to interrogate the repository's metadata collection interface. - * - * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - */ - @PostMapping( path = "/api/instances/entities/by-property-value") - public RexSearchResponse entitySearch(@RequestBody RexSearchBody body) - { - RexSearchResponse response; - String exceptionMessage; - - String searchCategory = "Entity"; - - String serverName; - String serverURLRoot; - boolean enterpriseOption; - String entityTypeName; - String searchText; - - try { - serverName = body.getServerName(); - serverURLRoot = body.getServerURLRoot(); - enterpriseOption = body.getEnterpriseOption(); - entityTypeName = body.getTypeName(); - searchText = body.getSearchText(); - } - catch (Exception e) { - exceptionMessage = INVALID_PARAMETER_IN_REX_REQUEST; - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexSearchResponse(400, exceptionMessage, null, null, searchCategory, null, null); - return response; - } - - - - - String userId = getUser(); - - String entityTypeGUID = null; - - // Convert type name to typeGUID. - try { - - TypeExplorer typeExplorer = getTypeExplorer(userId, serverName, serverURLRoot, enterpriseOption); - entityTypeGUID = typeExplorer.getEntityTypeGUID(entityTypeName); - - List entities = this.findEntities(userId, serverName, serverURLRoot, enterpriseOption, searchText, entityTypeGUID); - - if (entities != null) { - - // Process the list of EntityDetail objects and produce a list of EntityDigest objects - - Map digestMap = new HashMap<>(); - - for (int e=0; e < entities.size(); e++) { - EntityDetail entityDetail = entities.get(e); - String label = this.chooseLabelForEntity(entityDetail, typeExplorer); - - RexEntityDigest entityDigest = new RexEntityDigest(entityDetail.getGUID(), label, 0, entityDetail.getMetadataCollectionName()); - - digestMap.put(entityDetail.getGUID(), entityDigest); - - } - - - response = new RexSearchResponse(200, "", serverName, searchText, searchCategory, digestMap, null); - - } else { - - String excMsg = "Could not find any entities that matched "+searchText; - response = new RexSearchResponse(400, excMsg, serverName, searchText, searchCategory, null, null); - - } - - return response; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST; - } - catch (RepositoryErrorException e) { - - exceptionMessage = REPOSITORY_COULD_NOT_BE_REACHED; - } - catch (InvalidParameterException e) { - - exceptionMessage = REQUEST_HAS_AN_INVALID_PARAMETER; - } - catch (TypeErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_TYPE_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (PropertyErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_PROPERTY_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (PagingErrorException e) { - - exceptionMessage = "There was a problem with Paging - please check and retry"; - } - catch (FunctionNotSupportedException e) { - - exceptionMessage = THE_UI_TRIED_TO_USE_AN_UNSUPPORTED_FUNCTION; - } - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexSearchResponse(400, exceptionMessage, serverName, searchText, searchCategory, null, null); - - return response; - - } - - - - private List findEntities(String userId, - String serverName, - String serverURLRoot, - boolean enterpriseOption, - String searchText, - String entityTypeGUID) - throws - UserNotAuthorizedException, - RepositoryErrorException, - InvalidParameterException, - TypeErrorException, - PropertyErrorException, - PagingErrorException, - FunctionNotSupportedException - { - - String methodName = "findEntities"; - - - - if (searchText == null) { - // If no searchText is specified, there is no point in continuing... - // We have a problem - the searchText has not been specified. - // We cannot do a query... - - final String parameterName = "searchText"; - - throw new InvalidParameterException(RexErrorCode.INVALID_VALUE.getMessageDefinition(searchText, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - } - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - if (!enterpriseOption) { - repositoryServicesClient = this.getLocalRepositoryServicesClient(serverName, serverURLRoot); - } - else { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(serverName, serverURLRoot); - } - - - return repositoryServicesClient.findEntitiesByPropertyValue( - userId, - entityTypeGUID, - searchText, - 0, - null, - null, - null, - null, - null, - 0); - - } - - - - /* - * This method searches for relationships that match property value - using search text. - * - * - * This method has a body because things like serverName etc are for the repo server - they need - * to be unpacked here and used to interrogate the repository's metadata collection interface. - * - * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - */ - @PostMapping( path = "/api/instances/relationships/by-property-value") - public RexSearchResponse relationshipSearch(@RequestBody RexSearchBody body) - { - - RexSearchResponse response; - String exceptionMessage; - - String searchCategory = "Relationship"; - - String serverName; - String serverURLRoot; - boolean enterpriseOption; - String relationshipTypeName; - String searchText; - - try { - serverName = body.getServerName(); - serverURLRoot = body.getServerURLRoot(); - enterpriseOption = body.getEnterpriseOption(); - relationshipTypeName = body.getTypeName(); - searchText = body.getSearchText(); - } - catch (Exception e) { - exceptionMessage = INVALID_PARAMETER_IN_REX_REQUEST; - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexSearchResponse(400, exceptionMessage, null, null, searchCategory, null, null); - return response; - } - - - String userId = getUser(); - - String relationshipTypeGUID = null; - - // Convert type name to typeGUID. - try { - - TypeExplorer typeExplorer = getTypeExplorer(userId, serverName, serverURLRoot, enterpriseOption); - relationshipTypeGUID = typeExplorer.getRelationshipTypeGUID(relationshipTypeName); - - List relationships = this.findRelationships(userId, serverName, serverURLRoot, enterpriseOption, searchText, relationshipTypeGUID); - - if (relationships != null) { - - // Process the list of Relationship objects and produce a list of RelationshipDigest objects - - Map digestMap = new HashMap<>(); - - for (Relationship relationship : relationships) { - String label = this.chooseLabelForRelationship(relationship); - - RexRelationshipDigest relationshipDigest = new RexRelationshipDigest( - relationship.getGUID(), - label, - relationship.getEntityOneProxy().getGUID(), - relationship.getEntityTwoProxy().getGUID(), - 0, - 0, - relationship.getMetadataCollectionName()); - - digestMap.put(relationship.getGUID(), relationshipDigest); - - } - - - response = new RexSearchResponse(200, "", serverName, searchText, searchCategory, null, digestMap); - - } else { - - String excMsg = "Could not find any entities that matched "+searchText; - response = new RexSearchResponse(400, excMsg, serverName, searchText, searchCategory, null, null); - - } - - return response; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = USERNAME_NOT_AUTHORIZED_TO_PERFORM_THE_REQUEST; - } - catch (RepositoryErrorException e) { - - exceptionMessage = REPOSITORY_COULD_NOT_BE_REACHED; - } - catch (InvalidParameterException e) { - - exceptionMessage = REQUEST_HAS_AN_INVALID_PARAMETER; - } - catch (TypeErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_TYPE_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (PropertyErrorException e) { - - exceptionMessage = THERE_WAS_A_PROBLEM_WITH_PROPERTY_INFORMATION_PLEASE_CHECK_AND_RETRY; - } - catch (PagingErrorException e) { - - exceptionMessage = "There was a problem with Paging - please check and retry"; - } - catch (FunctionNotSupportedException e) { - - exceptionMessage = THE_UI_TRIED_TO_USE_AN_UNSUPPORTED_FUNCTION; - } - // For any of the above exceptions, incorporate the exception message into a response object - response = new RexSearchResponse(400, exceptionMessage, serverName, searchText, searchCategory, null, null); - - return response; - - } - - - - private List findRelationships(String userId, - String serverName, - String serverURLRoot, - boolean enterpriseOption, - String searchText, - String relationshipTypeGUID) - throws - UserNotAuthorizedException, - RepositoryErrorException, - InvalidParameterException, - TypeErrorException, - PropertyErrorException, - PagingErrorException, - FunctionNotSupportedException - { - - String methodName = "findRelationships"; - - if (searchText == null) { - - // If no searchText is specified, there is no point in continuing... - // We have a problem - the searchText has not been specified. - // We cannot do a query... - - final String parameterName = "searchText"; - - throw new InvalidParameterException(RexErrorCode.INVALID_VALUE.getMessageDefinition(searchText, methodName, serverName), - this.getClass().getName(), - methodName, - parameterName); - } - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - if (!enterpriseOption) { - repositoryServicesClient = this.getLocalRepositoryServicesClient(serverName, serverURLRoot); - } - else { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(serverName, serverURLRoot); - } - - List relationshipList = repositoryServicesClient.findRelationshipsByPropertyValue( - userId, - relationshipTypeGUID, - searchText, - 0, - null, - null, - null, - null, - 0); - - - if (relationshipList != null) { - - return relationshipList; - - } else { - - // No relationships could be found - this is OK... - - return null; - - } - - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityDetailResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityDetailResponse.java deleted file mode 100644 index 07a70f29b97..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityDetailResponse.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - - -public class RexEntityDetailResponse { - - private Integer httpStatusCode; - private String exceptionText; - private RexExpandedEntityDetail expandedEntityDetail; - - public RexEntityDetailResponse(Integer statusCode, String exceptionText, RexExpandedEntityDetail expandedEntityDetail) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.expandedEntityDetail = expandedEntityDetail; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public RexExpandedEntityDetail getExpandedEntityDetail() { - return this.expandedEntityDetail; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setExpandedEntityDetail(RexExpandedEntityDetail expandedEntityDetail) { this.expandedEntityDetail = expandedEntityDetail; } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityDigest.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityDigest.java deleted file mode 100644 index c9a7aa786a4..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityDigest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexEntityDigest { - - private String entityGUID; - private String label; - private Integer gen; - private String metadataCollectionName; - - public RexEntityDigest(String entityGUID, String label, Integer gen, String metadataCollectionName) { - this.entityGUID = entityGUID; - this.label = label; - this.gen = gen; - this.metadataCollectionName = metadataCollectionName; /* The name of the metadataCollection that is home to the entity */ - } - - /* - * Getters for Jackson - */ - - public String getEntityGUID() { return entityGUID; } - public String getLabel() { return label; } - public Integer getGen() { return gen; } - public String getMetadataCollectionName() { return metadataCollectionName; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - public void setLabel(String label) { this.label = label; } - public void setGen(Integer gen) { this.gen = gen; } - public void setMetadataCollectionName(String metadataCollectionName) { this.metadataCollectionName = metadataCollectionName; } - - - - @Override - public String toString() - { - return "RexEntityDigest{" + - ", entityGUID=" + entityGUID + - ", label=" + label + - ", gen=" + gen + - ", metadataCollectionName=" + metadataCollectionName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityRequestBody.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityRequestBody.java deleted file mode 100644 index c36e73abe1a..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexEntityRequestBody.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexEntityRequestBody { - - - /* - * The RexTraversalRequestBody class provides a body for REST requests to perform a rex-traversal - */ - - private String serverName; // must be non-null - private String serverURLRoot; // must be non-null - private String entityGUID; // must be non-null, GUID of root of traversal - private Boolean enterpriseOption; - private Integer gen; // indicator of the current gen of the traversal - - - public RexEntityRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getServerURLRoot() { return serverURLRoot; } - - public String getEntityGUID() { return entityGUID; } - - public Boolean getEnterpriseOption() { return enterpriseOption; } - - public Integer getGen() { return gen; } - - // --- - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setServerURLRoot(String serverURLRoot) { this.serverURLRoot = serverURLRoot; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setGen(Integer gen) { this.gen = gen; } - - - - - - @Override - public String toString() - { - return "RexEntityRequestBody{" + - ", serverName=" + serverName + - ", serverURLRoot=" + serverURLRoot + - ", entityGUID=" + entityGUID + - ", enterpriseOption=" + enterpriseOption + - ", gen=" + gen + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexErrorCode.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexErrorCode.java deleted file mode 100644 index ad631164c4c..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexErrorCode.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - - - /** - * The RexErrorCode is used to define first failure data capture (FFDC) for errors that occur within REX. - * It is used in conjunction with all exceptions, both Checked and Runtime (unchecked). - * - * The 5 fields in the enum are: - *
    - *
  • HTTP Error Code for translating between REST and JAVA. Typically the numbers used are:
  • - *
    • - *
    • 500: internal error
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: 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 user should correct the error
  • - *
- */ - - public enum RexErrorCode implements ExceptionMessageSet - { - NO_GUID(400, "REX-400-001", - "A null unique identifier (guid) has been passed as the {0} parameter on a {1} request to open metadata repository {2}", - "The system is unable to perform the request because the unique identifier is needed.", - "Correct the caller's code and retry the request."), - - INVALID_VALUE(400, "REX-400-002", - "An invalid value has been passed as the {0} parameter on a {1} request to open metadata repository {2}", - "The system is unable to perform the request using the value provided.", - "Correct the caller's code and retry the request."), - - ENTITY_NOT_KNOWN(400, "REX-400-003", - "The entity identified with guid {0} passed on the {1} call is not known to the open metadata repository {2}", - "\"The system is unable to retrieve the properties for the requested entity because the supplied guid is not recognized.", - "The guid is supplied by the caller to the server. It may have a logic problem that has corrupted the guid, or the entity has been deleted since the guid was retrieved."), - - RELATIONSHIP_NOT_KNOWN(400, "REX-400-004", - "The relationship identified with guid {0} passed on the {1} call is not known to the open metadata repository {2}", - "\"The system is unable to retrieve the properties for the requested relationship because the supplied guid is not recognized.", - "The guid is supplied by the caller to the server. It may have a logic problem that has corrupted the guid, or the relationship has been deleted since the guid was retrieved."), - - TROUBLE_AT_MILL(400, "REX-400-005", - "Apparently, one on't cross beams gone ow't askew on't treddle on repository {2}", - "The system is unable to perform the request because none expects the Spanish Inquisition!", - "Correct the caller's code and retry the request."), - - ; - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - RexErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexExpandedEntityDetail.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexExpandedEntityDetail.java deleted file mode 100644 index 6d6a8dc72ee..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexExpandedEntityDetail.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -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) -public class RexExpandedEntityDetail { - - private EntityDetail entityDetail; - private RexEntityDigest entityDigest; - private String serverName; // the name of the server that returned this object - - - public RexExpandedEntityDetail(EntityDetail entityDetail, String label, String serverName) { - this.entityDetail = entityDetail; - this.serverName = serverName; - // Server-side we do not know which gen this is for - so set to 0. - this.entityDigest = new RexEntityDigest(entityDetail.getGUID(), label, 0, entityDetail.getMetadataCollectionName()); - } - - /* - * Getters for Jackson - */ - - public EntityDetail getEntityDetail() { return entityDetail; } - public String getServerName() { return serverName; } - public RexEntityDigest getEntityDigest() { return entityDigest; } - - public void setEntityDetail(EntityDetail entityDetail) { this.entityDetail = entityDetail; } - public void setServerName(String serverName) { this.serverName = serverName; } - public void setEntityDigest(RexEntityDigest entityDigest) { this.entityDigest = entityDigest; } - - - - @Override - public String toString() - { - return "RexExpandedEntityDetail{" + - ", entityDetail=" + entityDetail + - ", entityDigest=" + entityDigest + - ", serverName=" + serverName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexExpandedRelationship.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexExpandedRelationship.java deleted file mode 100644 index 147b9c72a5d..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexExpandedRelationship.java +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; - -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) -public class RexExpandedRelationship { - - private Relationship relationship; - private RexRelationshipDigest relationshipDigest; - private RexEntityDigest entityOneDigest; - private RexEntityDigest entityTwoDigest; - private String serverName; // name of the server that returned this object - - - public RexExpandedRelationship(Relationship relationship, String label, RexEntityDigest digest1, RexEntityDigest digest2, String serverName) { - this.relationship = relationship; - this.relationshipDigest = new RexRelationshipDigest(relationship.getGUID(), - label, - digest1.getEntityGUID(), - digest2.getEntityGUID(), - 0, - 0, - relationship.getMetadataCollectionName()); - this.entityOneDigest = digest1; - this.entityTwoDigest = digest2; - this.serverName = serverName; - - } - - /* - * Getters for Jackson - */ - - public Relationship getRelationship() { return relationship; } - public RexRelationshipDigest getRelationshipDigest() { return relationshipDigest; } - public RexEntityDigest getEntityOneDigest() { return entityOneDigest; } - public RexEntityDigest getEntityTwoDigest() { return entityTwoDigest; } - public String getServerName() { return serverName; } - - - public void setRelationship(Relationship relationship) { this.relationship = relationship; } - public void setRelationshipDigest(RexRelationshipDigest relationshipDigest) { this.relationshipDigest = relationshipDigest; } - public void setEntityOneDigest(RexEntityDigest entityOneDigest) { this.entityOneDigest = entityOneDigest; } - public void setEntityTwoDigest(RexEntityDigest entityTwoDigest) { this.entityTwoDigest = entityTwoDigest; } - public void setServerName(String serverName) { this.serverName = serverName; } - - - @Override - public String toString() - { - return "RexExpandedRelationship{" + - ", relationship=" + relationship + - ", relationshipDigest=" + relationshipDigest + - ", entityOneDigest=" + entityOneDigest + - ", entityTwoDigest=" + entityTwoDigest + - ", serverName=" + serverName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexPreTraversal.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexPreTraversal.java deleted file mode 100644 index f7edf760768..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexPreTraversal.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; - -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) -public class RexPreTraversal { - - - // The RexPreTraversal class enables the packaging and interrogation of a predictive stats - // for a potential traversal. It does NOT contain the sub-graph - that is in a RexTraversal - // object. - // The PreTraversal includes the entityGUID of the entity on which it is centered and the depth. - // The PreTraversal is formed from the result of a traversal with no filtering - it includes - // 3 maps of type information - one per category - keyed by typeName, where each entry (value) - // contains the typeGUID and number of instances of that type in the traversal, i.e: - // { typeName --> { typeGUID : , count : } } - // The typeName and typeGUID are both included in order to minimise conversion in the browser for - // display purposes. All 3 maps are keyed by typeName as names are available for classifications. - // In a RexTypeStats for a classification the typeGUID is ignored (set to null). - // A PreTraversal does not need a gen. - - - private String entityGUID; // must be non-null - private Map entityInstanceCounts; // a map from typename to stats - private Map relationshipInstanceCounts; // a map from typename to stats - private Map classificationInstanceCounts; // a map from typename to stats - private Integer depth; // the depth of traversal - - - public RexPreTraversal() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getEntityGUID() { return entityGUID; } - - public Map getEntityInstanceCounts() { return entityInstanceCounts; } - - public Map getRelationshipInstanceCounts() { - return relationshipInstanceCounts; - } - - public Map getClassificationInstanceCounts() { - return classificationInstanceCounts; - } - - public Integer getDepth() { return depth; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEntityInstanceCounts(Map entityInstanceCounts) { this.entityInstanceCounts = entityInstanceCounts; } - - public void setRelationshipInstanceCounts(Map relationshipInstanceCounts) { this.relationshipInstanceCounts = relationshipInstanceCounts; } - - public void setClassificationInstanceCounts(Map classificationInstanceCounts) { this.classificationInstanceCounts = classificationInstanceCounts; } - - public void setDepth(Integer depth) { this.depth = depth; } - - - - @Override - public String toString() - { - return "RexPreTraversal{" + - ", entityGUID=" + entityGUID + - ", depth=" + depth + - ", entityInstanceCounts=" + entityInstanceCounts + - ", relationshipInstanceCounts=" + relationshipInstanceCounts + - ", classificationInstanceCounts=" + classificationInstanceCounts + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexPreTraversalResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexPreTraversalResponse.java deleted file mode 100644 index f864c5c4746..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexPreTraversalResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - - -public class RexPreTraversalResponse { - - private Integer httpStatusCode; - private String exceptionText; - private RexPreTraversal rexPreTraversal; - - public RexPreTraversalResponse(Integer statusCode, String exceptionText, RexPreTraversal rexPreTraversal) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.rexPreTraversal = rexPreTraversal; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public RexPreTraversal getRexPreTraversal() { - return this.rexPreTraversal; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setRexPreTraversal(RexPreTraversal rexPreTraversal) - { - this.rexPreTraversal = rexPreTraversal; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipDigest.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipDigest.java deleted file mode 100644 index cda00c3d669..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipDigest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexRelationshipDigest { - - private String relationshipGUID; - private String label; - private String end1GUID; - private String end2GUID; - private Integer idx; - private Integer gen; - private String metadataCollectionName; - - public RexRelationshipDigest(String relationshipGUID, String label, String end1GUID, String end2GUID, Integer idx, Integer gen, - String metadataCollectionName) { - this.relationshipGUID = relationshipGUID; - this.label = label; - this.end1GUID = end1GUID; - this.end2GUID = end2GUID; - this.idx = idx; - this.gen = gen; - this.metadataCollectionName = metadataCollectionName; - } - - /* - * Getters for Jackson - */ - - public String getRelationshipGUID() { return relationshipGUID; } - public String getEnd1GUID() { return end1GUID; } - public String getEnd2GUID() { return end2GUID; } - public String getLabel() { return label; } - public Integer getIdx() { return idx; } - public Integer getGen() { return gen; } - public String getMetadataCollectionName() { return metadataCollectionName; } - - public void setRelationshipGUID(String relationshipGUID) { this.relationshipGUID = relationshipGUID; } - public void setLabel(String label) { this.label = label; } - public void setEnd1GUID(String end1GUID) { this.end1GUID = end1GUID; } - public void setEnd2GUID(String end2GUID) { this.end2GUID = end2GUID; } - public void setIdx(Integer idx) { this.idx = idx; } - public void setGen(Integer gen) { this.gen = gen; } - public void setMetadataCollectionName(String metadataCollectionName) { this.metadataCollectionName = metadataCollectionName; } - - - - @Override - public String toString() - { - return "RexTypeStats{" + - ", relationshipGUID=" + relationshipGUID + - ", label=" + label + - ", end1GUID=" + end1GUID + - ", end2GUID=" + end2GUID + - ", idx=" + idx + - ", gen=" + gen + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipRequestBody.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipRequestBody.java deleted file mode 100644 index fb5b27c8f98..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipRequestBody.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexRelationshipRequestBody { - - - /* - * The RexRelationshipRequestBody class provides a body for REST requests to retrieve relationships by GUID - */ - - private String serverName; // must be non-null - private String serverURLRoot; // must be non-null - private String relationshipGUID; // must be non-null, GUID of root of traversal - private Boolean enterpriseOption; - private Integer gen; // indicator of the current gen of the traversal - - - public RexRelationshipRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getServerURLRoot() { return serverURLRoot; } - - public String getRelationshipGUID() { return relationshipGUID; } - - public Boolean getEnterpriseOption() { return enterpriseOption; } - - public Integer getGen() { return gen; } - - // --- - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setServerURLRoot(String serverURLRoot) { this.serverURLRoot = serverURLRoot; } - - public void setRelationshipGUID(String relationshipGUID) { this.relationshipGUID = relationshipGUID; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setGen(Integer gen) { this.gen = gen; } - - - - - - @Override - public String toString() - { - return "RexRelationshipRequestBody{" + - ", serverName=" + serverName + - ", serverURLRoot=" + serverURLRoot + - ", relationshipGUID=" + relationshipGUID + - ", enterpriseOption=" + enterpriseOption + - ", gen=" + gen + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipResponse.java deleted file mode 100644 index 32557338755..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipResponse.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - -public class RexRelationshipResponse { - - private Integer httpStatusCode; - private String exceptionText; - private RexExpandedRelationship expandedRelationship; - - public RexRelationshipResponse(Integer statusCode, String exceptionText, RexExpandedRelationship expandedRelationship) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.expandedRelationship = expandedRelationship; - - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public RexExpandedRelationship getExpandedRelationship() { - return this.expandedRelationship; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setExpandedRelationship(RexExpandedRelationship expandedRelationship) { this.expandedRelationship = expandedRelationship; } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipSearchResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipSearchResponse.java deleted file mode 100644 index 246090ebdc5..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexRelationshipSearchResponse.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - -import java.util.Map; - -public class RexRelationshipSearchResponse { - - private Integer httpStatusCode; - private String exceptionText; - private String serverName; - private String searchOperation; - private String searchText; - - // Fields that contain the maps of instance summaries. - // An instance summary is much smaller than the full instance. - // The entities map is keyed by entityGUID and the value part consists of - // { entityGUID, label, gen } - // The relationships map is keyed by relationshipGUID and the value part consists of - // { relationshipGUID, end1GUID, end2GUID, idx, label, gen } - // The above value types are described by the RexEntityDigest and RexRelationshipDigest Java classes. - private Map entities; - private Map relationships; - - - public RexRelationshipSearchResponse(Integer statusCode, - String exceptionText, - String serverName, - String searchText, - String searchOperation, - Map entities, - Map relationships) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.serverName = serverName; - this.searchText = searchText; - this.searchOperation = searchOperation; - this.entities = entities; - this.relationships = relationships; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public String getServerName() { return this.serverName; } - - public String getSearchText() { return this.searchText; } - - public String getSearchOperation() { return this.searchOperation; } - - public Map getEntities() { return this.entities; } - - public Map getRelationships() { - return this.relationships; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setSearchText(String searchText) { this.searchText = searchText; } - - public void setSearchOperation(String searchOperation) { this.searchOperation = searchOperation; } - - public void setEntities(Map entities) { this.entities = entities; } - - public void setRelationships(Map relationships) { this.relationships = relationships; } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexSearchBody.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexSearchBody.java deleted file mode 100644 index eecfad04148..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexSearchBody.java +++ /dev/null @@ -1,83 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexSearchBody { - - - /* - * The RexTraversalRequestBody class provides a body for REST requests to perform a rex-traversal - */ - - private String serverName; // must be non-null - private String serverURLRoot; // must be non-null - private String searchText; // must be non-null - private Boolean enterpriseOption; - private String typeName; // filter by type, or null - private Integer gen; // indicator of the current gen of the traversal - - - public RexSearchBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getServerURLRoot() { return serverURLRoot; } - - public String getSearchText() { return searchText; } - - public String getTypeName() { return typeName; } - - public Boolean getEnterpriseOption() { return enterpriseOption; } - - public Integer getGen() { return gen; } - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setServerURLRoot(String serverURLRoot) { this.serverURLRoot = serverURLRoot; } - - public void setSearchText(String searchText) { this.searchText = searchText; } - - public void setTypeName(String typeName) { this.typeName = typeName; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setGen(Integer gen) { this.gen = gen; } - - - - - - @Override - public String toString() - { - return "RexSearchBody{" + - ", serverName=" + serverName + - ", serverURLRoot=" + serverURLRoot + - ", searchText=" + searchText + - ", enterpriseOption=" + enterpriseOption + - ", typeName=" + typeName + - ", gen=" + gen + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexSearchResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexSearchResponse.java deleted file mode 100644 index 802c734f1f5..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexSearchResponse.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - -import java.util.Map; - -public class RexSearchResponse { - - private Integer httpStatusCode; - private String exceptionText; - private String serverName; - private String searchCategory; - private String searchText; - - // Fields that contain the maps of instance summaries. - // An instance summary is much smaller than the full instance. - // The entities map is keyed by entityGUID and the value part consists of - // { entityGUID, label, gen } - // The relationships map is keyed by relationshipGUID and the value part consists of - // { relationshipGUID, end1GUID, end2GUID, idx, label, gen } - // The above value types are described by the RexEntityDigest and RexRelationshipDigest Java classes. - private Map entities; - private Map relationships; - - - public RexSearchResponse(Integer statusCode, - String exceptionText, - String serverName, - String searchText, - String searchCategory, - Map entities, - Map relationships) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.serverName = serverName; - this.searchText = searchText; - this.searchCategory = searchCategory; - this.entities = entities; - this.relationships = relationships; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public String getServerName() { return this.serverName; } - - public String getSearchText() { return this.searchText; } - - public String getSearchCategory() { return this.searchCategory; } - - public Map getEntities() { return this.entities; } - - public Map getRelationships() { - return this.relationships; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setSearchText(String searchText) { this.searchText = searchText; } - - public void setSearchCategory(String searchCategory) { this.searchCategory = searchCategory; } - - public void setEntities(Map entities) { this.entities = entities; } - - public void setRelationships(Map relationships) { this.relationships = relationships; } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversal.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversal.java deleted file mode 100644 index a7f01cc1c58..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversal.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Map; - -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) -public class RexTraversal { - - - // The RexTraversal class enables the packaging and interrogation of a traversal query - // and a summary of the results - enough information for the display in Rex ut not the - // whole InstanceGraph. - // The traversal will have been centered on an entity instance and may have been filtered by - // lists of entity types, relationship types and/or classification names. - // The graph will also have been explored to the specified depth. - // Associated with the traversal (and result) is the gen in the user sequence. - // The settings of these parameters are stored in the RexTraversal. - - - // Fields that describe the query that was performed: - private String entityGUID; // must be non-null - private List entityTypeNames; // a list of type names or null - private List relationshipTypeGUIDs; // a list of type guids or null - private List classificationNames; // a list of names or null - private Integer depth; // the depth used to create the subgraph - private Integer gen; // which generation this subgraph pertains to - private String serverName; // the name of the repo server that was traversed - - // Fields that contain the maps of instance summaries. - // An instance summary is much smaller than the full instance. - // The entities map is keyed by entityGUID and the value part consists of - // { entityGUID, label, gen } - // The relationships map is keyed by relationshipGUID and the value part consists of - // { relationshipGUID, end1GUID, end2GUID, idx, label, gen } - // The above value types are described by the RexEntityDigest and RexRelationshipDigest Java classes. - private Map entities; - private Map relationships; - - - public RexTraversal() { - - // No initialization yet - } - - /* - * Getters for Jackson - */ - - - public String getEntityGUID() { return entityGUID; } - - public List getEntityTypeNames() { return entityTypeNames; } - - public List getRelationshipTypeGUIDs() { - return relationshipTypeGUIDs; - } - - public List getClassificationNames() { - return classificationNames; - } - - public Integer getDepth() { return depth; } - - public Integer getGen() { return gen; } - - public Map getEntities() { return entities;} - - public Map getRelationships() { return relationships;} - - public String getServerName() { return serverName; } - - - - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEntityTypeNames(List entityTypeNames) { this.entityTypeNames = entityTypeNames; } - - public void setRelationshipTypeGUIDs(List relationshipTypeGUIDs) { this.relationshipTypeGUIDs = relationshipTypeGUIDs; } - - public void setClassificationNames(List classificationNames) { this.classificationNames = classificationNames; } - - public void setDepth(Integer depth) { this.depth = depth; } - - public void setGen(Integer gen) { this.gen = gen; } - - public void setEntities(Map entities) { this.entities = entities;} - - public void setRelationships(Map relationships) { this.relationships = relationships;} - - public void setServerName(String serverName) { this.serverName = serverName; } - - @Override - public String toString() - { - return "RexTraversal{" + - "entityGUID=" + entityGUID + - ", depth=" + depth + - ", gen=" + gen + - ", entityTypeNames=" + entityTypeNames + - ", relationshipTypeGUIDs=" + relationshipTypeGUIDs + - ", classificationNames=" + classificationNames + - ", entities=" + entities + - ", relationships=" + relationships + - ", serverName=" + serverName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversalRequestBody.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversalRequestBody.java deleted file mode 100644 index 572eeaa1479..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversalRequestBody.java +++ /dev/null @@ -1,111 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; - -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) -public class RexTraversalRequestBody { - - - /* - * The RexTraversalRequestBody class provides a body for REST requests to perform a rex-traversal - */ - - private String serverName; // must be non-null - private String serverURLRoot; // must be non-null - private String entityGUID; // must be non-null, GUID of root of traversal - private Boolean enterpriseOption; - private List entityTypeGUIDs; // a list of type guids or null - private List relationshipTypeGUIDs; // a list of type guids or null - private List classificationNames; // a list of names or null - private Integer depth; // the depth of traversal - private Integer gen; // indicator of the current gen of the traversal - - - public RexTraversalRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getServerURLRoot() { return serverURLRoot; } - - public String getEntityGUID() { return entityGUID; } - - public Boolean getEnterpriseOption() { return enterpriseOption; } - - public List getEntityTypeGUIDs() { return entityTypeGUIDs; } - - public List getRelationshipTypeGUIDs() { - return relationshipTypeGUIDs; - } - - public List getClassificationNames() { - return classificationNames; - } - - public Integer getDepth() { return depth; } - - public Integer getGen() { return gen; } - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setServerURLRoot(String serverURLRoot) { this.serverURLRoot = serverURLRoot; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setEntityTypeGUIDs(List entityTypeGUIDs) { this.entityTypeGUIDs = entityTypeGUIDs; } - - public void setRelationshipTypeGUIDs(List relationshipTypeGUIDs) { - this.relationshipTypeGUIDs = relationshipTypeGUIDs; - } - - public void setClassificationNames(List classificationNames) { - this.classificationNames = classificationNames; - } - - public void setDepth(Integer depth) { this.depth = depth; } - - public void setGen(Integer gen) { this.gen = gen; } - - - - - - @Override - public String toString() - { - return "RexTraversalRequestBody{" + - ", serverName=" + serverName + - ", serverURLRoot=" + serverURLRoot + - ", entityGUID=" + entityGUID + - ", depth=" + depth + - ", enterpriseOption=" + enterpriseOption + - ", entityTypeGUIDs=" + entityTypeGUIDs + - ", relationshipTypeGUIDs=" + relationshipTypeGUIDs + - ", classificationNames=" + classificationNames + - ", gen=" + gen + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversalResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversalResponse.java deleted file mode 100644 index 1a7cdecb9cc..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTraversalResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - - -public class RexTraversalResponse { - - private Integer httpStatusCode; - private String exceptionText; - private RexTraversal rexTraversal; - - public RexTraversalResponse(Integer statusCode, String exceptionText, RexTraversal rexTraversal) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.rexTraversal = rexTraversal; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public RexTraversal getRexTraversal() { - return this.rexTraversal; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setRexTraversal(RexTraversal rexTraversal) - { - this.rexTraversal = rexTraversal; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTypeStats.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTypeStats.java deleted file mode 100644 index 4d360032797..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTypeStats.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - - -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) -public class RexTypeStats { - - private String typeGUID; - private Integer count; - - public RexTypeStats(String typeGUID, Integer count) { - this.typeGUID = typeGUID; - this.count = count; - } - - /* - * Getters for Jackson - */ - - public String getTypeGUID() { return typeGUID; } - public Integer getCount() { return count; } - - - - public void setTypeGUID(String typeGUID) { this.typeGUID = typeGUID; } - public void setCount(Integer count) { this.count = count; } - - - - @Override - public String toString() - { - return "RexTypeStats{" + - ", typeGUID=" + typeGUID + - ", count=" + count + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTypesRequestBody.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTypesRequestBody.java deleted file mode 100644 index b5b86fe6941..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/RexTypesRequestBody.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - - -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) -public class RexTypesRequestBody { - - - /* - * The RexTypesRequestBody class provides a body for REST requests to perform a load of type information - */ - - private String serverName; // must be non-null - private String serverURLRoot; // must be non-null - private Boolean enterpriseOption; - - - public RexTypesRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getServerURLRoot() { return serverURLRoot; } - - public Boolean getEnterpriseOption() { return enterpriseOption; } - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setServerURLRoot(String serverURLRoot) { this.serverURLRoot = serverURLRoot; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - - - @Override - public String toString() - { - return "RexTypesRequestBody{" + - ", serverName=" + serverName + - ", serverURLRoot=" + serverURLRoot + - ", enterpriseOption=" + enterpriseOption + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/TypeExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/TypeExplorer.java deleted file mode 100644 index 7901dbad34c..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/TypeExplorer.java +++ /dev/null @@ -1,285 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -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) -public class TypeExplorer { - - - private Map entities; - private Map relationships; - private Map classifications; - private Map enums; - - private Map entityTypeGUIDToName; - private Map entityTypeNameToGUID; - - private Map relationshipTypeGUIDToName; - private Map relationshipTypeNameToGUID; - - - public TypeExplorer() { - entities = new HashMap<>(); - relationships = new HashMap<>(); - classifications = new HashMap<>(); - enums = new HashMap<>(); - entityTypeGUIDToName = new HashMap<>(); - entityTypeNameToGUID = new HashMap<>(); - relationshipTypeGUIDToName = new HashMap<>(); - relationshipTypeNameToGUID = new HashMap<>(); - } - - /* - * Getters for Jackson - */ - public Map getEntities() { - return entities; - } - - public Map getRelationships() { - return relationships; - } - - public Map getClassifications() { - return classifications; - } - - public Map getEnums() { - return enums; - } - - public Map getEntityTypeGUIDToName() { - return entityTypeGUIDToName; - } - - public Map getEntityTypeNameToGUID() { - return entityTypeNameToGUID; - } - - public Map getRelationshipyTypeGUIDToName() { - return relationshipTypeGUIDToName; - } - - public Map getRelationshipTypeNameToGUID() { - return relationshipTypeNameToGUID; - } - - public void addEntityExplorer(String entityTypeName, EntityExplorer entityExplorer) { - entities.put(entityTypeName, entityExplorer); - String typeGUID = entityExplorer.getEntityDef().getGUID(); - entityTypeGUIDToName.put(typeGUID, entityTypeName); - entityTypeNameToGUID.put(entityTypeName, typeGUID); - } - - public void addRelationshipExplorer(String relationshipTypeName, RelationshipExplorer relationshipExplorer) { - relationships.put(relationshipTypeName, relationshipExplorer); - String typeGUID = relationshipExplorer.getRelationshipDef().getGUID(); - relationshipTypeGUIDToName.put(typeGUID, relationshipTypeName); - relationshipTypeNameToGUID.put(relationshipTypeName, typeGUID); - } - - public void addClassificationExplorer(String classificationTypeName, ClassificationExplorer classificationExplorer) { - classifications.put(classificationTypeName, classificationExplorer); - } - - public void addEnumExplorer(String enumTypeName, EnumDef enumDef) { - enums.put(enumTypeName, enumDef); - } - - public void resolve() { - - /* - * After all types have been loaded, call the resolver methods to expand the TEX for each type category - * Order is important, entities are expanded first. - */ - - resolveEntities(); - resolveRelationships(); - resolveClassifications(); - - } - - private void resolveEntities() { - - // For each entityExplorer add it to its superType's subTypes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - // Not every entity type has a superType - if (superType != null) { - String superTypeName = superType.getName(); - // Find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - superTypeExplorer.addSubTypName(entityTypeName); - } - } - - // For each entityExplorer resolve its full list of attributes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - // find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - EntityDef superDef = superTypeExplorer.getEntityDef(); - List superAttributes = superDef.getPropertiesDefinition(); - entityExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void resolveRelationships() - { - // For each relationshipExplorer gets its end types and add the relationship type to each of the entity types - for (String relationshipTypeName : relationships.keySet()) { - - RelationshipExplorer relationshipExplorer = relationships.get(relationshipTypeName); - RelationshipEndDef entityOneDef = relationshipExplorer.getRelationshipDef().getEndDef1(); - RelationshipEndDef entityTwoDef = relationshipExplorer.getRelationshipDef().getEndDef2(); - - if (entityOneDef != null) { - String entityOneTypeName = entityOneDef.getEntityType().getName(); - EntityExplorer entityOneExplorer = entities.get(entityOneTypeName); - entityOneExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityOneExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - - if (entityTwoDef != null) { - String entityTwoTypeName = entityTwoDef.getEntityType().getName(); - EntityExplorer entityTwoExplorer = entities.get(entityTwoTypeName); - entityTwoExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityTwoExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - - - } - } - - private void addRelationshipToSubType(String relationshipTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedRelationship(relationshipTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - } - - - private void resolveClassifications() - { - // For each classificationExplorer add its name to the known classifications for its valid entity types - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - List validEntityTypes = classificationExplorer.getClassificationDef().getValidEntityDefs(); - if (validEntityTypes != null) { - for (TypeDefLink entityType : validEntityTypes) { - String entityTypeName = entityType.getName(); - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addClassification(classificationTypeName); - List subTypeNames = entityExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addClassificationToSubType(classificationTypeName,subTypeName); - } - } - } - } - - // For each classificationExplorer add it to its superType's subTypes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - if (superType != null) { - String superTypeName = superType.getName(); - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - superTypeExplorer.addSubTypeName(classificationTypeName); - } - } - - // For each classificationExplorer resolve its full list of attributes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - ClassificationDef superDef = superTypeExplorer.getClassificationDef(); - List superAttributes = superDef.getPropertiesDefinition(); - classificationExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void addClassificationToSubType(String classificationTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedClassification(classificationTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addClassificationToSubType(classificationTypeName,subTypeName); - } - } - } - - public String getEntityTypeName(String entityTypeGUID) { - return entityTypeGUIDToName.get(entityTypeGUID); - } - public String getEntityTypeGUID(String entityTypeName) { - return entityTypeNameToGUID.get(entityTypeName); - } - public String getRelationshipTypeName(String relationshipTypeGUID) { return entityTypeGUIDToName.get(relationshipTypeGUID); } - public String getRelationshipTypeGUID(String relationshipTypeName) { return relationshipTypeNameToGUID.get(relationshipTypeName); } - - @Override - public String toString() - { - return "TypeExplorer{" + - "entities=" + entities + - ", relationships=" + relationships + - ", classifications=" + classifications + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/TypeExplorerResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/TypeExplorerResponse.java deleted file mode 100644 index 29878eccbd0..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/TypeExplorerResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; - - - -public class TypeExplorerResponse { - - private Integer httpStatusCode; - private String exceptionText; - private TypeExplorer typeExplorer; - - public TypeExplorerResponse(Integer statusCode, String exceptionText, TypeExplorer tex) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.typeExplorer = tex; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public TypeExplorer getTypeExplorer() { - return this.typeExplorer; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setTypeExplorer(TypeExplorer typeExplorer) - { - this.typeExplorer = typeExplorer; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/package-info.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/package-info.java deleted file mode 100644 index f89c3d352f7..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/rex/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * @deprecated {@link org.odpi.openmetadata.userinterface.uichassis.springboot.service.view} - */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.rex; \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/AppBean.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/AppBean.java deleted file mode 100644 index 017167edc06..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/AppBean.java +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.settings; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import java.io.Serializable; - -/** - * App bean used to store app description - */ -@Component -public class AppBean implements Serializable { - private final String title; - private final String description; - - public AppBean(@Value("${app.title: }") String title, - @Value("${app.description: }") String description){ - this.title = title; - this.description = description; - } - - /** - * @return title field - */ - public String getTitle() { - return title; - } - - /** - * @return description field - */ - public String getDescription() { - return description; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/PublicController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/PublicController.java deleted file mode 100644 index 968f4ad9fd0..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/PublicController.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.settings; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import jakarta.servlet.http.HttpServletRequest; - - -@RestController -@RequestMapping("/api/public") -public class PublicController { - - @Autowired - AppBean app; - - /** - * - * @param request the http servlet request - * @return an AppBean that contains the app build information - */ - @GetMapping( path = "/app/info") - public AppBean getAppTitle(HttpServletRequest request){ - return app; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/SettingsController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/SettingsController.java deleted file mode 100644 index 0066f56c05b..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/SettingsController.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.settings; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - - -@RestController -public class SettingsController { - - @Value("${omas.server.name}") - String serverName; - - @Value("${omas.server.url}") - String serverUrl; - - @Value("${omas.asset.catalog.page.size}") - String pageSize; - - /** - * @return omas settings object - */ - @GetMapping(value = "/api/ui/settings") - public UISettings getUISettings() { - return new UISettings(serverName, serverUrl, pageSize); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/UISettings.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/UISettings.java deleted file mode 100644 index b57578f1e0b..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/settings/UISettings.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.settings; - -import java.io.Serializable; - -/** - * Encapsulates server base url and the serverName form the configuration. - * The purpose is to be consumed in order to compute the url for registry repository view - */ -public class UISettings implements Serializable { - String serverName; - String baseUrl; - String pageSize; - - public UISettings(String serverName, String baseUrl, String pageSize) { - this.serverName = serverName; - this.baseUrl = baseUrl; - this.pageSize = pageSize; - } - - public String getServerName() { - return serverName; - } - - public String getBaseUrl() { - return baseUrl; - } - - public String getPageSize() { - return pageSize; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/ClassificationExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/ClassificationExplorer.java deleted file mode 100644 index ca98cbbd3e9..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/ClassificationExplorer.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.tex; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - -public class ClassificationExplorer { - - private ClassificationDef classificationDef; - private List inheritedAttributes; - private List subTypeNames; - - - public ClassificationExplorer(ClassificationDef def) { - classificationDef = def; - } - - public ClassificationDef getClassificationDef() { return classificationDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public void addSubTypeName(String subTypeName) { - if (subTypeNames == null) { - subTypeNames = new ArrayList<>(); - } - subTypeNames.add(subTypeName); - } - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - if (inheritedAttributes == null) { - inheritedAttributes = new ArrayList<>(); - } - inheritedAttributes.addAll(inheritedAttrs); - } - } - -} - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/EntityExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/EntityExplorer.java deleted file mode 100644 index 64ac0229634..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/EntityExplorer.java +++ /dev/null @@ -1,83 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.tex; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - - -public class EntityExplorer { - - private EntityDef entityDef; - private List inheritedAttributes; - private List subTypeNames; - private List classificationNames; - private List relationshipNames; - private List inheritedRelationshipNames; - private List inheritedClassificationNames; - - - public EntityExplorer(EntityDef def) { - entityDef = def; - inheritedAttributes = new ArrayList<>(); - subTypeNames = new ArrayList<>(); - classificationNames = new ArrayList<>(); - relationshipNames = new ArrayList<>(); - inheritedRelationshipNames = new ArrayList<>(); - inheritedClassificationNames = new ArrayList<>(); - - } - - public EntityDef getEntityDef() { return entityDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public List getClassificationNames() { return classificationNames; } - - public List getRelationshipNames() { return relationshipNames; } - - public List getInheritedRelationshipNames() { return inheritedRelationshipNames; } - - public List getInheritedClassificationNames() { return inheritedClassificationNames; } - - public void addSubTypName(String subTypeName) { - subTypeNames.add(subTypeName); - } - - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - inheritedAttributes.addAll(inheritedAttrs); - } - } - - public void addRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - relationshipNames.add(relationshipTypeName); - } - } - - public void addInheritedRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - inheritedRelationshipNames.add(relationshipTypeName); - } - } - - public void addClassification(String classificationName) { - if (classificationName != null) { - classificationNames.add(classificationName); - } - } - - public void addInheritedClassification(String classificationName) { - if (classificationName != null) { - inheritedClassificationNames.add(classificationName); - } - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/RelationshipExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/RelationshipExplorer.java deleted file mode 100644 index 1661f909d82..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/RelationshipExplorer.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.tex; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; - - -public class RelationshipExplorer { - - private RelationshipDef relationshipDef; - - - public RelationshipExplorer(RelationshipDef def) { - relationshipDef = def; - } - - public RelationshipDef getRelationshipDef() { return relationshipDef; } -} - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorer.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorer.java deleted file mode 100644 index 8cd7d90507b..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorer.java +++ /dev/null @@ -1,246 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.tex; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -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) -public class TypeExplorer { - - - private Map entities; - private Map relationships; - private Map classifications; - private Map enums; - - - public TypeExplorer() { - entities = new HashMap<>(); - relationships = new HashMap<>(); - classifications = new HashMap<>(); - enums = new HashMap<>(); - } - - /* - * Getters for Jackson - */ - public Map getEntities() { - return entities; - } - - public Map getRelationships() { - return relationships; - } - - public Map getClassifications() { - return classifications; - } - - public Map getEnums() { - return enums; - } - - - public void addEntityExplorer(String entityTypeName, EntityExplorer entityExplorer) { - entities.put(entityTypeName, entityExplorer); - } - - public void addRelationshipExplorer(String relationshipTypeName, RelationshipExplorer relationshipExplorer) { - relationships.put(relationshipTypeName, relationshipExplorer); - } - - public void addClassificationExplorer(String classificationTypeName, ClassificationExplorer classificationExplorer) { - classifications.put(classificationTypeName, classificationExplorer); - } - - public void addEnumExplorer(String enumTypeName, EnumDef enumDef) { - enums.put(enumTypeName, enumDef); - } - - public void resolve() { - - /* - * After all types have been loaded, call the resolver methods to expand the TEX for each type category - * Order is important, entities are expanded first. - */ - - resolveEntities(); - resolveRelationships(); - resolveClassifications(); - - } - - private void resolveEntities() { - - // For each entityExplorer add it to its superType's subTypes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - // Not every entity type has a superType - if (superType != null) { - String superTypeName = superType.getName(); - // Find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - superTypeExplorer.addSubTypName(entityTypeName); - } - } - - // For each entityExplorer resolve its full list of attributes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - // find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - EntityDef superDef = superTypeExplorer.getEntityDef(); - List superAttributes = superDef.getPropertiesDefinition(); - entityExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void resolveRelationships() - { - // For each relationshipExplorer gets its end types and add the relationship type to each of the entity types - for (String relationshipTypeName : relationships.keySet()) { - - RelationshipExplorer relationshipExplorer = relationships.get(relationshipTypeName); - RelationshipEndDef entityOneDef = relationshipExplorer.getRelationshipDef().getEndDef1(); - RelationshipEndDef entityTwoDef = relationshipExplorer.getRelationshipDef().getEndDef2(); - - if (entityOneDef != null) { - String entityOneTypeName = entityOneDef.getEntityType().getName(); - EntityExplorer entityOneExplorer = entities.get(entityOneTypeName); - entityOneExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityOneExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - - if (entityTwoDef != null) { - String entityTwoTypeName = entityTwoDef.getEntityType().getName(); - EntityExplorer entityTwoExplorer = entities.get(entityTwoTypeName); - entityTwoExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityTwoExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - - - } - } - - private void addRelationshipToSubType(String relationshipTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedRelationship(relationshipTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - } - - - private void resolveClassifications() - { - // For each classificationExplorer add its name to the known classifications for its valid entity types - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - List validEntityTypes = classificationExplorer.getClassificationDef().getValidEntityDefs(); - if (validEntityTypes != null) { - for (TypeDefLink entityType : validEntityTypes) { - String entityTypeName = entityType.getName(); - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addClassification(classificationTypeName); - List subTypeNames = entityExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addClassificationToSubType(classificationTypeName,subTypeName); - } - } - } - } - - // For each classificationExplorer add it to its superType's subTypes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - if (superType != null) { - String superTypeName = superType.getName(); - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - superTypeExplorer.addSubTypeName(classificationTypeName); - } - } - - // For each classificationExplorer resolve its full list of attributes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - ClassificationDef superDef = superTypeExplorer.getClassificationDef(); - List superAttributes = superDef.getPropertiesDefinition(); - classificationExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void addClassificationToSubType(String classificationTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedClassification(classificationTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addClassificationToSubType(classificationTypeName,subTypeName); - } - } - } - - @Override - public String toString() - { - return "TypeExplorer{" + - "entities=" + entities + - ", relationships=" + relationships + - ", classifications=" + classifications + - '}'; - } - - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorerController.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorerController.java deleted file mode 100644 index 9f612f6f523..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorerController.java +++ /dev/null @@ -1,227 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.tex; - - -import org.odpi.openmetadata.repositoryservices.clients.LocalRepositoryServicesClient; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.SecureController; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; -import java.util.Map; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefGallery; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; - -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.bind.annotation.PostMapping; - -import jakarta.servlet.http.HttpServletRequest; - - -/** - * The TypeExplorerRESTServicesInstance provides the server-side implementation - * of the TypeExplorer UI-component - */ -@RestController -public class TypeExplorerController extends SecureController -{ - - private static String className = TypeExplorerController.class.getName(); - private static final Logger LOG = LoggerFactory.getLogger(className); - - - String metadataCollectionId; - OMRSMetadataCollection metadataCollection; - - /** - * Default constructor - * - */ - public TypeExplorerController() { - metadataCollectionId = null; - metadataCollection = null; - } - - - /* - * This method retrieves all the types from the server in a TypeExplorer object. - * In the RequestBody: - * serverName is the name of the repository server to be interrogated. - * serverURLRoot is the root of the URL to use to connect to the server. - * enterpriseOption is a string "true" or "false" indicating whether to include results from the cohorts to which the server belongs - */ - - @PostMapping( path = "/api/types/typeExplorer") - public TypeExplorerResponse typeExplorer(@RequestBody Map body, HttpServletRequest request) - { - - String serverName = body.get("serverName"); - String serverURLRoot = body.get("serverURLRoot"); - boolean enterpriseOption = body.get("enterpriseOption").equals("true"); - - String userId = SecurityContextHolder.getContext().getAuthentication().getName(); - - // Look up types in server and construct TEX - TypeExplorerResponse texResp; - String exceptionMessage; - - try { - - TypeExplorer tex = this.getTypeExplorer(userId, serverName, serverURLRoot, enterpriseOption); - - if (tex != null) { - texResp = new TypeExplorerResponse(200, "", tex); - } else { - texResp = new TypeExplorerResponse(400, "Could not retrieve type information", null); - } - return texResp; - } - catch (UserNotAuthorizedException e) { - - exceptionMessage = "Sorry - this username was not authorized to perform the request"; - } - catch (RepositoryErrorException e) { - - exceptionMessage = "The repository could not be reached, please check the server name and URL root and verify that the server is running "; - } - catch (InvalidParameterException e) { - - exceptionMessage = "The request to load type information reported an invalid parameter, please check the server name and URL root parameters"; - } - // For any of the above exceptions, incorporate the exception message into a response object - texResp = new TypeExplorerResponse(400, exceptionMessage, null); - - return texResp; - - } - - - /** - * getTypeExplorer - * - * This method will get a repository services client and then access the repository for its type information, - * which is the processed into a TypeExplorer object. The resolve method of the TEX object is then invoked, - * which will elaborate the type information, adding cross-references for easy manipulation in a UI cpt. - * - * @param userId - * @param serverName - * @param serverURLRoot - * @param enterpriseOption - * @throws InvalidParameterException - */ - private TypeExplorer getTypeExplorer(String userId, - String serverName, - String serverURLRoot, - boolean enterpriseOption) - throws - UserNotAuthorizedException, - RepositoryErrorException, - InvalidParameterException - { - - try { - - // TODO - add switch for enterprise option - - LocalRepositoryServicesClient repositoryServicesClient = this.getLocalRepositoryServicesClient(serverName, serverURLRoot); - - TypeExplorer tex = new TypeExplorer(); - - TypeDefGallery typeDefGallery = repositoryServicesClient.getAllTypes(userId); - - List typeDefs = typeDefGallery.getTypeDefs(); - for (TypeDef typeDef : typeDefs) { - TypeDefCategory tdCat = typeDef.getCategory(); - switch (tdCat) { - case ENTITY_DEF: - EntityExplorer eex = new EntityExplorer((EntityDef) typeDef); - tex.addEntityExplorer(typeDef.getName(), eex); - break; - case RELATIONSHIP_DEF: - RelationshipExplorer rex = new RelationshipExplorer((RelationshipDef) typeDef); - tex.addRelationshipExplorer(typeDef.getName(), rex); - break; - case CLASSIFICATION_DEF: - ClassificationExplorer cex = new ClassificationExplorer((ClassificationDef) typeDef); - tex.addClassificationExplorer(typeDef.getName(), cex); - break; - default: - // Ignore this typeDef and continue with next - break; - } - } - - // Include EnumDefs in the TEX - List attributeTypeDefs = typeDefGallery.getAttributeTypeDefs(); - for (AttributeTypeDef attributeTypeDef : attributeTypeDefs) { - AttributeTypeDefCategory tdCat = attributeTypeDef.getCategory(); - switch (tdCat) { - case ENUM_DEF: - tex.addEnumExplorer(attributeTypeDef.getName(), (EnumDef)attributeTypeDef); - break; - default: - // Ignore this AttributeTypeDef and continue with next - break; - } - } - - // All typeDefs processed, resolve linkages and return the TEX object - tex.resolve(); - return tex; - - } - catch (UserNotAuthorizedException | - RepositoryErrorException | - InvalidParameterException e ) { - throw e; - } - - } - - /** - * getLocalRepositoryServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * MetadataCollection interface. This client is used when the enterprise option is not set, and will - * connect to the local repository. - * - * @param serverName - * @param serverURLRoot - * @throws InvalidParameterException - */ - private LocalRepositoryServicesClient getLocalRepositoryServicesClient(String serverName, - String serverURLRoot) - throws - InvalidParameterException - { - /* - * The serverName is used as the repositoryName - * The serverURLRoot is used as part of the restURLRoot, along with the serverName - */ - - /* - * The only exception thrown by the CTOR is InvalidParameterException, and this is not caught - * here because we want to surface it to the REST API that called this method so that the - * exception can be wrapped and a suitable indication sent in the REST Response. - */ - String restURLRoot = serverURLRoot + "/servers/" + serverName; - LocalRepositoryServicesClient client = new LocalRepositoryServicesClient(serverName, restURLRoot); - - return client; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorerResponse.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorerResponse.java deleted file mode 100644 index b3133e953ca..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/TypeExplorerResponse.java +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.tex; - -public class TypeExplorerResponse { - - private Integer httpStatusCode; - private String exceptionText; - private TypeExplorer typeExplorer; - - public TypeExplorerResponse(Integer statusCode, String exceptionText, TypeExplorer tex) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.typeExplorer = tex; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public TypeExplorer getTypeExplorer() { - return this.typeExplorer; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setTypeExplorer(TypeExplorer typeExplorer) - { - this.typeExplorer = typeExplorer; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/package-info.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/package-info.java deleted file mode 100644 index c42cceccb15..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/api/tex/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * @deprecated {@link org.odpi.openmetadata.userinterface.uichassis.springboot.service.view} - */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.api.tex; \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auditlog/ViewServiceAuditCode.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auditlog/ViewServiceAuditCode.java deleted file mode 100644 index d41808d0154..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auditlog/ViewServiceAuditCode.java +++ /dev/null @@ -1,133 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auditlog; - -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - -import java.text.MessageFormat; - -/** - * The AssetConsumerAuditCode is used to define the message content for the OMRS Audit Log. - *

- * The 5 fields in the enum are: - *

    - *
  • Log Message Id - 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 ViewServiceAuditCode { - SERVICE_INITIALIZING("OMVS-VIEW-0001", - OMRSAuditLogRecordSeverity.INFO, - "The {1} Open Metadata View Service (OMVS) is initializing for server {0}", - "The {1} OMVS has started initialization.", - "No action is required. This is part of the normal operation of the service."), - - SERVICE_INITIALIZED("OMVS-VIEW-0003", - OMRSAuditLogRecordSeverity.INFO, - "The {1} Open Metadata View Service (OMVS) has initialized for server {0}", - "The {1} OMVS has completed initialization.", - "No action is required. This is part of the normal operation of the service."), - - SERVICE_SHUTDOWN("OMVS-VIEW-0004", - OMRSAuditLogRecordSeverity.INFO, - "Open Metadata View Service (OMVS) is shutting down for server {0}", - "The local server has requested shut down of a OMVS instance.", - "No action is required. This is part of the normal operation of the service."), - - SERVICE_INSTANCE_FAILURE("OMAS-VIEW-0005", - OMRSAuditLogRecordSeverity.ERROR, - "The {0} Open Metadata View Service (OMVS) is unable to initialize a new instance; error message is {1}", - "The view service detected an error during the start up of a specific server instance. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - UNKNOWN_SERVICE_INITIALIZING("OMVS-VIEW-0001", - OMRSAuditLogRecordSeverity.INFO, - "A Open Metadata View Service (OMVS) is initializing for server {0}", - "The local server is initializing a new instance a OMVS.", - "No action is required. This is part of the normal operation of the service.") - ; - - private String logMessageId; - private OMRSAuditLogRecordSeverity severity; - private String logMessage; - private String systemAction; - private String userAction; - - - /** - * The constructor for OMRSAuditCode expects to be passed one of the enumeration rows defined in - * OMRSAuditCode above. For example: - *

- * OMRSAuditCode auditCode = OMRSAuditCode.SERVER_NOT_AVAILABLE; - *

- * This will expand out to the 5 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 - */ - ViewServiceAuditCode(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; - } - - /** - * Returns the unique identifier for the error message. - * - * @return logMessageId - */ - public String getLogMessageId() { - return logMessageId; - } - - - /** - * Return the severity of the audit log record. - * - * @return OMRSAuditLogRecordSeverity enum - */ - public OMRSAuditLogRecordSeverity getSeverity() { - return severity; - } - - /** - * Returns the log message with the placeholders filled out with the supplied parameters. - * - * @param params - strings that plug into the placeholders in the logMessage - * @return logMessage (formatted with supplied parameters) - */ - public String getFormattedLogMessage(String... params) { - MessageFormat mf = new MessageFormat(logMessage); - return mf.format(params); - } - - - /** - * Returns a description of the action taken by the system when the condition that caused this exception was - * detected. - * - * @return systemAction String - */ - public String getSystemAction() { - return systemAction; - } - - - /** - * Returns instructions of how to resolve the issue reported in this exception. - * - * @return userAction String - */ - public String getUserAction() { - return userAction; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/AuthenticationExceptionHandler.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/AuthenticationExceptionHandler.java deleted file mode 100644 index 0c030899cb5..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/AuthenticationExceptionHandler.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - -import org.springframework.security.core.AuthenticationException; - -/** - * Handles AuthenticationException for different instances of WebSecurityConfigurerAdapter used for different - * authentication mechanism used - */ -public interface AuthenticationExceptionHandler { - - /** - * - * @param e the AuthenticationException thrown by authentication attempt - * @return whether or not is an bad credentials related exception - */ - boolean isBadCredentials(AuthenticationException e); -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/KeyPairGeneratorUtils.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/KeyPairGeneratorUtils.java deleted file mode 100644 index bbd929b8613..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/KeyPairGeneratorUtils.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - -import java.security.KeyPair; -import java.security.KeyPairGenerator; - -final class KeyPairGeneratorUtils { - - static KeyPair generateRsaKey() { - KeyPair keyPair; - try { - KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); - keyPairGenerator.initialize(2048); - keyPair = keyPairGenerator.generateKeyPair(); - } catch (Exception ex) { - throw new IllegalStateException(ex); - } - return keyPair; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/LoggingRequestFilter.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/LoggingRequestFilter.java deleted file mode 100644 index 798d4392201..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/LoggingRequestFilter.java +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - -import org.slf4j.MDC; - -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import jakarta.servlet.http.HttpServletRequest; -import java.io.IOException; -import java.util.Collections; - -public class LoggingRequestFilter implements Filter { - private String path; - - public LoggingRequestFilter(String path) { - this.path = path; - } - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - - } - - @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - HttpServletRequest httpRequest = (HttpServletRequest) servletRequest; - String requestURI = httpRequest.getRequestURI(); - if (!path.equals(requestURI)) { - filterChain.doFilter(servletRequest, servletResponse); - return; - } - MDC.put("remoteAddress", httpRequest.getRemoteAddr()); - MDC.put("remoteHost", httpRequest.getRemoteHost()); - MDC.put("username", httpRequest.getParameter("username")); - MDC.put("sessionId", httpRequest.getSession().getId()); - - Collections.list(httpRequest.getHeaderNames()).forEach(name -> MDC.put(name, httpRequest.getHeader(name))); - filterChain.doFilter(servletRequest, servletResponse); - } - - @Override - public void destroy() { - MDC.clear(); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/RSAGenerator.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/RSAGenerator.java deleted file mode 100644 index e338c66f123..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/RSAGenerator.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - -import com.nimbusds.jose.jwk.RSAKey; - -import java.security.KeyPair; -import java.security.interfaces.RSAPrivateKey; -import java.security.interfaces.RSAPublicKey; -import java.util.UUID; - -final class RSAGenerator { - - public static RSAKey generateRsa() { - KeyPair keyPair = KeyPairGeneratorUtils.generateRsaKey(); - RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); - RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); - return new RSAKey.Builder(publicKey) - .privateKey(privateKey) - .keyID(UUID.randomUUID().toString()) - .build(); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/RoleService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/RoleService.java deleted file mode 100644 index 2bb29cf5ab6..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/RoleService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.ComponentService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Collection; -import java.util.Set; -import java.util.stream.Collectors; - -@Service -public class RoleService { - - @Autowired - ComponentService componentService; - - /** - * - * @param userRoles collection of roles of user - * @return the intersection between all user roles and roles used for the application - */ - public Collection extractUserAppRoles(Collection userRoles) { - Collection appRoles = componentService.getAppRoles(); - return userRoles.stream() - .filter( appRoles::contains ) - .collect( Collectors.toSet() ); - } - - public Set getVisibleComponents(Collection roles){ - return componentService.getVisibleComponentsForRoles(roles); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/SecurityConfig.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/SecurityConfig.java deleted file mode 100644 index 12fedfb7bbc..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/SecurityConfig.java +++ /dev/null @@ -1,113 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - - -import com.nimbusds.jose.JOSEException; -import com.nimbusds.jose.jwk.JWKSet; -import com.nimbusds.jose.jwk.RSAKey; -import com.nimbusds.jose.jwk.source.JWKSource; -import com.nimbusds.jose.proc.SecurityContext; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.AuthenticationProvider; -import org.springframework.security.authentication.ProviderManager; -import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; -import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer; -import org.springframework.security.config.http.SessionCreationPolicy; -import org.springframework.security.oauth2.jwt.JwtDecoder; -import org.springframework.security.oauth2.jwt.JwtEncoder; -import org.springframework.security.oauth2.jwt.NimbusJwtDecoder; -import org.springframework.security.oauth2.jwt.NimbusJwtEncoder; -import org.springframework.security.web.SecurityFilterChain; -import org.springframework.web.servlet.config.annotation.CorsRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -import java.util.List; - -/** - * Configuration of HttpSecurity for Spring security - */ -@EnableWebSecurity -@EnableMethodSecurity -@Configuration -public class SecurityConfig { - - @Value("${cors.allowed-origins}") - List allowedOrigins; - - - @Bean - public AuthenticationManager authManager(AuthenticationProvider authProvider) { - return new ProviderManager(authProvider); - } - - @Value("${ldap.user.search.base}") - protected String userSearchBase; - - @Value("${ldap.user.search.filter}") - protected String userSearchFilter; - - private RSAKey rsaKey = RSAGenerator.generateRsa(); - - @Bean - public JWKSource jwkSource() { - rsaKey = RSAGenerator.generateRsa(); - JWKSet jwkSet = new JWKSet(rsaKey); - return (jwkSelector, securityContext) -> jwkSelector.select(jwkSet); - } - - @Bean - JwtEncoder jwtEncoder(JWKSource jwks) { - return new NimbusJwtEncoder(jwks); - } - - @Bean - JwtDecoder jwtDecoder() throws JOSEException { - return NimbusJwtDecoder.withPublicKey(rsaKey.toRSAPublicKey()).build(); - } - - /** - *Returns WebMvcConfigurer for the cors configuration - * The bean is based on springboot configuration property cors.allowed-origins - */ - @Bean - @ConditionalOnProperty(value = "cors.allowed-origins") - public WebMvcConfigurer corsConfigurer() { - return new WebMvcConfigurer() { - @Override - public void addCorsMappings( CorsRegistry registry ) { - registry.addMapping("/**") - .allowedOrigins(allowedOrigins.toArray(new String[]{})) - .allowedMethods("GET","POST","PUT","DELETE") - .allowedHeaders("Authorization","Content-type"); - } - }; - } - - @Bean - public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { - return http - .cors().and() - .csrf(AbstractHttpConfigurer::disable) - .authorizeHttpRequests( auth -> auth - .requestMatchers("/api/token").permitAll() - .requestMatchers("/api/public/**").permitAll() - .requestMatchers("/swagger-ui/**").permitAll() - .requestMatchers("/v3/api-docs/**").permitAll() - .anyRequest().authenticated() - ) - .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt) - .build(); - } - -} - - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/TokenClient.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/TokenClient.java deleted file mode 100644 index be5119b216f..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/TokenClient.java +++ /dev/null @@ -1,70 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - -/** - * TokenOption is used to have statefull webtoken by using persistence and expiration validation - */ -public interface TokenClient { - - /** - * shut down client connection - */ - default void shutdownClient(){}; - - /** - * - * @param token the token - * @param seconds for absolute timeout - * @param expiration representation of expiration - * @return the persistence response - */ - default String set(String token, long seconds, String expiration){ - return null; - }; - - /** - * - * @param token the token - * @param expiration representation of expiration - * @return the persistence response - */ - default String set(String token, String expiration){ - return null; - }; - - /** - * Used to postpone expiration but keep existing absolute timeout - * @param token the token - * @param expiration representation of expiration - * @return the persistence response - */ - default String setKeepTTL(String token, String expiration){ - return null; - }; - - - /** - * retrieve expiration from persistence - * @param token the token - * @return expiration or null if token doesn't exist - */ - default String get(String token){ - return null; - }; - - /** - * retrieve the absolute timeout of token in seconds - * @param token the token to determine ttl for - * @return the ttl for the token - */ - default Long ttl(String token){ - return null; - }; - - /** - * - * @param tokens the tokens to be removed from persistence - */ - default void del(String... tokens){ }; -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/TokenLogoutSuccessHandler.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/TokenLogoutSuccessHandler.java deleted file mode 100644 index 3289149f360..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/TokenLogoutSuccessHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.Authentication; -import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; -import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler; - -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import java.io.IOException; - -public class TokenLogoutSuccessHandler extends - SimpleUrlLogoutSuccessHandler implements LogoutSuccessHandler { - - private static final Logger log = LoggerFactory.getLogger( TokenLogoutSuccessHandler.class ); - - private TokenClient tokenClient; - - TokenLogoutSuccessHandler(TokenClient tokenClient){ - this.tokenClient = tokenClient; - } - - @Override - public void onLogoutSuccess( - HttpServletRequest request, - HttpServletResponse response, - Authentication authentication) - throws IOException, ServletException { - - - String refererUrl = request.getHeader("Referer"); - log.debug("Logout from: {}", refererUrl); - -// return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest().getHeader("Authorization"); - - String token = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()) - .getRequest().getHeader("Authorization"); - - if(tokenClient!=null && token != null ){ - tokenClient.del(token); - } - - response.sendRedirect("login?logoutSuccessful"); - super.onLogoutSuccess(request, response, authentication); - } -} - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/DemoSecurityConfig.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/DemoSecurityConfig.java deleted file mode 100644 index af998553f3e..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/DemoSecurityConfig.java +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.demo; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.Ordered; -import org.springframework.core.annotation.Order; -import org.springframework.security.authentication.AuthenticationProvider; -import org.springframework.security.authentication.dao.DaoAuthenticationProvider; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; - -@Configuration -@Order(Ordered.HIGHEST_PRECEDENCE) -@ConditionalOnProperty(value = "authentication.source", havingValue = "demo") -public class DemoSecurityConfig { - - @Autowired - @Qualifier("demoUserDetailsService") - private UserDetailsService userDetailsService; - - @Bean - public AuthenticationProvider getDemoAuthenticationProvider(){ - var authProvider = new DaoAuthenticationProvider(); - authProvider.setUserDetailsService(userDetailsService); - authProvider.setPasswordEncoder(new BCryptPasswordEncoder()); - return authProvider; - } - -// protected AuthenticationExceptionHandler getAuthenticationExceptionHandler() { -// return BadCredentialsException.class::isInstance; -// } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/DemoUsers.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/DemoUsers.java deleted file mode 100644 index e1ef00c2e70..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/DemoUsers.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.demo; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -@Service -@ConfigurationProperties(prefix = "egeria", ignoreUnknownFields = false, ignoreInvalidFields = false) -public class DemoUsers { - - private final Map demoUsers = new HashMap<>();; - - public Map getDemoUsers() { - return demoUsers; - } - - /** - * - * @param username the username - * @return a clone of the user from the map, with password encrypted. - */ - public User getUser (String username) { - User u1 = new User(); - User u2 = demoUsers.get(username); - if( u2 != null ) { - - u1.setUsername(u2.getUsername()); - u1.setPassword(new BCryptPasswordEncoder().encode(u2.getPassword())); - u1.setAvatarUrl(u2.getAvatarUrl()); - u1.setId(u2.getId()); - u1.setRoles( new ArrayList<>(u2.getRoles())); - u1.setName(u2.getName()); - } - return u1; - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/User.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/User.java deleted file mode 100644 index 77afc0cd5c7..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/User.java +++ /dev/null @@ -1,119 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.demo; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.AuthorityUtils; -import org.springframework.security.core.userdetails.UserDetails; - -import java.util.Collection; -import java.util.List; - -/** - * Entity User used for in-memory mocked demos, in case the real authentication is missing. - */ -public class User implements UserDetails { - private Long id; - - private String username; - - private String name; - - private String avatarUrl; - - // Default to empty string for Auths created by JWT requests - @JsonIgnore - private String password = ""; - - private List roles; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getUsername() { - return username; - } - - @Override - public boolean isAccountNonExpired() { - return true; - } - - @Override - public boolean isAccountNonLocked() { - return true; - } - - @Override - public boolean isCredentialsNonExpired() { - return true; - } - - @Override - public boolean isEnabled() { - return true; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public Collection getAuthorities() { - return AuthorityUtils.createAuthorityList(roles.toArray(new String[]{})); - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - - public String getAvatarUrl() { - return avatarUrl; - } - - public void setAvatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - User user = (User) o; - - return id != null ? id.equals(user.id) : user.id == null; - - } - - @Override - public int hashCode() { - return id != null ? id.hashCode() : 0; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/UserDetailsServiceImpl.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/UserDetailsServiceImpl.java deleted file mode 100644 index ca9f5369d94..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/demo/UserDetailsServiceImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.demo; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.security.authentication.AccountStatusUserDetailsChecker; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; - -@Service("demoUserDetailsService") -@ConditionalOnProperty(value = "authentication.source", havingValue = "demo") -@EnableConfigurationProperties( DemoUsers.class ) -public class UserDetailsServiceImpl implements UserDetailsService { - - private final AccountStatusUserDetailsChecker detailsChecker = new AccountStatusUserDetailsChecker(); - - @Autowired - DemoUsers demoUsers; - - @Override - public final User loadUserByUsername(String username) throws UsernameNotFoundException { - - final User user = demoUsers.getUser(username); - - detailsChecker.check(user); - - return user; - } - -} - - - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/ldap/ActiveDirectoryLdapSecurityConfig.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/ldap/ActiveDirectoryLdapSecurityConfig.java deleted file mode 100644 index 0b79f125642..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/ldap/ActiveDirectoryLdapSecurityConfig.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.ldap; - - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider; -import org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper; - -@Configuration -public class ActiveDirectoryLdapSecurityConfig { - - @Value("${ldap.domain}") - private String ldapDomain; - - @Value("${ldap.url}") - protected String ldapURL; - - @Value("${ldap.user.search.base}") - protected String userSearchBase; - - @Value("${ldap.user.search.filter}") - protected String userSearchFilter; - - @Bean - @ConditionalOnProperty(value = "authentication.source", havingValue = "ad") - public ActiveDirectoryLdapAuthenticationProvider getActiveDirectoryAuthenticationProvider(){ - ActiveDirectoryLdapAuthenticationProvider adProvider = - new ActiveDirectoryLdapAuthenticationProvider( - ldapDomain, - ldapURL, - userSearchBase); - adProvider.setSearchFilter(userSearchFilter); - adProvider.setUserDetailsContextMapper(new InetOrgPersonContextMapper()); - adProvider.setConvertSubErrorCodesToExceptions(true); - adProvider.setUseAuthenticationRequestCredentials(true); - return adProvider; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/ldap/LdapSecurityConfig.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/ldap/LdapSecurityConfig.java deleted file mode 100644 index 1038c43f484..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/ldap/LdapSecurityConfig.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.ldap; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.auth.AuthenticationExceptionHandler; -import org.odpi.openmetadata.userinterface.uichassis.springboot.auth.SecurityConfig; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.Ordered; -import org.springframework.core.annotation.Order; -import org.springframework.ldap.InvalidSearchFilterException; -import org.springframework.ldap.core.DirContextOperations; -import org.springframework.ldap.core.support.LdapContextSource; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.core.Authentication; -import org.springframework.security.ldap.DefaultSpringSecurityContextSource; -import org.springframework.security.ldap.authentication.BindAuthenticator; -import org.springframework.security.ldap.authentication.LdapAuthenticationProvider; -import org.springframework.security.ldap.authentication.LdapAuthenticator; -import org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider; -import org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper; - - -@EnableWebSecurity -@Configuration("securityConfig") -@Order(Ordered.HIGHEST_PRECEDENCE) -@ConditionalOnProperty(value = "authentication.source", havingValue = "ldap", matchIfMissing = true) -class LdapSecurityConfig { - - @Value("${ldap.user.search.base}") - protected String userSearchBase; - - @Value("${ldap.user.search.filter}") - protected String userSearchFilter; - - @Value("${ldap.group.search.base}") - protected String groupSearchBase; - - @Value("${ldap.group.search.filter}") - protected String groupSearchFilter; - - @Value("${ldap.url}") - protected String ldapURL; - - @Value("#{'${ldap.user.dn.patterns}'.split(';')}") - protected String[] userDnPatterns; - - @Value("${ldap.npa.dn}") - protected String npaDn; - - @Value("${ldap.npa.password}") - protected String npaPassword; - - @Value("${ldap.group.role.attribute}") - protected String roleAttribute; - - - @Bean - @ConditionalOnProperty(value = "authentication.source", havingValue = "ad") - public LdapAuthenticationProvider getActiveDirectoryAuthenticationProvider(){ - - LdapContextSource ldapContextSource = new DefaultSpringSecurityContextSource(ldapURL); - ldapContextSource.setUserDn(npaDn); - ldapContextSource.setPassword(npaPassword); - ldapContextSource.setCacheEnvironmentProperties(true); - ldapContextSource.setAnonymousReadOnly(false); - ldapContextSource.setPooled(true); - ldapContextSource.afterPropertiesSet(); - - BindAuthenticator authenticator = new BindAuthenticator(ldapContextSource); - authenticator.setUserDnPatterns(userDnPatterns); - - LdapAuthenticationProvider ldapAuthenticationProvider = new LdapAuthenticationProvider(authenticator); - ldapAuthenticationProvider.setUserDetailsContextMapper(new InetOrgPersonContextMapper()); - - return ldapAuthenticationProvider; - } - -// @Override -// protected AuthenticationExceptionHandler getAuthenticationExceptionHandler() { -// return e -> e instanceof BadCredentialsException || e.getCause() instanceof InvalidSearchFilterException; -// } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/model/LoginRequest.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/model/LoginRequest.java deleted file mode 100644 index be264acf718..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/model/LoginRequest.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.model; - -public record LoginRequest(String username, String password) { - -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/redis/RedisConfig.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/redis/RedisConfig.java deleted file mode 100644 index d25d3704bd4..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/redis/RedisConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.redis; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class RedisConfig { - - @Value("${redis.hostName:localhost}") - private String hostName; - - @Value("${redis.port:6379}") - private int port; - - @Bean - @ConditionalOnProperty(value = "authentication.mode", havingValue = "redis") - public TokenRedisClient tokenRedisClient(){ - return new TokenRedisClient(hostName, port); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/redis/TokenRedisClient.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/redis/TokenRedisClient.java deleted file mode 100644 index 72762e46726..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/redis/TokenRedisClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.redis; - -import io.lettuce.core.RedisClient; -import io.lettuce.core.RedisURI; -import io.lettuce.core.SetArgs; -import io.lettuce.core.api.StatefulRedisConnection; -import io.lettuce.core.api.sync.RedisCommands; -import org.odpi.openmetadata.userinterface.uichassis.springboot.auth.TokenClient; - -public class TokenRedisClient implements TokenClient { - - private RedisClient redisClient; - private StatefulRedisConnection connection; - private RedisCommands commands; - - public TokenRedisClient(String host, int port){ - RedisURI redisUri = RedisURI.Builder.redis(host).withPort(port).build(); - redisClient = RedisClient.create(redisUri); - connection = redisClient.connect(); - commands = connection.sync(); - } - - @Override - public void shutdownClient(){ - connection.close(); - redisClient.shutdown(); - } - - @Override - public String set(String key, long seconds, String value){ - return commands.setex(key, seconds, value); - } - - @Override - public String set(String key, String value){ - return commands.set(key, value); - } - - @Override - public String setKeepTTL(String key, String value){ - return commands.set(key, value, SetArgs.Builder.keepttl()); - } - - @Override - public String get(String key){ - return commands.get(key); - } - - @Override - public Long ttl(String key){ - return commands.ttl(key); - } - - public Long exists(String... keys){ - return commands.exists(keys); - } - - @Override - public void del(String... keys){ - commands.del(keys); - } - - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/service/TokenService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/service/TokenService.java deleted file mode 100644 index 3e40e50ddbd..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/auth/service/TokenService.java +++ /dev/null @@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.auth.service; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.auth.RoleService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.oauth2.jwt.*; -import org.springframework.stereotype.Service; - -import java.time.Instant; -import java.time.temporal.ChronoUnit; -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; - -@Service -public class TokenService { - - @Autowired - RoleService roleService; - private final JwtEncoder encoder; - - public TokenService(JwtEncoder encoder) { - this.encoder = encoder; - } - - public String generateToken(Authentication authentication) { - Instant now = Instant.now(); - List authotities = authentication.getAuthorities().stream() - .map(GrantedAuthority::getAuthority) - .collect(Collectors.toList()); - Collection scope = roleService.extractUserAppRoles(authotities); - JwtClaimsSet claims = JwtClaimsSet.builder() - .issuer("self") - .issuedAt(now) - .expiresAt(now.plus(1, ChronoUnit.HOURS)) - .subject(authentication.getName()) - .claim("visibleComponents", roleService.getVisibleComponents(scope)) - .claim("scope", scope) - .build(); - return this.encoder.encode(JwtEncoderParameters.from(claims)).getTokenValue(); - } - - - -} - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Edge.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Edge.java deleted file mode 100644 index b431fc0e218..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Edge.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.beans; - -import java.util.Objects; - -public class Edge { - - private String id; - private String from; - private String to; - private String label; - private String type; - - public Edge(String from, String to) { - this.from = from; - this.to = to; - } - - public Edge(String id, String from, String to, String label) { - this.id = id; - this.from = from; - this.to = to; - this.label = label; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFrom() { - return from; - } - - public void setFrom(String from) { - this.from = from; - } - - public String getTo() { - return to; - } - - public void setTo(String to) { - this.to = to; - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Edge edge = (Edge) o; - return Objects.equals(id, edge.id) && Objects.equals(from, edge.from) && Objects.equals(to, edge.to) && Objects.equals(label, edge.label) && Objects.equals(type, edge.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, from, to, label, type); - } - - @Override - public String toString() { - return "Edge{" + - "id='" + id + '\'' + - ", from='" + from + '\'' + - ", to='" + to + '\'' + - ", label='" + label + '\'' + - ", type='" + type + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Graph.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Graph.java deleted file mode 100644 index f71ce49aa97..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Graph.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.beans; - -import java.util.List; - -public class Graph { - private List nodes; - private List edges; - - public Graph(List nodes, List edge) { - this.nodes = nodes; - this.edges = edge; - } - - public List getNodes() { - return nodes; - } - - public void setNodes(List nodes) { - this.nodes = nodes; - } - - public List getEdges() { - return edges; - } - - public void setEdges(List edges) { - this.edges = edges; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Node.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Node.java deleted file mode 100644 index 090db985fb1..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Node.java +++ /dev/null @@ -1,80 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.beans; - -import java.util.Map; - -public class Node { - - private String id; - private String label; - private String group; - private Map properties; - private Integer level = 0; - private String qualifiedName; - - public Node(String id, String label) { - this.id = id; - this.label = label; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String getGroup() { - return group; - } - - public void setGroup(String group) { - this.group = group; - } - - public Map getProperties() { - return properties; - } - - public void setProperties(Map properties) { - this.properties = properties; - } - - public Integer getLevel() { - return level; - } - - public void setLevel(Integer level) { - this.level = level; - } - - public String getQualifiedName() { - return qualifiedName; - } - - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - @Override - public String toString() { - return "Node{" + - "id='" + id + '\'' + - ", label='" + label + '\'' + - ", group='" + group + '\'' + - ", properties=" + properties + - ", level=" + level + - ", qualifiedName=" + qualifiedName + - '}'; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Rules.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Rules.java deleted file mode 100644 index 686fb312260..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/beans/Rules.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.beans; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules.IncompleteRule; -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules.InvertEdgeRule; -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules.PrimaryCategoryRule; -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules.RemoveNodesRule; -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules.Rule; - -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -public class Rules { - private List incomplete; - private List invertEdge; - private List primaryCategory; - private List removeNodes; - - public List getIncomplete() { - return incomplete; - } - - public void setIncomplete(List incomplete) { - this.incomplete = incomplete; - } - - public List getInvertEdge() { - return invertEdge; - } - - public void setInvertEdge(List invertEdge) { - this.invertEdge = invertEdge; - } - - public List getPrimaryCategory() { - return primaryCategory; - } - - public void setPrimaryCategory(List primaryCategory) { - this.primaryCategory = primaryCategory; - } - - public List getRemoveNodes() { - return removeNodes; - } - - public void setRemoveNodes(List removeNodes) { - this.removeNodes = removeNodes; - } - - public List getAllRules() { - return Stream.of(incomplete, invertEdge, primaryCategory, removeNodes) - .filter(Objects::nonNull) - .flatMap(Collection::stream) - .collect(Collectors.toList()); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/AssetCatalogOMASService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/AssetCatalogOMASService.java deleted file mode 100644 index d0e373a20d3..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/AssetCatalogOMASService.java +++ /dev/null @@ -1,242 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service; - -import org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Classification; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship; -import org.odpi.openmetadata.accessservices.assetcatalog.model.Type; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.UserInterfaceErrorCodes; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.BadRequestException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * The Asset Catalog OMAS Service provides an interface to search for assets using the Asset Catalog OMAS client - */ -@Service -public class AssetCatalogOMASService { - - private final AssetCatalog assetCatalog; - private static final Logger LOG = LoggerFactory.getLogger(AssetCatalogOMASService.class); - - @Autowired - public AssetCatalogOMASService(AssetCatalog assetCatalog) { - this.assetCatalog = assetCatalog; - } - - - /** - * Fetch asset's header, classification and properties - * - * @param user userId of the user triggering the request - * @param assetId the unique identifier for the asset - * @param assetType the open metadata type - * @return the asset with its header and the list of associated classifications and specific properties - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public AssetCatalogBean getAssetDetails(String user, - String assetId, - String assetType) - throws PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - { - try { - return assetCatalog.getAssetDetails(user, assetId, assetType).getAssetCatalogBean(); - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException | PropertyServerException e) { - LOG.error(String.format("Error retrieving asset details for %s", assetId)); - throw e; - } - } - - /** - * Fetch asset's header, classification, properties and relationships - * - * @param user userId of the user triggering the request - * @param assetId the unique identifier for the asset - * @param assetType the open metadata type - * @return the asset with its header and the list of associated classifications - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public AssetCatalogBean getAssetUniverse(String user, - String assetId, - String assetType) - throws PropertyServerException, InvalidParameterException { - try { - return assetCatalog.getAssetUniverse(user, assetId, assetType).getAssetCatalogBean(); - } catch (PropertyServerException | InvalidParameterException e) { - LOG.error(String.format("Error retrieving asset universe for %s", assetId)); - throw e; - } - } - - /** - * Fetch the relationships for a specific asset - * - * @param user userId of the user triggering the request - * @param assetId the unique identifier for the asset - * @param assetType the open metadata type - * @param relationshipTypeGUID the relationships type - * @param from starting index - * @param pageSize number of relationships to be returned after starting index - * @return list of relationships for the given asset - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public List getAssetRelationships(String user, String assetId, - String assetType, - String relationshipTypeGUID, - Integer from, - Integer pageSize) - throws PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - try { - return assetCatalog.getAssetRelationships(user, assetId, assetType, relationshipTypeGUID, from, pageSize).getRelationships(); - } catch (PropertyServerException | org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - LOG.error(String.format("Error retrieving asset relationships for %s", assetId)); - throw e; - } - } - - /** - * Fetch the classification for a specific asset - * - * @param user userId of the user triggering the request - * @param assetId the unique identifier for the asset - * @param assetType the open metadata type - * @param classificationName the cname of the classification - * @return the classifications for the asset - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public List getClassificationsForAsset(String user, - String assetId, - String assetType, - String classificationName) - throws PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - try { - return assetCatalog.getClassificationsForAsset(user, assetId, assetType, classificationName).getClassifications(); - } catch (PropertyServerException | org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - LOG.error(String.format("Error retrieving asset classifications for %s", assetId)); - throw e; - } - } - - /** - * Fetch asset's header - * - * @param user userId of the user triggering the request - * @param searchCriteria the searchCriteria - * @param searchParameters the search parameters - * @return the assets for the search criteria - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException there is a problem with the parameters - */ - public List searchAssets(String user, - String searchCriteria, - SearchParameters searchParameters) - throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, PropertyServerException { - try { - return assetCatalog.searchByType(user, searchCriteria, searchParameters).getElementsList(); - } catch (PropertyServerException e){ - LOG.error(String.format("Error searching the assets by criteria %s", searchCriteria)); - throw e; - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - throw new BadRequestException(UserInterfaceErrorCodes.INVALID_SEARCH_REQUEST, e.getMessage()); - } - - } - - /** - * Fetch asset's header by type name - * - * @param user userId of the user triggering the request - * @param typeName the assets type name to search for - * @return list of assets by type name or GUID - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException there is a problem with the parameters - */ - public List searchAssetsByTypeName(String user, - String typeName) - throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, PropertyServerException { - try { - return assetCatalog.searchByTypeName(user, typeName).getElementsList(); - } catch (PropertyServerException e){ - LOG.error(String.format("Error searching the assets by type name: %s", typeName)); - throw e; - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - throw new BadRequestException(UserInterfaceErrorCodes.INVALID_SEARCH_REQUEST, e.getMessage()); - } - } - - /** - * Fetch asset's header by type GUID - * - * @param user userId of the user triggering the request - * @param typeGUID the assets type GUID to search for - * @return list of assets by type name or GUID - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException there is a problem with the parameters - */ - public List searchAssetsByTypeGUID(String user, - String typeGUID) - throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, PropertyServerException { - try { - return assetCatalog.searchByTypeGUID(user, typeGUID).getElementsList(); - } catch (PropertyServerException e){ - LOG.error(String.format("Error searching the assets by type GUID: %s", typeGUID)); - throw e; - } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - throw new BadRequestException(UserInterfaceErrorCodes.INVALID_SEARCH_REQUEST, e.getMessage()); - } - } - - /** - * Fetch asset's context - * - * @param userId userId of the user triggering the request - * @param assetId the id of the asset (usually String representation of a GUID ) - * @param assetType the open metadata type - * @return the asset context - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException there is a problem with the parameters - */ - public Elements getAssetContext(String userId, - String assetId, - String assetType) - throws PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - try { - return assetCatalog.getAssetContext(userId, assetId, assetType).getAsset(); - } catch (PropertyServerException | org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - LOG.error(String.format("Error retrieving asset context for '%s'", assetId)); - throw e; - } - } - - /** - * Asset catalog supported types - a list of the types that are returned by the catalog - * - * @param userId userId of the user triggering the request - * @return the list of supported types - * @throws PropertyServerException there is a problem retrieving information from the property server - * @throws InvalidParameterException there is a problem with the parameters - */ - public List getSupportedTypes(String userId) throws PropertyServerException, - org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException { - try { - return assetCatalog.getSupportedTypes(userId, null).getTypes(); - } catch (PropertyServerException | org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { - LOG.error("Error retrieving supported types"); - throw e; - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/ComponentService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/ComponentService.java deleted file mode 100644 index c394b531c2f..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/ComponentService.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.stereotype.Service; - -import java.util.*; - -/** - * This component is responsible to provide model used by UI to show/hide components - */ -@Service -@ConfigurationProperties(prefix = "role") -@EnableConfigurationProperties -public class ComponentService { - - private final Map> visibleComponents = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - - public Map> getVisibleComponents() { - return visibleComponents; - } - - /** - * - * @param roles the list of roles - * @return a set of components to be displayed - */ - public Set getVisibleComponentsForRoles(Collection roles) { - Set components = new HashSet<>(); - roles.stream() - .map(visibleComponents::get) - .filter(Objects::nonNull) - .forEach(components::addAll); - return components; - } - - /** - * - * @return the set of roles used by the app - * this is configuration of the application.properties with role.visibleComponents.[ROLE] values - */ - public final Set getAppRoles(){ - return visibleComponents.keySet(); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/LineageGraphDisplayService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/LineageGraphDisplayService.java deleted file mode 100644 index e72a73a8f5f..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/LineageGraphDisplayService.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Edge; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Node; -import org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules.Rule; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Rules; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; -import java.util.ListIterator; - -/** - * This component matches the properties provided under lineage-display-config which provide rules - * based on which the edge's direction will be inverted - */ -@Service -@ConfigurationProperties(prefix = "lineage-display-config") -public class LineageGraphDisplayService { - - private Rules rules; - - public Rules getRules() { - return rules; - } - - public void setRules(Rules rules) { - this.rules = rules; - } - - - /** - * This method applies the rules defined in the properties file on the graph. - * - * @param graph graph processed from the response from open lineage - * @param queriedNodeGUID the GUID of the queried node - */ - public void applyRules(Graph graph, String queriedNodeGUID) { - if (rules == null) { - return; - } - - for (Rule rule : rules.getAllRules()) { - rule.apply(graph, queriedNodeGUID); - } - } - - @Override - public String toString() { - return "LineageGraphDisplayRulesService{" + - "rules=" + rules + - '}'; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/OpenLineageService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/OpenLineageService.java deleted file mode 100644 index 4c8d52b5cf3..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/OpenLineageService.java +++ /dev/null @@ -1,335 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.client.LineageWarehouseClientWarehouse; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.ffdc.LineageWarehouseException; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageEdge; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageVertex; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageVerticesAndEdges; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.Scope; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.requests.ElementHierarchyRequest; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.requests.LineageSearchRequest; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.LineageNotFoundException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.OpenLineageServiceException; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Edge; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Node; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * This class responsibility is to interact with Open Lineage Services(OLS), - * process the returned response and return it in a format understood by view - */ -@Service -@EnableConfigurationProperties(LineageGraphDisplayService.class) -public class OpenLineageService { - - private final LineageWarehouseClientWarehouse lineageWarehouseClient; - private final LineageGraphDisplayService lineageGraphDisplayService; - private static final Logger LOG = LoggerFactory.getLogger(OpenLineageService.class); - - /** - * @param lineageWarehouseClient client to connect to open lineage services - * @param lineageGraphDisplayService the rules for display - */ - @Autowired - public OpenLineageService(LineageWarehouseClientWarehouse lineageWarehouseClient, LineageGraphDisplayService lineageGraphDisplayService) { - this.lineageWarehouseClient = lineageWarehouseClient; - this.lineageGraphDisplayService = lineageGraphDisplayService; - } - - - /** - * @param userId id of the user triggering the request - * @param guid unique identifier if the asset - * @param includeProcesses if true includes processes in the response - * @return map of nodes and edges describing the ultimate sources for the asset - * @throws InvalidParameterException from the underlying client - * @throws PropertyServerException from the underlying client - * @throws LineageWarehouseException from the underlying client - */ - public Graph getUltimateSource(String userId, - String guid, - boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - try { - LineageVerticesAndEdges response = lineageWarehouseClient.lineage(userId, Scope.ULTIMATE_SOURCE, guid, includeProcesses); - return processResponse(response, guid); - } catch (PropertyServerException e) { - LOG.error("Cannot get ultimate source lineage for guid {}", guid); - throw e; - } catch (InvalidParameterException e) { - LOG.error("Cannot get ultimate source for guid {}", guid); - throw new LineageNotFoundException("ultimate source lineage error", e); - } catch (LineageWarehouseException e) { - LOG.error("Error while calling open lineage services {}", guid); - throw new OpenLineageServiceException("entity details error", e); - } - - } - - - /** - * @param userId id of the user triggering the request - * @param guid unique identifier if the asset - * @param includeProcesses if true includes processes in the response - * @return map of nodes and edges describing the end to end flow - * @throws InvalidParameterException from the underlying client - * @throws PropertyServerException from the underlying client - * @throws LineageWarehouseException from the underlying client - */ - public Graph getEndToEndLineage(String userId, - String guid, - boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - try { - LineageVerticesAndEdges response = lineageWarehouseClient.lineage(userId, Scope.END_TO_END, guid, includeProcesses); - return processResponse(response, guid); - } catch (PropertyServerException e) { - LOG.error("Cannot get end-to-end lineage for guid {}", guid); - throw e; - } catch (InvalidParameterException e) { - LOG.error("Cannot get end-to-end lineage for guid {}", guid); - throw new LineageNotFoundException("end-to-end lineage error", e); - } catch (LineageWarehouseException e) { - LOG.error("Error while calling open lineage services {}", guid); - throw new OpenLineageServiceException("entity details error", e); - } - } - - /** - * @param userId id of the user triggering the request - * @param guid unique identifier if the asset - * @param includeProcesses if true includes processes in the response - * @return map of nodes and edges describing the ultimate destinations of the asset - * @throws InvalidParameterException from the underlying client - * @throws PropertyServerException from the underlying client - * @throws LineageWarehouseException from the underlying client - */ - public Graph getUltimateDestination(String userId, - String guid, - boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - try { - LineageVerticesAndEdges response = lineageWarehouseClient.lineage(userId, Scope.ULTIMATE_DESTINATION, guid, includeProcesses); - return processResponse(response, guid); - } catch (PropertyServerException e) { - LOG.error("Cannot get ultimate destination lineage for guid {}", guid); - throw e; - } catch (InvalidParameterException e) { - LOG.error("Cannot get ultimate destination for guid {}", guid); - throw new LineageNotFoundException("ultimate destination lineage error", e); - } catch (LineageWarehouseException e) { - LOG.error("Error while calling open lineage services {}", guid); - throw new OpenLineageServiceException("entity details error", e); - } - - - } - - /** - * @param userId id of the user triggering the request - * @param guid unique identifier if the asset - * @param includeProcesses if true includes processes in the response - * @return map of nodes and edges describing the glossary terms linked to the asset - * @throws InvalidParameterException from the underlying client - * @throws PropertyServerException from the underlying client - * @throws LineageWarehouseException from the underlying client - */ - public Graph getVerticalLineage(String userId, - String guid, - boolean includeProcesses) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - try { - LineageVerticesAndEdges response = lineageWarehouseClient.lineage(userId, Scope.VERTICAL, guid, includeProcesses); - return processResponse(response, guid); - } catch (PropertyServerException e) { - LOG.error("Error while trying to retrieve verical lineage {}", e.getMessage()); - throw e; - } catch (InvalidParameterException e) { - LOG.error("Cannot get vertical lineage for guid {}", guid); - throw new LineageNotFoundException("vertical lineage error", e); - } catch (LineageWarehouseException e) { - LOG.error("Error while calling open lineage services {}", guid); - throw new OpenLineageServiceException("entity details error", e); - } - - } - - /** - * Gets node details. - * - * @param userId the user id - * @param guid the guid - * @return the node details - * @throws InvalidParameterException from the underlying client - * @throws PropertyServerException from the underlying client - * @throws LineageWarehouseException from the underlying client - */ - public LineageVertex getEntityDetails(String userId, String guid) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - try { - return lineageWarehouseClient.getEntityDetails(userId, guid); - } catch (InvalidParameterException | PropertyServerException e) { - LOG.error("Cannot get node details for guid {}", guid); - throw e; - } catch (LineageWarehouseException e) { - LOG.error("Error while calling open lineage services {}", guid); - throw new OpenLineageServiceException("entity details error", e); - } - } - - /** - * Gets node details. - * - * @param userId the user id - * @param lineageSearchRequest the body for search - * @return the node details - * @throws InvalidParameterException from the underlying client - * @throws PropertyServerException from the underlying client - * @throws LineageWarehouseException from the underlying client - */ - public List search(String userId, LineageSearchRequest lineageSearchRequest) - throws InvalidParameterException, PropertyServerException, LineageWarehouseException - { - try { - return lineageWarehouseClient.search(userId, lineageSearchRequest); - } catch (InvalidParameterException | PropertyServerException e) { - LOG.error("Error during search with request {}", lineageSearchRequest); - throw e; - } catch (LineageWarehouseException e) { - LOG.error("Error while calling open lineage services {}", lineageSearchRequest); - throw new OpenLineageServiceException("entity details error", e); - } - } - - /** - * Gets available entities types from lineage repository. - * @param userId user ID - * @return the available entities types - */ - public List getTypes(String userId) { - try { - return lineageWarehouseClient.getTypes(userId); - } catch (PropertyServerException | InvalidParameterException | LineageWarehouseException e) { - LOG.error("Cannot get entities types in the lineage graph"); - throw new OpenLineageServiceException("entities types retrieval error", e); - } - } - - /** - * Gets nodes names of certain type with display name containing a certain value. - * @param userId user ID - * @param type the type of the nodes name to search for - * @param searchValue the string to be contained in the qualified name of the node - case insensitive - * @param limit the maximum number of node names to retrieve - * @return the list of node names - */ - public List getNodes(String userId, String type, String searchValue, int limit) { - try { - return lineageWarehouseClient.getNodes(userId, type, searchValue, limit); - } catch (PropertyServerException | InvalidParameterException | LineageWarehouseException e) { - LOG.error("Cannot get node names from the lineage graph"); - throw new OpenLineageServiceException("node names retrieval error", e); - } - } - - /** - * Returns a subraph representing the hierarchy of a certain node, based on the request - * - * @param elementHierarchyRequest contains the guid of the queried node and the hierarchyType of the display name of the nodes - * - * @return a subgraph containing all relevant paths, - */ - public Graph getElementHierarchy(String userId, ElementHierarchyRequest elementHierarchyRequest) { - try { - LineageVerticesAndEdges response = lineageWarehouseClient.getElementHierarchy(userId, elementHierarchyRequest); - return processResponse(response, elementHierarchyRequest.getGuid()); - } catch (PropertyServerException | InvalidParameterException | LineageWarehouseException e) { - LOG.error("Cannot get node names from the lineage graph"); - throw new OpenLineageServiceException("node names retrieval error", e); - } - } - /** - * @param response string returned from Open Lineage Services to be processed - * @param guid the guid to process - * @return map of nodes and edges describing the end to end flow - */ - private Graph processResponse(LineageVerticesAndEdges response, String guid) { - List edges = new ArrayList<>(); - List nodes = new ArrayList<>(); - LOG.debug("Received response from open lineage service: {}", response); - if (response == null || CollectionUtils.isEmpty(response.getLineageVertices())) { - return new Graph(nodes, edges); - - } - - edges = Optional.ofNullable(response).map(LineageVerticesAndEdges::getLineageEdges) - .map(Collection::stream) - .orElseGet(Stream::empty) - .map(this::createEdge) - .collect(Collectors.toList()); - - nodes = Optional.ofNullable(response).map(LineageVerticesAndEdges::getLineageVertices) - .map(Collection::stream) - .orElseGet(Stream::empty) - .map(this::createNode) - .collect(Collectors.toList()); - - List startList = nodes.stream() - .filter(n -> n.getId().equals(guid)) - .collect(Collectors.toList()); - - Graph graph = new Graph(nodes, edges); - lineageGraphDisplayService.applyRules(graph, guid); - - return graph; - } - - /** - * This method will create a new edge in a ui specific format based on the edge being processed - * - * @param currentEdge current edge to be processed - * @return the edge in the format to be understand by the ui - */ - private Edge createEdge(LineageEdge currentEdge) { - return new Edge(currentEdge.getId().toString(), currentEdge.getSourceNodeID(), - currentEdge.getDestinationNodeID(), currentEdge.getEdgeType()); - } - - /** - * This method will create a new node in ui specific format based on the properties of the currentNode to be processed - * - * @param currentNode current node to be processed - * @return the node in the format to be understand by the ui - */ - private Node createNode(LineageVertex currentNode) { - String displayName = currentNode.getDisplayName(); - Node node = new Node(currentNode.getNodeID(), displayName); - node.setGroup(currentNode.getNodeType()); - node.setQualifiedName(currentNode.getQualifiedName()); - node.setProperties(currentNode.getProperties()); - return node; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/IncompleteRule.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/IncompleteRule.java deleted file mode 100644 index 229b6e6d578..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/IncompleteRule.java +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules; - -import lombok.ToString; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Edge; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Node; - -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; - -@ToString -public class IncompleteRule implements Rule { - private static final String INCOMPLETE = "Incomplete"; - public static final String TYPE = "type"; - private String edgeType; - private String destinationNodeType; - - public String getEdgeType() { - return edgeType; - } - - public void setEdgeType(String edgeType) { - this.edgeType = edgeType; - } - - public String getDestinationNodeType() { - return destinationNodeType; - } - - public void setDestinationNodeType(String destinationNodeType) { - this.destinationNodeType = destinationNodeType; - } - - /** - * In order to mark the incomplete assets accordingly, the graph is iterated and based on the existence of a - * classification the nodes and edges are altered. - * - * @param graph the lineage graph - * @param queriedNodeGUID the guid of the queried node used to identify it in the graph - */ - @Override - public void apply(Graph graph, String queriedNodeGUID) { - - if (edgeType == null) { - return; - } - - List edgesToRemove = new ArrayList<>(); - List nodesToRemove = new ArrayList<>(); - - List graphNodes = graph.getNodes(); - List edgesWithProperLabel = getEdgesWithProperLabel(graph); - - for (Edge edge : edgesWithProperLabel) { - for (Node node : graphNodes) { - if (node.getId().equals(edge.getFrom())) { - Optional classificationNode = getSecondNode(graphNodes, edge); - if(classificationNode.isPresent()) { - nodesToRemove.add(classificationNode.get()); - node.getProperties().put(TYPE, INCOMPLETE); - edgesToRemove.add(edge); - } - } - } - } - graph.getNodes().removeAll(nodesToRemove); - graph.getEdges().removeAll(edgesToRemove); - } - - private List getEdgesWithProperLabel(Graph graph) { - return graph.getEdges().stream().filter(e -> e.getLabel().equals(edgeType)).collect(Collectors.toList()); - } - - private Optional getSecondNode(List nodes, Edge edge) { - return nodes.stream().filter(node -> node.getId().equals(edge.getTo()) && destinationNodeType.equals(node.getGroup())).findAny(); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/InvertEdgeRule.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/InvertEdgeRule.java deleted file mode 100644 index 80b01427431..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/InvertEdgeRule.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Edge; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Node; - -import java.util.List; - -public class InvertEdgeRule implements Rule { - private String edgeType; - private String sourceNodeType; - private String destinationNodeType; - - public String getEdgeType() { - return edgeType; - } - - public void setEdgeType(String edgeType) { - this.edgeType = edgeType; - } - - public String getSourceNodeType() { - return sourceNodeType; - } - - public void setSourceNodeType(String sourceNodeType) { - this.sourceNodeType = sourceNodeType; - } - - public String getDestinationNodeType() { - return destinationNodeType; - } - - public void setDestinationNodeType(String destinationNodeType) { - this.destinationNodeType = destinationNodeType; - } - - - /** Inverts the edge direction based on the configured parameters - * @param graph the lineage graph - * @param queriedNodeGUID the guid of the queried node used to identify it in the graph - */ - public void apply(Graph graph, String queriedNodeGUID) { - for (Edge edge : graph.getEdges()) { - List nodes = graph.getNodes(); - if (edgeType != null && edgeType.equals(edge.getLabel())) { - invertEdge(nodes, edge); - } - } - } - - private void invertEdge(List nodes, Edge edge) { - if (this.getSourceNodeType() != null && this.getDestinationNodeType() != null) { - applyRuleWithBothNodeTypes(nodes, edge); - } else if (this.getSourceNodeType() != null && this.getDestinationNodeType() == null) { - applyRuleWithOneNodeType(nodes, edge, edge.getFrom(), this.getSourceNodeType()); - } else if (this.getSourceNodeType() == null && this.getDestinationNodeType() != null) { - applyRuleWithOneNodeType(nodes, edge, edge.getTo(), this.getDestinationNodeType()); - } else { - invertEdgeDirection(edge); - } - } - - private void applyRuleWithBothNodeTypes(List nodes, Edge edge) { - for (Node node : nodes) { - if (node.getId().equals(edge.getFrom()) && node.getGroup().equals(this.getSourceNodeType())) { - for (Node secondNode : nodes) { - if (secondNode.getId().equals(edge.getTo()) && secondNode.getGroup().equals(this.getDestinationNodeType())) { - invertEdgeDirection(edge); - break; - } - } - } - } - } - - private void applyRuleWithOneNodeType(List nodes, Edge edge, String nodeId, String ruleNodeType) { - boolean findNode = false; - for (Node node : nodes) { - if (node.getId().equals(nodeId) && node.getGroup().equals(ruleNodeType)) { - findNode = true; - } - if (findNode) { - invertEdgeDirection(edge); - } - } - } - - private void invertEdgeDirection(Edge edge) { - String originalFrom = edge.getFrom(); - String originalTo = edge.getTo(); - edge.setFrom(originalTo); - edge.setTo(originalFrom); - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/PrimaryCategoryRule.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/PrimaryCategoryRule.java deleted file mode 100644 index 3c8ca694bd9..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/PrimaryCategoryRule.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Edge; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Node; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class PrimaryCategoryRule implements Rule { - private static final String TERM_CATEGORIZATION = "TermCategorization"; - private static final String REFERENCING_CATEGORY = "ReferencingCategory"; - private static final String PRIMARY_CATEGORY = "PrimaryCategory"; - private String edgeType; - private String sourceNodeType; - private String destinationNodeType; - private String classificationProperty; - - public String getEdgeType() { - return edgeType; - } - - public void setEdgeType(String edgeType) { - this.edgeType = edgeType; - } - - public String getSourceNodeType() { - return sourceNodeType; - } - - public void setSourceNodeType(String sourceNodeType) { - this.sourceNodeType = sourceNodeType; - } - - public String getDestinationNodeType() { - return destinationNodeType; - } - - public void setDestinationNodeType(String destinationNodeType) { - this.destinationNodeType = destinationNodeType; - } - - public String getClassificationProperty() { - return classificationProperty; - } - - public void setClassificationProperty(String classificationProperty) { - this.classificationProperty = classificationProperty; - } - - - /** - * In order to mark the primaryCategory accordingly the graph is iterated and based on the existence of a classification the nodes and edges are altered - * - * @param graph the lineage graph - * @param queriedNodeGUID the guid of the queried node used to identify it in the graph - */ - @Override - public void apply(Graph graph, String queriedNodeGUID) { - - List nodes = graph.getNodes(); - List edges = graph.getEdges(); - - List edgesToRemove = new ArrayList<>(); - List nodesToDrop = new ArrayList<>(); - - if (classificationProperty == null || edgeType == null) { - return; - } - - List edgesWithProperLabel = graph.getEdges().stream() - .filter(e -> e.getLabel().equals(edgeType)).collect(Collectors.toList()); - - for (Edge edge : edgesWithProperLabel) { - String primaryCategoryQualifiedName = null; - String glossaryTermGUID = null; - for (Node node : nodes) { - if (node.getGroup().equals(sourceNodeType) && node.getId().equals(edge.getFrom())) { - Node classificationNode = getSecondNode(nodes, edge); - if (hasCorrectClassificationProperty(classificationNode)) { - primaryCategoryQualifiedName = classificationNode.getProperties().get(classificationProperty); - glossaryTermGUID = node.getId(); - nodesToDrop.add(classificationNode); - } - } - } - - if (primaryCategoryQualifiedName == null) { - continue; - } - String primaryCategoryGUID = getPrimaryCategoryGUID(nodes, primaryCategoryQualifiedName); - markRelationships(edges, glossaryTermGUID, primaryCategoryGUID); - - edgesToRemove.add(edge); - } - - graph.getNodes().removeAll(nodesToDrop); - graph.getEdges().removeAll(edgesToRemove); - } - - - private Node getSecondNode(List nodes, Edge edge) { - for (Node secondNode : nodes) { - if (secondNode.getId().equals(edge.getTo()) && destinationNodeType.equals(secondNode.getGroup())) { - return secondNode; - } - } - return null; - } - - /** - * Null checks and has the classification property - * - * @param node the node that is checked - * @return true or false - */ - private boolean hasCorrectClassificationProperty(Node node) { - return node != null && node.getProperties() != null && node.getProperties().containsKey(classificationProperty); - } - - /** - * Get the get the GUID of the node based on it's qualifiedName - * - * @param nodes the nodes of the graphg - * @param primaryCategoryQualifiedName qualified name of the category whos GUID is searched - * @return the GUID of thr primary category - */ - private String getPrimaryCategoryGUID(List nodes, String primaryCategoryQualifiedName) { - for (Node node : nodes) { - if (primaryCategoryQualifiedName.equals(node.getQualifiedName())) { - return node.getId(); - } - } - return null; - } - - /** - * Marks the relationships between a GlossaryTerm and it's Categories either as REFERENCING_CATEGORY or PRIMARY_CATEGORY - * - * @param edges of the graph - * @param glossaryTermGUID guid of the GlossaryTerm - * @param primaryCategoryGUID guid of the primary category - */ - private void markRelationships(List edges, String glossaryTermGUID, String primaryCategoryGUID) { - edges.stream() - .filter(edge -> isTermCategorizationAndCorrectNodes(glossaryTermGUID, edge)) - .forEach(edge -> markRelationship(primaryCategoryGUID, edge)); - } - - private void markRelationship(String primaryCategoryGUID, Edge e) { - if (e.getTo().equals(primaryCategoryGUID) || e.getFrom().equals(primaryCategoryGUID)) { - e.setType(PRIMARY_CATEGORY); - } else { - e.setType(REFERENCING_CATEGORY); - } - } - - private boolean isTermCategorizationAndCorrectNodes(String glossaryTermGUID, Edge e) { - return e.getLabel().equals(TERM_CATEGORIZATION) && - (e.getTo().equals(glossaryTermGUID) || e.getFrom().equals(glossaryTermGUID)); - } - - @Override - public String toString() { - return "PrimaryCategoryRule{" + - "edgeType='" + edgeType + '\'' + - ", sourceNodeType='" + sourceNodeType + '\'' + - ", destinationNodeType='" + destinationNodeType + '\'' + - ", classificationProperty='" + classificationProperty + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/RemoveNodesRule.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/RemoveNodesRule.java deleted file mode 100644 index 44ce403dc81..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/RemoveNodesRule.java +++ /dev/null @@ -1,106 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Edge; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Node; - -import java.util.ArrayList; -import java.util.List; - -public class RemoveNodesRule implements Rule { - private String queriedNodeType; - private List nodeTypesToRemove; - - public String getQueriedNodeType() { - return queriedNodeType; - } - - public void setQueriedNodeType(String queriedNodeType) { - this.queriedNodeType = queriedNodeType; - } - - public List getNodeTypesToRemove() { - return nodeTypesToRemove; - } - - public void setNodeTypesToRemove(List nodeTypesToRemove) { - this.nodeTypesToRemove = nodeTypesToRemove; - } - - - /** - * If the queried node type matches the rule field defined in properties, the graph will be altered by deleting all the nodes of types nodeTypesToRemove from the graph - * - * @param graph the lineage graph - * @param queriedNodeGUID the guid of the queried node used to identify it in the graph - */ - @Override - public void apply(Graph graph, String queriedNodeGUID) { - if (queriedNodeType == null || nodeTypesToRemove == null) { - return; - } - - if (areSameQueriedNodeTypes(queriedNodeGUID, graph.getNodes())) { - removeNodesFromGraph(graph.getEdges(), graph.getNodes()); - } - - } - - private boolean areSameQueriedNodeTypes(String guid, List nodes) { - return nodes.stream().anyMatch(node -> node.getId().equals(guid) && node.getGroup().equals(queriedNodeType)); - } - - /** - * Removes the nodes from the graph if they match the rule - * - * @param edges the edges of the graph - * @param nodes nodes of the graph - */ - private void removeNodesFromGraph(List edges, List nodes) { - List edgesToRemove = new ArrayList<>(); - List nodesToRemove = new ArrayList<>(); - for (Node node : nodes) { - if (nodeTypesToRemove.contains(node.getGroup())) { - nodesToRemove.add(node); - String newStartNode = findNewStartNode(edges, edgesToRemove, node); - List newEndNodes = findNewEndNodes(edges, edgesToRemove, node.getId()); - createNewEdges(edges, newStartNode, newEndNodes); - } - } - nodes.removeAll(nodesToRemove); - edges.removeAll(edgesToRemove); - } - - - private String findNewStartNode(List edges, List edgesToRemove, Node node) { - String newFrom = ""; - for (Edge edge : edges) { - if (edge.getTo().equals(node.getId())) { - edgesToRemove.add(edge); - newFrom = edge.getFrom(); - } - } - return newFrom; - } - - private List findNewEndNodes(List edges, List edgesToRemove, String nodeId) { - List newTo = new ArrayList<>(); - for (Edge edge : edges) { - if (edge.getFrom().equals(nodeId)) { - edgesToRemove.add(edge); - newTo.add(edge.getTo()); - } - } - return newTo; - } - - private void createNewEdges(List edges, String newStartNode, List newEndNodes) { - for (String newEndNode : newEndNodes) { - if (!newStartNode.equals("")) { - edges.add(new Edge(newStartNode, newEndNode)); - } - } - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/Rule.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/Rule.java deleted file mode 100644 index 4e8cfda4ca0..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/graphrules/Rule.java +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.graphrules; - -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; - -public interface Rule { - - void apply(Graph graph, String queriedNodeGUID); - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/AuditLogDestinationService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/AuditLogDestinationService.java deleted file mode 100644 index 184b76a9adf..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/AuditLogDestinationService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.view; - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogDestination; -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecord; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -@Service -public class AuditLogDestinationService extends AuditLogDestination { - - private static final Logger LOGGER = LoggerFactory.getLogger(AuditLogDestinationService.class); - - @Override - public void addLogRecord(AuditLogRecord logRecord) { - - if ((OMRSAuditLogRecordSeverity.ERROR.getName().equals(logRecord.getSeverity())) || - (OMRSAuditLogRecordSeverity.EXCEPTION.getName().equals(logRecord.getSeverity()))) - { - - if (logRecord.getExceptionClassName() != null) - { - Logger log = LoggerFactory.getLogger(logRecord.getExceptionClassName()); - log.error( logRecord.getMessageText() ); - } else { - LOGGER.error(logRecord.getExceptionStackTrace()); - } - } - else - { - LOGGER.info(logRecord.getMessageText()); - } - - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/DinoViewService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/DinoViewService.java deleted file mode 100644 index 9fc41240de9..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/DinoViewService.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.view; - -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.auditlog.ComponentDevelopmentStatus; -import org.odpi.openmetadata.viewservices.dino.admin.DinoViewAdmin; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import java.util.Random; - -@Component -public class DinoViewService extends DinoViewAdmin implements InitializingBean { - @Value("${viewServiceServerName}") - private String viewServerName; - - @Value("${viewServiceMaxPageSize:0}") - private int maxPageSize; - - @Autowired - IntegrationViewServiceConfigComponent integrationViewServiceConfigComponent; - - @Autowired - private AuditLogDestinationService auditLogDestinationService; - - @Override - public void afterPropertiesSet() throws Exception { - this.initialize( - viewServerName, - integrationViewServiceConfigComponent, - getAuditLog(), - "system", - maxPageSize - ); - } - private AuditLog getAuditLog(){ - AuditLog auditLog = new AuditLog( - auditLogDestinationService, - 84431, - ComponentDevelopmentStatus.IN_DEVELOPMENT, - "dino-view", - "dino view service", - ""); - return auditLog; - } - - @Override - public void initialize(String serverName, ViewServiceConfig viewServiceConfig, AuditLog auditLog, String serverUserName, int maxPageSize) - throws OMAGConfigurationErrorException { - super.initialize(serverName, viewServiceConfig, auditLog, serverUserName, maxPageSize); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/IntegrationViewServiceConfigComponent.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/IntegrationViewServiceConfigComponent.java deleted file mode 100644 index 27b699d88f4..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/IntegrationViewServiceConfigComponent.java +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.view; - -import org.odpi.openmetadata.adminservices.configuration.properties.IntegrationViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; -import org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -@Component -public class IntegrationViewServiceConfigComponent extends IntegrationViewServiceConfig implements InitializingBean { - - @Value("${viewServiceFullName}") - private String omagServiceFullName; - - @Value("${viewServiceUrlMarker}") - private String urlMarker; - - @Autowired - ResourceEndpointConfigComponent resourceEndpointConfigComponent; - - @Override - public void afterPropertiesSet() throws Exception { - setViewServiceOperationalStatus(ServiceOperationalStatus.ENABLED); - setViewServiceAdminClass(ViewServiceAdmin.class.getName()); - - setViewServiceFullName( omagServiceFullName ); - setViewServiceURLMarker( urlMarker ); - - setResourceEndpoints( - resourceEndpointConfigComponent.getResourceEndpointConfigs() - ); - - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/ResourceEndpointConfigComponent.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/ResourceEndpointConfigComponent.java deleted file mode 100644 index 6a088e8aa13..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/ResourceEndpointConfigComponent.java +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.view; - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -import java.util.List; - -@Component -@ConfigurationProperties(prefix = "view-services-resource-endpoints") -public class ResourceEndpointConfigComponent { - - private List resourceEndpointConfigs; - - public void setResourceEndpointConfigs(List resourceEndpointConfigs) { - this.resourceEndpointConfigs = resourceEndpointConfigs; - } - - public List getResourceEndpointConfigs() { - return resourceEndpointConfigs; - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/RexViewService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/RexViewService.java deleted file mode 100644 index 793bcbdddab..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/RexViewService.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.view; - -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.auditlog.ComponentDevelopmentStatus; -import org.odpi.openmetadata.viewservices.rex.admin.RexViewAdmin; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import java.util.Random; - -@Component -public class RexViewService extends RexViewAdmin implements InitializingBean { - @Value("${viewServiceServerName}") - private String viewServerName; - - @Value("${viewServiceMaxPageSize:0}") - private int maxPageSize; - - @Autowired - IntegrationViewServiceConfigComponent integrationViewServiceConfigComponent; - - @Autowired - private AuditLogDestinationService auditLogDestinationService; - - @Override - public void afterPropertiesSet() throws Exception { - this.initialize( - viewServerName, - integrationViewServiceConfigComponent, - getAuditLog(), - "system", - maxPageSize - ); - } - private AuditLog getAuditLog(){ - AuditLog auditLog = new AuditLog( - auditLogDestinationService, - 84433, - ComponentDevelopmentStatus.IN_DEVELOPMENT, - "rex-view", - "Repository explorer view service", - ""); - return auditLog; - } - - @Override - public void initialize(String serverName, ViewServiceConfig viewServiceConfig, AuditLog auditLog, String serverUserName, int maxPageSize) - throws OMAGConfigurationErrorException { - super.initialize(serverName, viewServiceConfig, auditLog, serverUserName, maxPageSize); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/TexViewService.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/TexViewService.java deleted file mode 100644 index 53e8bdc849a..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/view/TexViewService.java +++ /dev/null @@ -1,60 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service.view; - -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.auditlog.ComponentDevelopmentStatus; -import org.odpi.openmetadata.viewservices.tex.admin.TexViewAdmin; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import java.util.Random; - -@Component -public class TexViewService extends TexViewAdmin implements InitializingBean { - @Value("${viewServiceServerName}") - private String viewServerName; - - @Value("${viewServiceMaxPageSize:0}") - private int maxPageSize; - - @Autowired - IntegrationViewServiceConfigComponent integrationViewServiceConfigComponent; - - @Autowired - private AuditLogDestinationService auditLogDestinationService; - - @Override - public void afterPropertiesSet() throws Exception { - this.initialize( - viewServerName, - integrationViewServiceConfigComponent, - getAuditLog(), - "system", - maxPageSize - ); - } - - private AuditLog getAuditLog(){ - AuditLog auditLog = new AuditLog( - auditLogDestinationService, - 84432, - ComponentDevelopmentStatus.IN_DEVELOPMENT, - "tex-view", - "Type explorer view", - ""); - return auditLog; - } - - @Override - public void initialize(String serverName, ViewServiceConfig viewServiceConfig, AuditLog auditLog, String serverUserName, int maxPageSize) - throws OMAGConfigurationErrorException { - - super.initialize(serverName, viewServiceConfig, auditLog, serverUserName, maxPageSize); - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/application.properties b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/application.properties deleted file mode 100644 index 131b5a49159..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/application.properties +++ /dev/null @@ -1,150 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the ODPi Egeria project. - -#Tomcat server configuration -server.port=8443 -server.compression.enabled=true -server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css -server.tomcat.uri-encoding=UTF-8 - -server.ssl.key-store=classpath:keystore.p12 -server.ssl.key-store-password=egeria -server.ssl.keyStoreType=PKCS12 -server.ssl.keyAlias=egeriauichassis - -server.ssl.trust-store=truststore.p12 -server.ssl.trust-store-password=egeria - - -# Packages to be scanned by spring -scan.packages=org.odpi.openmetadata - -# WARNING! setting 'false' allows java clients to open https connections without checking certificates validity -# Alternate you can import self signed certificates into java truststore or setup an truststore only for this app -# by adding the store into server.ssl.trust-store parameter -strict.ssl=true - -#token timeout in minutes -token.timeout=15 -token.absolute.timeout=720 -token.secret=doNotTell - -#LDAP authentication - -ldap.domain= -ldap.user.search.base=ou=people,dc=egeria,dc=com -ldap.user.search.filter=uid={0} -ldap.group.search.base=ou=Groups,dc=egeria,dc=com -ldap.group.search.filter=member={0} -ldap.url=ldap://localhost:389 -ldap.group.role.attribute= -ldap.npa.dn= -ldap.npa.password= -#ldap.user.dn.patterns patterns is a list of values separated by ";" as comma is used in the ldap pattern -ldap.user.dn.patterns= - -# Redis configuration -#redis.host=localhost -#redis.port=6379 - -# Authentication source (possible values: demo, ldap, ad) -authentication.source=demo -# Authentication mode (possible values: session,token,redis) -authentication.mode=token - -# ############################################################## -# Component visibility for Role based access ################### -# ############################################################## -# How it works? -# -# The roles are defined in external authentication source (provider) configured with `authentication.source`. -# For demo purposes, we are providing simple file based authentication provider. See demo-users.yml -# The matrix controlling what components are allowed on the UI views for specific role is defined in the 'role.visibleComponents' prefixed properties as follows" -# -# role.visibleComponents.{ROLE-1}={component-name-1} -# role.visibleComponents.{ROLE-2}={component-name-1},{component-name-2} -# -# This will configure the application to show the component named 'component-name-1' for all uses assigned to 'ROLE-1' -# In the same way, users that have assigned 'ROLE-2' can see more 'component-name-1' and 'component-name-2'. -# It is also possible to use wildcard '*' to enable full visibility of all components to users in the given role. -# -# Complete list of components names that can be used: -# -# about -# asset-catalog -# asset-details -# asset-details-print -# glossary -# repository-explorer -# type-explorer -# asset-lineage -# asset-lineage-print -# end-to-end -# ultimate-source -# ultimate-destination -# vertical-lineage -# -# Below is the default configuration for the two COCO_PHARMA roles we use for demo: - -role.visibleComponents.COCO_PHARMA_USER=about,asset-catalog,asset-details,asset-details-print,asset-lineage,asset-lineage-print,end-to-end,ultimate-source,ultimate-destination,vertical-lineage,glossary,repository-explorer -role.visibleComponents.COCO_PHARMA_ADMIN=* - -# omas server connection details -omas.server.name=cocoMDS1 -omas.server.url=https://localhost:9444 - -# lineage-warehouse -open.lineage.server.url=https://localhost:9444 -open.lineage.server.name=cocoOLS1 - -# ui configuration properties -omas.asset.catalog.page.size=50 - -# landing page -app.description=Have a question? || Get in touch via our Slack community https://slack.lfai.foundation/ @@What is Open Metadata? || Find out more on our website https://egeria-project.org/ @@Have more cool ideas? || Feel free to let us know your ideas so we can make it better. -app.title=Egeria Open Metadata | Find the right data with governance - -################################################ -### Logging -################################################ -logging.pattern.console=${CONSOLE_LOG_PATTERN:%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %replace(%m){"password=.*", "password=*****"}%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}} -logging.pattern.file=${logging.pattern.console} -logging.level.root=ERROR -logging.level.org.springframework=ERROR -logging.level.org.springframework.boot.web.embedded.tomcat=INFO -logging.level.org.odpi.openmetadata=INFO - -################################################ -### CORS -################################################ -# Comma-separated list of origins. -# Example configuration below is for setting up local development environment where egeria-ui is hosted on one of the two urls. -# cors.allowed-origins=http://localhost,http://localhost:8081 -cors.allowed-origins=* - -################################################ -### Swagger Docs -################################################ -springdoc.version='@springdoc.version@' -springdoc.api-docs.enabled=true -springdoc.api-docs.path=/v3/api-docs -springdoc.swagger-ui.path=/swagger-ui.html -springdoc.swagger-ui.displayRequestDuration=true -springdoc.swagger-ui.tagsSorter=alpha -springdoc.swagger-ui.operationsSorter=alpha -springdoc.swagger-ui.docExpansion=none -springdoc.swagger-ui.enabled=true - -################################################ -### Additional demo users configuration -################################################ -spring.config.import=classpath:demo-users.yml - -################################################ -### Spring Boot Actuator -################################################ -# Endpoints web configuration -#management.endpoints.web.exposure.include=* -management.health.cassandra.enabled=false -management.health.redis.enabled=false -management.health.ldap.enabled=false \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/application.yml b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/application.yml deleted file mode 100644 index 0e5d530571e..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/application.yml +++ /dev/null @@ -1,44 +0,0 @@ -lineage-display-config: - rules: - incomplete: - - edgeType: Classification - destinationNodeType: Incomplete - invertEdge: - - edgeType: SemanticAssignment - destinationNodeType: GlossaryTerm - sourceNodeType: GlossaryCategory - - edgeType: TermCategorization - destinationNodeType: GlossaryTerm - sourceNodeType: GlossaryCategory - primaryCategory: - - edgeType: Classification - sourceNodeType: GlossaryTerm - destinationNodeType: PrimaryCategory - classificationProperty: categoryQualifiedName - removeNodes: - - queriedNodeType: TabularFileColumn - nodeTypesToRemove: - - TabularSchemaType - -view-services-resource-endpoints: - resourceEndpointConfigs: -# - resourceCategory : "" // should be set to { "Platform" | "Server" } -# description : "" // a descriptive string that describes the endpoint - can be displayed to a UI user -# platformRootURL : "" // the root URL of the platform - always "platform" whether the resource is a platform or server running on the platform -# serverName : "" // always null for a platform, but for a server this MUST contain the real server name to use in URL construction -# serverInstanceName : "" // always null for a platform, but for a server this MUST contain a unique name used as a handle for the server/platform combination -# platformName : "" // always null for a server, but for a platform this MUST contain a unique name used as a handle for the platform - - resourceCategory : "Platform" - description : "Egeria Open Metadata platform running on localhost:9443 (https)" - platformRootURL : "https://localhost:9443" - platformName : "LocalhostPlatform" - - - resourceCategory : "Server" - description : "Egeria Open Metadata server running on platform named 'LocalhostPlatform:9443' " - serverName : "cocoMDS1" - - -viewServiceUrlMarker: "uiViewServer" -viewServiceServerName: "uiViewServer" -viewServiceFullName: "Egeria UI view-services" -viewServiceMaxPageSize: 0 diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/banner.txt b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/banner.txt deleted file mode 100644 index f39eb31897f..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/banner.txt +++ /dev/null @@ -1,12 +0,0 @@ -${AnsiColor.CYAN} ODPi Egeria -${AnsiColor.CYAN} -${AnsiColor.CYAN} ______ _ __ __ ____ -${AnsiColor.CYAN} / ____/ ____ _ ___ _____ (_) ____ _ / / / / / _/ -${AnsiColor.CYAN} / __/ / __ `/ / _ \ / ___/ / / / __ `/ / / / / / / -${AnsiColor.CYAN} / /___ / /_/ / / __/ / / / / / /_/ / / /_/ / _/ / -${AnsiColor.CYAN} /_____/ \__, / \___/ /_/ /_/ \__,_/ \____/ /___/ -${AnsiColor.CYAN} /____/ -${AnsiColor.CYAN} -${AnsiColor.CYAN} -${AnsiColor.CYAN} :: Powered by Spring Boot${spring-boot.formatted-version} :: -${Ansi.DEFAULT} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/demo-users.yml b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/demo-users.yml deleted file mode 100644 index 6cc2742c828..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/demo-users.yml +++ /dev/null @@ -1,161 +0,0 @@ -################################################ -### Additional demo users configuration -################################################ - -### -### please override the passwords with your own in the following format -### - -# default password for all demo users. TO BE CHANGED -demoUserPassword: secret - -egeria: - demoUsers: - admin: - username: admin - name: Generic Admin - password: ${demoUserPassword} - roles: COCO_PHARMA_ADMIN - garygeeke: - username: garygeeke - name: Gary Geeke - password: ${demoUserPassword} - roles: COCO_PHARMA_USER, COCO_PHARMA_ADMIN - faith: - username: faith - name: Faith Broker - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - zach: - username: zach - name: Zach Now - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - steves: - username: steves - name: Steve Starter - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - terri: - username: terri - name: Terri Daring - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - tanyatidie: - username: tanyatidie - name: Tanya Tide - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - pollytasker: - username: pollytasker - name: Polly Tasker - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - tessatube: - username: tessatube - name: Tessa Tube - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - calliequartile: - username: calliequartile - name: Callie Quartile - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - ivorpadlock: - username: ivorpadlock - name: Ivor Padlock - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - bobnitter: - username: bobnitter - name: Bob Nitter - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - faithbroker: - username: faithbroker - name: Faith Broker - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - sallycounter: - username: sallycounter - name: Sally Counter - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - lemmiestage: - username: lemmiestage - name: Lemmie Stage - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - erinoverview: - username: erinoverview - name: Erin Overview - password: ${demoUserPassword} - roles: COCO_PHARMA_USER, COCO_PHARMA_ADMIN - harryhopeful: - username: harryhopeful - name: Harry Hopeful - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - grantable: - username: grantable - name: Grant Able - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - robbierecords: - username: robbierecords - name: Robbie Records - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - reggiemint: - username: reggiemint - name: Reggie Mint - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - peterprofile: - username: peterprofile - name: Peter Profile - password: ${demoUserPassword} - roles: COCO_PHARMA_USER, COCO_PHARMA_ADMIN - nancynoah: - username: nancynoah - name: Nancy Noah - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - sidneyseeker: - username: sidneyseeker - name: Sidney Seeker - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - tomtally: - username: tomtally - name: Tom Tally - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - juliestitched: - username: juliestitched - name: Julies Titched - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - angelacummings: - username: angelacummings - name: Angel Accumings - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - jukeskeeper: - username: jukeskeeper - name: Jukes Keeper - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - stewfaster: - username: stewfaster - name: Steward Faster - password: ${demoUserPassword} - roles: COCO_PHARMA_USER - - - - - - - - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/keystore.p12 b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/keystore.p12 deleted file mode 100644 index b452f59f933..00000000000 Binary files a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/keystore.p12 and /dev/null differ diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/truststore.p12 b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/truststore.p12 deleted file mode 100644 index 65dfaa50d31..00000000000 Binary files a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/main/resources/truststore.p12 and /dev/null differ diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/EgeriaUIPlatformTest.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/EgeriaUIPlatformTest.java deleted file mode 100644 index 2345c4f2f73..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/EgeriaUIPlatformTest.java +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -public class EgeriaUIPlatformTest { - - @Test - void contextLoads() { - } -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/AssetCatalogOMASServiceTest.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/AssetCatalogOMASServiceTest.java deleted file mode 100644 index ef3271f577a..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/AssetCatalogOMASServiceTest.java +++ /dev/null @@ -1,162 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service; - -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.mockito.junit.jupiter.MockitoSettings; -import org.mockito.quality.Strictness; -import org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog; -import org.odpi.openmetadata.accessservices.assetcatalog.model.*; -import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.ClassificationListResponse; -import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.RelationshipListResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.mockito.ArgumentMatchers.anyInt; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.when; - -@ExtendWith(MockitoExtension.class) -@MockitoSettings(strictness = Strictness.WARN) -class AssetCatalogOMASServiceTest { - - private static final String CONFIDENTIALITY = "Confidentiality"; - private final String COMPLEX_SCHEMA_TYPE = "ComplexSchemaType"; - private final String assetId = "6662c0f2.e1b1ec6c.54865omh1.pco9ecb.c3g5f1.pfvf6bdv95dnc67jq2jli"; - private final String schemaId = "abababa1.e1b1ec6c.54865omh1.pco9ecb.c3g5f1.pfvf6bdv95dnc67jq2jli"; - private final String typeDef = "Asset"; - private final String relationshipTypeDef = "AssetSchemaType"; - private final String user = "demo"; - - @Mock - private AssetCatalog assetCatalog; - - @InjectMocks - private AssetCatalogOMASService assetCatalogOMASService; - - @Test - @DisplayName("Asset Details") - void testGetAssetDetails() throws PropertyServerException, InvalidParameterException { - AssetCatalogResponse expectedResponse = mockAssetDescriptionResponse(); - when(assetCatalog.getAssetDetails(anyString(), anyString(), anyString())).thenReturn(expectedResponse); - AssetCatalogBean response = assetCatalogOMASService.getAssetDetails(user, assetId, typeDef); - verifyAssetDescriptionResult(response); - } - - @Test - @DisplayName("Asset Universe") - void testGetAssetUniverse() throws PropertyServerException, InvalidParameterException { - AssetCatalogResponse expectedResponse = mockAssetDescriptionResponse(); - when(assetCatalog.getAssetUniverse(anyString(), anyString(), anyString())).thenReturn(expectedResponse); - AssetCatalogBean response = assetCatalogOMASService.getAssetUniverse(user, assetId, typeDef); - verifyAssetDescriptionResult(response); - } - - @Test - @DisplayName("Asset Relationships by type") - void testGetAssetRelationships() throws PropertyServerException, InvalidParameterException { - RelationshipListResponse expectedResponse = mockRelationshipResponse(); - when(assetCatalog.getAssetRelationships(anyString(), anyString(), anyString(), anyString(), anyInt(), anyInt())).thenReturn(expectedResponse); - List resultList = assetCatalogOMASService.getAssetRelationships(user, assetId, typeDef, relationshipTypeDef, 0, 1); - verifyRelationshipResponse(resultList); - } - - @Test - @DisplayName("Asset Classification") - void testGetClassificationForAsset() throws PropertyServerException, InvalidParameterException { - ClassificationListResponse expectedResponse = mockClassificationsResponse(); - when(assetCatalog.getClassificationsForAsset(anyString(), anyString(), anyString(), anyString())).thenReturn(expectedResponse); - List resultList = assetCatalogOMASService.getClassificationsForAsset(user, assetId, typeDef, CONFIDENTIALITY); - verifyClassificationResponse(resultList); - } - - private AssetCatalogResponse mockAssetDescriptionResponse() { - AssetCatalogResponse expectedResponse = new AssetCatalogResponse(); - - AssetCatalogBean expectedDescription = new AssetCatalogBean(); - expectedDescription.setGuid(assetId); - Type type = mockType(typeDef); - expectedDescription.setType(type); - Map propertiesMap = new HashMap<>(); - propertiesMap.put("summary", "Short description of term First Name"); - propertiesMap.put("displayName", "First Name"); - expectedDescription.setProperties(propertiesMap); - - expectedResponse.setAssetCatalogBean(expectedDescription); - return expectedResponse; - } - - private RelationshipListResponse mockRelationshipResponse() { - RelationshipListResponse expectedResponse = new RelationshipListResponse(); - - List expectedRelationshipList = new ArrayList<>(); - Relationship expectedRelationship = new Relationship(); - - Element fromEntity = new Element(); - fromEntity.setGuid(assetId); - Type type = mockType(typeDef); - fromEntity.setType(type); - expectedRelationship.setFromEntity(fromEntity); - - Element toEntity = new Element(); - expectedRelationship.setToEntity(toEntity); - toEntity.setGuid(schemaId); - Type type1 = mockType("ComplexSchemaType"); - toEntity.setType(type1); - - expectedRelationshipList.add(expectedRelationship); - expectedResponse.setRelationships(expectedRelationshipList); - return expectedResponse; - } - - private Type mockType(String complexSchemaType) { - Type type1 = new Type(); - type1.setName(complexSchemaType); - return type1; - } - - private ClassificationListResponse mockClassificationsResponse() { - ClassificationListResponse expectedResponse = new ClassificationListResponse(); - List expectedClassificationList = new ArrayList<>(); - Classification expectedClassification = new Classification(); - Type type = mockType(CONFIDENTIALITY); - expectedClassification.setType(type); - expectedClassificationList.add(expectedClassification); - expectedResponse.setClassifications(expectedClassificationList); - return expectedResponse; - } - - private void verifyAssetDescriptionResult(AssetCatalogBean assetCatalogBean) { - assertEquals(assetCatalogBean.getGuid(), assetId); - assertFalse(assetCatalogBean.getProperties().isEmpty()); - } - - private void verifyRelationshipResponse(List resultList) { - assertFalse(resultList.isEmpty()); - Relationship relationship = resultList.get(0); - assertEquals(relationship.getFromEntity().getGuid(), assetId); - assertEquals(relationship.getFromEntity().getType().getName(), typeDef); - assertEquals(relationship.getToEntity().getGuid(), schemaId); - assertEquals(relationship.getToEntity().getType().getName(), COMPLEX_SCHEMA_TYPE); - } - - private void verifyClassificationResponse(List resultList) { - assertFalse(resultList.isEmpty()); - Classification classification = resultList.get(0); - assertEquals(classification.getType().getName(), CONFIDENTIALITY); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/OpenLineageServiceTest.java b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/OpenLineageServiceTest.java deleted file mode 100644 index d7287642321..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/java/org/odpi/openmetadata/userinterface/uichassis/springboot/service/OpenLineageServiceTest.java +++ /dev/null @@ -1,196 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.userinterface.uichassis.springboot.service; - - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.io.FileUtils; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.client.LineageWarehouseClientWarehouse; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.ffdc.LineageWarehouseException; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageEdge; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageVertex; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageVerticesAndEdges; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.Scope; -import org.odpi.openmetadata.governanceservers.lineagewarehouse.requests.LineageSearchRequest; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Graph; -import org.odpi.openmetadata.userinterface.uichassis.springboot.beans.Node; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Collectors; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.when; - - -public class OpenLineageServiceTest { - - private static final Logger LOG = LoggerFactory.getLogger(OpenLineageServiceTest.class); - public static final String RESPONSE_JSON = "./src/test/resources/openLineageServicesResponse.json"; - public static final String guid = "test-guid"; - private static String USER_ID = "userId"; - private static ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private static LineageVerticesAndEdges lineageVerticesAndEdges; - - @Mock - private LineageGraphDisplayService lineageGraphDisplayService; - - @Mock - private LineageWarehouseClientWarehouse lineageWarehouseClient; - - @InjectMocks - private OpenLineageService openLineageService; - - @BeforeEach - void setup() { - MockitoAnnotations.openMocks(this); - } - - @BeforeEach - public void readResource() throws IOException { - String payload = FileUtils.readFileToString(new File(RESPONSE_JSON), "UTF-8"); - lineageVerticesAndEdges = OBJECT_MAPPER.readValue(payload, LineageVerticesAndEdges.class); - } - - @Test - @DisplayName("Ultimate Source") - public void testUltimateSource() throws PropertyServerException, InvalidParameterException, LineageWarehouseException - { - when(lineageWarehouseClient.lineage(USER_ID, Scope.ULTIMATE_SOURCE, guid, true)) - .thenReturn(lineageVerticesAndEdges); - Graph ultimateSource = openLineageService.getUltimateSource(USER_ID, guid, true); - checkResponse(ultimateSource); - } - - @Test - @DisplayName("End To End") - public void testEndToEnd() throws PropertyServerException, InvalidParameterException, LineageWarehouseException - { - when(lineageWarehouseClient.lineage(USER_ID, Scope.END_TO_END, guid, true)) - .thenReturn(lineageVerticesAndEdges); - Graph response = openLineageService.getEndToEndLineage(USER_ID, guid, true); - checkResponse(response); - } - - - @Test - @DisplayName("Ultimate Destination") - public void testUltimateDestination() throws PropertyServerException, InvalidParameterException, LineageWarehouseException - { - when(lineageWarehouseClient.lineage(USER_ID, Scope.ULTIMATE_DESTINATION, guid, true)) - .thenReturn(lineageVerticesAndEdges); - Graph response = openLineageService.getUltimateDestination(USER_ID, guid, true); - checkResponse(response); - } - - @Test - @DisplayName("GlossaryLineage") - public void testGlossaryLineage() throws PropertyServerException, InvalidParameterException, LineageWarehouseException - { - when(lineageWarehouseClient.lineage(USER_ID, Scope.VERTICAL, guid, true)) - .thenReturn(lineageVerticesAndEdges); - Graph response = openLineageService.getVerticalLineage(USER_ID, guid, true); - checkResponse(response); - } - - @Test - @DisplayName("Search") - public void search() throws PropertyServerException, InvalidParameterException, LineageWarehouseException - { - LineageSearchRequest searchRequest = new LineageSearchRequest(); - List lineageVertices = new ArrayList<>(lineageVerticesAndEdges.getLineageVertices()); - when(lineageWarehouseClient.search(USER_ID, searchRequest)) - .thenReturn(lineageVertices); - List response = openLineageService.search(USER_ID, searchRequest); - checkSearchResponse(response); - } - - private void checkSearchResponse(List nodes) { - assertNotNull("List of nodes is null", nodes); - assertEquals("Response should contain 4 nodes", 4, nodes.size()); - List nodesIds = nodes.stream().map(LineageVertex::getNodeID).collect(Collectors.toList()); - assertTrue("Response doesn't contain all nodes", nodesIds.containsAll(Arrays.asList("p0","p30", "p2"))); - } - - @SuppressWarnings("unchecked") - private void checkResponse(Graph responseGraph) { - assertNotNull("Response is null", responseGraph); - assertNotNull("Response should contain nodes", responseGraph.getNodes()); - assertNotNull("Response should contain edges", responseGraph.getEdges()); - List nodes = responseGraph.getNodes(); - assertNotNull("List of nodes is null", nodes); - List nodesIds = nodes.stream().map(Node::getId).collect(Collectors.toList()); - assertEquals("Response should contain 4 nodes", 4, nodes.size()); - assertTrue("Response doesn't contain all nodes", nodesIds.containsAll(Arrays.asList("p0","p30", "p2"))); - - } - - /** - * Generates the graph: - * - * 1-->2-->3 --\ / 13-->14-->15 - * 7 -- 12 -- - * 4-->5-->6 --/ \ / \ 16-->17-->18 - * -->11 --> - * 8-->9-->10 -->/ \ - * 19-->20-->21 - */ - private void setupLineageVerticesAndEdges(){ - lineageVerticesAndEdges.getLineageVertices().clear(); - lineageVerticesAndEdges.getLineageEdges().clear();; - - for(int i = 1; i < 22; i++) { - lineageVerticesAndEdges.getLineageVertices() - .add(new LineageVertex("n"+i , "node")); - } - - AtomicInteger counter = new AtomicInteger(0); - Set edges = lineageVerticesAndEdges.getLineageEdges(); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n1","n2")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n2","n3")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n3","n7")); - - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n4","n5")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n5","n6")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n6","n7")); - - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n8","n9")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n9","n10")); - - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n10","n11")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n7","n11")); - - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n11","n12")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n11","n19")); - - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n12","n13")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n13","n14")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n14","n15")); - - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n12","n16")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n16","n17")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n17","n18")); - - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n19","n20")); - edges.add( new LineageEdge(counter.incrementAndGet(), "edge","n20","n21")); - - } - -} diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/resources/logback-test.xml b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/resources/logback-test.xml deleted file mode 100644 index 6b1d7ab96a7..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/resources/logback-test.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/resources/openLineageServicesResponse.json b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/resources/openLineageServicesResponse.json deleted file mode 100644 index 49ca040b84c..00000000000 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/src/test/resources/openLineageServicesResponse.json +++ /dev/null @@ -1,42 +0,0 @@ - { - "class": "LineageVerticesAndEdges", - "lineageVertices": [ - { - "class": "LineageVertex", - "nodeID": "p2", - "nodeType": "subProcess", - "displayName": "p2", - "guid": "p2", - "qualifiedName" : "q1", - "attributes": {} - }, - { - "class": "LineageVertex", - "nodeID": "p0", - "nodeType": "subProcess", - "displayName": "p0", - "guid": "p0", - "qualifiedName" : "q2", - "attributes": {} - }, - { - "class": "LineageVertex", - "nodeID": "p30", - "nodeType": "subProcess", - "displayName": "p30", - "guid": "p30", - "qualifiedName" : "q3", - "attributes": {} - }, - { - "class": "LineageVertex", - "nodeID": "gt10", - "nodeType": "glossaryTerm", - "displayName": "gt10", - "guid": "gt10", - "qualifiedName" : "q01", - "attributes": {} - } - ], - "lineageEdges": [] -} \ No newline at end of file diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/truststore.p12 b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/truststore.p12 deleted file mode 100644 index 65dfaa50d31..00000000000 Binary files a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/truststore.p12 and /dev/null differ diff --git a/open-metadata-implementation/view-services/dino-view/README.md b/open-metadata-implementation/view-services/dino-view/README.md deleted file mode 100644 index 0bae6709c50..00000000000 --- a/open-metadata-implementation/view-services/dino-view/README.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -![Technical Preview](../../../images/egeria-content-status-tech-preview.png) - -# Open Metadata View Services (OMVS) - - -Develop a user interface to support the Dino UI, which enables a technical user (such as an Egeria Operator) to -retrieve information about servers, services, cohorts and platforms. -The interface supports the exploration of an Egeria topology and displays it both visually, as graphs and using -detailed textual description of each type of artefact. The textual display provides summary and detailed views. - -This OMVS calls a remote server using the [repository services client](../../repository-services/repository-services-client/README.md). - - -The module structure for the Dino OMVS is as follows: - -* [dino-view-api](dino-view-api) defines the interface to the view service. -* [dino-view-server](dino-view-server) supports an implementation of the view service. -* [dino-view-spring](dino-view-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - -Return to [open-metadata-implementation](../..). - ----- -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/view-services/dino-view/dino-view-api/README.md b/open-metadata-implementation/view-services/dino-view/dino-view-api/README.md deleted file mode 100644 index 1425c8ed09c..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Dino Open Metadata View Service (OMVS) api definitions - -The Dino OMVS api support is organized in the following top level packages - -* ffdc - audit log and error log definitions -* properties - types used by the API -* rest - request body and response body definitions for REST calls - ----- -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/view-services/dino-view/dino-view-api/build.gradle b/open-metadata-implementation/view-services/dino-view/dino-view-api/build.gradle deleted file mode 100644 index 32e153e4481..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:server-operations:server-operations-api') - implementation project(':open-metadata-implementation:platform-services:platform-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-api') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation 'org.slf4j:slf4j-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoExceptionHandler.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoExceptionHandler.java deleted file mode 100644 index c1b01301c61..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoExceptionHandler.java +++ /dev/null @@ -1,231 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.ffdc; - -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; - - - -import java.net.ConnectException; - -public class DinoExceptionHandler { - - - /** - * Method for capturing an exception into a REST response. - * - * Set the exception information into the response. - * This exception capture handler strips off the messageId from the front of the message as - * the message is intended for user-consumption. - * - * @param response REST Response - * @param error returned response. - * @param exceptionClassName class name of the exception to recreate - */ - public static void captureCheckedException(FFDCResponse response, - OCFCheckedExceptionBase error, - String exceptionClassName) - - { - response.setRelatedHTTPCode(error.getReportedHTTPCode()); - response.setExceptionClassName(exceptionClassName); - if (error.getReportedCaughtException() != null) - { - response.setExceptionCausedBy(error.getReportedCaughtException().getClass().getName()); - } - response.setActionDescription(error.getReportingActionDescription()); - String fullErrorMessage = error.getReportedErrorMessage(); - String errorMessageId = error.getReportedErrorMessageId(); - String trimmedErrorMessage = fullErrorMessage.substring(errorMessageId.length()+1); - response.setExceptionErrorMessage(trimmedErrorMessage); - response.setExceptionErrorMessageId(error.getReportedErrorMessageId()); - response.setExceptionErrorMessageParameters(error.getReportedErrorMessageParameters()); - response.setExceptionSystemAction(error.getReportedSystemAction()); - response.setExceptionUserAction(error.getReportedUserAction()); - response.setExceptionProperties(null); - } - - - /* - * Mapping functions for OMRS (back-end) repository services exceptions - */ - - public static DinoViewServiceException mapOMRSUserNotAuthorizedException(String className, - String methodName, - UserNotAuthorizedException repositoryException) - { - String userId = repositoryException.getUserId(); - return new DinoViewServiceException(DinoViewErrorCode.USER_NOT_AUTHORIZED.getMessageDefinition(userId), - className, - methodName); - } - - - - public static DinoViewServiceException mapOMRSInvalidParameterException(String className, String methodName, InvalidParameterException repositoryException) - { - String parameterName = repositoryException.getReportedErrorMessageParameters()[0]; - if (parameterName.equals("searchCriteria")) - parameterName = "Search Text"; - return new DinoViewServiceException(DinoViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, parameterName), - className, - methodName); - } - - - - /* - * Mapping functions for OCF (connector framework) exceptions - */ - - public static DinoViewServiceException mapOCFInvalidParameterException(String className, - String methodName, - org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException ocfException) - { - String ocfMessage = ocfException.getReportedErrorMessage(); - return new DinoViewServiceException(DinoViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, ocfMessage), - className, - methodName); - } - - - public static DinoViewServiceException mapOCFUserNotAuthorizedException(String className, - String methodName, - String userName, - org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException ocfException) - { - return new DinoViewServiceException(DinoViewErrorCode.USER_NOT_AUTHORIZED.getMessageDefinition(methodName, userName), - className, - methodName); - } - - - public static DinoViewServiceException mapOCFPropertyServerException(String className, - String methodName, - String platformName, - org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException ocfException) - { - /* - * This error is caught if a platform services client tries to contact a platform that is not running. - * In this case the exception has relatedHTTPCode 503 and a cause -> cause (i.e. double nested) that is an - * Exception and has a (further) cause which is a ConnectException with message containing "Connection refused". - * This is not nice but the exceptions are nested deeply and we need to dig to find the cause. - */ - - if (ocfException.getCause() != null) - { - Exception cause1 = (Exception)(ocfException.getCause()); - if (cause1.getCause() != null) - { - Exception cause2 = (Exception)(cause1.getCause()); - if (cause2.getCause() != null && cause2.getCause() instanceof ConnectException) - { - String message = cause2.getCause().getMessage(); - if (message.contains("Connection refused")) - { - return new DinoViewServiceException(DinoViewErrorCode.PLATFORM_NOT_AVAILABLE.getMessageDefinition(methodName, platformName), - className, - methodName); - } - } - } - } - - /* In any other scenario, take the message from the OCF exception */ - String exceptionMessage = ocfException.getReportedErrorMessage(); - return new DinoViewServiceException(DinoViewErrorCode.UNKNOWN_ERROR.getMessageDefinition(methodName, exceptionMessage), - className, - methodName); - } - - - /* - * Mapping functions for OMAG Server Configuration exceptions - */ - - public static DinoViewServiceException mapOMAGInvalidParameterException(String className, - String methodName, - OMAGInvalidParameterException omagException) - { - if (omagException != null) - { - String omagMessage = omagException.getReportedErrorMessage(); - return new DinoViewServiceException(DinoViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, omagMessage), - className, - methodName); - } - else - { - return new DinoViewServiceException(DinoViewErrorCode.UNKNOWN_ERROR.getMessageDefinition(methodName), - className, - methodName); - } - - } - - - public static DinoViewServiceException mapOMAGNotAuthorizedException(String className, - String methodName, - String userName, - OMAGNotAuthorizedException omagException) - { - - return new DinoViewServiceException(DinoViewErrorCode.USER_NOT_AUTHORIZED.getMessageDefinition(methodName, userName), - className, - methodName); - - } - - - public static DinoViewServiceException mapOMAGConfigurationErrorException(String className, - String methodName, - String serverName, - OMAGConfigurationErrorException omagException) - { - - return new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_RETRIEVE_SERVER_CONFIGURATION.getMessageDefinition(methodName, serverName), - className, - methodName); - - } - - /* - * Mapping functions for InvalidParameterException and similar - as thrown by DiscoveryConfigurationClient - */ - - public static DinoViewServiceException mapInvalidParameterException(String className, - String methodName, - org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException exception) - { - if (exception != null) - { - String message = exception.getReportedErrorMessage(); - return new DinoViewServiceException(DinoViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, message), - className, - methodName); - } - else - { - return new DinoViewServiceException(DinoViewErrorCode.UNKNOWN_ERROR.getMessageDefinition(methodName), - className, - methodName); - } - - } - - public static DinoViewServiceException mapUserNotAuthorizedException(String className, - String methodName, - org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException repositoryException) - { - String userId = repositoryException.getUserId(); - return new DinoViewServiceException(DinoViewErrorCode.USER_NOT_AUTHORIZED.getMessageDefinition(userId), - className, - methodName); - } -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewAuditCode.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewAuditCode.java deleted file mode 100644 index 96a2fc2b22e..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewAuditCode.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.ffdc; - - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - -/** - * The DinoAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *

    - *
  • Log Message Id - 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 DinoViewAuditCode implements AuditLogMessageSet -{ - /** - * OMVS-DINO-0001 - The Dino View Service (OMVS) is initializing - */ - SERVICE_INITIALIZING("OMVS-DINO-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The Dino View Service (OMVS) is initializing", - "The local server is initializing the Dino View Service. If the initialization is successful then audit message OMVS-DINO-0002 will be issued, if there were errors then they should be shown in the audit log. ", - "No action is required. This is part of the normal operation of the Dino View Service."), - - /** - * OMVS-DINO-0002 - The Dino View Service (OMVS) is initialized - */ - SERVICE_INITIALIZED("OMVS-DINO-0002", - AuditLogRecordSeverityLevel.STARTUP, - "The Dino View Service (OMVS) is initialized", - "The Dino OMVS has completed initialization. Calls will be accepted by this service, if OMRS is also configured and the view server has been started. ", - "No action is required. This is part of the normal operation of the Dino View Service. Once the OMRS is configured and the server is started, Dino view service requests can be accepted."), - - /** - * OMVS-DINO-0003 - The Dino View Service (OMVS) is shutting down - */ - SERVICE_SHUTDOWN("OMVS-DINO-0003", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Dino View Service (OMVS) is shutting down", - "The local server has requested shutdown of the Dino OMVS.", - "No action is required. The operator should verify that shutdown was intended. This is part of the normal operation of the Dino OMVS."), - - /** - * OMVS-DINO-0004 - The Dino View Service (OMVS) is unable to initialize a new instance; error message is {0} - */ - SERVICE_INSTANCE_FAILURE("OMVS-DINO-0004", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Dino View Service (OMVS) is unable to initialize a new instance; error message is {0}", - "The view service detected an error during the start up of a specific server instance. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - - /** - * OMVS-DINO-0005 - The Dino View Service (OMVS) is shutting down server instance {0} - */ - SERVICE_TERMINATING("OMVS-DINO-0005", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Dino View Service (OMVS) is shutting down server instance {0}", - "The local handler has requested shut down of the Dino OMVS.", - "No action is required. This is part of the normal operation of the service."), - - /** - * OMVS-DINO-0006 - The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2} - */ - UNEXPECTED_EXCEPTION("OMVS-DINO-0006", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2}", - "The request returned an Exception.", - "This is probably a logic error. Review the stack trace to identify where the error occurred and work to resolve the cause.") - ; - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor for DinoAuditCode expects to be passed one of the enumeration rows defined in - * DinoAuditCode above. For example: - * DinoAuditCode auditCode = DinoAuditCode.SERVER_NOT_AVAILABLE; - * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique identifier 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 - */ - DinoViewAuditCode(String messageId, - AuditLogRecordSeverityLevel 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. - */ - 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. - */ - 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 "DinoViewAuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - ", messageDefinition=" + getMessageDefinition() + - '}'; - } -} - diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewErrorCode.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewErrorCode.java deleted file mode 100644 index 8436b9eeeda..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewErrorCode.java +++ /dev/null @@ -1,269 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The DinoViewErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMVS - * It is used in conjunction with all OMVS 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
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: 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 user should correct the error
  • - *
- */ -public enum DinoViewErrorCode implements ExceptionMessageSet -{ - SERVICE_NOT_INITIALIZED - (404, "OMVS-DINO-400-001", - "The Dino Open Metadata View Service (OMVS) has not been initialized.", - "The system is unable to perform the request because the service has not been initialized.", - "Initialize the view service retry the request."), - - INVALID_CONFIG_PROPERTY - (404, "OMVS-DINO-400-002", - "The Dino Open Metadata View Service (OMVS) configuration has an invalid or missing property, property name {0}.", - "The service is unable to initialize because the configuration is not valid or complete.", - "Correct the view service configuration and restart the view server."), - - VIEW_SERVICE_NULL_PLATFORM_NAME - (400, "OMVS-DINO-400-003", - "The Dino Open Metadata View Service (OMVS) has been called with a null platform name", - "The system is unable to resolve the platform to query without knowing what it is called.", - "The platform name is supplied by the caller to the OMAG view service. This call needs to be corrected before the view service can perform the request."), - - VIEW_SERVICE_NULL_SERVER_NAME - (400, "OMVS-DINO-400-004", - "The Dino Open Metadata View Service (OMVS) has been called with a null server name", - "The system is unable to resolve the server to query without knowing what it is called.", - "The server name is supplied by the caller to the OMAG view service. This call needs to be corrected before the view service can perform the request."), - - VIEW_SERVICE_UNKNOWN_SERVER_NAME - (400, "OMVS-DINO-400-005", - "The Dino Open Metadata View Service (OMVS)'s {0} method has been called with an unknown server name of {1}", - "The system is unable to resolve the server name.", - "The server name is supplied by the caller to the OMAG view service. Please ensure a known server name is passed and retry the call to the view service."), - - USER_NOT_AUTHORIZED - (400, "OMVS-REPOSITORY-EXPLORER-400-004", - "The dino view service could not perform the requested operation {0} on behalf of user {1}", - "The system reported that the user is not authorized to perform the requested action.", - "Request that the name used to log in to the UI is given authority to perform the request."), - - REPOSITORY_NOT_AVAILABLE - (400, "OMVS-DINO-400-005", - "The dino view service operation {0} found that server {1} is not available", - "The system reported that the server is not available to perform the requested action.", - "Retry the request when the server is available."), - - PLATFORM_NOT_AVAILABLE - (400, "OMVS-DINO-400-006", - "The dino view service operation {0} could not reach platform {1}", - "The system reported that the platform is not reachable using the provided URL.", - "Check the platform is running and check the dino resource endpoint configuration for the server and its platform."), - - REPOSITORY_ERROR - (400, "OMVS-DINO-400-007", - "The dino view service operation {0} encountered a problem connecting to the repository, the message is {1}", - "The system could not complete a repository operation due to the error indicated.", - "Look at the error message and check the configuration and state of the repository server."), - - INVALID_PARAMETER - (400, "OMVS-DINO-400-008", - "The dino view service operation {0} could not proceed with the setting of parameter {1}", - "The system detected that the parameter was not set to a valid value and could not perform the requested action.", - "Check the parameter setting and retry the operation."), - - ENTITY_NOT_KNOWN_IN_REPOSITORY - (400, "OMVS-DINO-400-009", - "The dino view service operation {0} found no entity with guid {1} in repository {2}", - "The system reported that the entity is not available in the specified repository.", - "If you expect that the entity exists, check the GUID is correct, try a server running a repository with the home instance or reference copy, or enable the enterprise option."), - - ENTITY_NOT_KNOWN_IN_ENTERPRISE - (400, "OMVS-DINO-400-010", - "The dino view service operation {0} found no entity with guid {1} at enterprise scope for repository {2}", - "The system reported that the entity is not available at enterprise scope for the specified repository server.", - "If you expect that the entity exists, check the GUID is correct and the selected repository server is in the cohort where you would expect to find the entity."), - - ENTITY_PROXY_ONLY - (400, "OMVS-DINO-400-011", - "The dino view service operation {0} reported that an entity is only available as a proxy - {1}", - "The system reported that the entity is only available as a proxy object.", - "Try to retrieve the entity detail from a server running a repository with the home instance or reference copy, or enable the enterprise option."), - - RELATIONSHIP_NOT_KNOWN_IN_REPOSITORY - (400, "OMVS-DINO-400-012", - "The dino view service operation {0} found no relationship with guid {1} in repository {2}", - "The system reported that the relationship is not available in the specified repository.", - "If you expect that the relationship exists, check the GUID is correct, try a server running a repository with the home instance or reference copy, or enable the enterprise option."), - - RELATIONSHIP_NOT_KNOWN_IN_ENTERPRISE - (400, "OMVS-DINO-400-013", - "The dino view service operation {0} found no relationship with guid {1} at enterprise scope for repository {2}", - "The system reported that the relationship is not available at enterprise scope for the specified repository server.", - "If you expect that the relationship exists, check the GUID is correct and the selected repository server is in the cohort where you would expect to find the relationship."), - - VIEW_SERVICE_REQUEST_BODY_MISSING - (400, "OMVS-DINO-400-014", - "The dino view service could not perform the requested operation {0} because te requestBody was missing", - "The system could not perform the requested action.", - "Check the calling code to make sure that a requestBody is passed to the view service API."), - - TYPE_ERROR - (400, "OMVS-DINO-400-015", - "The dino view service operation {0} reported a type error - {1}", - "The system could not perform the requested action.", - "Check the calling code to make sure that a valid type is passed to the view service API."), - - PROPERTY_ERROR - (400, "OMVS-DINO-400-016", - "The dino view service operation {0} reported a property error - {1}", - "The system could not perform the requested action with the supplied properties.", - "Check the detailed message and check the properties supplied to the operation."), - - PAGING_ERROR - (400, "OMVS-DINO-400-017", - "The dino view service operation {0} reported a paging error - {1}", - "The system could not perform the requested action.", - "Check the calling code to make sure that the requested operation is valid."), - - FUNCTION_NOT_SUPPORTED_ERROR - (400, "OMVS-DINO-400-018", - "The dino view service could not perform the requested operation {0} because it is not supported by repository {1}", - "The system could not perform the requested action.", - "Check the conformance of the target repository and retry with a supported operation."), - - COULD_NOT_CREATE_HANDLER - (400, "OMVS-DINO-400-019", - "The dino view service could not instantiate its handler", - "The system could not perform the requested action.", - "Check the configuration of the view service and its platform."), - - COULD_NOT_RETRIEVE_SERVER_CONFIGURATION - (400, "OMVS-DINO-400-020", - "The dino view service operation {0} could not retrieve the configuration for server {1}", - "The system could not perform the requested action.", - "Check the configuration of the view service and its platform."), - - COULD_NOT_RETRIEVE_SERVICE_CONFIGURATION - (400, "OMVS-DINO-400-021", - "The dino view service operation {0} could not retrieve the configuration for service {1}", - "The system could not perform the requested action.", - "Check the configuration of the view service and its platform."), - - COULD_NOT_RETRIEVE_GOVERNANCE_ENGINE - (400, "OMVS-DINO-400-022", - "The dino view service operation {0} could not find a governance engine with qualified name {1}", - "The system could not perform the requested action.", - "Please check the supplied engine name matches the engine service's engine configuration."), - - /* - * Provide a catch-all error code in case Rex catches a Throwable. It will capture the Throwable - * and package it into the REST response, but does not specific error handling for the error - */ - UNKNOWN_ERROR - (400, "OMVS-DINO-400-099", - "The dino view service caught an unknown error during operation {0}. The detailed message is {1}", - "The system could not perform the requested action.", - "Please check the detailed message and the system log.") - - ; - - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - DinoViewErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewServiceException.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewServiceException.java deleted file mode 100644 index ea49d820de3..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewServiceException.java +++ /dev/null @@ -1,93 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; - -import java.io.Serial; -import java.util.Arrays; - - -/* - * This is a simple exception class that can convey the few types of exception - * that it is sensible to propagate back to the user interface. The Dino handler will - * have detected or caught each error condition, audit logged it and will then - * create a DinoViewServiceException to capture the essential details that can be - * used in the UI. - */ -public class DinoViewServiceException extends OCFCheckedExceptionBase -{ - @Serial - private static final long serialVersionUID = 1L; - - /* - * Constructor - */ - public DinoViewServiceException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) - { - super(messageDefinition, className, actionDescription); - } - - - - /** - * JSON-style toString - * - * @return string of property names and values for this enum - */ - @Override - public String toString() - { - return "DinoViewServiceException{" + - ", reportedHTTPCode=" + getReportedHTTPCode() + - ", reportingClassName='" + getReportingClassName() + '\'' + - ", reportingActionDescription='" + getReportingActionDescription() + '\'' + - ", reportedErrorMessageId='" + getReportedErrorMessageId() + '\'' + - ", reportedErrorMessageParameters=" + Arrays.toString(getReportedErrorMessageParameters()) + - ", reportedSystemAction='" + getReportedSystemAction() + '\'' + - ", reportedUserAction='" + getReportedUserAction() + '\'' + - ", reportedCaughtException=" + getReportedCaughtException() + - ", relatedProperties=" + getRelatedProperties() + - '}'; - } - - /** - * 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 == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - return true; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return super.hashCode(); - } -} - diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/package-info.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/package-info.java deleted file mode 100644 index ec159279781..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Dino OMVS. - */ -package org.odpi.openmetadata.viewservices.dino.api.ffdc; diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/DinoServerInstance.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/DinoServerInstance.java deleted file mode 100644 index e05d216f865..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/DinoServerInstance.java +++ /dev/null @@ -1,99 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.rest.ServerTypeClassificationSummary; - -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) -public class DinoServerInstance { - - /* - * A DinoServerInstance is used to include a brief summary of a server to be included into the serverList in response to a request - * to the platform to list its servers [active or known]. A DinoServerInstance conveys just enough information for the UI to be able - * to display the server's status and to identify the serverInstanceName (which is how server resource endpoints are configured into - * the VS); and to identify the serverName (which is how the server itself is configured and how it is identified/referred to by the - * platform hosting it). - * The serverInstanceName will generally be used as the key to a map of DinoServerInstance objects but for ease of handling the - * serverInstanceName is explicitly included in the DinoServerInstance object, alongside the serverName and active status. - */ - - /* - * Include the server instance name - this is the name used in the VS configuration as opposed to the serverName used in the server configuration - * and reported by the platform. THe serverInstanceName has no real meaning in terms of the configuration or deployment of OMAG resources, it is - * a purely logical name used between the VS and the admin UI, to identify the instance of the server as being available to the user to query. - */ - private String serverInstanceName; - - /* - * Include the general server name - this is not the same as the serverInstanceName used in the VS configuration; it is the serverName as - * used in the server configuration and the servername as reported by the platform. - */ - private String serverName; - - /* - * The boolean field 'active' indicates if the server is active or not. - */ - private boolean isActive; - - /* - * Include the platform name - this is the name of the platform (in the VS configuration) that was used in the query that retrieved this ServerStatus - * object. It can be used by the UI to associate the server with the platform (via a graph relationship) and can be passed again by the client if it - * needs to query further information about the server instance. - */ - private String platformName; - - /** - * Default Constructor sets the properties to nulls - */ - public DinoServerInstance() - { - /* - * Nothing to do. - */ - } - - public DinoServerInstance(String serverInstanceName, String serverName, boolean active) { - - this.serverInstanceName = serverInstanceName; - this.serverName = serverName; - this.isActive = isActive; - this.platformName = platformName; - } - - public String getServerInstanceName() { return serverInstanceName; } - - public void setServerInstanceName(String serverInstanceName) { - this.serverInstanceName = serverInstanceName; - } - - public String getServerName() { return serverName; } - - public void setServerName(String serverName) { - this.serverName = serverName; - } - - public boolean getIsActive() { return isActive; } - - public void setIsActive(boolean isActive) { - this.isActive = isActive; - } - - public String getPlatformName() { return platformName; } - - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/EngineDetails.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/EngineDetails.java deleted file mode 100644 index 6efc76326f0..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/EngineDetails.java +++ /dev/null @@ -1,174 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Map; -import java.util.Objects; - -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) -public class EngineDetails { - - private String engineGUID; - private String engineDisplayName; - private String engineQualifiedName; - private String engineDescription; - private String engineTypeDescription; - private String engineVersion; - private Map serviceMap; - - - /** - * Default Constructor sets the properties to nulls - */ - public EngineDetails() - { - /* - * Nothing to do. - */ - } - - public EngineDetails(String engineGUID, - String engineDisplayName, - String engineQualifiedName, - String engineDescription, - String engineTypeDescription, - String engineVersion, - Map serviceMap ) - { - - this.engineGUID = engineGUID; - this.engineDisplayName = engineDisplayName; - this.engineQualifiedName = engineQualifiedName; - this.engineDescription = engineDescription; - this.engineTypeDescription = engineTypeDescription; - this.engineVersion = engineVersion; - this.serviceMap = serviceMap; - - } - - - public String getEngineGUID() { - return engineGUID; - } - - public void setEngineGUID(String engineGUID) { - this.engineGUID = engineGUID; - } - - public String getEngineDisplayName() { return engineDisplayName; } - - public void setEngineDisplayName(String engineDisplayName) { - this.engineDisplayName = engineDisplayName; - } - - public String getEngineQualifiedName() { - return engineQualifiedName; - } - - public void setEngineQualifiedName(String engineQualifiedName) { - this.engineQualifiedName = engineQualifiedName; - } - - public String getEngineDescription() { - return engineDescription; - } - - public void setEngineDescription(String engineDescription) { - this.engineDescription = engineDescription; - } - - public String getEngineTypeDescription() { - return engineTypeDescription; - } - - public void setEngineTypeDescription(String engineTypeDescription) { this.engineTypeDescription = engineTypeDescription; } - - public String getEngineVersion() { - return engineVersion; - } - - public void setEngineVersion(String engineVersion) { - this.engineVersion = engineVersion; - } - - public Map getServiceMap() { - return serviceMap; - } - - public void setServiceMap(Map serviceMap) { - this.serviceMap = serviceMap; - } - - - - /** - * Standard toString method. - * - * @return JSON style description of variables. - */ - @Override - public String toString() - { - return "EngineDetails{" + - ", engineDisplayName='" + engineDisplayName + '\'' + - ", engineQualifiedName='" + engineQualifiedName + '\'' + - ", engineDescription='" + engineDescription + '\'' + - ", engineTypeDescription='" + engineTypeDescription + '\'' + - ", engineVersion='" + engineVersion + '\'' + - ", engineGUID=" + engineGUID +'\'' + - ", serviceMap=" + serviceMap +'\'' + - '}'; - } - - - /** - * Validate that an object is equal depending on their stored values. - * - * @param objectToCompare object - * @return boolean result - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EngineDetails that = (EngineDetails) objectToCompare; - return Objects.equals(getEngineQualifiedName(), that.getEngineQualifiedName()) && - Objects.equals(getEngineGUID(), that.getEngineGUID()) && - Objects.equals(getEngineDisplayName(), that.getEngineDisplayName()) && - Objects.equals(getEngineVersion(), that.getEngineVersion()) && - Objects.equals(getEngineDescription(), that.getEngineDescription()) && - Objects.equals(getEngineTypeDescription(), that.getEngineTypeDescription()) && - Objects.equals(getServiceMap(), that.getServiceMap()) ; - } - - - /** - * Return a hash code based on the values of this object. - * - * @return in hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getEngineQualifiedName(), getEngineGUID(), getEngineDisplayName(), - getEngineDescription(), getEngineVersion(), getEngineTypeDescription(), - getServiceMap() ); - } - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/PlatformOverview.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/PlatformOverview.java deleted file mode 100644 index 5d5aa9f371b..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/PlatformOverview.java +++ /dev/null @@ -1,142 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService; - -import java.util.List; - -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) -public class PlatformOverview { - - private String platformName; - private String platformRootURL; // e.g. "https://localhost:9443" - private String description; - private String platformOrigin; - - private List accessServices; - private List commonServices; - private List governanceServices; - private List viewServices; - private List engineServices; - private List integrationServices; - - /** - * Default Constructor sets the properties to nulls - */ - public PlatformOverview() - { - /* - * Nothing to do. - */ - } - - - public PlatformOverview(String platformName, String description, String platformRootURL, String platformOrigin) { - - this.platformName = platformName; - this.description = description; - this.platformRootURL = platformRootURL; - this.platformOrigin = platformOrigin; - } - - - /* - * Config constructor - create a skeletal PlatformOverview from a ResourceEndpointConfig - */ - public PlatformOverview(ResourceEndpointConfig cfg) { - - this.platformName = cfg.getPlatformName(); - this.description = cfg.getDescription(); - this.platformRootURL = cfg.getPlatformRootURL(); - } - - - public String getPlatformName() { - return platformName; - } - - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getPlatformRootURL() { - return platformRootURL; - } - - public void setPlatformRootURL(String platformRootURL) { - this.platformRootURL = platformRootURL; - } - - public String getPlatformOrigin() { - return platformOrigin; - } - - public void setPlatformOrigin(String platformOrigin) { - this.platformOrigin = platformOrigin; - } - - public List getAccessServices() { - return accessServices; - } - - public void setAccessServices(List accessServices) { - this.accessServices = accessServices; - } - - public List getCommonServices() { - return commonServices; - } - - public void setCommonServices(List commonServices) { - this.commonServices = commonServices; - } - - public List getGovernanceServices() { - return governanceServices; - } - - public void setGovernanceServices(List governanceServices) { this.governanceServices = governanceServices; } - - public List getViewServices() { - return viewServices; - } - - public void setViewServices(List viewServices) { - this.viewServices = viewServices; - } - - public List getEngineServices() { - return engineServices; - } - - public void setEngineServices(List engineServices) { - this.engineServices = engineServices; - } - - public List getIntegrationServices() { - return integrationServices; - } - - public void setIntegrationServices(List integrationServices) { - this.integrationServices = integrationServices; - } -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/RequestSummary.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/RequestSummary.java deleted file mode 100644 index 6822fa45f3e..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/RequestSummary.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Arrays; - -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) -public class RequestSummary { - - /* - * A RequestSummary object captures the essence of a request and is passed back in response. - * It is stored in the gen into which the response is stored. - */ - - private String platformName; - private String operation; - private String serverName; - private String requestContextCorrelator; - - - - /** - * Default Constructor sets the properties to nulls - */ - public RequestSummary() - { - /* - * Nothing to do. - */ - } - - public RequestSummary(String platformName, String serverName, String requestContextCorrelator, String operation) { - - this.platformName = platformName; - this.serverName = serverName; - this.requestContextCorrelator = requestContextCorrelator; - this.operation = operation; - - } - - public String getPlatformName() { return platformName; } - - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - public String getServerName() { return serverName; } - - public void setServerName(String serverName) { - this.serverName = serverName; - } - - public String getRequestContextCorrelator() { return requestContextCorrelator; } - - public void setRequestContextCorrelator(String requestContextCorrelator) { - this.requestContextCorrelator = requestContextCorrelator; - } - - public String getOperation() { return operation; } - - public void setOperation(String operation) { - this.operation = operation; - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "RequestSummary{" + - "platformName='" + getPlatformName() + '\'' + - ", serverName='" + getServerName() + '\'' + - ", requestContextCorrelator='" + getRequestContextCorrelator() + '\'' + - ", operation='" + getOperation() + '\'' + - '}'; - } - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ResourceEndpoint.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ResourceEndpoint.java deleted file mode 100644 index 978d8f68d06..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ResourceEndpoint.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; - -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) -public class ResourceEndpoint { - - - private String resourceCategory; - private String resourceDescription; - private String resourceRootURL; // e.g. "https://localhost:9443" - private String serverName; - private String platformName; - private String serverInstanceName; - - /** - * Default Constructor sets the properties to nulls - */ - public ResourceEndpoint() - { - /* - * Nothing to do. - */ - } - - - public ResourceEndpoint(String resourceCategory, String platformName, String resourceDescription, String resourceRootURL, String serverName, String serverInstanceName) { - this.resourceCategory = resourceCategory; - this.resourceDescription = resourceDescription; - this.resourceRootURL = resourceRootURL; - this.serverName = serverName; - this.platformName = platformName; - this.serverInstanceName = serverInstanceName; - } - - - /* - * Config constructor - create a ResourceEndpoint from a ResourceEndpointConfig - */ - public ResourceEndpoint(ResourceEndpointConfig cfg) { - this.resourceCategory = cfg.getResourceCategory(); - this.resourceDescription = cfg.getDescription(); - this.resourceRootURL = cfg.getPlatformRootURL(); - this.serverName = cfg.getServerName(); - this.platformName = cfg.getPlatformName(); - this.serverInstanceName = cfg.getServerInstanceName(); - } - - public String getResourceCategory() { - return resourceCategory; - } - - public void setResourceCategory(String resourceCategory) { - this.resourceCategory = resourceCategory; - } - - public String getResourceDescription() { - return resourceDescription; - } - - public void setResourceDescription(String resourceDescription) { - this.resourceDescription = resourceDescription; - } - - public String getResourceRootURL() { - return resourceRootURL; - } - - public void setResourceRootURL(String resourceRootURL) { - this.resourceRootURL = resourceRootURL; - } - - public String getServerName() { - return serverName; - } - - public void setServerName(String serverName) { - this.serverName = serverName; - } - - public String getPlatformName() { - return platformName; - } - - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - public String getServerInstanceName() { - return serverInstanceName; - } - - public void setServerInstanceName(String serverInstanceName) { - this.serverInstanceName = serverInstanceName; - } - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServerCohortDetails.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServerCohortDetails.java deleted file mode 100644 index c571753c20a..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServerCohortDetails.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.cohortregistrystore.properties.MemberRegistration; -import org.odpi.openmetadata.repositoryservices.properties.CohortDescription; - -import java.util.List; - -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) -public class ServerCohortDetails { - - /* - * A ServerCohortDetails object is constructed when a server overview is retrieved. - * The server overview contains a map (by cohort name) with an entry for each of the cohorts the server is a membber of. - * For each cohort, the map contains a ServerCohortDetails object which holds the: - * cohortDescription - the status and embedded connection details - * localRegistration - the registration of the local server in the cohort - * remoteRegistrations - the registrations of other servers in the cohort, as seen by the local server - */ - - - private CohortDescription cohortDescription; - - private MemberRegistration localRegistration; - - private List remoteRegistrations; - - - - /** - * Default Constructor sets the properties to nulls - */ - public ServerCohortDetails() - { - /* - * Nothing to do. - */ - } - - public ServerCohortDetails(CohortDescription cohortDescription, - MemberRegistration localRegistration, - List remoteRegistrations) { - - - this.cohortDescription = cohortDescription; - this.localRegistration = localRegistration; - this.remoteRegistrations = remoteRegistrations; - - } - - public CohortDescription getCohortDescription() { return cohortDescription; } - - public void setCohortDescription(CohortDescription cohortDescription) { - this.cohortDescription = cohortDescription; - } - - public MemberRegistration getLocalRegistration() { return localRegistration; } - - public void setLocalRegistration(MemberRegistration localRegistration) { - this.localRegistration = localRegistration; - } - - public List getRemoteRegistrations() { return remoteRegistrations; } - - public void setRemoteRegistrations(List remoteRegistrations) { - this.remoteRegistrations = remoteRegistrations; - } - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServerOverview.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServerOverview.java deleted file mode 100644 index 40828320489..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServerOverview.java +++ /dev/null @@ -1,282 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.rest.ServerTypeClassificationSummary; -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService; -import org.odpi.openmetadata.serveroperations.properties.ServerStatus; - -import java.util.List; -import java.util.Map; -import java.util.Objects; - -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) -public class ServerOverview { - - private String serverInstanceName; - private String serverName; - private String platformRootURL; // e.g. "https://localhost:9443" - private String description; - private String serverOrigin; - private ServerTypeClassificationSummary serverClassification; - private boolean isActive; - private Map cohortDetails; - private ServerStatus serverStatus; - private List integrationServices; - private List engineServices; - private List accessServices; - private List viewServices; - //private List commonServices; - //private List governanceServices; - - - - - - /** - * Default Constructor sets the properties to nulls - */ - public ServerOverview() - { - /* - * Nothing to do. - */ - } - - - public ServerOverview(String serverInstanceName, - String serverName, - String description, - String platformRootURL, - String serverOrigin, - ServerTypeClassificationSummary serverClassification, - boolean isActive, - Map cohortDetails, - ServerStatus serverStatus, - List integrationServices, - List engineServices, - List accessServices, - List viewServices - //List commonServices, - //List governanceServices, - - ) { - - this.serverInstanceName = serverInstanceName; - this.serverName = serverName; - this.description = description; - this.platformRootURL = platformRootURL; - this.serverOrigin = serverOrigin; - this.serverClassification = serverClassification; - this.isActive = isActive; - this.cohortDetails = cohortDetails; - this.serverStatus = serverStatus; - this.integrationServices = integrationServices; - this.engineServices = engineServices; - this.accessServices = accessServices; - this.viewServices = viewServices; - //this.commonServices = commonServices; - //this.governanceServices = governanceServices; - - - } - - - /* - * Config constructor - create a skeletal PlatformOverview from a ResourceEndpointConfig - */ - public ServerOverview(ResourceEndpointConfig cfg) { - - this.serverInstanceName = cfg.getServerInstanceName(); - this.serverName = cfg.getServerName(); - this.description = cfg.getDescription(); - this.platformRootURL = cfg.getPlatformRootURL(); - } - - - public String getServerInstanceName() { - return serverInstanceName; - } - - public void setServerInstanceName(String serverInstanceName) { - this.serverInstanceName = serverInstanceName; - } - - public String getServerName() { - return serverName; - } - - public void setServerName(String serverName) { - this.serverName = serverName; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getPlatformRootURL() { - return platformRootURL; - } - - public void setPlatformRootURL(String platformRootURL) { - this.platformRootURL = platformRootURL; - } - - public String getServerOrigin() { - return serverOrigin; - } - - public void setServerOrigin(String serverOrigin) { - this.serverOrigin = serverOrigin; - } - - public ServerTypeClassificationSummary getServerClassification() { - return serverClassification; - } - - public void setServerClassification(ServerTypeClassificationSummary serverClassification) { - this.serverClassification = serverClassification; - } - - public boolean getIsActive() { - return isActive; - } - - public void setIsActive(boolean isActive) { - this.isActive = isActive; - } - - public Map getCohortDetails() { - return cohortDetails; - } - - public void setCohortDetails(Map cohortDetails) { this.cohortDetails = cohortDetails; } - - public ServerStatus getServerStatus() { - return serverStatus; - } - - public void setServerStatus(ServerStatus serverStatus) { - this.serverStatus = serverStatus; - } - - public List getIntegrationServices() { - return integrationServices; - } - - public void setIntegrationServices(List integrationServices) { - this.integrationServices = integrationServices; - } - - public List getEngineServices() { - return engineServices; - } - - public void setEngineServices(List engineServices) { - this.engineServices = engineServices; - } - - public List getAccessServices() { - return accessServices; - } - - public void setAccessServices(List accessServices) { - this.accessServices = accessServices; - } - - public List getViewServices() { - return viewServices; - } - - public void setViewServices(List viewServices) { - this.viewServices = viewServices; - } - - - /** - * Standard toString method. - * - * @return JSON style description of variables. - */ - @Override - public String toString() - { - return "ServerOverview{" + - ", description='" + description + '\'' + - ", platformRootURL=" + platformRootURL +'\'' + - ", serverName=" + serverName +'\'' + - ", serverInstanceName=" + serverInstanceName +'\'' + - ", serverOrigin=" + serverOrigin +'\'' + - ", serverClassification=" + serverClassification +'\'' + - ", isActive=" + isActive +'\'' + - ", cohortDetails=" + cohortDetails +'\'' + - ", serverStatus=" + serverStatus +'\'' + - ", integrationServices=" + integrationServices +'\'' + - ", engineServices=" + engineServices +'\'' + - ", accessServices=" + accessServices +'\'' + - ", viewServices=" + viewServices +'\'' + - '}'; - } - - - /** - * Validate that an object is equal depending on their stored values. - * - * @param objectToCompare object - * @return boolean result - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ServerOverview that = (ServerOverview) objectToCompare; - return Objects.equals(getServerInstanceName(), that.getServerInstanceName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getPlatformRootURL(), that.getPlatformRootURL()) && - Objects.equals(getServerName(), that.getServerName()) && - Objects.equals(getServerOrigin(), that.getServerOrigin()) && - Objects.equals(getIsActive(), that.getIsActive()) && - Objects.equals(getCohortDetails(), that.getCohortDetails()) && - Objects.equals(getIntegrationServices(), that.getIntegrationServices()) && - Objects.equals(getEngineServices(), that.getEngineServices()) && - Objects.equals(getAccessServices(), that.getAccessServices()) && - Objects.equals(getViewServices(), that.getViewServices()) && - Objects.equals(getServerStatus(), that.getServerStatus()); - } - - - /** - * Return a hash code based on the values of this object. - * - * @return in hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getServerInstanceName(), getDescription(), getPlatformRootURL(), getServerName(), - getServerOrigin(), getIsActive(), getCohortDetails(), getServerStatus(), - getIntegrationServices(), getAccessServices(), getViewServices(), getEngineServices()); - } - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServiceDetails.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServiceDetails.java deleted file mode 100644 index 2b58d761184..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServiceDetails.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.EngineServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.IntegrationServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; - -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) -public class ServiceDetails { - - public enum ServiceCat { - IntegrationService, - EngineService, - AccessService, - ViewService - } - - - private ServiceCat serviceCat; - private IntegrationServiceConfig integrationServiceConfig; - private EngineServiceConfig engineServiceConfig; - private AccessServiceConfig accessServiceConfig; - private ViewServiceConfig viewServiceConfig; - - - /** - * Default Constructor sets the properties to nulls - */ - public ServiceDetails() - { - /* - * Nothing to do. - */ - } - - /** - * Copy constructor - * @param template object to copy - */ - public ServiceDetails(ServiceDetails template) { - - this.integrationServiceConfig = template.getIntegrationServiceConfig(); - this.engineServiceConfig = template.getEngineServiceConfig(); - this.accessServiceConfig = template.getAccessServiceConfig(); - this.viewServiceConfig = template.getViewServiceConfig(); - } - - public ServiceCat getServiceCat() { return serviceCat; } - - public void setServiceCat(ServiceCat serviceCat) { - this.serviceCat = serviceCat; - } - - public IntegrationServiceConfig getIntegrationServiceConfig() { return integrationServiceConfig; } - - public void setIntegrationServiceConfig(IntegrationServiceConfig integrationServiceConfig) { - this.integrationServiceConfig = integrationServiceConfig; - } - - public EngineServiceConfig getEngineServiceConfig() { return engineServiceConfig; } - - public void setEngineServiceConfig(EngineServiceConfig engineServiceConfig) { - this.engineServiceConfig = engineServiceConfig; - } - - public AccessServiceConfig getAccessServiceConfig() { return accessServiceConfig; } - - public void setAccessServiceConfig(AccessServiceConfig accessServiceConfig) { - this.accessServiceConfig = accessServiceConfig; - } - - public ViewServiceConfig getViewServiceConfig() { return viewServiceConfig; } - - public void setViewServiceConfig(ViewServiceConfig viewServiceConfig) { - this.viewServiceConfig = viewServiceConfig; - } - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServicePropertiesAndRequests.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServicePropertiesAndRequests.java deleted file mode 100644 index dbbe354f4e1..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/ServicePropertiesAndRequests.java +++ /dev/null @@ -1,111 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceengine.properties.GovernanceServiceProperties; - -import java.util.Map; -import java.util.Objects; - -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) -public class ServicePropertiesAndRequests { - - private GovernanceServiceProperties serviceProperties; - private Map> requestTypeParameters; - - - /** - * Default Constructor sets the properties to nulls - */ - public ServicePropertiesAndRequests() - { - /* - * Nothing to do. - */ - } - - public ServicePropertiesAndRequests(GovernanceServiceProperties serviceProperties, - Map> requestTypeParameters) - { - - this.serviceProperties = serviceProperties; - this.requestTypeParameters = requestTypeParameters; - - } - - - public GovernanceServiceProperties getServiceProperties() { - return serviceProperties; - } - - public void setServiceProperties(GovernanceServiceProperties serviceProperties) { - this.serviceProperties = serviceProperties; - } - - public Map> getRequestTypeParameters() { return requestTypeParameters; } - - public void setRequestTypeParameters( Map> requestTypeParameters) { - this.requestTypeParameters = requestTypeParameters; - } - - - - /** - * Standard toString method. - * - * @return JSON style description of variables. - */ - @Override - public String toString() - { - return "ServicePropertiesAndRequests{" + - ", serviceProperties='" + serviceProperties + '\'' + - ", requestTypeParameters='" + requestTypeParameters + '\'' + - '}'; - } - - - /** - * Validate that an object is equal depending on their stored values. - * - * @param objectToCompare object - * @return boolean result - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ServicePropertiesAndRequests that = (ServicePropertiesAndRequests) objectToCompare; - return Objects.equals(getRequestTypeParameters(), that.getRequestTypeParameters()) && - Objects.equals(getServiceProperties(), that.getServiceProperties()); - } - - - /** - * Return a hash code based on the values of this object. - * - * @return in hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getServiceProperties(), getRequestTypeParameters() ); - } - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/package-info.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/package-info.java deleted file mode 100644 index 0267b1862c1..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/properties/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Dino OMVS. - */ -package org.odpi.openmetadata.viewservices.dino.api.properties; diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoCohortListResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoCohortListResponse.java deleted file mode 100644 index 75e5b013e64..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoCohortListResponse.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - - -import org.odpi.openmetadata.repositoryservices.properties.CohortDescription; - -import java.util.Arrays; -import java.util.List; - -public class DinoCohortListResponse extends DinoViewOMVSAPIResponse { - - - // A DinoCohortListResponse contains a list of CohortDescription objects. - - private List cohortList = null; - - /** - * Default constructor - */ - public DinoCohortListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoCohortListResponse(DinoCohortListResponse template) - { - super(template); - - if (template != null) - { - this.cohortList = template.getCohortList(); - } - } - - - /** - * Return the serverList. - * - * @return bean - */ - public List getCohortList() - { - return cohortList; - } - - - /** - * Set the serverList. - * - * @param cohortList - bean - */ - public void setCohortList(List cohortList) - { - this.cohortList = cohortList; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoCohortListResponse{" + - "cohortList=" + cohortList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoEngineDetailsResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoEngineDetailsResponse.java deleted file mode 100644 index 8141319327f..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoEngineDetailsResponse.java +++ /dev/null @@ -1,95 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - -import org.odpi.openmetadata.viewservices.dino.api.properties.EngineDetails; -import org.odpi.openmetadata.viewservices.dino.api.properties.ServiceDetails; - -import java.util.Arrays; - - -public class DinoEngineDetailsResponse extends DinoViewOMVSAPIResponse { - - - private EngineDetails engineDetails = null; - - /** - * Default constructor - */ - public DinoEngineDetailsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoEngineDetailsResponse(DinoEngineDetailsResponse template) - { - super(template); - - if (template != null) - { - this.engineDetails = template.getEngineDetails(); - } - } - - - /** - * Return the engineDetails. - * - * @return bean - */ - public EngineDetails getEngineDetails() - { - return engineDetails; - } - - - /** - * Set the engineDetails. - * - * @param engineDetails - bean - */ - public void setEngineDetails(EngineDetails engineDetails) - { - this.engineDetails = engineDetails; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoEngineDetailsResponse{" + - "engineDetails=" + engineDetails + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoEngineRequestBody.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoEngineRequestBody.java deleted file mode 100644 index de79a62f408..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoEngineRequestBody.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class DinoEngineRequestBody { - - - /* - * The DinoEngineRequestBody class provides a body for REST requests to the platform-oriented Dino REST APIs - */ - - private String serverName; // mandatory - private String platformName; // mandatory - private String requestContextCorrelator; - private String engineQualifiedName; // mandatory - - - public DinoEngineRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public void setServerName(String serverName) { this.serverName = serverName; } - - public String getPlatformName() { return platformName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public String getRequestContextCorrelator() { return requestContextCorrelator; } - - public void setRequestContextCorrelator(String requestContextCorrelator) { this.requestContextCorrelator = requestContextCorrelator; } - - public String getEngineQualifiedName() { return engineQualifiedName; } - - public void setEngineQualifiedName(String engineQualifiedName) { this.engineQualifiedName = engineQualifiedName; } - - @Override - public String toString() - { - return "DinoEngineRequestBody{" + - ", serverName=" + serverName + - ", platformName=" + platformName + - ", requestContextCorrelator=" + requestContextCorrelator + - ", engineQualifiedName=" + engineQualifiedName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformOverviewResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformOverviewResponse.java deleted file mode 100644 index 9b7f27e38de..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformOverviewResponse.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - -import org.odpi.openmetadata.viewservices.dino.api.properties.PlatformOverview; - -import java.util.Arrays; - -public class DinoPlatformOverviewResponse extends DinoViewOMVSAPIResponse { - - - private PlatformOverview platformOverview = null; - - /** - * Default constructor - */ - public DinoPlatformOverviewResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoPlatformOverviewResponse(DinoPlatformOverviewResponse template) - { - super(template); - - if (template != null) - { - this.platformOverview = template.getPlatformOverview(); - } - } - - - /** - * Return the platformOverview. - * - * @return platformOverview - */ - public PlatformOverview getPlatformOverview() - { - return platformOverview; - } - - - /** - * Set the platformOverview. - * - * @param platformOverview - the platform overview object to set - */ - public void setPlatformOverview(PlatformOverview platformOverview) - { - this.platformOverview = platformOverview; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoPlatformOverviewResponse{" + - "platformOverview=" + platformOverview + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformRequestBody.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformRequestBody.java deleted file mode 100644 index b751880b5a5..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformRequestBody.java +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class DinoPlatformRequestBody { - - - /* - * The DinoPlatformRequestBody class provides a body for REST requests to the platform-oriented Dino REST APIs - */ - - private String platformName; // must be non-null - - - - public DinoPlatformRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getPlatformName() { return platformName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - - @Override - public String toString() - { - return "DinoPlatformRequestBody{" + - ", platformName=" + platformName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformServiceListRequestBody.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformServiceListRequestBody.java deleted file mode 100644 index ebe60aae4b6..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoPlatformServiceListRequestBody.java +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class DinoPlatformServiceListRequestBody { - - - /* - * The DinoPlatformServiceListRequestBody class provides a body for REST requests to retrieve server lists (active or known) - */ - - private String platformName; // must be non-null - - - - public DinoPlatformServiceListRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getPlatformName() { return platformName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - - @Override - public String toString() - { - return "DinoPlatformServiceListRequestBody{" + - ", platformName=" + platformName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoResourceEndpointListResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoResourceEndpointListResponse.java deleted file mode 100644 index 5147d5654f2..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoResourceEndpointListResponse.java +++ /dev/null @@ -1,120 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - - -import org.odpi.openmetadata.viewservices.dino.api.properties.ResourceEndpoint; - -import java.util.Arrays; -import java.util.List; - -public class DinoResourceEndpointListResponse extends DinoViewOMVSAPIResponse { - - - - private List platformList = null; - private List serverList = null; - - /** - * Default constructor - */ - public DinoResourceEndpointListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoResourceEndpointListResponse(DinoResourceEndpointListResponse template) - { - super(template); - - if (template != null) - { - this.platformList = template.getPlatformList(); - this.serverList = template.getServerList(); - } - } - - - /** - * Return the platformList. - * - * @return bean - */ - public List getPlatformList() - { - return platformList; - } - - - /** - * Set the resourceEndpointList. - * - * @param platformList - bean - */ - public void setPlatformList(List platformList) - { - this.platformList = platformList; - } - - /** - * Return the serverList. - * - * @return bean - */ - public List getServerList() - { - return serverList; - } - - - /** - * Set the resourceEndpointList. - * - * @param serverList - bean - */ - public void setServerList(List serverList) - { - this.serverList = serverList; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoResourceEndpointListResponse{" + - "platformList='" + platformList + '\'' + - ", serverList='" + serverList + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoResponse.java deleted file mode 100644 index 72c9c6c781e..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - - -import java.util.Arrays; - -public class DinoResponse extends DinoViewOMVSAPIResponse { - - /** - * Default constructor - */ - public DinoResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoResponse(DinoResponse template) - { - super(template); - - if (template != null) - { - // copy any properties - } - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoResponse{" + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerAuditLogResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerAuditLogResponse.java deleted file mode 100644 index 1978730c148..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerAuditLogResponse.java +++ /dev/null @@ -1,96 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - - -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogReport; - -import java.util.Arrays; -import java.util.List; - -public class DinoServerAuditLogResponse extends DinoViewOMVSAPIResponse { - - - private OMRSAuditLogReport auditLog = null; - - /** - * Default constructor - */ - public DinoServerAuditLogResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServerAuditLogResponse(DinoServerAuditLogResponse template) - { - super(template); - - if (template != null) - { - this.auditLog = template.getAuditLog(); - } - } - - - /** - * Return the server audit log - * - * @return bean - */ - public OMRSAuditLogReport getAuditLog() - { - return auditLog; - } - - - /** - * Set the serverList. - * - * @param auditLog - bean - */ - public void setAuditLog(OMRSAuditLogReport auditLog) - { - this.auditLog = auditLog; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoServerAuditLogResponse{" + - "auditLog=" + auditLog + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerConfigResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerConfigResponse.java deleted file mode 100644 index 140e5638a13..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerConfigResponse.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; - -import java.util.Arrays; - -public class DinoServerConfigResponse extends DinoViewOMVSAPIResponse { - - - private OMAGServerConfig serverConfig = null; - - /** - * Default constructor - */ - public DinoServerConfigResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServerConfigResponse(DinoServerConfigResponse template) - { - super(template); - - if (template != null) - { - this.serverConfig = template.getServerConfig(); - } - } - - - /** - * Return the serverConfig. - * - * @return bean - serverConfig - */ - public OMAGServerConfig getServerConfig() - { - return serverConfig; - } - - - /** - * Set the string. - * - * @param serverConfig - bean - */ - public void setServerConfig(OMAGServerConfig serverConfig) - { - this.serverConfig = serverConfig; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoStringResponse{" + - "serverConfig=" + serverConfig + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerDoubleConfigResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerDoubleConfigResponse.java deleted file mode 100644 index 7cf79889c2d..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerDoubleConfigResponse.java +++ /dev/null @@ -1,112 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; - -import java.util.Arrays; - -public class DinoServerDoubleConfigResponse extends DinoViewOMVSAPIResponse { - - - private OMAGServerConfig storedConfig = null; - private OMAGServerConfig activeConfig = null; - - /** - * Default constructor - */ - public DinoServerDoubleConfigResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServerDoubleConfigResponse(DinoServerDoubleConfigResponse template) - { - super(template); - - if (template != null) - { - this.storedConfig = template.getStoredConfig(); - this.activeConfig = template.getActiveConfig(); - } - } - - - /** - * Return the serverConfig. - * - * @return bean - serverConfig - */ - public OMAGServerConfig getStoredConfig() - { - return storedConfig; - } - - - /** - * Set the string. - * - * @param storedConfig - bean - */ - public void setStoredConfig(OMAGServerConfig storedConfig) - { - this.storedConfig = storedConfig; - } - - /** - * Return the activeConfig. - * - * @return bean - serverConfig - */ - public OMAGServerConfig getActiveConfig() - { - return activeConfig; - } - - - /** - * Set the string. - * - * @param activeConfig - bean - */ - public void setActiveConfig(OMAGServerConfig activeConfig) - { - this.activeConfig = activeConfig; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoStringResponse{" + - "serverConfig=" + storedConfig + - "activeConfig=" + activeConfig + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerListResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerListResponse.java deleted file mode 100644 index 03958667659..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerListResponse.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - - -import org.odpi.openmetadata.viewservices.dino.api.properties.DinoServerInstance; - -import java.util.Arrays; -import java.util.List; - -public class DinoServerListResponse extends DinoViewOMVSAPIResponse { - - - /* - * A ServerList response is list of ServerStatus objects. - * Each server is identified by its server instance name to the REST client. The platformRootU~RL is not sent back as the client cannot use it to request - * further details about the server (instance). The return of the server list is in response to the platform services call to list active or known servers - * and is intended to convey much/any detail about each server instance. It must convey enough to allow the server and server instance to be identified so - * that the server instance is recognizable in the SevrerSelector (list of pre-defined server resource endpoints) and can be displayed in the diagram - where - * it can be selected to request further (full) details. - * If the server is not found in the configured list of server instances - the ServerStatus.serverInstanceName field is set to null. - * - * It is desirable to include an indication of whether the server is active or not. The status is depicted by the isActive boolean in the ServerStatus object. - * The RootURL (and other details) is not included. These stay in the VS; the RootURL is resolved by the VS so it avoids exposing an interface in which the - * client (any client) of the VS REST API can specify the RootURL. - */ - private List serverList = null; - - /** - * Default constructor - */ - public DinoServerListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServerListResponse(DinoServerListResponse template) - { - super(template); - - if (template != null) - { - this.serverList = template.getServerList(); - } - } - - - /** - * Return the serverList. - * - * @return bean - */ - public List getServerList() - { - return serverList; - } - - - /** - * Set the serverList. - * - * @param serverList - bean - */ - public void setServerList(ListserverList) - { - this.serverList = serverList; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoServerListResponse{" + - "serverList=" + serverList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerOverviewResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerOverviewResponse.java deleted file mode 100644 index 846f417a87b..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerOverviewResponse.java +++ /dev/null @@ -1,93 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - -import org.odpi.openmetadata.viewservices.dino.api.properties.PlatformOverview; -import org.odpi.openmetadata.viewservices.dino.api.properties.ServerOverview; - -import java.util.Arrays; - -public class DinoServerOverviewResponse extends DinoViewOMVSAPIResponse { - - - private ServerOverview serverOverview = null; - - /** - * Default constructor - */ - public DinoServerOverviewResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServerOverviewResponse(DinoServerOverviewResponse template) - { - super(template); - - if (template != null) - { - this.serverOverview = template.getServerOverview(); - } - } - - - /** - * Return the serverOverview. - * - * @return serverOverview - */ - public ServerOverview getServerOverview() - { - return serverOverview; - } - - - /** - * Set the serverOverview. - * - * @param serverOverview - the server overview object to set - */ - public void setServerOverview(ServerOverview serverOverview) - { - this.serverOverview = serverOverview; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoServerOverviewResponse{" + - "serverOverview=" + serverOverview + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerRequestBody.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerRequestBody.java deleted file mode 100644 index cd9ef7dee4c..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerRequestBody.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class DinoServerRequestBody { - - - /* - * The DinoServerRequestBody class provides a body for REST requests to the platform-oriented Dino REST APIs - */ - - private String serverName; // must be non-null - private String platformName; // must be non-null - private String serverInstanceName; - private String description; - - - public DinoServerRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public void setServerName(String serverName) { this.serverName = serverName; } - - public String getPlatformName() { return platformName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public String getServerInstanceName() { return serverInstanceName; } - - public void setServerInstanceName(String serverInstanceName) { this.serverInstanceName = serverInstanceName; } - - public String getDescription() { return description; } - - public void setDescription(String description) { this.description = description; } - - @Override - public String toString() - { - return "DinoServerRequestBody{" + - ", serverName=" + serverName + - ", platformName=" + platformName + - ", serverInstanceName=" + serverInstanceName + - ", description=" + description + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerTypeResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerTypeResponse.java deleted file mode 100644 index fe64383602c..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServerTypeResponse.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Arrays; -import java.util.List; - -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) -public class DinoServerTypeResponse extends DinoViewOMVSAPIResponse { - - private String serverTypeName = null; - private String serverTypeDescription = null; - - /** - * Default constructor - */ - public DinoServerTypeResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServerTypeResponse(DinoServerTypeResponse template) - { - super(template); - - if (template != null) - { - this.serverTypeName = template.getServerTypeName(); - this.serverTypeDescription = template.getServerTypeDescription(); - } - } - - - /** - * Return the serverTypeName. - * - * @return string - */ - public String getServerTypeName() - { - return serverTypeName; - } - - - /** - * Set the serverTypeName. - * - * @param serverTypeName - string - */ - public void setServerTypeName(String serverTypeName) - { - this.serverTypeName = serverTypeName; - } - - /** - * Return the serverTypeDescription. - * - * @return string - */ - public String getServerTypeDescription() - { - return serverTypeDescription; - } - - - /** - * Set the serverTypeDescription. - * - * @param serverTypeDescription - string - */ - public void setServerTypeDescription(String serverTypeDescription) - { - this.serverTypeDescription = serverTypeDescription; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoServerListResponse{" + - "serverTypeName=" + serverTypeName + - ", serverTypeDescription=" + serverTypeDescription + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceDetailsResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceDetailsResponse.java deleted file mode 100644 index cc37d830838..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceDetailsResponse.java +++ /dev/null @@ -1,94 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - -import org.odpi.openmetadata.viewservices.dino.api.properties.ServiceDetails; - -import java.util.Arrays; - - -public class DinoServiceDetailsResponse extends DinoViewOMVSAPIResponse { - - - private ServiceDetails serviceDetails = null; - - /** - * Default constructor - */ - public DinoServiceDetailsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServiceDetailsResponse(DinoServiceDetailsResponse template) - { - super(template); - - if (template != null) - { - this.serviceDetails = template.getServiceDetails(); - } - } - - - /** - * Return the serviceDetails. - * - * @return bean - */ - public ServiceDetails getServiceDetails() - { - return serviceDetails; - } - - - /** - * Set the serviceDetails. - * - * @param serviceDetails - bean - */ - public void setServiceDetails(ServiceDetails serviceDetails) - { - this.serviceDetails = serviceDetails; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoServiceDetailsResponse{" + - "serviceDetails=" + serviceDetails + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceListResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceListResponse.java deleted file mode 100644 index 85c669a6627..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceListResponse.java +++ /dev/null @@ -1,95 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - - - -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService; - -import java.util.Arrays; -import java.util.List; - -public class DinoServiceListResponse extends DinoViewOMVSAPIResponse { - - - private List serviceList = null; - - /** - * Default constructor - */ - public DinoServiceListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoServiceListResponse(DinoServiceListResponse template) - { - super(template); - - if (template != null) - { - this.serviceList = template.getServiceList(); - } - } - - - /** - * Return the serviceList. - * - * @return bean - */ - public List getServiceList() - { - return serviceList; - } - - - /** - * Set the serverList. - * - * @param serviceList - bean - */ - public void setServiceList(List serviceList) - { - this.serviceList = serviceList; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoServiceListResponse{" + - "serviceList=" + serviceList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceRequestBody.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceRequestBody.java deleted file mode 100644 index 4732786b1f8..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoServiceRequestBody.java +++ /dev/null @@ -1,78 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class DinoServiceRequestBody { - - - /* - * The DinoServerRequestBody class provides a body for REST requests to the platform-oriented Dino REST APIs - */ - - private String serverName; // mandatory - private String platformName; // mandatory - private String serverInstanceName; - private String serviceFullName; // At least one of full name and URL marker must be supplied - private String serviceURLMarker; // See line above - private String description; - - - public DinoServiceRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public void setServerName(String serverName) { this.serverName = serverName; } - - public String getPlatformName() { return platformName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public String getServiceFullName() { return serviceFullName; } - - public void setServiceFullName(String serviceFullName) { this.serviceFullName = serviceFullName; } - - public String getServiceURLMarker() { return serviceURLMarker; } - - public void setServiceURLMarker(String serviceURLMarker) { this.serviceURLMarker = serviceURLMarker; } - - public String getServerInstanceName() { return serverInstanceName; } - - public void setServerInstanceName(String serverInstanceName) { this.serverInstanceName = serverInstanceName; } - - public String getDescription() { return description; } - - public void setDescription(String description) { this.description = description; } - - @Override - public String toString() - { - return "DinoServiceRequestBody{" + - ", serverName=" + serverName + - ", platformName=" + platformName + - ", serverInstanceName=" + serverInstanceName + - ", serviceFullName=" + serviceFullName + - ", serviceURLMarker=" + serviceURLMarker + - ", description=" + description + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoStringResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoStringResponse.java deleted file mode 100644 index d6835e7b4c5..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoStringResponse.java +++ /dev/null @@ -1,91 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.dino.api.rest; - - -import java.util.Arrays; -import java.util.List; - -public class DinoStringResponse extends DinoViewOMVSAPIResponse { - - - private String string = null; - - /** - * Default constructor - */ - public DinoStringResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoStringResponse(DinoStringResponse template) - { - super(template); - - if (template != null) - { - this.string = template.getString(); - } - } - - - /** - * Return the string. - * - * @return bean - */ - public String getString() - { - return string; - } - - - /** - * Set the string. - * - * @param string - bean - */ - public void setString(String string) - { - this.string = string; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoStringResponse{" + - "string=" + string + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoViewOMVSAPIResponse.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoViewOMVSAPIResponse.java deleted file mode 100644 index cf88abeed4d..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/DinoViewOMVSAPIResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; -import org.odpi.openmetadata.viewservices.dino.api.properties.RequestSummary; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DinoViewOMVSAPIResponse provides a common header for the Dino OMVS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = DinoResponse.class, name = "DinoResponse") -}) - -public abstract class DinoViewOMVSAPIResponse extends FFDCResponseBase -{ - - private RequestSummary requestSummary = null; - - /** - * Default constructor - */ - public DinoViewOMVSAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DinoViewOMVSAPIResponse(DinoViewOMVSAPIResponse template) - { - super(template); - } - - - public RequestSummary getRequestSummary() { return requestSummary; } - - public void setRequestSummary(RequestSummary requestSummary) { - this.requestSummary = requestSummary; - } - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "DinoViewOMVSAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - ", requestSummary='" + getRequestSummary() + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/package-info.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/package-info.java deleted file mode 100644 index 43258ed09b8..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/rest/package-info.java +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.viewservices.dino.api.rest; diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/README.md b/open-metadata-implementation/view-services/dino-view/dino-view-server/README.md deleted file mode 100644 index b1967b9a4de..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Dino Open Metadata View Service (OMVS) server-side implementation - -The Dino OMVS server-side support is organized in the following top level packages - -* admin - DinoViewAdmin controls this OMVS's lifecycle. It is initialised here receiving the view service configuration. It is shutdown here. -* handlers - instance handler -* server - implementation of the view service - ----- -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/view-services/dino-view/dino-view-server/build.gradle b/open-metadata-implementation/view-services/dino-view/dino-view-server/build.gradle deleted file mode 100644 index e0234563616..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:dino-view:dino-view-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-client') - implementation project(':open-metadata-implementation:server-operations:server-operations-api') - implementation project(':open-metadata-implementation:platform-services:platform-services-api') - implementation project(':open-metadata-implementation:platform-services:platform-services-client') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-api') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-client') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/admin/DinoViewAdmin.java b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/admin/DinoViewAdmin.java deleted file mode 100644 index cd04dcc1bde..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/admin/DinoViewAdmin.java +++ /dev/null @@ -1,214 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.admin; - - -import org.odpi.openmetadata.adminservices.configuration.properties.IntegrationViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin; -import org.odpi.openmetadata.adminservices.ffdc.OMAGAdminAuditCode; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoViewAuditCode; -import org.odpi.openmetadata.viewservices.dino.server.DinoViewServicesInstance; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - - -/** - * DinoViewAdmin is the class that is called by the UI Server to initialize and terminate - * the Dino OMVS. The initialization call provides this OMVS with the Audit log and configuration. - */ -public class DinoViewAdmin extends ViewServiceAdmin { - - private static final Logger log = LoggerFactory.getLogger(DinoViewAdmin.class); - - - protected String resourceEndpointsPropertyName = "resourceEndpoints"; /* Common */ - - private AuditLog auditLog = null; - private DinoViewServicesInstance instance = null; - private String serverName = null; - - /** - * Default constructor - */ - public DinoViewAdmin() { - } - - /** - * Initialize the Dino view service. - * - * @param serverName name of the local server - * @param viewServiceConfig specific configuration properties for this view service. - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use to issue calls to the remote server. - * @param maxPageSize maximum page size. 0 means unlimited - * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. - */ - @Override - public void initialize(String serverName, - ViewServiceConfig viewServiceConfig, - AuditLog auditLog, - String serverUserName, - int maxPageSize) throws OMAGConfigurationErrorException - - { - - final String actionDescription = "initialize"; - - auditLog.logMessage(actionDescription, DinoViewAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - this.auditLog = auditLog; - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + actionDescription); - } - - /* - * This method will be called (by Operational Services) with the view service config passed as a ViewServiceConfig. - * This is the super type of IntegrationViewServiceConfig which is what this service actually requires. - */ - - IntegrationViewServiceConfig integrationViewServiceConfig; - if (viewServiceConfig instanceof IntegrationViewServiceConfig) - { - integrationViewServiceConfig = (IntegrationViewServiceConfig) viewServiceConfig; - } - else - { - logBadConfiguration(viewServiceConfig.getViewServiceName(), - "viewServiceConfig", - viewServiceConfig.toString(), - auditLog, - actionDescription); - - // unreachable - return; - } - - final String viewServiceFullName = viewServiceConfig.getViewServiceName(); - - try { - - List resourceEndpoints = this.extractResourceEndpoints(integrationViewServiceConfig.getResourceEndpoints(), - viewServiceFullName, - auditLog); - - - - - - - /* - * The name and rootURL of a repository server are not passed at this stage - they are not known at this stage - * because they are set at runtime by the user and potentially changed between operations. - */ - this.instance = new DinoViewServicesInstance(serverName, - auditLog, - serverUserName, - maxPageSize, - resourceEndpoints); - - this.serverName = serverName; - - auditLog.logMessage(actionDescription, - DinoViewAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), - viewServiceConfig.toString()); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + actionDescription); - } - - } - catch (OMAGConfigurationErrorException error) - { - throw error; - } - catch (Exception error) - { - auditLog.logException(actionDescription, - DinoViewAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage()), - viewServiceConfig.toString(), - error); - - super.throwUnexpectedInitializationException(actionDescription, - ViewServiceDescription.DINO.getViewServiceFullName(), - error); - } - - } - - /** - * Shutdown the dino view service. - */ - @Override - public void shutdown() - { - final String actionDescription = "shutdown"; - - log.debug("==> Method: " + actionDescription); - - auditLog.logMessage(actionDescription, DinoViewAuditCode.SERVICE_TERMINATING.getMessageDefinition(serverName)); - - if (instance != null) - { - this.instance.shutdown(); - } - - auditLog.logMessage(actionDescription, DinoViewAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(serverName)); - - log.debug("<== Method: " + actionDescription); - - } - - - - /** - * Extract the resource endpoints property from the view services option. - * - * @param resourceEndpoints options passed to the access service. - * @param viewServiceFullName name of calling service - * @param auditLog audit log for error messages - * @return null or list of resource endpoints - * @throws OMAGConfigurationErrorException the supported zones property is not a list of zone names. - */ - protected List extractResourceEndpoints(List resourceEndpoints, - String viewServiceFullName, - AuditLog auditLog) - throws OMAGConfigurationErrorException - { - final String methodName = "extractResourceEndpoints"; - - /* - * Dino cannot operate without any endpoints. - * Check if resourceEndpoints is null and if so call logBadConfigProperties, which will - * log the error and throw an OMAGConfigurationErrorException - */ - if (resourceEndpoints == null || resourceEndpoints.isEmpty()) - { - - logBadConfiguration(viewServiceFullName, - resourceEndpointsPropertyName, - resourceEndpoints == null ? "null" : resourceEndpoints.toString(), - auditLog, - methodName); - - // unreachable - return null; - - } - else - { - auditLog.logMessage(methodName, - OMAGAdminAuditCode.RESOURCE_ENDPOINTS.getMessageDefinition(viewServiceFullName, - resourceEndpoints.toString())); - return resourceEndpoints; - } - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/handlers/DinoViewHandler.java b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/handlers/DinoViewHandler.java deleted file mode 100644 index 36bf5ceec58..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/handlers/DinoViewHandler.java +++ /dev/null @@ -1,2398 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.handlers; - -import org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineConfigurationClient; -import org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceEngineElement; -import org.odpi.openmetadata.accessservices.governanceengine.metadataelements.RegisteredGovernanceServiceElement; -import org.odpi.openmetadata.accessservices.governanceengine.properties.GovernanceServiceProperties; -import org.odpi.openmetadata.accessservices.governanceengine.properties.RegisteredGovernanceServiceProperties; -import org.odpi.openmetadata.adminservices.client.EngineHostConfigurationClient; -import org.odpi.openmetadata.adminservices.client.IntegrationDaemonConfigurationClient; -import org.odpi.openmetadata.adminservices.client.MetadataAccessPointConfigurationClient; -import org.odpi.openmetadata.adminservices.client.OMAGServerConfigurationClient; -import org.odpi.openmetadata.adminservices.client.ViewServerConfigurationClient; -import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.EngineServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.IntegrationServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException; -import org.odpi.openmetadata.adminservices.rest.ServerTypeClassificationSummary; -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.platformservices.client.PlatformServicesClient; -import org.odpi.openmetadata.serveroperations.properties.ServerStatus; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogReport; -import org.odpi.openmetadata.repositoryservices.clients.AuditLogServicesClient; -import org.odpi.openmetadata.repositoryservices.clients.MetadataHighwayServicesClient; -import org.odpi.openmetadata.repositoryservices.connectors.stores.cohortregistrystore.properties.MemberRegistration; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.properties.CohortDescription; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoExceptionHandler; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoViewErrorCode; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoViewServiceException; -import org.odpi.openmetadata.viewservices.dino.api.properties.DinoServerInstance; -import org.odpi.openmetadata.viewservices.dino.api.properties.EngineDetails; -import org.odpi.openmetadata.viewservices.dino.api.properties.PlatformOverview; -import org.odpi.openmetadata.viewservices.dino.api.properties.ResourceEndpoint; -import org.odpi.openmetadata.viewservices.dino.api.properties.ServerCohortDetails; -import org.odpi.openmetadata.viewservices.dino.api.properties.ServerOverview; -import org.odpi.openmetadata.viewservices.dino.api.properties.ServiceDetails; -import org.odpi.openmetadata.viewservices.dino.api.properties.ServicePropertiesAndRequests; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - - -/** - * The DinoViewHandler is initialised with the configured resource endpoints. - * The handler exposes methods for functionality for the dino view - */ -public class DinoViewHandler { - private static final Logger log = LoggerFactory.getLogger(DinoViewHandler.class); - - /* - * viewServiceOptions should have been validated in the Admin layer. - * The viewServiceOptions contains a list of resource endpoints that the - * view service can connect to. It is formatted like this: - * - * "resourceEndpoints" : [ - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Platform", - * "platformName" : "Platform1", - * "platformRootURL" : "https://localhost:8082", - * "description" : "Egeria deployment on local development server" - * }, - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Platform", - * "platformName" : "Platform2", - * "platformRootURL" : "https://localhost:9443", - * "description" : "Egeria deployment on local test server" - * }, - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Server", - * "serverName" : "Metadata_Server", - * "serverInstanceName" : "Metadata Server 1", - * "platformName" : "Platform1", - * "description" : "Metadata server for development testing" - * }, - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Server", - * "serverName" : "Metadata_Server2", - * "serverInstanceName" : "Metadata Server 2", - * "platformName" : "Platform2", - * "description" : "Metadata server used as home for test artefacts" - * } - * ] - */ - private Map configuredPlatforms = null; // map is keyed using platformRootURL - private Map configuredServerInstances = null; // map is keyed using serverName+platformRootURL so each instance is unique - - /** - * Default constructor for DinoViewHandler - */ - public DinoViewHandler() - { - - } - - /** - * Constructor for DinoViewHandler with configured resourceEndpoints - * - * @param resourceEndpoints - list of resource endpoint configuration objects for this view service - */ - public DinoViewHandler(List resourceEndpoints) - { - - /* - * Populate map of resources with their endpoints.... - */ - - // TODO - It would be desirable to add validation rules to ensure uniqueness etc. - - configuredPlatforms = new HashMap<>(); - configuredServerInstances = new HashMap<>(); - - if (resourceEndpoints != null && !resourceEndpoints.isEmpty()) - { - - resourceEndpoints.forEach(res -> { - - String resCategory = res.getResourceCategory(); - ResourceEndpoint rep = new ResourceEndpoint(res); - - String resName; - - switch (resCategory) - { - case "Platform": - resName = res.getPlatformName(); - configuredPlatforms.put(resName, rep); - break; - - case "Server": - resName = res.getServerInstanceName(); - configuredServerInstances.put(resName, rep); - break; - - default: - // Unsupported category is ignored - break; - - } - }); - } - } - - /** - * getResourceEndpoints - returns a list of the configured resource endpoints. Does not include discovered resource endpoints. - * - * @param userId userId under which the request is performed - * @param methodName The name of the method being invoked - * @return The resource endpoints that have been configured for the view service - */ - public Map> getResourceEndpoints(String userId, - String methodName) - - { - Map> returnMap = new HashMap<>(); - - List platformList = null; - List serverList = null; - - if (!configuredPlatforms.isEmpty()) - { - platformList = new ArrayList<>(); - platformList.addAll(configuredPlatforms.values()); - } - - if (!configuredServerInstances.isEmpty()) - { - serverList = new ArrayList<>(); - serverList.addAll(configuredServerInstances.values()); - } - - returnMap.put("platformList", platformList); - returnMap.put("serverList", serverList); - - return returnMap; - } - - - /** - * resolvePlatformRootURL - *

- * This method will look up the configured root URL for the named platform. - * - * @param platformName - the name of the platform to resolve - * @param methodName - the name of the calling method - * @return resolved platform URL Root - *

- * Exceptions - * @throws DinoViewServiceException an error was detected and details are reported in the exception - */ - private String resolvePlatformRootURL(String platformName, - String methodName) - throws DinoViewServiceException - - { - String platformRootURL = null; - - if (platformName != null) - { - ResourceEndpoint resource = configuredPlatforms.get(platformName); - if (resource != null) - { - platformRootURL = resource.getResourceRootURL(); - } - } - if (platformName == null || platformRootURL == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_NULL_PLATFORM_NAME.getMessageDefinition(), - this.getClass().getName(), - methodName); - } - - return platformRootURL; - } - - - /** - * getPlatformServicesClient - *

- * This method will get the above client object, which then provides access to all the methods of the - * Platform Services interface. - * - * @param platformName - name of the platform to connect to - * @param platformRootURL - the root URL to connect to the platform - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private PlatformServicesClient getPlatformServicesClient(String platformName, - String platformRootURL) - throws DinoViewServiceException - - { - String methodName = "getOMAGServerConfigurationClient"; - - try - { - return new PlatformServicesClient(platformName, platformRootURL); - } - catch (InvalidParameterException e) - - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - /** - * getOMAGServerConfigurationClient - *

- * This method will get the above client object, which then provides access to all the methods of the - * Platform Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param serverRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private OMAGServerConfigurationClient getOMAGServerConfigurationClient(String userId, - String serverName, - String serverRootURL) - - throws DinoViewServiceException - - { - String methodName = "getOMAGServerConfigurationClient"; - - try - { - - return new OMAGServerConfigurationClient(userId, serverName, serverRootURL); - - } - catch (OMAGInvalidParameterException e) - - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - - - } - - /** - * getMetadataHighwayServicesClient - *

- * This method will get the above client object, which then provides access to all the methods of the - * Platform Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param platformRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private MetadataHighwayServicesClient getMetadataHighwayServicesClient(String userId, - String serverName, - String platformRootURL) - - throws DinoViewServiceException - - { - String methodName = "getMetadataHighwayServicesClient"; - - try - { - String serverRootURL = platformRootURL + "/servers/" + serverName; - - return new MetadataHighwayServicesClient(serverName, serverRootURL); - - } - catch (org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException e) - - { - throw DinoExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), methodName, e); - } - - } - - - - - /** - * getAuditLogServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * Repository Services Audit Log Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param platformRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private AuditLogServicesClient getAuditLogServicesClient(String userId, - String serverName, - String platformRootURL) - - throws DinoViewServiceException - - - - { - - String methodName = "getAuditLogServicesClient"; - - try - { - - String serverRootURL = platformRootURL + "/servers/" + serverName; - - return new AuditLogServicesClient(serverName, serverRootURL); - - - } - catch(org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - - - /** - * getIntegrationDaemonConfigurationClient - * - * This method will get the above client object, which then provides access to all the methods of the - * Repository Services Audit Log Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param platformRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private IntegrationDaemonConfigurationClient getIntegrationDaemonConfigurationClient(String userId, - String serverName, - String platformRootURL) - - throws DinoViewServiceException - - - - { - - String methodName = "getIntegrationDaemonConfigurationClient"; - - try - { - - return new IntegrationDaemonConfigurationClient(userId, serverName, platformRootURL); - - } - catch(OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - /** - * getEngineHostConfigurationClient - * - * This method will get the above client object, which then provides access to all the methods of the - * Repository Services Audit Log Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param platformRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private EngineHostConfigurationClient getEngineHostConfigurationClient(String userId, - String serverName, - String platformRootURL) - - throws DinoViewServiceException - - { - - String methodName = "getEngineHostConfigurationClient"; - - try - { - - return new EngineHostConfigurationClient(userId, serverName, platformRootURL); - - } - catch(OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - - /** - * getMetadataAccessPointConfigurationClient - * - * This method will get the above client object, which then provides access to all the methods of the - * Repository Services Audit Log Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param platformRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private MetadataAccessPointConfigurationClient getMetadataAccessPointConfigurationClient(String userId, - String serverName, - String platformRootURL) - - throws DinoViewServiceException - - { - - String methodName = "getMetadataAccessPointConfigurationClient"; - - try - { - - return new MetadataAccessPointConfigurationClient(userId, serverName, platformRootURL); - - } - catch(OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - /** - * getViewServerConfigurationClient - * - * This method will get the above client object, which then provides access to all the methods of the - * Repository Services Audit Log Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param platformRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private ViewServerConfigurationClient getViewServerConfigurationClient(String userId, - String serverName, - String platformRootURL) - - throws DinoViewServiceException - - { - - String methodName = "getViewServerConfigurationClient"; - - try - { - - return new ViewServerConfigurationClient(userId, serverName, platformRootURL); - - } - catch(OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - - /** - * getGovernanceEngineConfigurationClient - * - * This method will get the above client object, which then provides access to all the methods of the - * Repository Services Audit Log Services interface. - * - * @param userId - name of the user performing the operation - * @param serverName - name of the server to connect to - * @param platformRootURL - the root URL to connect to the server - * @throws DinoViewServiceException - an invalid parameter was detected and reported - */ - private GovernanceEngineConfigurationClient getGovernanceEngineConfigurationClient(String userId, - String serverName, - String platformRootURL) - - throws DinoViewServiceException - - { - - String methodName = "getGovernanceEngineConfigurationClient"; - - try - { - - return new GovernanceEngineConfigurationClient(serverName, platformRootURL ); - - } - catch(InvalidParameterException e) - { - throw DinoExceptionHandler.mapInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - /* - * Retrieve the platform overview - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return the platform overview - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public PlatformOverview platformGetOverview(String userId, - String platformName, - String methodName) - throws - DinoViewServiceException - - { - - PlatformServicesClient platformServicesClient; - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client. Internal method will only throw a DinoViewServiceException - */ - platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - - try - { - - /* - * Construct an overview with the configured aspects - */ - ResourceEndpoint platformConfig = configuredPlatforms.get(platformName); - PlatformOverview platformOverview = new PlatformOverview(); - platformOverview.setPlatformName(platformConfig.getPlatformName()); - platformOverview.setDescription(platformConfig.getResourceDescription()); - platformOverview.setPlatformRootURL(platformConfig.getResourceRootURL()); - - // All the following calls to the platformServicesClient can throw a number of OCF exceptions - - // Fetch the platformOrigin - String platformOrigin = platformServicesClient.getPlatformOrigin(userId); - platformOverview.setPlatformOrigin(platformOrigin); - - // Fetch the various types of registered services - // A RegisteredOMAGService contains serviceName, serviceURLMarker, serviceDescription, serviceWiki - List accessServiceList = platformServicesClient.getAccessServices(userId); - platformOverview.setAccessServices(accessServiceList); - - List commonServiceList = platformServicesClient.getCommonServices(userId); - platformOverview.setCommonServices(commonServiceList); - - List governanceServiceList = platformServicesClient.getGovernanceServices(userId); - platformOverview.setGovernanceServices(governanceServiceList); - - List viewServiceList = platformServicesClient.getViewServices(userId); - platformOverview.setViewServices(viewServiceList); - - List integrationServiceList = platformServicesClient.getIntegrationServices(userId); - platformOverview.setIntegrationServices(integrationServiceList); - - List engineServiceList = platformServicesClient.getEngineServices(userId); - platformOverview.setEngineServices(engineServiceList); - return platformOverview; - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - - - /* - * Retrieve the platform origin - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return the platform origin - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public String platformGetOrigin(String userId, - String platformName, - String methodName) - throws - DinoViewServiceException - - { - - try { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - return platformServicesClient.getPlatformOrigin(userId); - - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - - /* - * Retrieve the active server list from the platform - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return response containing the DinoServerListResponse object. - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List platformGetActiveServerList(String userId, - String platformName, - String methodName) - throws - DinoViewServiceException - - { - - try - { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - /* Retrieve the server names */ - List serverNames = platformServicesClient.getActiveServers(userId); - - - if (serverNames != null) - { - /* - * Construct the return list indicating that all servers it contains are active - */ - List serverList = new ArrayList<>(); - - serverNames.forEach(serverName -> { - DinoServerInstance dinoServerInstance = new DinoServerInstance(); - // Try to locate the serverName and platformRootURL in the configured serverInstances. If found include the serverInstanceName, - // else ensure it is set to null. - String configuredInstanceName = null; - - Iterator configuredServerInstances = this.configuredServerInstances.values().iterator(); - while (configuredServerInstances.hasNext()) - { - ResourceEndpoint csire = configuredServerInstances.next(); - if (csire.getServerName().equals(serverName) - && csire.getPlatformName().equals(platformName)) - { - // This is our configuration entry... - configuredInstanceName = csire.getServerInstanceName(); - } - } - dinoServerInstance.setServerInstanceName(configuredInstanceName); - dinoServerInstance.setIsActive(true); - dinoServerInstance.setServerName(serverName); - dinoServerInstance.setPlatformName(platformName); - serverList.add(dinoServerInstance); - }); - - return serverList; - } - else - { - return null; - } - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - - /* - * Retrieve the known server list from the platform - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return the list of server names - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List platformGetKnownServerList(String userId, - String platformName, - String methodName) - throws - DinoViewServiceException - - { - - try - { - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - List serverNames = platformServicesClient.getKnownServers(userId); - - if (serverNames != null) - { - /* - * Construct the return list indicating which servers are active - */ - List serverList = new ArrayList<>(); - - /* Retrieve a list of names of the active servers */ - List activeServerNames = platformServicesClient.getActiveServers(userId); - serverNames.forEach(serverName -> { - DinoServerInstance dinoServerInstance = new DinoServerInstance(); - dinoServerInstance.setServerName(serverName); - dinoServerInstance.setPlatformName(platformName); - if (activeServerNames != null && activeServerNames.contains(serverName)) - { - dinoServerInstance.setIsActive(true); - } - else - { - dinoServerInstance.setIsActive(false); - } - serverList.add(dinoServerInstance); - }); - - return serverList; - - } - else - { - return null; - } - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - /* - * Retrieve the access services for the platform - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return the list of services - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List platformGetAccessServiceList(String userId, - String platformName, - String methodName) - - throws - DinoViewServiceException - - { - - try { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - return platformServicesClient.getAccessServices(userId); - - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - - /* - * Retrieve the view services for the platform - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return the list of services - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List platformGetViewServiceList(String userId, - String platformName, - String methodName) - throws - DinoViewServiceException - - { - - try { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - return platformServicesClient.getViewServices(userId); - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - /* - * Retrieve the governance services for the platform - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return the list of services - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List platformGetGovernanceServiceList(String userId, - String platformName, - String methodName) - throws - DinoViewServiceException - - { - - try { - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - return platformServicesClient.getGovernanceServices(userId); - - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - /* - * Retrieve the common services for the platform - * @param userId userId under which the request is performed - * @param platformName The name of the platform to interrogate - * @param methodName The name of the method being invoked - * @return the list of services - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List platformGetCommonServiceList(String userId, - String platformName, - String methodName) - throws - DinoViewServiceException - - { - - try - { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - return platformServicesClient.getCommonServices(userId); - - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - - - /* - * Retrieve the server overview - * @param userId userId under which the request is performed - * @param platformName The name of the server to interrogate - * @param methodName The name of the method being invoked - * @return the server overview - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public ServerOverview serverGetOverview(String userId, - String serverName, - String platformName, - String serverInstanceName, - String description, - String methodName) - - throws - DinoViewServiceException - - { - - try { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - /* - * Construct an overview with the configured aspects - */ - - ServerOverview serverOverview = new ServerOverview(); - serverOverview.setServerName(serverName); - serverOverview.setPlatformRootURL(platformRootURL); - if (serverInstanceName != null) - serverOverview.setServerInstanceName(serverInstanceName); - if (description != null) - serverOverview.setDescription(description); - - // Fetch the platformOrigin - String serverOrigin = platformServicesClient.getPlatformOrigin(userId); - serverOverview.setServerOrigin(serverOrigin); - - // Fetch the server classification - internal method will only throw DinoViewServiceException - - ServerTypeClassificationSummary serverClassification = serverGetTypeClassification(userId, serverName, platformName, methodName); - serverOverview.setServerClassification(serverClassification); - - - // Fetch the various aspects of server status (including history) - can throw OCF exceptions - ServerStatus serverStatus = platformServicesClient.getServerStatus(userId, serverName); - serverOverview.setServerStatus(serverStatus); - - ///* - // * Get the active services running on the server.... - // */ - //List serverList = platformServicesClient.getActiveServices(userId, serverName); - //serverOverview.setServerServicesList(serverList); - - /* - * Get the integration services running on the server.... - */ - List integrationServices = this.serverGetIntegrationServices(userId, serverName, platformName, methodName); - serverOverview.setIntegrationServices(integrationServices); - - /* - * Get the engine services running on the server.... - */ - List engineServices = this.serverGetEngineServices(userId, serverName, platformName, methodName); - serverOverview.setEngineServices(engineServices); - - /* - * Get the access services running on the server.... - */ - List accessServices = this.serverGetAccessServices(userId, serverName, platformName, methodName); - serverOverview.setAccessServices(accessServices); - - /* - * Get the view services running on the server.... - */ - List viewServices = this.serverGetViewServices(userId, serverName, platformName, methodName); - serverOverview.setViewServices(viewServices); - - /* - * Fechez la vache - * - * This is an internal method that will already have mapped any exceptions to DinoViewServiceException - */ - Map cohortDetails = serverGetCohortDetails(userId, serverName, platformName, methodName); - serverOverview.setCohortDetails(cohortDetails); - - return serverOverview; - - } - - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - - /* - * Retrieve the server origin - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param methodName The name of the method being invoked - * @return the platform origin - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public String serverGetOrigin(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - { - - try { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use platform services client - * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - PlatformServicesClient platformServicesClient = this.getPlatformServicesClient(platformName, platformRootURL); - - return platformServicesClient.getPlatformOrigin(userId); - - } - catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOCFInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOCFUserNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - - } - - /* - * Retrieve the server type classification - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public ServerTypeClassificationSummary serverGetTypeClassification(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - { - - try { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classfiication method is in the abstract superclass. - * - * * Can throw a number of OCF exceptions - catch and map them to DinoViewServiceException - */ - OMAGServerConfigurationClient adminServicesClient = this.getOMAGServerConfigurationClient(userId, serverName, platformRootURL); - - return adminServicesClient.getServerTypeClassification(); - - } - catch (OMAGInvalidParameterException e) { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) { - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - /* - * Retrieve the server's stored configuration - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param methodName The name of the method being invoked - * @return the platform origin - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public OMAGServerConfig serverGetStoredConfiguration(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - { - - try - { - - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classfiication method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - - OMAGServerConfigurationClient adminServicesClient = this.getOMAGServerConfigurationClient(userId, serverName, platformRootURL); - - /* - * Get the configuration - can throw OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException - * - */ - return adminServicesClient.getOMAGServerConfig(); - - } - - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - - } - - /* - * Retrieve the server's running instance configuration - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param methodName The name of the method being invoked - * @return the platform origin - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public OMAGServerConfig serverGetInstanceConfiguration(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - { - - try - { - /* - * Resolve the platformURL - can throw a DinoViewServiceException - no need to catch - */ - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classfiication method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - OMAGServerConfigurationClient adminServicesClient = this.getOMAGServerConfigurationClient(userId, serverName, platformRootURL); - - /* - * Get the configuration - can throw OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException - * - */ - return adminServicesClient.getOMAGServerInstanceConfig(); - - } - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - /* - * You may get this exception if the server is not running - and has been asked for its instance configuration - * In this case you will get an exception in which the 'cause' has a reportedErrorMessageId of OMAG-MULTI-TENANT-404-001. - * In this specific case ONLY, tolerate the error and pass back a null in the response for activeConfig. For any other error codes - * report the exception. - */ - - if (e.getCause() != null && e.getCause() instanceof OCFCheckedExceptionBase) - { - OCFCheckedExceptionBase cause = (OCFCheckedExceptionBase) (e.getCause()); - if (cause.getReportedErrorMessageId().equals("OMAG-MULTI-TENANT-404-001")) - { - /* In this specific circumstance, tolerate the exception... */ - return null; - } - } - /* If the OMAGConfigurationErrorException was for a different reason, do not tolerate.... */ - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - - - - /** - * Retrieve the server's cohort descriptions and the local and remote registrations for each cohort - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform the server can be reached at - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - */ - public Map serverGetCohortDetails(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - { - - Map returnMap = new HashMap<>(); - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use metadata highway services client - this is an internal function and will only throw a DinoViewServiceException - */ - MetadataHighwayServicesClient metadataHighwayServicesClient = this.getMetadataHighwayServicesClient(userId, serverName, platformRootURL); - - /* - * metadataHighwayServicesClient can throw OMRS exceptions for InvalidParameter, UserNotAuthorized or RepositoryError - */ - - List cohortDescriptions = metadataHighwayServicesClient.getCohortDescriptions(userId); - - // For each cohort construct and populate a ServerCohortDetails object and add it to the map - for (CohortDescription cohortDescription : cohortDescriptions) - { - String cohortName = cohortDescription.getCohortName(); - ServerCohortDetails serverCohortDetails = new ServerCohortDetails(); - serverCohortDetails.setCohortDescription(cohortDescription); - - // Get the local registration and add that to the SCD - MemberRegistration localRegistration = metadataHighwayServicesClient.getLocalRegistration(userId, cohortName); - serverCohortDetails.setLocalRegistration(localRegistration); - - // Get the remote registrations and add them to the SCD - List remoteRegistrations = metadataHighwayServicesClient.getRemoteRegistrations(userId, cohortName); - serverCohortDetails.setRemoteRegistrations(remoteRegistrations); - - returnMap.put(cohortName, serverCohortDetails); - - } - return returnMap; - - } - - catch (RepositoryErrorException e) - { - /* If the server is not in a cohort, it may not have metadata highway services enabled. In this - * case just return an empty result - */ - return null; - } - catch (org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException e) - { - throw DinoExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), methodName, e); - } - - } - - - /* - * Retrieve the server audit log - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public OMRSAuditLogReport serverGetAuditLog(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use repository services audit log services client. - * Internal method will only throw DinoViewServiceException - */ - AuditLogServicesClient auditLogServicesClient = this.getAuditLogServicesClient(userId, serverName, platformRootURL); - - return auditLogServicesClient.getAuditLogReport(userId); - - } - catch (RepositoryErrorException exc) { - /* If the server is not in a cohort, it may not have metadata highway services enabled. In this - * case just return an empty result - */ - return null; - } - catch (org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException e) { - throw DinoExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), methodName, e); - - } - catch (org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException e) { - throw DinoExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), methodName, e); - - } - - } - - - /* - * Retrieve a list of integration services for a specified service - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform hosting the server - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List serverGetIntegrationServices(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classification method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - IntegrationDaemonConfigurationClient integrationDaemonConfigurationClient = - this.getIntegrationDaemonConfigurationClient(userId, serverName, platformRootURL); - - /* - * Get a list of the integration services that are configured on the server - * - */ - - List serviceList = integrationDaemonConfigurationClient.getConfiguredIntegrationServices(); - - return serviceList; - - } - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - /* - * You may get this exception if the server is not running - and has been asked for its instance configuration - * In this case you will get an exception in which the 'cause' has a reportedErrorMessageId of OMAG-MULTI-TENANT-404-001. - * In this specific case ONLY, tolerate the error and pass back a null in the response for activeConfig. For any other error codes - * report the exception. - */ - - if (e.getCause() != null && e.getCause() instanceof OCFCheckedExceptionBase) - { - OCFCheckedExceptionBase cause = (OCFCheckedExceptionBase) (e.getCause()); - if (cause.getReportedErrorMessageId().equals("OMAG-MULTI-TENANT-404-001")) - { - /* In this specific circumstance, tolerate the exception... */ - return null; - } - } - /* If the OMAGConfigurationErrorException was for a different reason, do not tolerate.... */ - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - - - /* - * Retrieve a list of engine services for a specified service - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform hosting the server - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List serverGetEngineServices(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classification method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - EngineHostConfigurationClient engineHostConfigurationClient = - this.getEngineHostConfigurationClient(userId, serverName, platformRootURL); - - /* - * Get a list of the integration services that are configured on the server - * - */ - - List serviceList = engineHostConfigurationClient.getConfiguredEngineServices(); - - return serviceList; - - } - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - /* - * You may get this exception if the server is not running - and has been asked for its instance configuration - * In this case you will get an exception in which the 'cause' has a reportedErrorMessageId of OMAG-MULTI-TENANT-404-001. - * In this specific case ONLY, tolerate the error and pass back a null in the response for activeConfig. For any other error codes - * report the exception. - */ - - if (e.getCause() != null && e.getCause() instanceof OCFCheckedExceptionBase) - { - OCFCheckedExceptionBase cause = (OCFCheckedExceptionBase) (e.getCause()); - if (cause.getReportedErrorMessageId().equals("OMAG-MULTI-TENANT-404-001")) - { - /* In this specific circumstance, tolerate the exception... */ - return null; - } - } - /* If the OMAGConfigurationErrorException was for a different reason, do not tolerate.... */ - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - /* - * Retrieve a list of access services for a specified service - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform hosting the server - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List serverGetAccessServices(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classification method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - MetadataAccessPointConfigurationClient metadataAccessPointConfigurationClient = - this.getMetadataAccessPointConfigurationClient(userId, serverName, platformRootURL); - - /* - * Get a list of the integration services that are configured on the server - * - */ - - List serviceList = metadataAccessPointConfigurationClient.getConfiguredAccessServices(); - - return serviceList; - - } - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - /* - * You may get this exception if the server is not running - and has been asked for its instance configuration - * In this case you will get an exception in which the 'cause' has a reportedErrorMessageId of OMAG-MULTI-TENANT-404-001. - * In this specific case ONLY, tolerate the error and pass back a null in the response for activeConfig. For any other error codes - * report the exception. - */ - - if (e.getCause() != null && e.getCause() instanceof OCFCheckedExceptionBase) - { - OCFCheckedExceptionBase cause = (OCFCheckedExceptionBase) (e.getCause()); - if (cause.getReportedErrorMessageId().equals("OMAG-MULTI-TENANT-404-001")) - { - /* In this specific circumstance, tolerate the exception... */ - return null; - } - } - /* If the OMAGConfigurationErrorException was for a different reason, do not tolerate.... */ - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - - /* - * Retrieve a list of view services for a specified service - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform hosting the server - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public List serverGetViewServices(String userId, - String serverName, - String platformName, - String methodName) - - throws - DinoViewServiceException - - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classification method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - ViewServerConfigurationClient viewServerConfigurationClient = - this.getViewServerConfigurationClient(userId, serverName, platformRootURL); - - /* - * Get a list of the integration services that are configured on the server - * - */ - - List serviceList = viewServerConfigurationClient.getConfiguredViewServices(); - - return serviceList; - - } - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - /* - * You may get this exception if the server is not running - and has been asked for its instance configuration - * In this case you will get an exception in which the 'cause' has a reportedErrorMessageId of OMAG-MULTI-TENANT-404-001. - * In this specific case ONLY, tolerate the error and pass back a null in the response for activeConfig. For any other error codes - * report the exception. - */ - - if (e.getCause() != null && e.getCause() instanceof OCFCheckedExceptionBase) - { - OCFCheckedExceptionBase cause = (OCFCheckedExceptionBase) (e.getCause()); - if (cause.getReportedErrorMessageId().equals("OMAG-MULTI-TENANT-404-001")) - { - /* In this specific circumstance, tolerate the exception... */ - return null; - } - } - /* If the OMAGConfigurationErrorException was for a different reason, do not tolerate.... */ - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - - - - /* - * Retrieve the service details for a specified integration service - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform hosting the server - * @param serviceName The name of the service to be retrieved - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public ServiceDetails serverGetIntegrationServiceDetails(String userId, - String serverName, - String platformName, - String serviceURLMarker, - String methodName) - - throws - DinoViewServiceException - - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classification method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - IntegrationDaemonConfigurationClient integrationDaemonConfigurationClient = - this.getIntegrationDaemonConfigurationClient(userId, serverName, platformRootURL); - - - /* - * Get the configuration of the integration service that has been requested. This can throw - * OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException - * - */ - IntegrationServiceConfig serviceConfig = integrationDaemonConfigurationClient.getIntegrationServiceConfiguration(serviceURLMarker); - - ServiceDetails serviceDetails = new ServiceDetails(); - serviceDetails.setServiceCat(ServiceDetails.ServiceCat.IntegrationService); - serviceDetails.setIntegrationServiceConfig(serviceConfig); - - return serviceDetails; - - } - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - /* - * You may get this exception if the server is not running - and has been asked for its instance configuration - * In this case you will get an exception in which the 'cause' has a reportedErrorMessageId of OMAG-MULTI-TENANT-404-001. - * In this specific case ONLY, tolerate the error and pass back a null in the response for activeConfig. For any other error codes - * report the exception. - */ - - if (e.getCause() != null && e.getCause() instanceof OCFCheckedExceptionBase) - { - OCFCheckedExceptionBase cause = (OCFCheckedExceptionBase) (e.getCause()); - if (cause.getReportedErrorMessageId().equals("OMAG-MULTI-TENANT-404-001")) - { - /* In this specific circumstance, tolerate the exception... */ - return null; - } - } - /* If the OMAGConfigurationErrorException was for a different reason, do not tolerate.... */ - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - - /* - * Retrieve the service details for a specified engine service - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform hosting the server - * @param serviceName The name of the service to be retrieved - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public ServiceDetails serverGetEngineServiceDetails(String userId, - String serverName, - String platformName, - String serviceURLMarker, - String methodName) - - throws - DinoViewServiceException - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classification method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - EngineHostConfigurationClient engineHostConfigurationClient = - this.getEngineHostConfigurationClient(userId, serverName, platformRootURL); - - /* - * Get the configuration of the integration service that has been requested. This can throw - * OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException - * - */ - EngineServiceConfig serviceConfig = engineHostConfigurationClient.getEngineServiceConfiguration(serviceURLMarker); - - ServiceDetails serviceDetails = new ServiceDetails(); - serviceDetails.setServiceCat(ServiceDetails.ServiceCat.EngineService); - serviceDetails.setEngineServiceConfig(serviceConfig); - - return serviceDetails; - - } - catch (OMAGInvalidParameterException e) - { - throw DinoExceptionHandler.mapOMAGInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (OMAGNotAuthorizedException e) - { - throw DinoExceptionHandler.mapOMAGNotAuthorizedException(this.getClass().getName(), methodName, userId, e); - } - catch (OMAGConfigurationErrorException e) - { - /* - * You may get this exception if the server is not running - and has been asked for its instance configuration - * In this case you will get an exception in which the 'cause' has a reportedErrorMessageId of OMAG-MULTI-TENANT-404-001. - * In this specific case ONLY, tolerate the error and pass back a null in the response for activeConfig. For any other error codes - * report the exception. - */ - - if (e.getCause() != null && e.getCause() instanceof OCFCheckedExceptionBase) - { - OCFCheckedExceptionBase cause = (OCFCheckedExceptionBase) (e.getCause()); - if (cause.getReportedErrorMessageId().equals("OMAG-MULTI-TENANT-404-001")) - { - /* In this specific circumstance, tolerate the exception... */ - return null; - } - } - /* If the OMAGConfigurationErrorException was for a different reason, do not tolerate.... */ - throw DinoExceptionHandler.mapOMAGConfigurationErrorException(this.getClass().getName(), methodName, serverName, e); - } - - } - - /* - * Retrieve the service details for a specified access service - * @param userId userId under which the request is performed - * @param serverName The name of the server to interrogate - * @param platformName The name of the platform hosting the server - * @param serviceName The name of the service to be retrieved - * @param methodName The name of the method being invoked - * @return the server type as a String - * - * Exceptions returned by the server - * @throws DinoViewServiceException an error was detected and reported - * - */ - public ServiceDetails serverGetAccessServiceDetails(String userId, - String serverName, - String platformName, - String serviceFullName, - String serviceURLMarker, - String methodName) - - throws - DinoViewServiceException - - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Use admin services client - need to speculatively choose one of the concrete admin clients, since type classification method is in the abstract superclass. - * - * Can throw OMAGInvalidParameterException - */ - MetadataAccessPointConfigurationClient metadataAccessPointConfigurationClient = - this.getMetadataAccessPointConfigurationClient(userId, serverName, platformRootURL); - - - /* - * Get the configuration of the integration service that has been requested. This can throw - * OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException - * - */ - List accessServices = metadataAccessPointConfigurationClient.getAccessServicesConfiguration(); - AccessServiceConfig serviceConfig = null; - for (int i=0; i viewServices = viewServerConfigurationClient.getViewServicesConfiguration(); - ViewServiceConfig serviceConfig = null; - for (int i=0; i GovernanceEngineElement.properties.displayName - * engineQualifiedName ==> GovernanceEngineElement.properties.qualifiedName - * engineDescription ==> GovernanceEngineElement.properties.description - * engineTypeDescription ==> GovernanceEngineElement.properties.typeDescription - * engineVersion ==> GovernanceEngineElement.properties.version - * engineGUID ==> GovernanceEngineElement.elementHeader.guid - * Services, for each Service: - * for each requestType: - * requestType (string) : { parameter : value , parameter : value, etc. } - * => RegisteredGovernanceService.requestTypes - */ - - EngineDetails engineDetails = new EngineDetails(); - engineDetails.setEngineDisplayName(governanceEngineElement.getProperties().getDisplayName()); - engineDetails.setEngineQualifiedName(governanceEngineElement.getProperties().getQualifiedName()); - engineDetails.setEngineDescription(governanceEngineElement.getProperties().getDescription()); - engineDetails.setEngineTypeDescription(governanceEngineElement.getProperties().getTypeDescription()); - engineDetails.setEngineVersion(governanceEngineElement.getProperties().getVersion()); - engineDetails.setEngineGUID(governanceEngineElement.getElementHeader().getGUID()); - - String governanceEngineGUID = governanceEngineElement.getElementHeader().getGUID(); - - /* - * The following call will return a list of governance service GUIDs. - * For each of the GUIDs, call getGovernanceServiceByGUID to get the governance service properties (including - * qualifiedName, description, zones etc). - * Also call the getRegisteredGovernanceService method to get the requestTtypes and requestParameters - * with which the service was registered with the engine. - */ - - List governanceServices = gecc.getRegisteredGovernanceServices(userId, governanceEngineGUID, 0, 100); - - if (governanceServices != null && governanceServices.size()>0) { - - Map serviceMap = new HashMap<>(); - - for (RegisteredGovernanceServiceElement governanceService : governanceServices) { - - GovernanceServiceProperties gsp = governanceService.getProperties(); - - String governanceServiceQualifiedName = gsp.getQualifiedName(); - - Map requestTypes = governanceService.getProperties().getRequestTypes(); - - if (requestTypes != null) { - - Map> requestTypeMap = new HashMap<>(); - - for (String requestType : requestTypes.keySet()) { - - RegisteredGovernanceServiceProperties registeredGovernanceServiceProperties = requestTypes.get(requestType); - - if (registeredGovernanceServiceProperties != null) { - - if (registeredGovernanceServiceProperties.getServiceRequestType() == null) { - - requestTypeMap.put(requestType, registeredGovernanceServiceProperties.getRequestParameters()); - } - else { - - requestTypeMap.put(requestType + " -> " + registeredGovernanceServiceProperties.getServiceRequestType(), registeredGovernanceServiceProperties.getRequestParameters()); - } - } - } - - ServicePropertiesAndRequests spar = new ServicePropertiesAndRequests(gsp, requestTypeMap); - - serviceMap.put(governanceServiceQualifiedName, spar); - } - - } - engineDetails.setServiceMap(serviceMap); - } - - return engineDetails; - - } - catch (InvalidParameterException e) - { - throw DinoExceptionHandler.mapInvalidParameterException(this.getClass().getName(), methodName, e); - } - catch (UserNotAuthorizedException e) - { - throw DinoExceptionHandler.mapUserNotAuthorizedException(this.getClass().getName(), methodName, e); - } - catch (PropertyServerException e) - { - throw DinoExceptionHandler.mapOCFPropertyServerException(this.getClass().getName(), methodName, platformName, e); - } - } -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewInstanceHandler.java b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewInstanceHandler.java deleted file mode 100644 index 4c89757e36d..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewInstanceHandler.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.server; - - -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoViewErrorCode; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoViewServiceException; -import org.odpi.openmetadata.viewservices.dino.handlers.DinoViewHandler; - -/** - * DinoViewInstanceHandler retrieves information from the instance map for the - * view service instances. The instance map is thread-safe. Instances are added - * and removed by the DinoViewAdmin class. - */ -public class DinoViewInstanceHandler extends OMVSServiceInstanceHandler -{ - - - - /** - * Default constructor registers the view service - */ - public DinoViewInstanceHandler() { - - super(ViewServiceDescription.DINO.getViewServiceName()); - - DinoViewRegistration.registerViewService(); - } - - - /** - * The getDinoViewHandler method retrieves the handler from the DinoViewServicesInstance and returns it. - * @param userId the user performing the operation - * @param serverName the name of the server running the view-service - * @param serviceOperationName the operation to be performed - * @return RexHandler - * @throws InvalidParameterException - the server name is not recognized - * @throws UserNotAuthorizedException - the user id not permitted to perform the requested operation - * @throws PropertyServerException - the service name is not known - indicating a logic error - */ - public DinoViewHandler getDinoViewHandler(String userId, String serverName, String serviceOperationName) - throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - String methodName = "getDinoViewHandler"; - - - /* - * Get the DinoViewServicesInstance. This is an instance associated with the UI servername (tenant). - */ - DinoViewServicesInstance instance = (DinoViewServicesInstance) super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getDinoViewHandler(); - } - else - { - - return null; - } - - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewRESTServices.java b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewRESTServices.java deleted file mode 100644 index 076888c5581..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewRESTServices.java +++ /dev/null @@ -1,2331 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.dino.server; - - -import org.odpi.openmetadata.adminservices.rest.ServerTypeClassificationSummary; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoExceptionHandler; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoViewErrorCode; -import org.odpi.openmetadata.viewservices.dino.api.ffdc.DinoViewServiceException; -import org.odpi.openmetadata.viewservices.dino.api.properties.RequestSummary; -import org.odpi.openmetadata.viewservices.dino.api.properties.ResourceEndpoint; -import org.odpi.openmetadata.viewservices.dino.api.rest.*; -import org.odpi.openmetadata.viewservices.dino.handlers.DinoViewHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; -import java.util.Map; - - -/** - * The DinoViewRESTServices provides the implementation of the Dino Open Metadata View Service (OMVS). - * This interface provides view interfaces for infrastructure and ops users. - */ - -public class DinoViewRESTServices { - - protected static DinoViewInstanceHandler instanceHandler = new DinoViewInstanceHandler(); - - private static RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - - private static RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(DinoViewRESTServices.class), - instanceHandler.getServiceName()); - - private static final Logger log = LoggerFactory.getLogger(DinoViewRESTServices.class); - - - /** - * Default constructor - */ - public DinoViewRESTServices() { - - } - - /** - * Retrieve platform origin - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @return response the list of resource endpoints configured for the view service - * - */ - public DinoResourceEndpointListResponse getResourceEndpointList(String serverName, String userId) - { - - final String methodName = "getResourceEndpointList"; - - DinoResourceEndpointListResponse response = new DinoResourceEndpointListResponse(); - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - Map> lists = handler.getResourceEndpoints(userId, methodName); - - List platformList = null; - List serverList = null; - if (lists != null) - { - platformList = lists.get("platformList"); - serverList = lists.get("serverList"); - } - response.setPlatformList(platformList); - response.setServerList(serverList); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - return response; - } - - /** - * Retrieve platform overview - this is an overview of multiple aspects of the platform for when it becomes the focus. - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName of the platform to be queried. - * @return response the platform overview. - * - */ - public DinoPlatformOverviewResponse platformGetOverview(String serverName, String userId, DinoPlatformRequestBody requestBody) { - - final String methodName = "platformGetOverview"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoPlatformOverviewResponse response = new DinoPlatformOverviewResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - AuditLog auditLog = null; - DinoViewHandler handler; - - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setPlatformOverview(handler.platformGetOverview(userId, - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - /** - * Retrieve platform origin - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName of the platform to be queried. - * @return response the origin string for the platform. - * - */ - public DinoStringResponse platformGetOrigin(String serverName, String userId, DinoPlatformRequestBody requestBody) - { - - final String methodName = "platformGetOrigin"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoStringResponse response = new DinoStringResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setString(handler.platformGetOrigin(userId, - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - /** - * Retrieve active servers for platform - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName and platformRootURL of the platform to be queried. - * @return response the list of servers that are active on the platform - * - */ - public DinoServerListResponse platformGetActiveServers(String serverName, String userId, DinoPlatformRequestBody requestBody) { - - final String methodName = "platformGetActiveServers"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerListResponse response = new DinoServerListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServerList(handler.platformGetActiveServerList(userId, - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve known servers for platform - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName and platformRootURL of the platform to be queried. - * @return response the list of servers that are active on the platform - * - */ - public DinoServerListResponse platformGetKnownServers(String serverName, String userId, DinoPlatformRequestBody requestBody) { - - final String methodName = "platformGetKnownServers"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerListResponse response = new DinoServerListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServerList(handler.platformGetKnownServerList(userId, - requestBody.getPlatformName(), - methodName)); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve access services for platform - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName and platformRootURL of the platform to be queried. - * @return response the list of services registered to the platform - * - */ - public DinoServiceListResponse platformGetAccessServices(String serverName, String userId, DinoPlatformRequestBody requestBody) { - - final String methodName = "platformGetAccessServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.platformGetAccessServiceList(userId, - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve view services for platform - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName and platformRootURL of the platform to be queried. - * @return response the list of services registered to the platform - * - */ - public DinoServiceListResponse platformGetViewServices(String serverName, String userId, DinoPlatformRequestBody requestBody) { - - final String methodName = "platformGetViewServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.platformGetViewServiceList(userId, - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve governance services for platform - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName and platformRootURL of the platform to be queried. - * @return response the list of services registered to the platform - * - */ - public DinoServiceListResponse platformGetGovernanceServices(String serverName, String userId, DinoPlatformRequestBody requestBody) { - - final String methodName = "platformGetGovernanceServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.platformGetGovernanceServiceList(userId, - requestBody.getPlatformName(), - methodName)); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve common services for platform - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing platformName and platformRootURL of the platform to be queried. - * @return response the list of services registered to the platform - * - */ - public DinoServiceListResponse platformGetCommonServices(String serverName, String userId, DinoPlatformRequestBody requestBody) { - - final String methodName = "platformGetCommonServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), null, null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.platformGetCommonServiceList(userId, - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve server overview - this is an overview of multiple aspects of the server for when it becomes the focus. - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server to be queried. - * @return response the server overview. - * - */ - - public DinoServerOverviewResponse serverGetOverview(String serverName, String userId, DinoServerRequestBody requestBody) { - - final String methodName = "serverGetOverview"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerOverviewResponse response = new DinoServerOverviewResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServerOverview(handler.serverGetOverview(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getServerInstanceName(), - requestBody.getDescription(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - - - - - /** - * Retrieve server origin - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server to be queried. - * @return response the origin string for the server. - * - */ - public DinoStringResponse serverGetOrigin(String serverName, String userId, DinoServerRequestBody requestBody) { - - final String methodName = "serverGetOrigin"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoStringResponse response = new DinoStringResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setString(handler.serverGetOrigin(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve server type classification - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server to be queried. - * @return response the server type, as a string response. - * - */ - public DinoServerTypeResponse serverGetTypeClassification(String serverName, String userId, DinoServerRequestBody requestBody) { - - final String methodName = "serverGetTypeClassification"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerTypeResponse response = new DinoServerTypeResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - ServerTypeClassificationSummary summary = handler.serverGetTypeClassification(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName); - response.setServerTypeName(summary.getServerTypeName()); - response.setServerTypeDescription(summary.getServerTypeDescription()); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve server's stored configuration - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server to be queried. - * @return response the configuration for the server. - * - */ - public DinoServerConfigResponse serverGetStoredConfiguration(String serverName, String userId, DinoServerRequestBody requestBody) { - - final String methodName = "serverGetConfiguration"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerConfigResponse response = new DinoServerConfigResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServerConfig(handler.serverGetStoredConfiguration(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve server's running instance configuration - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server to be queried. - * @return response the configuration for the server. - * - */ - public DinoServerConfigResponse serverGetInstanceConfiguration(String serverName, String userId, DinoServerRequestBody requestBody) { - - final String methodName = "serverGetInstanceConfiguration"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerConfigResponse response = new DinoServerConfigResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServerConfig(handler.serverGetInstanceConfiguration(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve server's running instance configuration - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server to be queried. - * @return response the configuration for the server. - * - */ - public DinoServerDoubleConfigResponse serverGetStoredAndActiveConfiguration(String serverName, String userId, DinoServerRequestBody requestBody) { - - final String methodName = "serverGetInstanceConfiguration"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerDoubleConfigResponse response = new DinoServerDoubleConfigResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setStoredConfig(handler.serverGetStoredConfiguration(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - - /* - * It is possible to get a null return (from serverGetInstanceConfiguration) if the server - * is not running. The handler detects this condition and returns null rather than - * throwing an exception. - */ - - response.setActiveConfig(handler.serverGetInstanceConfiguration(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - /* - * If the method managed to retrieve stored configuration and it is just the 'instance' - * (i.e. active) configuration that is missing, then ignore the exception and treat it - * the same as if the user had requested the stored configuration only. - * On the other hand, if we have failed to even get the stored configuration then it's - * game over. - */ - if (response.getStoredConfig() == null) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - else { - /* proceed to the normal method exit with logging and return.... */ - } - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve server's audit log - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server to be queried. - * @return response the configuration for the server. - * - */ - public DinoServerAuditLogResponse serverGetAuditLog(String serverName, String userId, DinoServerRequestBody requestBody) { - - final String methodName = "serverGetAuditLog"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServerAuditLogResponse response = new DinoServerAuditLogResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setAuditLog(handler.serverGetAuditLog(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - /** - * Retrieve list of integration services for a specified server - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceListResponse serverGetIntegrationServices(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetIntegrationServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.serverGetIntegrationServices(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve list of engine services for a specified server - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceListResponse serverGetEngineServices(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetEngineServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.serverGetEngineServices(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - - /** - * Retrieve list of access services for a specified server - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceListResponse serverGetAccessServices(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetAccessServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.serverGetAccessServices(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - /** - * Retrieve list of view services for a specified server - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceListResponse serverGetViewServices(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetViewServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceListResponse response = new DinoServiceListResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), requestBody.getServerName(), null, methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceList(handler.serverGetViewServices(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - - - /** - * Retrieve service details for a specified integration service - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceDetailsResponse serverGetIntegrationServiceDetails(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetIntegrationServiceDetails"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceDetailsResponse response = new DinoServiceDetailsResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), - requestBody.getServerName(), - null, - methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceDetails(handler.serverGetIntegrationServiceDetails(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getServiceURLMarker(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve service details for a specified engine service - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceDetailsResponse serverGetEngineServiceDetails(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetEngineServiceDetails"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceDetailsResponse response = new DinoServiceDetailsResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), - requestBody.getServerName(), - null, - methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceDetails(handler.serverGetEngineServiceDetails(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getServiceURLMarker(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve service details for a specified access service - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceDetailsResponse serverGetAccessServiceDetails(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetAccessServiceDetails"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceDetailsResponse response = new DinoServiceDetailsResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), - requestBody.getServerName(), - null, - methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceDetails(handler.serverGetAccessServiceDetails(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getServiceFullName(), - requestBody.getServiceURLMarker(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve service details for a specified view service - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoServiceDetailsResponse serverGetViewServiceDetails(String serverName, String userId, DinoServiceRequestBody requestBody) { - - final String methodName = "serverGetViewServiceDetails"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoServiceDetailsResponse response = new DinoServiceDetailsResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), - requestBody.getServerName(), - null, - methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setServiceDetails(handler.serverGetViewServiceDetails(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getServiceURLMarker(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - /** - * Retrieve engine details for a specified engine - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody body containing serverName of the server and serviceName of the service to be queried. - * @return response the configuration for the server. - * - */ - public DinoEngineDetailsResponse serverGetEngineDetails(String serverName, - String userId, - DinoEngineRequestBody requestBody) { - - final String methodName = "serverGetEngineDetails"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - DinoEngineDetailsResponse response = new DinoEngineDetailsResponse(); - - if (requestBody != null) - { - - // The serverName parameter to the RequestSummary is the target server not the server running the VS - RequestSummary request = new RequestSummary(requestBody.getPlatformName(), - requestBody.getServerName(), - requestBody.getRequestContextCorrelator(), // OMES instance GUID - methodName); - response.setRequestSummary(request); - - - AuditLog auditLog = null; - DinoViewHandler handler; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getDinoViewHandler(userId, serverName, methodName); - - if (handler == null) - { - throw new DinoViewServiceException(DinoViewErrorCode.COULD_NOT_CREATE_HANDLER.getMessageDefinition(methodName), - this.getClass().getName(), - methodName); - - } - - response.setEngineDetails(handler.serverGetEngineDetails(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEngineQualifiedName(), - methodName)); - - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (DinoViewServiceException exception) - { - DinoExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - DinoViewServiceException exception = new DinoViewServiceException(DinoViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - DinoExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewRegistration.java b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewRegistration.java deleted file mode 100644 index e634029a024..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewRegistration.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.server; - -import org.odpi.openmetadata.adminservices.registration.OMAGViewServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceRegistrationEntry; -import org.odpi.openmetadata.viewservices.dino.admin.DinoViewAdmin; - -/** - * DinoViewRegistration registers the view service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * view service in the server and it can be configured and used. - */ -public class DinoViewRegistration -{ - /** - * Pass information about this view service to the OMAG Server administration services. - */ - public static void registerViewService() - { - ViewServiceDescription myDescription = ViewServiceDescription.DINO; - ViewServiceRegistrationEntry myRegistration = new ViewServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - DinoViewAdmin.class.getName()); - OMAGViewServiceRegistration.registerViewService(myRegistration); - } -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewServicesInstance.java b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewServicesInstance.java deleted file mode 100644 index b615b1ed042..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/server/DinoViewServicesInstance.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.dino.server; - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstance; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.dino.handlers.DinoViewHandler; -import org.odpi.openmetadata.viewservices.dino.api.properties.ResourceEndpoint; - -import java.util.List; - - -/** - * DinoViewServicesInstance caches references to objects it needs for a specific server. - * It is also responsible for registering itself in the instance map. - */ - -public class DinoViewServicesInstance extends OMVSServiceInstance -{ - - private static ViewServiceDescription myDescription = ViewServiceDescription.DINO; - - private DinoViewHandler dinoViewHandler = null; - - - - /** - * Set up the Dino OMVS instance - * Unlike the superclass () Dino does not expect to be passed remoteServerName or remoteServerURL during configuration or initialization. - * This is because in Dino these are variable (set per requested operation), so the are passed by the RESTServices methods. - * - * @param serverName name of this server - * @param auditLog logging destination - * @param localServerUserId userId used for server initiated actions - * @param maxPageSize maximum page size - */ - public DinoViewServicesInstance(String serverName, - AuditLog auditLog, - String localServerUserId, - int maxPageSize, - List resourceEndpoints) - { - - - - super(serverName, - myDescription.getViewServiceName(), - auditLog, - localServerUserId, - maxPageSize, - null, // see comment above about remoteServerName - null); // .... and remoteServerURL. - - - this.dinoViewHandler = new DinoViewHandler(resourceEndpoints); - } - - - - /** - * Return the handler for Dino view requests - * - * @return handler object - */ - DinoViewHandler getDinoViewHandler() - { - return dinoViewHandler; - } - - - -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-spring/README.md b/open-metadata-implementation/view-services/dino-view/dino-view-spring/README.md deleted file mode 100644 index 501959d9eb7..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-spring/README.md +++ /dev/null @@ -1,6 +0,0 @@ - - - -# Dino View Open Metadata View Service (OMVS) with Spring - -The Dino OMVS spring module uses spring to create the server-side support for the REST services. \ No newline at end of file diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-spring/build.gradle b/open-metadata-implementation/view-services/dino-view/dino-view-spring/build.gradle deleted file mode 100644 index d8610f64789..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-spring/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:dino-view:dino-view-api') - implementation project(':open-metadata-implementation:view-services:dino-view:dino-view-server') - implementation 'org.springframework:spring-web' - implementation 'io.swagger.core.v3:swagger-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-spring/src/main/java/org/odpi/openmetadata/viewservices/dino/server/spring/DinoViewRESTResource.java b/open-metadata-implementation/view-services/dino-view/dino-view-spring/src/main/java/org/odpi/openmetadata/viewservices/dino/server/spring/DinoViewRESTResource.java deleted file mode 100644 index b2d4dfeba9e..00000000000 --- a/open-metadata-implementation/view-services/dino-view/dino-view-spring/src/main/java/org/odpi/openmetadata/viewservices/dino/server/spring/DinoViewRESTResource.java +++ /dev/null @@ -1,541 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.dino.server.spring; - - - -import org.odpi.openmetadata.viewservices.dino.api.rest.*; -import org.odpi.openmetadata.viewservices.dino.server.DinoViewRESTServices; -import org.springframework.web.bind.annotation.*; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; - - - -/** - * The DinoViewRESTResource provides the Spring API endpoints of the Dino Open Metadata View Service (OMVS). - * This interface provides a service for Egeria operators. - */ - -@RestController -@RequestMapping("/servers/{viewServerName}/open-metadata/view-services/dino/users/{userId}") - -@Tag(name="View Server: Dino OMVS", - description="Explore topology information in an Egeria deployment of platforms, servers, services and cohorts for graph visualization.", externalDocs=@ExternalDocumentation(description="Further Information",url="https://egeria-project.org/services/omvs/dino/overview/")) - -public class DinoViewRESTResource { - - private final DinoViewRESTServices restAPI = new DinoViewRESTServices(); - - - /** - * Default constructor - */ - public DinoViewRESTResource() { - } - - /** - * Get the configured resource endpoints - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @return response object containing the list of resource endpoints or exception information - */ - - @GetMapping("/resource-endpoints") - public DinoResourceEndpointListResponse getResourceEndpoints(@PathVariable String viewServerName, - @PathVariable String userId) { - return restAPI.getResourceEndpointList(viewServerName, userId); - - } - - /** - * Get the platform overview - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the overview of the platform or exception information - */ - - @PostMapping("/platform/{platformName}") - public DinoPlatformOverviewResponse getPlatformOverview(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetOverview(viewServerName, userId, requestBody); - - } - - - - /** - * Get the platform origin - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the platform's origin string or exception information - */ - - @PostMapping("/platform/{platformName}/origin") - public DinoStringResponse getPlatformOrigin(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetOrigin(viewServerName, userId, requestBody); - - } - - - /** - * Get the active servers on a platform - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of names of active servers or exception information - */ - - @PostMapping("/platform/{platformName}/servers/active") - public DinoServerListResponse getActiveServers(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetActiveServers(viewServerName, userId, requestBody); - - } - - - - /** - * Get the known servers on a platform - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of names of all known servers or exception information - */ - - @PostMapping("/platform/{platformName}/servers") - public DinoServerListResponse getKnownServers(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetKnownServers(viewServerName, userId, requestBody); - - } - - /** - * Get the access services on a platform - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of service objects or exception information - */ - - @PostMapping("/platform/{platformName}/registered-services/access-services") - public DinoServiceListResponse getAccessServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetAccessServices(viewServerName, userId, requestBody); - - } - - /** - * Get the view services on a platform - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of service objects or exception information - */ - - @PostMapping("/platform/{platformName}/registered-services/view-services") - public DinoServiceListResponse getViewServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetViewServices(viewServerName, userId, requestBody); - - } - /** - * Get the governance services on a platform - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of service objects or exception information - */ - - @PostMapping("/platform/{platformName}/registered-services/governance-services") - public DinoServiceListResponse getGovernanceServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetGovernanceServices(viewServerName, userId, requestBody); - - } - - - /** - * Get the common services on a platform - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param platformName name of the platform - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of service objects or exception information - */ - - @PostMapping("/platform/{platformName}/registered-services/common-services") - public DinoServiceListResponse getCommonServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String platformName, - @RequestBody DinoPlatformRequestBody requestBody ) { - return restAPI.platformGetCommonServices(viewServerName, userId, requestBody); - - } - - - /** - * Get the server overview - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the overview of the server or exception information - */ - - @PostMapping("/server/{serverName}") - public DinoServerOverviewResponse getServerOverview(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServerRequestBody requestBody ) { - return restAPI.serverGetOverview(viewServerName, userId, requestBody); - - } - - - /** - * Get the server origin - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the server origin or exception information - */ - - @PostMapping("/server/{serverName}/origin") - public DinoStringResponse getServerOrigin(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServerRequestBody requestBody ) { - return restAPI.serverGetOrigin(viewServerName, userId, requestBody); - - } - - /** - * Get the server type classification - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the server type information or exception information - */ - - @PostMapping("/server/{serverName}/server-type-classification") - public DinoServerTypeResponse getServerTypeClassification(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServerRequestBody requestBody ) { - return restAPI.serverGetTypeClassification(viewServerName, userId, requestBody); - - } - - /** - * Get the server's stored configuration - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the server configuration or exception information - */ - - @PostMapping("/server/{serverName}/configuration") - public DinoServerConfigResponse getServerStoredConfiguration(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServerRequestBody requestBody ) { - return restAPI.serverGetStoredConfiguration(viewServerName, userId, requestBody); - - } - - - /** - * Get the server's active (running instance) configuration - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the server configuration or exception information - */ - - @PostMapping("/server/{serverName}/instance/configuration") - public DinoServerConfigResponse getServerInstanceConfiguration(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServerRequestBody requestBody ) { - return restAPI.serverGetInstanceConfiguration(viewServerName, userId, requestBody); - - } - - /** - * Get the server's stored and active (running instance) configurations in a duplexed response - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the server configuration or exception information - */ - - @PostMapping("/server/{serverName}/stored-and-active-configuration") - public DinoServerDoubleConfigResponse getServerStoredAndActiveConfiguration(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServerRequestBody requestBody ) { - return restAPI.serverGetStoredAndActiveConfiguration(viewServerName, userId, requestBody); - - } - - /** - * Get the server's audit log - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the server's audit log or exception information - */ - - @PostMapping("/server/{serverName}/audit-log") - public DinoServerAuditLogResponse getServerAuditLog(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServerRequestBody requestBody ) { - return restAPI.serverGetAuditLog(viewServerName, userId, requestBody); - - } - - /** - * Get a list of the integration services on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of integration services or exception information - */ - - @PostMapping("/server/{serverName}/integration-services") - public DinoServiceListResponse getServerIntegrationServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetIntegrationServices(viewServerName, userId, requestBody); - - } - - /** - * Get a list of the engine services on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of integration services or exception information - */ - - @PostMapping("/server/{serverName}/engine-services") - public DinoServiceListResponse getServerEngineServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetEngineServices(viewServerName, userId, requestBody); - - } - /** - * Get a list of the access services on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of integration services or exception information - */ - - @PostMapping("/server/{serverName}/access-services") - public DinoServiceListResponse getServerAccessServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetAccessServices(viewServerName, userId, requestBody); - - } - - /** - * Get a list of the view services on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the list of integration services or exception information - */ - - @PostMapping("/server/{serverName}/view-services") - public DinoServiceListResponse getServerViewServices(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetViewServices(viewServerName, userId, requestBody); - - } - - - /** - * Get the details of an integration service running on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the service's details or exception information - */ - - @PostMapping("/server/{serverName}/integration-service-details") - public DinoServiceDetailsResponse getServerIntegrationServiceDetails(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetIntegrationServiceDetails(viewServerName, userId, requestBody); - - } - - /** - * Get the details of an engine service running on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the service's details or exception information - */ - - @PostMapping("/server/{serverName}/engine-service-details") - public DinoServiceDetailsResponse getServerEngineServiceDetails(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetEngineServiceDetails(viewServerName, userId, requestBody); - - } - - /** - * Get the details of an access service running on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the service's details or exception information - */ - - @PostMapping("/server/{serverName}/access-service-details") - public DinoServiceDetailsResponse getServerAccessServiceDetails(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetAccessServiceDetails(viewServerName, userId, requestBody); - - } - - /** - * Get the details of a view service running on the server - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the service's details or exception information - */ - - @PostMapping("/server/{serverName}/view-service-details") - public DinoServiceDetailsResponse getServerViewServiceDetails(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoServiceRequestBody requestBody ) { - return restAPI.serverGetViewServiceDetails(viewServerName, userId, requestBody); - - } - - - /** - * Get the details of an engine running on the server. This wll return a list of the services registered to the engine - * The request body contains the serverName, platformName and OMES service name, plus the engine name. - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param serverName name of the server - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the service's details or exception information - */ - - @PostMapping("/server/{serverName}/engine-details") - public DinoEngineDetailsResponse getServerEngineServiceDetails(@PathVariable String viewServerName, - @PathVariable String userId, - @PathVariable String serverName, - @RequestBody DinoEngineRequestBody requestBody ) { - return restAPI.serverGetEngineDetails(viewServerName, userId, requestBody); - - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/README.md b/open-metadata-implementation/view-services/glossary-author-view/README.md deleted file mode 100644 index d983bd0fb19..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -![InDev](../../../images/egeria-content-status-in-development.png#pagewidth) - -# Glossary Author Open Metadata View Service (OMVS) - -Develop a definition of a subject area by authoring glossaries, including terms for use by a user interface. The Glossary Author OMVS is for user interfaces that support subject matter experts -who are defining glossaries, reference data and rules around data for a specific subject area, such as "customer data". - -This OMVS calls a remote server using the [Subject Area OMAS](../../access-services/subject-area/README.md). - - -The module structure for the Glossary Author OMVS is as follows: - -* [glossary-author-view-server](glossary-author-view-server) supports an implementation of the view service. -* [glossary-author-view-spring](glossary-author-view-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - -Return to [open-metadata-implementation](../..). - ----- -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/view-services/glossary-author-view/docs/design/Story board - Subject Area UI.drawio b/open-metadata-implementation/view-services/glossary-author-view/docs/design/Story board - Subject Area UI.drawio deleted file mode 100644 index 88d8e54e2fc..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/docs/design/Story board - Subject Area UI.drawio +++ /dev/null @@ -1 +0,0 @@ -5LzHkutMlib4NP8yx0AIAlhCa03IHbTWknj6gUfcPyurstqme1OLnrCwG6SDBBzu53ziuOP+hTD9JSzxVGljlnd/wVB2/YWwf8EwDEHo8we0fH9b3sTrt6Fc6uy36V8anPrO/zRCf1r3OsvX//TBbRy7rZ7+c2M6DkOebv+pLV6W8fzPHyvG7j9fdYrL/N8anDTu/r3Vr7Ot+m0lYPw/2sW8Lqu/r/x6k79H+vjvD/+5k7WKs/H8lyaE+wthlnHcfl/1F5N3YPD+Hpff7/H/i6P/7NiSD9v/zhfMXPfaCm+q3WJL/pNN4tj8489Zjrjb/9zwX/C7e85Hx09zteTFT+t73kE36WrbwLhT4CowX9ZbtSf/Tzr2z5sxm+rnTxZv8T/K8ciXIR7S/Gk56xYcYMEB4Z8H/mFqzD+0PN/qofzHC9+qf8jxsMfL9x8w9CL/44rPq/J/+Mrd73X5+O9r/5m/7ft3UGz59dunvnsaXs/LdVvGNmfGblyelmEcnk/SRd11/6Up7upyeN6mz6TlTzv99Gqrn3Cj/hzo6ywDl6HPqt5yZ4pTcM3zSa6nbRn3IcvBfEL/7Na/BsDfs/mcM7/+pelPQAj52Ofb8n0+8ufoP/5Osz/ZSfx5e/5HqJPIn7bqX8L875iO/2RX+c8z/0cAPi/+xOD/QTzC/xaPZr6sT26DcEzitP0BCjAMz+TEPRiUIVmn/6snCf7/nKPX/+gc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5x3ydzJ83MlyvHBm7zLoyHre797bL/30H/eZH4zro3/kXHfSvNNB/fwNRbb/a9V7n3zec/QE= \ No newline at end of file diff --git a/open-metadata-implementation/view-services/glossary-author-view/docs/design/SubjectAreaMockups.drawio b/open-metadata-implementation/view-services/glossary-author-view/docs/design/SubjectAreaMockups.drawio deleted file mode 100644 index a01b83094c8..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/docs/design/SubjectAreaMockups.drawio +++ /dev/null @@ -1 +0,0 @@ -7L1Zl6M40zX6W85Fr/V8F12LebhkNBhjwBgb++ZdGDPZzLP59UfCOWdWdXV3ZfUzVHZXVRqDkBRbETtCIek3XMjGRe2VsV6cg/Q3DDmPv+HibxiGYhQD/oFXbvcrLEneL0R1cn646fmCnUzBw0Xk4WqXnIPm1Y1tUaRtUr6+6Bd5Hvjtq2teXRfD69vCIn391tKLgncXbN9L31/dJ+c2friKUuzzF0qQRPHDqxmMvn+ReY83P7Skib1zMby4hEu/4UJdFO39t2wUghR23mO/1MHG59ZCrO6FWGwRG1ur1O/3wuQ/88hTE+ogb/9y0cOhJeVgt52u/qpRpnO5lP/vd/xedO+l3UN//YZRKXgJH4O3UhH87fFKWIC3P1xbBHlQe+njV+CtL799cfl9MeUHd7271qVvr6TJ45VtHEBpZN7cvKJr0ySHV/yk9lMANYilDqAEQ07wcgKQ1cyoA3/VQVkHDexGcGEu55yEYVA/XLmV8/NFCAtJvaZJwsT32uReAuxbWER6vxJDCGPIv5J8LiyBH4LRy8oUljskbQzq9lQBnAO/CrAOcz+DX/MQjIy8Tbw0aW+/YQK4aHNP39vd6QLGA1cH3v277fN326DOuNyPi/rhK+HVV4LXBlFRJ9Ncz//35bELT/UHXf/cr1/taTimHzrl3mepV0dBDTu4O53uXT63/pzUoMrpDYK1Lsqihu+HKLl3/v3hvMtO88NzgQW4OH+YWzvLKfZgr8VeHzw903hZ8KbrYc8HEWgbQmBPrf+47Bb0yVzH/Ll4/95HsKpeDrESpUXTePXtubv+oHOENPG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N2P8Kxh5I5v8qth7/xla1SaoRFdLFiiZPe2joYDyH9Wm1GmQY+Xbv/zet8srwfx9jWex/ZYlxgvgvscRo1xikye6ejAhltPcUtfgf \ No newline at end of file diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/README.md b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/README.md deleted file mode 100644 index 10e15a0b567..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/README.md +++ /dev/null @@ -1,15 +0,0 @@ - - - -# Glossary Author Open Metadata View Service (OMVS) server-side implementation - -The Glossary Author OMVS server-side support is organized in the following top level packages - -* admin - The SubjectAreaAdmin controls this OMVS's lifecycle. It is initialised here receiving the view service configuration. It is shutdown here. -* auditlog - this is a list of the audit log messages -* initialization - registration and set up for multitenancy -* services - implementations of the view service -* handlers ----- -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/view-services/glossary-author-view/glossary-author-view-server/build.gradle b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/build.gradle deleted file mode 100644 index ff0c6d38860..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/admin/GlossaryAuthorViewAdmin.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/admin/GlossaryAuthorViewAdmin.java deleted file mode 100644 index 5bbccaa4f00..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/admin/GlossaryAuthorViewAdmin.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.admin; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin; -import org.odpi.openmetadata.adminservices.ffdc.OMAGAdminAuditCode; -import org.odpi.openmetadata.adminservices.ffdc.OMAGAdminErrorCode; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.glossaryauthor.admin.serviceinstances.GlossaryAuthorViewServicesInstance; -import org.odpi.openmetadata.viewservices.glossaryauthor.auditlog.GlossaryAuthorViewAuditCode; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * GlossaryAuthorViewAdmin is the class that is called by the UI Server to initialize and terminate - * the Glossary Author OMVS. The initialization call provides this OMVS with the Audit log and configuration. - */ -public class GlossaryAuthorViewAdmin extends ViewServiceAdmin { - - private static final Logger log = LoggerFactory.getLogger(GlossaryAuthorViewAdmin.class); - - private static final Integer MINIMUM_GLOSSARY_AUTHOR_PAGE_SIZE = 101; - - private ViewServiceConfig viewServiceConfig = null; - private AuditLog auditLog = null; - private String serverUserName = null; - - private GlossaryAuthorViewServicesInstance instance = null; - private String serverName = null; - - /** - * Default constructor - */ - public GlossaryAuthorViewAdmin() { - } - - /** - * Initialize the glossary author open metadata view service (OMVS). - * - * @param serverName name of the local server - * @param viewServiceConfigurationProperties specific configuration properties for this view service. - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use to issue calls to the remote server. - * @param maxPageSize maximum page size. - * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. - */ - @Override - public void initialize(String serverName, ViewServiceConfig viewServiceConfigurationProperties, AuditLog auditLog, String serverUserName, int maxPageSize) throws OMAGConfigurationErrorException { - final String actionDescription = "initialize"; - final String methodName = actionDescription; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO validate the configuration and when invalid, throw OMAGConfigurationErrorException - if (maxPageSize < MINIMUM_GLOSSARY_AUTHOR_PAGE_SIZE) { - final String viewServiceFullName = viewServiceConfigurationProperties.getViewServiceFullName(); - // There is a minimum max page size of this view service so that the UI can issue a paging call up to MINIMUM_GLOSSARY_AUTHOR_PAGE_SIZE-1 and - // the view service will support that page size. This means tha UI javascript can issue a single rest call to get the users page of data. - - auditLog.logMessage(actionDescription, OMAGAdminAuditCode.VIEW_SERVICE_MAX_PAGE_SIZE_TOO_LOW.getMessageDefinition(viewServiceFullName, serverName, MINIMUM_GLOSSARY_AUTHOR_PAGE_SIZE.toString(), - ""+maxPageSize)); - - throw new OMAGConfigurationErrorException(OMAGAdminErrorCode.VIEW_SERVICE_MAX_PAGE_SIZE_TOO_LOW.getMessageDefinition(viewServiceFullName, - serverName, MINIMUM_GLOSSARY_AUTHOR_PAGE_SIZE.toString(), - ""+maxPageSize), - this.getClass().getName(), - methodName); - - } - - auditLog.logMessage(actionDescription, - GlossaryAuthorViewAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - try { - this.viewServiceConfig = viewServiceConfigurationProperties; - this.auditLog = auditLog; - this.serverUserName = serverUserName; - this.serverName = serverName; - this.instance = new GlossaryAuthorViewServicesInstance(this.serverName, - auditLog, - serverUserName, - maxPageSize, - this.viewServiceConfig.getOMAGServerName(), - this.viewServiceConfig.getOMAGServerPlatformRootURL()); - writeAuditLogPassingErrorMessage(auditLog, actionDescription, GlossaryAuthorViewAuditCode.SERVICE_INITIALIZED, serverName); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - // todo - not valid to use private exception from SubjectArea OMAS - } catch (InvalidParameterException iae) { - writeAuditLogPassingErrorMessage(auditLog, actionDescription, GlossaryAuthorViewAuditCode.SERVICE_INSTANCE_FAILURE, iae.getMessage()); - throw new OMAGConfigurationErrorException(iae.getReportedHTTPCode(), iae.getReportingClassName(), iae.getReportingActionDescription(), - iae.getReportedErrorMessage(), iae.getReportedErrorMessageId(), iae.getReportedErrorMessageParameters(), - iae.getReportedSystemAction(), iae.getReportedUserAction(), iae.getReportedCaughtExceptionClassName(), iae.getRelatedProperties()); - } - } - - private void writeAuditLogPassingErrorMessage(AuditLog auditLog, String actionDescription, GlossaryAuthorViewAuditCode auditCode, String message) { - auditLog.logMessage(actionDescription, auditCode.getMessageDefinition(message)); - } - - /** - * Shutdown the glossary author view service. - */ - @Override - public void shutdown() { - final String actionDescription = "shutdown"; - - log.debug(">>" + actionDescription); - - GlossaryAuthorViewAuditCode auditCode; - - auditCode = GlossaryAuthorViewAuditCode.SERVICE_TERMINATING; - writeAuditLogPassingErrorMessage(auditLog, actionDescription, auditCode, serverName); - - if (instance != null) { - this.instance.shutdown(); - } - - auditCode = GlossaryAuthorViewAuditCode.SERVICE_SHUTDOWN; - writeAuditLogPassingErrorMessage(auditLog, actionDescription, auditCode, serverName); - - log.debug("<<" + actionDescription); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/admin/serviceinstances/GlossaryAuthorViewServicesInstance.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/admin/serviceinstances/GlossaryAuthorViewServicesInstance.java deleted file mode 100644 index 51bd3b2f822..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/admin/serviceinstances/GlossaryAuthorViewServicesInstance.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.admin.serviceinstances; - -import org.odpi.openmetadata.accessservices.subjectarea.SubjectArea; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaImpl; -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationshipClients; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstance; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; - - -/** - *GlossaryAuthorViewServicesInstance caches references to objects it needs for a specific server. - * It is also responsible for registering itself in the instance map. - */ - -public class GlossaryAuthorViewServicesInstance extends OMVSServiceInstance -{ - private final SubjectAreaNodeClients nodeClients; - private final SubjectAreaRelationshipClients subjectAreaRelationshipClients; - private final SubjectAreaConfigClient subjectAreaConfigClient; - private final SubjectAreaGraphClient subjectAreaGraphClient; - - /** - * Set up the Glossary Author OMVS instance - * - * @param serverName name of this server - * @param auditLog logging destination - * @param localServerUserId userId used for server initiated actions - * @param maxPageSize maximum page size - * @param remoteServerName remote server name - * @param remoteServerURL remote server URL - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - public GlossaryAuthorViewServicesInstance(String serverName, - AuditLog auditLog, - String localServerUserId, - int maxPageSize, - String remoteServerName, - String remoteServerURL) throws InvalidParameterException { - super(serverName, ViewServiceDescription.GLOSSARY_AUTHOR.getViewServiceName(), auditLog, localServerUserId, maxPageSize, remoteServerName, - remoteServerURL); - final SubjectArea subjectArea = new SubjectAreaImpl(remoteServerName, remoteServerURL); - this.subjectAreaRelationshipClients = subjectArea.relationshipClients(); - this.nodeClients = subjectArea.nodeClients(); - this.subjectAreaConfigClient = subjectArea.subjectAreaConfigClient(); - this.subjectAreaGraphClient = subjectArea.subjectAreaGraphClient(); - } - - public String getViewServiceName() - { - return ViewServiceDescription.GLOSSARY_AUTHOR.getViewServiceName(); - } - - public SubjectAreaNodeClients getNodeClients() { return nodeClients; } - - public SubjectAreaRelationshipClients getSubjectAreaRelationshipClients() { - return subjectAreaRelationshipClients; - } - - public SubjectAreaConfigClient getSubjectAreaConfigClient() { - return subjectAreaConfigClient; - } - public SubjectAreaGraphClient getSubjectAreaGraphClient() { - return subjectAreaGraphClient; - } - public int getGlossaryViewMaxPageSize() { - return maxPageSize; - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/auditlog/GlossaryAuthorViewAuditCode.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/auditlog/GlossaryAuthorViewAuditCode.java deleted file mode 100644 index fb669a4de24..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/auditlog/GlossaryAuthorViewAuditCode.java +++ /dev/null @@ -1,168 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.auditlog; - - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - -/** - * The GlossaryAuthorAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *

    - *
  • Log Message Id - 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
  • - *
- */ - - -//TODO the adding of terms for audit will need to pass the guid as a parameter and maybe the fully qualified name. I do not see how I can add parameters in the below structure. - -public enum GlossaryAuthorViewAuditCode implements AuditLogMessageSet -{ - /** - * OMVS-GLOSSARY-AUTHOR-0001 - The Glossary Author View Service (OMVS) is initializing - */ - SERVICE_INITIALIZING("OMVS-GLOSSARY-AUTHOR-0001", - OMRSAuditLogRecordSeverity.STARTUP, - "The Glossary Author View Service (OMVS) is initializing", - "The local server is initializing the Glossary Author OMVS. If the initialization is successful then audit message OMVS-GLOSSARY-AUTHOR-0003 will be issued, if there were errors then they should be shown in the audit log. ", - "No action is required. This is part of the normal operation of the Glossary Author OMVS."), - - /** - * OMVS-GLOSSARY-AUTHOR-0002 - The Glossary Author View Service (OMVS) is initialized - */ - SERVICE_INITIALIZED("OMVS-GLOSSARY-AUTHOR-0002", - OMRSAuditLogRecordSeverity.STARTUP, - "The Glossary Author View Service (OMVS) is initialized in server {0}", - "The Glossary Author OMVS has completed initialization. Calls will be accepted by this service, if OMRS is also configured and the view server has been started. ", - "No action is required. This is part of the normal operation of the Glossary Author OMVS. Once the OMRS is configured and the server is started, Glossary Author view service requests can be accepted."), - - /** - * OMVS-GLOSSARY-AUTHOR-0003 - The Glossary Author View Service (OMVS) is shutting down - */ - SERVICE_SHUTDOWN("OMVS-GLOSSARY-AUTHOR-0003", - OMRSAuditLogRecordSeverity.SHUTDOWN, - "The Glossary Author View Service (OMVS) is shutting down", - "The local server has requested shutdown of the Glossary Author OMVS.", - "No action is required. The operator should verify that shutdown was intended. This is part of the normal operation of the Glossary Author OMVS."), - - /** - * OMVS-GLOSSARY-AUTHOR-0004 - The Glossary Author View Service (OMVS) is unable to initialize a new instance; error message is {0} - */ - SERVICE_INSTANCE_FAILURE("OMVS-GLOSSARY-AUTHOR-0004", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The Glossary Author View Service (OMVS) is unable to initialize a new instance; error message is {0}", - "The view service detected an error during the start up of a specific server instance. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - - /** - * OMVS-GLOSSARY-AUTHOR-0005 - The Glossary Author View Service (OMVS) is shutting down server instance {0} - */ - SERVICE_TERMINATING("OMVS-GLOSSARY-AUTHOR-0005", - OMRSAuditLogRecordSeverity.SHUTDOWN, - "The Glossary Author View Service (OMVS) is shutting down server instance {0}", - "The local handlers has requested shut down of the Glossary Author OMVS.", - "No action is required. This is part of the normal operation of the service."), - - /** - * OMVS-GLOSSARY-AUTHOR-0006 - The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2} - */ - UNEXPECTED_EXCEPTION("OMVS-GLOSSARY-AUTHOR-0006", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2}", - "The request returns a PropertyServerException.", - "This is probably a logic error. Review the stack trace to identify where the error " + - "occurred and work to resolve the cause.") - ; - - private final String logMessageId; - private final OMRSAuditLogRecordSeverity severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor for GlossaryAuthorAuditCode expects to be passed one of the enumeration rows defined in - * GlossaryAuthorAuditCode above. For example: - * GlossaryAuthorAuditCode auditCode = GlossaryAuthorAuditCode.SERVER_NOT_AVAILABLE; - * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique identifier 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 - */ - GlossaryAuthorViewAuditCode(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. - */ - 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. - */ - 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 "GlossaryAuthorAuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - ", messageDefinition=" + getMessageDefinition() + - '}'; - } -} - diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/ffdc/GlossaryAuthorErrorCode.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/ffdc/GlossaryAuthorErrorCode.java deleted file mode 100644 index 2570c6f6052..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/ffdc/GlossaryAuthorErrorCode.java +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The GlossaryAuthorErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with - * the Glossary Author OMVS 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:
  • - *
    • - *
    • 500 - internal error
    • - *
    • 400 - invalid parameters
    • - *
    • 404 - not found
    • - *
    • 409 - data conflict errors - eg item already defined
    • - *
  • - *
  • Error Message Id - 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 SubjectAreaInterface should correct the error
  • - *
- */ -public enum GlossaryAuthorErrorCode implements ExceptionMessageSet { - GET_BREADCRUMBS_TERM_NOT_IN_GLOSSARY(400, "OMVS-GLOSSARY-AUTHOR-400-001", - "Get BreadCrumbs call issued term {0} guid {1}, is not in the glossary {2} guid {3} ", - "The system is unable to return breadcrumbs if the Term is not owned by the Glossary.", - "Supply valid Term and Glossary guids when requesting BreadCrumbs."), - GET_BREADCRUMBS_TERM_NOT_IN_ROOT_CATEGORY(400, "OMVS-GLOSSARY-AUTHOR-400-002", - "Get BreadCrumbs call issued term {0} guid {1}, is not in the root category {2} guid {3}.", - "The system is unable to return breadcrumbs if the Term is not owned by the root Category.", - "Supply valid Term and root category guids when requesting BreadCrumbs."), - GET_BREADCRUMBS_TERM_NOT_IN_LEAF_CATEGORY(400, "OMVS-GLOSSARY-AUTHOR-400-003", - "Get BreadCrumbs call issued term {0} guid {1}, is not in the leaf category {2} guid {3}.", - "The system is unable to return breadcrumbs if the Term is not owned by the leaf Category.", - "Supply valid Term and leaf category guids when requesting BreadCrumbs."), - GET_BREADCRUMBS_ROOT_CATEGORY_NOT_ROOT(400, "OMVS-GLOSSARY-AUTHOR-400-003", - "Get BreadCrumbs call the root category {0} guid {1}, is not actually the root as it has a parent category.", - "The system is unable to return breadcrumbs if the root Category has a parent category.", - "Supply a root category that does not have a parent category when requesting BreadCrumbs."), - GET_BREADCRUMBS_ROOT_CATEGORY_NOT_GLOSSARY(400, "OMVS-GLOSSARY-AUTHOR-400-004", - "Get BreadCrumbs call the root category {0} guid {1}, is not in the glossary {2} guid {3}", - "The system is unable to return breadcrumbs if the root Category is not in the supplied glossary.", - "Supply a root category that is in the requested glossary when requesting BreadCrumbs."), - ; - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - GlossaryAuthorErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} - diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/handlers/BreadCrumbHandler.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/handlers/BreadCrumbHandler.java deleted file mode 100644 index a553fce01db..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/handlers/BreadCrumbHandler.java +++ /dev/null @@ -1,203 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.handlers; - -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.ffdc.GlossaryAuthorErrorCode; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.BreadCrumb; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.BreadCrumbTrail; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * The breadcrumb handler is initialised with Subject Area Node clients clients (allowing calls to the Subject Area OMAs to be made) and - * the userId under which those calls should be issued. - * This class exposes a method which is supplied the - *
    - *
  • Glossary guid (the top of the bread crumb)
  • - *
  • the root Category the top of the Categories
  • - *
  • the leaf Category the bottom of the Categories
  • - *
  • a Term guid which if specified is the bottom of the breadcrumb trail.
  • - *
- * The guids represent nodes that are expected to determine a breadcrumb trail. If the supplied guids do not form - * a trail then an error occurs. - * - * The handler exposes methods for breadcrumb functionality for the Glossary Author view - */ -public class BreadCrumbHandler { - static String className = BreadCrumbHandler.class.getName(); - static String restAPIName = "getBreadCrumbTrail"; - List breadCrumbs = new ArrayList<>(); - Category currentCategory = null; - private Set guids = new HashSet<>(); - private SubjectAreaNodeClients clients; - private String userId; - - - - public BreadCrumbHandler(SubjectAreaNodeClients clients, String userId) { - this.clients =clients; - this.userId = userId; - } - - private boolean hasParentCategory() throws InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, UserNotAuthorizedException { - boolean hasParent = false; - Category parentCategory = null; - List categoryRelationships = clients.terms().getAllRelationships(userId, currentCategory.getSystemAttributes().getGUID()); - for (Relationship categoryRelationship : categoryRelationships) { - if (categoryRelationship.getRelationshipType().equals(RelationshipType.CategoryHierarchyLink)) { - // if there is more than one parent - it will get the last one its sees - String parentCategoryGuid =categoryRelationship.getEnd1().getNodeGuid(); - if (!parentCategoryGuid.equals(currentCategory.getSystemAttributes().getGUID())) { - parentCategory = clients.categories().getByGUID(userId, parentCategoryGuid); - } - } - } - if (parentCategory != null) { - hasParent = true; - currentCategory = parentCategory; - } - - return hasParent; - } - - public List getBreadCrumbTrail(String glossaryGuid, String rootCategoryGuid, String leafCategoryGuid, String termGuid) throws InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException { - - Category leafCategory = null; - Category rootCategory = null; - Glossary glossary = null; - Term term = null; - // If a guid is specified then it needs to be valid - if (leafCategoryGuid != null) { - leafCategory = clients.categories().getByGUID(userId, leafCategoryGuid); - } - if (rootCategoryGuid != null) { - rootCategory = clients.categories().getByGUID(userId, rootCategoryGuid); - } - if (glossaryGuid != null) { - glossary = clients.glossaries().getByGUID(userId, glossaryGuid); - } - if (termGuid !=null) { - term = clients.terms().getByGUID(userId, termGuid); - } - - // if we got here the supplied guids must match the appropriate types. - if (termGuid == null) { - // set the lowest breadcrumb - if (leafCategory != null) { - breadCrumbs.add(new BreadCrumb(leafCategoryGuid, leafCategory.getName(), NodeType.Category)); - } else if (rootCategory != null) { - breadCrumbs.add(new BreadCrumb(rootCategoryGuid, rootCategory.getName(), NodeType.Category)); - } - } else { - // create term breadcrumb - breadCrumbs.add(new BreadCrumb(termGuid, term.getName(), NodeType.Term)); - List termRelationships = clients.terms().getAllRelationships(userId, termGuid); - if (rootCategory == null && leafCategory == null ) { - boolean termCorrectlyAnchored = false; - // check that the term is anchored in the glossary - for (Relationship termRelationship : termRelationships) { - if (termRelationship.getRelationshipType().equals(RelationshipType.TermAnchor)) { - if (termRelationship.getEnd1().getNodeGuid().equals(glossaryGuid)) { - termCorrectlyAnchored = true; - } else { - // Found a TermAnchor, but not pointing to the right glossary - ExceptionMessageDefinition messageDefinition = GlossaryAuthorErrorCode.GET_BREADCRUMBS_TERM_NOT_IN_GLOSSARY.getMessageDefinition( term.getName(),termGuid, glossary.getName(), glossaryGuid); - throw new org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException(messageDefinition, className, restAPIName, "TermGuid", termGuid); - } - } - } - if (!termCorrectlyAnchored) { - // Error term not in glossary as we did not find a TermAnchor - ExceptionMessageDefinition messageDefinition = GlossaryAuthorErrorCode.GET_BREADCRUMBS_TERM_NOT_IN_GLOSSARY.getMessageDefinition( term.getName(),termGuid,glossary.getName(), glossaryGuid ); - throw new org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException(messageDefinition, className, restAPIName, "TermGuid", termGuid); - - } - // if we did not find a term anchor - error - } else if (rootCategory !=null && leafCategory == null ) { - // check that the rootCategory categories this term - boolean termCorrectlyCategorized = false; - for (Relationship termRelationship : termRelationships) { - if (termRelationship.getRelationshipType().equals(RelationshipType.TermCategorization)) { - if (termRelationship.getEnd1().getNodeGuid().equals(rootCategoryGuid)) { - breadCrumbs.add(new BreadCrumb(rootCategoryGuid, rootCategory.getName(), NodeType.Category)); - termCorrectlyCategorized = true; - } - } - } - if (!termCorrectlyCategorized) { - // Error term not in root category - ExceptionMessageDefinition messageDefinition = GlossaryAuthorErrorCode.GET_BREADCRUMBS_TERM_NOT_IN_ROOT_CATEGORY.getMessageDefinition( term.getName(),termGuid,rootCategory.getName(), rootCategoryGuid ); - throw new org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException(messageDefinition, className, restAPIName, "TermGuid", termGuid); - - } - } else if (rootCategory !=null && leafCategory != null ) { - // check that the leaf category categories this term - boolean termCorrectlyCategorized = false; - for (Relationship termRelationship : termRelationships) { - if (termRelationship.getRelationshipType().equals(RelationshipType.TermCategorization)) { - if (termRelationship.getEnd1().getNodeGuid().equals(leafCategoryGuid)) { - breadCrumbs.add(new BreadCrumb(leafCategoryGuid, leafCategory.getName(), NodeType.Category)); - termCorrectlyCategorized = true; - } - } - } - if (!termCorrectlyCategorized) { - // Error we did not find the expected categorization - ExceptionMessageDefinition messageDefinition = GlossaryAuthorErrorCode.GET_BREADCRUMBS_TERM_NOT_IN_LEAF_CATEGORY.getMessageDefinition(termGuid, term.getName(), leafCategoryGuid, leafCategory.getName()); - throw new org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException(messageDefinition, className, restAPIName, "TermGuid", termGuid); - - } - - } - } - // At this stage we have processed the Term and the relationships that it has to its parent. We have also added the first Category breadcrumb - - if (leafCategory != null && rootCategory != null) { - // we have at least 2 Categories in our tree. - currentCategory = leafCategory; - - while (this.hasParentCategory()) { - breadCrumbs.add(new BreadCrumb(currentCategory.getSystemAttributes().getGUID(), currentCategory.getName(), NodeType.Category)); - } - // the currentCategory should be the top of the tree. - if (!currentCategory.getSystemAttributes().getGUID().equals(rootCategoryGuid)) { - // error the supplied rootCategory not found to be the root in the category parents - ExceptionMessageDefinition messageDefinition = GlossaryAuthorErrorCode.GET_BREADCRUMBS_ROOT_CATEGORY_NOT_ROOT.getMessageDefinition(rootCategoryGuid, rootCategory.getName()); - throw new org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException(messageDefinition, className, restAPIName, "rootCategoryGuid", rootCategoryGuid); - - } else { - // check that the CategoryAnchor glossary is the supplied one - - List categoryRelationships = clients.terms().getAllRelationships(userId, currentCategory.getSystemAttributes().getGUID()); - for (Relationship categoryRelationship : categoryRelationships) { - if (categoryRelationship.getRelationshipType().equals(RelationshipType.CategoryAnchor)) { - // if there is more than one parent - it will get the last one its sees - if (!glossary.getSystemAttributes().getGUID().equals(glossaryGuid)) { - // the supplied glossary guid does not match the owning glossary of the rootCategory - ExceptionMessageDefinition messageDefinition = GlossaryAuthorErrorCode.GET_BREADCRUMBS_ROOT_CATEGORY_NOT_GLOSSARY.getMessageDefinition(rootCategoryGuid, rootCategory.getName(), glossaryGuid, glossary.getName()); - throw new org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException(messageDefinition, className, restAPIName, "rootCategoryGuid", rootCategoryGuid); - } - } - } - } - } - // then add the glossary to the BreadCrumb. - breadCrumbs.add(new BreadCrumb(glossaryGuid, glossary.getName(), NodeType.Glossary)); - BreadCrumbTrail breadCrumbTrail = new BreadCrumbTrail(breadCrumbs); - - return breadCrumbTrail.getBreadCrumbs(); - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/handlers/RelationshipHandler.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/handlers/RelationshipHandler.java deleted file mode 100644 index 41630b23cfd..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/handlers/RelationshipHandler.java +++ /dev/null @@ -1,1588 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.handlers; - -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationshipClients; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * The relationship handler is initialised with a SubjectAreaRelationship, that contains the server the call should be sent to. - * The handler exposes methods for term functionality for the glossary author view - */ -public class RelationshipHandler { - private final SubjectAreaRelationshipClients subjectAreaRelationship; - - /** - * Constructor for the RelationshipHandler - * - * @param subjectAreaRelationship The SubjectAreaDefinition Open Metadata Access Service (OMAS) API for terms. This is the same as the - * The SubjectAreaDefinition Open Metadata View Service (OMVS) API for terms. - */ - public RelationshipHandler(SubjectAreaRelationshipClients subjectAreaRelationship) { - this.subjectAreaRelationship = subjectAreaRelationship; - } - - /** - * Create a Term HasA Relationship. A relationship between a spine object and a spine attribute. - * Note that this method does not error if the relationship ends are not spine objects or spine attributes. - *

- * - * @param userId userId under which the request is performed - * @param termHasARelationship the HasA relationship - * @return the created term HasA relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public HasA createTermHasARelationship(String userId, HasA termHasARelationship) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaRelationship.hasA().create(userId, termHasARelationship); - } - - /** - * Get a Term HasA Relationship. A relationship between a spine object and a spine attribute. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Hasa relationship to get - * @return Hasa - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public HasA getTermHasARelationship(String userId, String guid) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - return subjectAreaRelationship.hasA().getByGUID(userId, guid); - } - - /** - * Update a Term HasA Relationship. A relationship between a spine object and a spine attribute. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the Hasa relationship - * @param termHasARelationship the HasA relationship - * @return the updated term HasA relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property Server Exception - */ - public HasA updateTermHasARelationship(String userId, String guid, HasA termHasARelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.hasA().update(userId, guid, termHasARelationship); - } - - /** - * Replace a Term HasA Relationship. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the Hasa relationship - * @param termHasARelationship the HasA relationship - * @return the replaced term HasA relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public HasA replaceTermHasARelationship(String userId, String guid, HasA termHasARelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.hasA().replace(userId, guid, termHasARelationship); - } - - /** - * Delete a Term HasA Relationship. A relationship between a spine object and a spine attribute. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Hasa relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteTermHasARelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.hasA().delete(userId, guid); - } - - /** - * Restore a Term HasA Relationship. A relationship between a spine object and a spine attribute. - *

- * Restore allows the deleted has a relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the has a relationship to delete - * @return the restored has a relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public HasA restoreTermHasARelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.hasA().restore(userId, guid); - } - - /** - * Create a RelatedTerm. A Related Term is a link between two similar Terms. - * - *

- * - * @param userId unique identifier for requesting user, under which the request is performed - * @param relatedTermRelationship the RelatedTerm relationship - * @return the created RelatedTerm relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property Server Exception - */ - public RelatedTerm createRelatedTerm(String userId, RelatedTerm relatedTermRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.relatedTerm().create(userId, relatedTermRelationship); - } - - /** - * Get a RelatedTerm. A Related Term is a link between two similar Terms. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the RelatedTerm relationship to get - * @return RelatedTerm - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public RelatedTerm getRelatedTerm(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.relatedTerm().getByGUID(userId, guid); - } - - /** - * Update a RelatedTerm Relationship. - *

- * - * @param userId userId under which the request is performed - * @param termRelatedTerm the RelatedTerm relationship - * @param guid guid of the RelatedTerm relationship - * @return the updated term RelatedTerm relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public RelatedTerm updateRelatedTerm(String userId, String guid, RelatedTerm termRelatedTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.relatedTerm().update(userId, guid, termRelatedTerm); - } - - /** - * Replace an ReplacementTerm relationship, which is link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the RelatedTerm relationship - * @param termRelatedTerm the replacement related term relationship - * @return ReplacementTerm replaced related Term relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public RelatedTerm replaceRelatedTerm(String userId, String guid, RelatedTerm termRelatedTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.relatedTerm().replace(userId, guid, termRelatedTerm); - } - - /** - * Restore a Related Term relationship - *

- * Restore allows the deleted Synonym relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to restore - * @return the restored related term relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public RelatedTerm restoreRelatedTerm(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.relatedTerm().restore(userId, guid); - } - - /** - * Delete a RelatedTerm. A Related Term is a link between two similar Terms. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the RelatedTerm relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteRelatedTerm(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.relatedTerm().delete(userId, guid); - } - - /** - * Restore a related term relationship - *

- * Restore allows the deleted related term relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to delete - * @return the restored related term relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public RelatedTerm restoreRelatedTermRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.relatedTerm().restore(userId, guid); - } - - - /** - * Create a synonym relationship. A link between glossary terms that have the same meaning. - *

- * - * @param userId userId under which the request is performed - * @param synonym the Synonym relationship - * @return the created Synonym relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Synonym createSynonymRelationship(String userId, Synonym synonym) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.synonym().create(userId, synonym); - } - - /** - * Get a synonym relationship. A link between glossary terms that have the same meaning. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym relationship to get - * @return Synonym - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public Synonym getSynonymRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.synonym().getByGUID(userId, guid); - } - - /** - * Update a Synonym relationship which is a link between glossary terms that have the same meaning - *

- * - * @param userId userId under which the request is performed - * @param synonym the Synonym relationship - * @param guid guid of the Synonym relationship - * @return updated Synonym relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Synonym updateSynonymRelationship(String userId, String guid, Synonym synonym) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.synonym().update(userId, guid, synonym); - } - - /** - * Replace a Synonym relationship, which is a link between glossary terms that have the same meaning - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the Synonym relationship - * @param synonym the Synonym relationship - * @return replaced synonym relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Synonym replaceSynonymRelationship(String userId, String guid, Synonym synonym) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.synonym().replace(userId, guid, synonym); - } - - /** - * Delete a synonym relationship. A link between glossary terms that have the same meaning. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the synonym relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteSynonymRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.synonym().delete(userId, guid); - } - - /** - * Restore a Synonym relationship - *

- * Restore allows the deleted Synonym relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym relationship to delete - * @return the restored Synonym relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Synonym restoreSynonymRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.synonym().restore(userId, guid); - } - - - /** - * Create a antonym relationship. A link between glossary terms that have the opposite meaning. - * - *

- * - * @param userId userId under which the request is performed - * @param antonym the Antonym relationship - * @return the created antonym relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Antonym createAntonymRelationship(String userId, Antonym antonym) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.antonym().create(userId, antonym); - } - - /** - * Get a antonym relationship. A link between glossary terms that have the opposite meaning. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Anonym relationship to get - * @return Antonym relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public Antonym getAntonymRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.antonym().getByGUID(userId, guid); - } - - /** - * Update a Antonym relationship which is a link between glossary terms that have the opposite meaning - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the Anonym relationship - * @param antonym the Antonym relationship - * @return Antonym updated antonym - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Antonym updateAntonymRelationship(String userId, String guid, Antonym antonym) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.antonym().update(userId, guid, antonym); - } - - /** - * Replace an Antonym relationship which is a link between glossary terms that have the opposite meaning - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the Anonym relationship - * @param antonym the antonym relationship - * @return Antonym replaced antonym - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Antonym replaceAntonymRelationship(String userId, String guid, Antonym antonym) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.antonym().replace(userId, guid, antonym); - } - - /** - * Delete a antonym relationship. A link between glossary terms that have the opposite meaning. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteAntonymRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.antonym().delete(userId, guid); - } - - /** - * Restore a Antonym relationship - *

- * Restore allows the deleted Antonym relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym relationship to delete - * @return the restored Antonym relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Antonym restoreAntonymRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.antonym().restore(userId, guid); - } - - /** - * Create a Translation relationship, which is link between glossary terms that provide different natural language translation of the same concept. - * - *

- * - * @param userId userId under which the request is performed - * @param translation the Translation relationship - * @return the created translation relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Translation createTranslationRelationship(String userId, Translation translation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.translation().create(userId, translation); - } - - /** - * Get a translation relationship, which is link between glossary terms that provide different natural language translation of the same concept. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to get - * @return Translation - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public Translation getTranslationRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.translation().getByGUID(userId, guid); - } - - /** - * Update a Translation relationship, which is link between glossary terms that provide different natural language translation of the same concept. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the Translation relationship - * @param translation the Translation relationship - * @return Translation updated translation - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Translation updateTranslationRelationship(String userId, String guid, Translation translation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.translation().update(userId, guid, translation); - } - - /** - * Replace an Translation relationship, which is link between glossary terms that provide different natural language translation of the same concept. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the Translation relationship - * @param translation the translation relationship - * @return Translation replaced translation - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Translation replaceTranslationRelationship(String userId, String guid, Translation translation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.translation().replace(userId, guid, translation); - } - - /** - * Delete a translation relationship, which is link between glossary terms that provide different natural language translation of the same concept. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteTranslationRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.translation().delete(userId, guid); - } - - /** - * Restore a Translation relationship - *

- * Restore allows the deleted Translation relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to delete - * @return the restored Translation relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Translation restoreTranslationRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.translation().restore(userId, guid); - } - - /** - * Create a UsedInContext relationship, which is link between glossary terms where on describes the context where the other one is valid to use. - * - *

- * - * @param userId userId under which the request is performed - * @param usedInContext the UsedInContext relationship - * @return the created usedInContext relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public UsedInContext createUsedInContextRelationship(String userId, UsedInContext usedInContext) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.usedInContext().create(userId, usedInContext); - } - - /** - * Get a usedInContext relationship, which is link between glossary terms where on describes the context where the other one is valid to use. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext relationship to get - * @return UsedInContext - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public UsedInContext getUsedInContextRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.usedInContext().getByGUID(userId, guid); - } - - /** - * Update a UsedInContext relationship, which is link between glossary terms where on describes the context where the other one is valid to use. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the UsedInContext relationship - * @param usedInContext the UsedInContext relationship - * @return UsedInContext updated usedInContext - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public UsedInContext updateUsedInContextRelationship(String userId, String guid, UsedInContext usedInContext) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.usedInContext().update(userId, guid, usedInContext); - } - - /** - * Replace an UsedInContext relationship, which is link between glossary terms where on describes the context where the other one is valid to use. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the UsedInContext relationship - * @param usedInContext the usedInContext relationship - * @return UsedInContext replaced usedInContext - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public UsedInContext replaceUsedInContextRelationship(String userId, String guid, UsedInContext usedInContext) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.usedInContext().replace(userId, guid, usedInContext); - } - - /** - * Delete a usedInContext relationship, which is link between glossary terms where on describes the context where the other one is valid to use. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteUsedInContextRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.usedInContext().delete(userId, guid); - } - - /** - * Restore a Used in context relationship - *

- * Restore allows the deletedUsed in context relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Used in context relationship to delete - * @return the restored Used in context relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public UsedInContext restoreUsedInContextRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.usedInContext().restore(userId, guid); - } - - /** - * Create a PreferredTerm relationship, which is link to an alternative term that the organization prefer is used. - * - *

- * - * @param userId userId under which the request is performed - * @param preferredTerm the PreferredTerm relationship - * @return the created preferredTerm relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public PreferredTerm createPreferredTermRelationship(String userId, PreferredTerm preferredTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.preferredTerm().create(userId, preferredTerm); - } - - /** - * Get a preferredTerm relationship, which is link to an alternative term that the organization prefer is used. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm relationship to get - * @return PreferredTerm - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public PreferredTerm getPreferredTermRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.preferredTerm().getByGUID(userId, guid); - } - - /** - * Update a PreferredTerm relationship, which is link to an alternative term that the organization prefer is used. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the PreferredTerm relationship - * @param preferredTerm the PreferredTerm relationship - * @return PreferredTerm updated preferredTerm - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public PreferredTerm updatePreferredTermRelationship(String userId, String guid, PreferredTerm preferredTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.preferredTerm().update(userId, guid, preferredTerm); - } - - /** - * Replace an PreferredTerm relationship, which is link to an alternative term that the organization prefer is used. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the PreferredTerm relationship - * @param preferredTerm the preferredTerm relationship - * @return PreferredTerm replaced preferredTerm - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public PreferredTerm replacePreferredTermRelationship(String userId, String guid, PreferredTerm preferredTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.preferredTerm().replace(userId, guid, preferredTerm); - } - - /** - * Delete a preferredTerm relationship, which is link to an alternative term that the organization prefer is used. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deletePreferredTermRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.preferredTerm().delete(userId, guid); - } - - /** - * Restore a preferred term relationship - *

- * Restore allows the deletedpreferred term relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the preferred term relationship to delete - * @return the restored preferred term relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public PreferredTerm restorePreferredTermRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.preferredTerm().restore(userId, guid); - } - - /** - * Create a ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - * - *

- * - * @param userId userId under which the request is performed - * @param validValue the ValidValue relationship - * @return the created validValue relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ValidValue createValidValueRelationship(String userId, ValidValue validValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.validValue().create(userId, validValue); - } - - /** - * Get a validValue relationship, which is link between glossary terms where one defines one of the data values for the another. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue relationship to get - * @return ValidValue - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public ValidValue getValidValueRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.validValue().getByGUID(userId, guid); - } - - /** - * Update a ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the ValidValue relationship - * @param validValue the ValidValue relationship - * @return ValidValue updated validValue - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ValidValue updateValidValueRelationship(String userId, String guid, ValidValue validValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.validValue().update(userId, guid, validValue); - } - - /** - * Replace an ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the ValidValue relationship - * @param validValue the validValue relationship - * @return ValidValue replaced validValue - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ValidValue replaceValidValueRelationship(String userId, String guid, ValidValue validValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.validValue().replace(userId, guid, validValue); - } - - /** - * Delete a validValue relationship, which is link between glossary terms where one defines one of the data values for the another. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteValidValueRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.validValue().delete(userId, guid); - } - - /** - * Restore a valid value relationship - *

- * Restore allows the deletedvalid value relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the valid value relationship to delete - * @return the restored valid value relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ValidValue restoreValidValueRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.validValue().restore(userId, guid); - } - - /** - * Create a ReplacementTerm relationship, which is link to a glossary term that is replacing an obsolete glossary term. - * - *

- * - * @param userId userId under which the request is performed - * @param replacementTerm the ReplacementTerm relationship - * @return the created replacementTerm relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ReplacementTerm createReplacementTermRelationship(String userId, ReplacementTerm replacementTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.replacementTerm().create(userId, replacementTerm); - } - - /** - * Get a replacementTerm relationship, which is link to a glossary term that is replacing an obsolete glossary term. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm relationship to get - * @return ReplacementTerm - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public ReplacementTerm getReplacementTermRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.replacementTerm().getByGUID(userId, guid); - } - - /** - * Update a ReplacementTerm relationship, which is link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the ReplacementTerm relationship - * @param replacementTerm the ReplacementTerm relationship - * @return ReplacementTerm updated replacementTerm - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ReplacementTerm updateReplacementTermRelationship(String userId, String guid, ReplacementTerm replacementTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.replacementTerm().update(userId, guid, replacementTerm); - } - - /** - * Replace an ReplacementTerm relationship, which is link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the ReplacementTerm relationship - * @param replacementTerm the replacementTerm relationship - * @return ReplacementTerm replaced replacementTerm - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ReplacementTerm replaceReplacementTermRelationship(String userId, String guid, ReplacementTerm replacementTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.replacementTerm().replace(userId, guid, replacementTerm); - } - - /** - * Delete a replacementTerm relationship, which is link to a glossary term that is replacing an obsolete glossary term. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteReplacementTermRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.replacementTerm().delete(userId, guid); - } - - /** - * Restore a replacement term relationship - *

- * Restore allows the deleted replacement term relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the replacement term relationship to delete - * @return the restored replacement term relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ReplacementTerm restoreReplacementTermRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.replacementTerm().restore(userId, guid); - } - - /** - * Create a TypedBy relationship, which is defines the relationship between a spine attribute and its type. - * - *

- * - * @param userId userId under which the request is performed - * @param termTYPEDBYRelationship the TypedBy relationship - * @return the created termTYPEDBYRelationship relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public TypedBy createTermTYPEDBYRelationship(String userId, TypedBy termTYPEDBYRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.typedBy().create(userId, termTYPEDBYRelationship); - } - - /** - * Get a termTYPEDBYRelationship relationship, which is defines the relationship between a spine attribute and its type. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termTYPEDBYRelationship relationship to get - * @return TypedBy - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public TypedBy getTermTYPEDBYRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.typedBy().getByGUID(userId, guid); - } - - /** - * Update a TypedBy relationship, which is defines the relationship between a spine attribute and its type. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the TypedBy relationship - * @param termTYPEDBYRelationship the TypedBy relationship - * @return TypedBy updated termTYPEDBYRelationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public TypedBy updateTermTYPEDBYRelationship(String userId, String guid, TypedBy termTYPEDBYRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.typedBy().update(userId, guid, termTYPEDBYRelationship); - } - - /** - * Replace an TypedBy relationship, which is defines the relationship between a spine attribute and its type. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the TypedBy relationship - * @param termTYPEDBYRelationship the termTYPEDBYRelationship relationship - * @return TypedBy replaced termTYPEDBYRelationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public TypedBy replaceTermTYPEDBYRelationship(String userId, String guid, TypedBy termTYPEDBYRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.typedBy().replace(userId, guid, termTYPEDBYRelationship); - } - - /** - * Delete a termTYPEDBYRelationship relationship, which is defines the relationship between a spine attribute and its type. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termTYPEDBYRelationship relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteTermTYPEDBYRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.typedBy().delete(userId, guid); - } - - /** - * Restore a typed by relationship - *

- * Restore allows the deleted typed by relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the typed by relationship to delete - * @return the restored typed by relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public TypedBy restoreTypedByRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.typedBy().restore(userId, guid); - } - - /** - * Create a Isa relationship, which is link between a more general glossary term and a more specific definition. - * - *

- * - * @param userId userId under which the request is performed - * @param isa the Isa relationship - * @return the created isa relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsA createIsaRelationship(String userId, IsA isa) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isA().create(userId, isa); - } - - /** - * Get a isa relationship, which is link between a more general glossary term and a more specific definition. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the isa relationship to get - * @return Isa - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public IsA getIsaRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isA().getByGUID(userId, guid); - } - - /** - * Update a Isa relationship, which is link between a more general glossary term and a more specific definition. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the isa relationship - * @param isa the Isa relationship - * @return Isa updated isa - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsA updateIsaRelationship(String userId, String guid, IsA isa) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isA().update(userId, guid, isa); - } - - /** - * Replace an Isa relationship, which is link between a more general glossary term and a more specific definition. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the isa relationship - * @param isa the isa relationship - * @return Isa replaced isa - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsA replaceIsaRelationship(String userId, String guid, IsA isa) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isA().replace(userId, guid, isa); - } - - /** - * Delete a isa relationship, which is link between a more general glossary term and a more specific definition. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the isa relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteIsaRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.isA().delete(userId, guid); - } - - /** - * Restore an is a relationship - *

- * Restore allows the deleted is a relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the is a relationship to delete - * @return the restored is a relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsA restoreIsaRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isA().restore(userId, guid); - } - - /** - * Create a IsaTypeOf relationship, which is defines an inheritance relationship between two spine objects. - * - *

- * - * @param userId userId under which the request is performed - * @param isATypeOf the IsaTypeOf relationship - * @return the created IsaTypeOf relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOfDeprecated createIsATypeOfDeprecated(String userId, IsATypeOfDeprecated isATypeOf) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isaTypeOfDeprecated().create(userId, isATypeOf); - } - - /** - * Get a IsaTypeOf relationship, which is defines an inheritance relationship between two spine objects. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsaTypeOf relationship to get - * @return IsaTypeOf - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public IsATypeOfDeprecated getIsATypeOfDeprecated(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isaTypeOfDeprecated().getByGUID(userId, guid); - } - - /** - * Update a IsaTypeOf relationship, which is defines an inheritance relationship between two spine objects. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the IsaTypeOf relationship - * @param isATypeOf the IsaTypeOf relationship - * @return IsaTypeOf updated IsaTypeOf - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOfDeprecated updateIsATypeOfDeprecated(String userId, String guid, IsATypeOfDeprecated isATypeOf) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isaTypeOfDeprecated().update(userId, guid, isATypeOf); - } - - /** - * Replace an IsaTypeOf relationship, which is defines an inheritance relationship between two spine objects. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the IsaTypeOf relationship - * @param isATypeOf the IsaTypeOf relationship - * @return IsaTypeOf replaced IsaTypeOf - * - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOfDeprecated replaceIsATypeOfDeprecated(String userId, String guid, IsATypeOfDeprecated isATypeOf) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isaTypeOfDeprecated().replace(userId, guid, isATypeOf); - } - - /** - * Delete a IsaTypeOf relationship, which is defines an inheritance relationship between two spine objects. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsaTypeOf relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteIsATypeOfDeprecated(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.isaTypeOfDeprecated().delete(userId, guid); - } - - /** - * Restore an is a type of deprecated relationship - *

- * Restore allows the deleted is a type of relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @deprecated - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the is a type of relationship to delete - * @return the restored is a type of relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOfDeprecated restoreIsaTypeOfDeprecated(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isaTypeOfDeprecated().restore(userId, guid); - } - - /** - * Create a IsATypeOf relationship, which is defines an inheritance relationship between two spine objects. - * - *

- * - * @param userId userId under which the request is performed - * @param IsATypeOf the IsATypeOf relationship - * @return the createdIsATypeOf relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOf createIsATypeOf(String userId, IsATypeOf IsATypeOf) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isATypeOf().create(userId, IsATypeOf); - } - - /** - * Get a IsATypeOf relationship, which is defines an inheritance relationship between two spine objects. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf relationship to get - * @return IsATypeOf - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public IsATypeOf getIsATypeOf(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isATypeOf().getByGUID(userId, guid); - } - - /** - * Update a IsATypeOf relationship, which is defines an inheritance relationship between two spine objects. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the IsATypeOf relationship - * @param IsATypeOf the IsATypeOf relationship - * @return IsATypeOf updatedIsATypeOf - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOf updateIsATypeOf(String userId, String guid, IsATypeOf IsATypeOf) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isATypeOf().update(userId, guid, IsATypeOf); - } - - /** - * Replace anIsATypeOf relationship, which is defines an inheritance relationship between two spine objects. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the IsATypeOf relationship - * @param IsATypeOf the IsATypeOf relationship - * @return IsATypeOf replacedIsATypeOf - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOf replaceIsATypeOf(String userId, String guid, IsATypeOf IsATypeOf) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isATypeOf().replace(userId, guid, IsATypeOf); - } - - /** - * Delete a IsATypeOf relationship, which is defines an inheritance relationship between two spine objects. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteIsATypeOf(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.isATypeOf().delete(userId, guid); - } - - /** - * Restore an is a type of relationship - *

- * Restore allows the deleted is a type of relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the is a type of relationship to delete - * @return the restored is a type of relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public IsATypeOf restoreIsATypeOf(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.isATypeOf().restore(userId, guid); - } - - /** - * Create a Term Categorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * Note that this method does not error if the relationship ends are not spine objects or spine attributes. - *

- * - * @param userId userId under which the request is performed - * @param termCategorizationRelationship the term categorization relationship - * @return the created term categorization relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Categorization createTermCategorizationRelationship(String userId, Categorization termCategorizationRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.termCategorization().create(userId, termCategorizationRelationship); - } - - /** - * Get a Term Categorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorizationRelationship relationship to get - * @return TermCategorizationRelationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public Categorization getTermCategorizationRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.termCategorization().getByGUID(userId, guid); - } - - /** - * Update a Term Categorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the TermCategorizationRelationship - * @param termCategorizationRelationship the term categorization relationship - * @return the updated term categorization relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Categorization updateTermCategorizationRelationship(String userId, String guid, Categorization termCategorizationRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.termCategorization().update(userId, guid, termCategorizationRelationship); - } - - /** - * Replace a Term HasA Relationship. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the TermCategorizationRelationship - * @param termCategorizationRelationship the term categorization relationship - * @return the replaced term categorization relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Categorization replaceTermCategorizationRelationship(String userId, String guid, Categorization termCategorizationRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.termCategorization().replace(userId, guid, termCategorizationRelationship); - } - - /** - * Delete a Term Categorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorizationRelationship relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteTermCategorizationRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.termCategorization().delete(userId, guid); - } - - /** - * Restore a Term Categorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * Restore allows the deleted Term Categorization relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Term Categorization relationship to delete - * @return the restored has a relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public Categorization restoreTermCategorizationRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.termCategorization().restore(userId, guid); - } - - // No modification of TermAnchor exists, because this is an anchoring relationship - - /** - * Get a Term Anchor Relationship. A relationship between a Glossary and a Term. This relationship allows terms to be owned by a glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermAnchorRelationship relationship to get - * @return TermAnchorRelationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public TermAnchor getTermAnchorRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.termAnchor().getByGUID(userId, guid); - } - // No modification of CategoryAnchor exists, because this is an anchoring relationship - /** - * Get a Category Anchor Relationship. A relationship between a Glossary and a Category. This relationship allows categoriess to be owned by a glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryAnchorRelationship relationship to get - * @return CategoryAnchorRelationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public CategoryAnchor getCategoryAnchorRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.categoryAnchor().getByGUID(userId, guid); - } - - /** - * Create a ProjectScope relationship. A link between the project content and the project. - *

- * - * @param userId userId under which the request is performed - * @param projectScope the ProjectScope relationship - * @return the created ProjectScope relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ProjectScope createProjectScopeRelationship(String userId, ProjectScope projectScope) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.projectScope().create(userId, projectScope); - } - - /** - * Get a ProjectScope relationship. A link between the project content and the project. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScope relationship to get - * @return ProjectScope - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public ProjectScope getProjectScopeRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.projectScope().getByGUID(userId, guid); - } - - /** - * Update a ProjectScope relationship which is a link between the project content and the project. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the ProjectScope relationship - * @param projectScopeRelationship the ProjectScope relationship - * @return updated ProjectScope relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ProjectScope updateProjectScopeRelationship(String userId, String guid, ProjectScope projectScopeRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.projectScope().update(userId, guid, projectScopeRelationship); - } - - /** - * Replace a ProjectScope relationship which is a link between the project content and the project. - *

- * - * @param userId userId under which the request is performed - * @param guid guid of the ProjectScope relationship - * @param projectScopeRelationship the ProjectScope relationship - * @return replaced ProjectScope relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ProjectScope replaceProjectScopeRelationship(String userId, String guid, ProjectScope projectScopeRelationship) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.projectScope().replace(userId, guid, projectScopeRelationship); - } - - /** - * Delete a ProjectScope relationship. A link between the project content and the project. - * A delete (also known as a soft delete) means that the relationship instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScope relationship to delete - *

- * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws PropertyServerException Property server exception - */ - public void deleteProjectScopeRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - subjectAreaRelationship.projectScope().delete(userId, guid); - } - - /** - * Restore a ProjectScope relationship which is a link between the project content and the project. - *

- * Restore allows the deleted ProjectScope relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScope relationship to restore - * @return the restored ProjectScope relationship - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public ProjectScope restoreProjectScopeRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.projectScope().restore(userId, guid); - } - - /** - * Create a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @return CategoryHierarchyLink the created CategoryHierarchyLink - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public CategoryHierarchyLink createCategoryHierarchyLink(String userId, CategoryHierarchyLink categoryHierarchyLink) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaRelationship.categoryHierarchyLink().create(userId, categoryHierarchyLink); - } - - /** - * Get a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to get - * @return the CategoryHierarchyLink relationship with the requested guid - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public CategoryHierarchyLink getCategoryHierarchyLink(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaRelationship.categoryHierarchyLink().getByGUID(userId, guid); - } - - /** - * Update a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param userId userId under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to update - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @return the updated categoryHierarchyLink - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public CategoryHierarchyLink updateCategoryHierarchyLink(String userId, String guid, CategoryHierarchyLink categoryHierarchyLink) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaRelationship.categoryHierarchyLink().update(userId, guid, categoryHierarchyLink); - } - - /** - * Replace a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param userId userId under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to update - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @return the replaced categoryHierarchyLink - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public CategoryHierarchyLink replaceCategoryHierarchyLink(String userId, String guid, CategoryHierarchyLink categoryHierarchyLink) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaRelationship.categoryHierarchyLink().replace(userId, guid, categoryHierarchyLink); - } - - /** - * Delete a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship to delete - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public void deleteCategoryHierarchyLink(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - subjectAreaRelationship.categoryHierarchyLink().delete(userId, guid); - } - - /** - * Restore a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - *

- * Restore allows the deleted CategoryHierarchyLink Relationship to be made active again. Restore allows deletes to be undone. - * Hard deletes are not stored in the repository so cannot be restored. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to restore - * @return the restored CategoryHierarchyLink - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public CategoryHierarchyLink restoreCategoryHierarchyLink(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaRelationship.categoryHierarchyLink().restore(userId, guid); - } - - /** - * Get a SemanticAssignment relationship, Links a glossary term to another element such as an asset or schema element to define its meaning. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the SemanticAssignment relationship to get - * @return the SemanticAssignment relationship with the requested guid - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - * @throws PropertyServerException Property server exception - */ - public SemanticAssignment getSemanticAssignmentRelationship(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return subjectAreaRelationship.semanticAssignment().getByGUID(userId, guid); - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewInstanceHandler.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewInstanceHandler.java deleted file mode 100644 index 6e2994ea194..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewInstanceHandler.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.initialization; - -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationshipClients; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.admin.serviceinstances.GlossaryAuthorViewServicesInstance; -import org.odpi.openmetadata.viewservices.glossaryauthor.handlers.RelationshipHandler; - -/** - * GlossaryAuthorViewInstanceHandler retrieves information from the instance map for the - * access service instances. The instance map is thread-safe. Instances are added - * and removed by the GlossaryAuthorViewAdmin class. - */ -public class GlossaryAuthorViewInstanceHandler extends OMVSServiceInstanceHandler { - - private static final GlossaryAuthorViewServicesInstanceMap instanceMap = new GlossaryAuthorViewServicesInstanceMap(); - - /** - * Default constructor registers the view service - */ - public GlossaryAuthorViewInstanceHandler() { - super(ViewServiceDescription.GLOSSARY_AUTHOR.getViewServiceName()); - GlossaryAuthorViewRegistration.registerViewService(); - } - - public RelationshipHandler getRelationshipHandler(String serverName, String userId, String serviceOperationName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException { - - SubjectAreaRelationshipClients subjectAreaRelationship = this.getSubjectAreaRelationship(serverName, userId, serviceOperationName); - return new RelationshipHandler(subjectAreaRelationship); - } - - /** - * This method returns the object for the tenant to use to work with the - * subject area nodes API - * - * @param serverName name of the server that the request is for - * @param userId local server userid - * @param serviceOperationName service operation - usually the top level rest call - * @return SubjectAreaNodeClients subject area nodes API objects - */ - public SubjectAreaNodeClients getSubjectAreaNodeClients(String serverName, String userId, String serviceOperationName) - throws - InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewServicesInstance instance = getSubjectAreaViewServicesInstance(userId, serverName, serviceOperationName); - return instance.getNodeClients(); - } - - /** - * This method returns the object for the tenant to use to work with the - * subject area relationship API - * - * @param serverName name of the server that the request is for - * @param userId local server userid - * @param serviceOperationName service operation - usually the top level rest call - * @return SubjectAreaRelationship subject area glossary API object - */ - private SubjectAreaRelationshipClients getSubjectAreaRelationship(String serverName, String userId, String serviceOperationName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewServicesInstance instance = getSubjectAreaViewServicesInstance(userId, serverName, serviceOperationName); - return instance.getSubjectAreaRelationshipClients(); - } - - /** - * Get the subject area services instance. This is an instance associated with the UI servername (tenant). - * - * @param userId local server userid - * @param serverName name of the server that the request is for - * @param serviceOperationName service operation - usually the top level rest call - * @return SubjectAreaViewServicesInstance instance for this tenant to use. - */ - private GlossaryAuthorViewServicesInstance getSubjectAreaViewServicesInstance(String userId, String serverName, String serviceOperationName) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return (GlossaryAuthorViewServicesInstance) - super.getServerServiceInstance(userId, serverName, serviceOperationName); - } - - /** - * This method returns the object for the tenant to use to work with the - * subject area config API - * - * @param serverName name of the server that the request is for - * @param userId local server userid - * @param serviceOperationName service operation - usually the top level rest call - * @return SubjectAreaNodeClients subject area config API objects - */ - public SubjectAreaConfigClient getSubjectAreaConfigClient(String serverName, String userId, String serviceOperationName) - throws - InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewServicesInstance instance = getSubjectAreaViewServicesInstance(userId, serverName, serviceOperationName); - return instance.getSubjectAreaConfigClient(); - } - - - /** - * This method returns the object for the tenant to use to work with the - * subject area graph API - * - * @param serverName name of the server that the request is for - * @param userId local server userid - * @param serviceOperationName service operation - usually the top level rest call - * @return SubjectAreaNodeClients subject area graph API objects - */ - public SubjectAreaGraphClient getSubjectAreaGraphClient(String serverName, String userId, String serviceOperationName) - throws - InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewServicesInstance instance = getSubjectAreaViewServicesInstance(userId, serverName, serviceOperationName); - return instance.getSubjectAreaGraphClient(); - } - - public int getGlossaryViewMaxPageSize(String serverName, String userId, String serviceOperationName) - throws - InvalidParameterException, PropertyServerException, UserNotAuthorizedException - { - GlossaryAuthorViewServicesInstance instance = getSubjectAreaViewServicesInstance(userId, serverName, serviceOperationName); - return instance.getGlossaryViewMaxPageSize(); - } - -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewRegistration.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewRegistration.java deleted file mode 100644 index b07e6b1d6fc..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewRegistration.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.initialization; - -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceRegistrationEntry; -import org.odpi.openmetadata.adminservices.registration.OMAGViewServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.viewservices.glossaryauthor.admin.GlossaryAuthorViewAdmin; - -/** - * GlossaryAuthorRegistration registers the view service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * view service in the server and it can be configured and used. - */ -public class GlossaryAuthorViewRegistration -{ - /** - * Pass information about this view service to the OMAG Server administration services. - */ - public static void registerViewService() - { - ViewServiceDescription myDescription = ViewServiceDescription.GLOSSARY_AUTHOR; - ViewServiceRegistrationEntry myRegistration = new ViewServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - GlossaryAuthorViewAdmin.class.getName()); - OMAGViewServiceRegistration.registerViewService(myRegistration); - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewServicesInstanceMap.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewServicesInstanceMap.java deleted file mode 100644 index 18eba290c39..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/initialization/GlossaryAuthorViewServicesInstanceMap.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.initialization; - -import org.odpi.openmetadata.viewservices.glossaryauthor.admin.serviceinstances.GlossaryAuthorViewServicesInstance; -import java.util.HashMap; -import java.util.Map; - -/** - * GlossaryAuthorViewServicesInstanceMap provides the mapping for inbound REST requests to the appropriate instances - * for the requested server. The map is maintained in a static so it is scoped to the class loader. - * - * Instances of this class call the synchronized static methods to work with the map. - */ -public class GlossaryAuthorViewServicesInstanceMap -{ - private static Map instanceMap = new HashMap<>(); - - - /** - * Add a new server instance to the server map. - * - * @param serverName name of the server - * @param instance instance object - */ - static public synchronized void setNewInstanceForJVM(String serverName, - GlossaryAuthorViewServicesInstance instance) - { - instanceMap.put(serverName, instance); - } - - - /** - * Return the instance for this server. - * - * @param serverName name of the server - * @return OMRSRepositoryServicesInstance object - */ - private static synchronized GlossaryAuthorViewServicesInstance getInstanceForJVM(String serverName) - { - GlossaryAuthorViewServicesInstance instance = instanceMap.get(serverName); - - return instance; - } - - - /** - * Remove the instance for this server. - * - * @param serverName name of the server - */ - static public synchronized void removeInstanceForJVM(String serverName) - { - instanceMap.remove(serverName); - } - - - /** - * Constructor - */ - public GlossaryAuthorViewServicesInstanceMap() - { - } - /** - * Return the instance for this server. - * - * @param serverName name of the server - * @return OMRSRepositoryServicesInstance object - */ - public GlossaryAuthorViewServicesInstance getInstance(String serverName) - { - return GlossaryAuthorViewServicesInstanceMap.getInstanceForJVM(serverName); - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumb.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumb.java deleted file mode 100644 index 5bb481e0781..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumb.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.properties; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import java.util.StringTokenizer; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import static java.lang.Enum.valueOf; - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -/** - * A breadcrumb is an item with in a breadcrumb trail; it has a displayName, guid, path and type. This is useful in user interfaces to be - * able to display a breadcrumb widget. - */ -public class BreadCrumb { - private String path; - private String guid; - private String displayName; - private NodeType nodeType; - BreadCrumb lastBreadCrumb; - - public BreadCrumb(String guid, String displayName, NodeType nodeType) { - this.guid = guid; - this.displayName = displayName; - this.nodeType = nodeType; - } - - public BreadCrumb(BreadCrumb breadCrumb, BreadCrumb lastBreadCrumb) { - this.guid = breadCrumb.getGuid(); - this.displayName = breadCrumb.getDisplayName(); - this.nodeType = breadCrumb.getNodeType(); - this.lastBreadCrumb = lastBreadCrumb; - setPath(); - } - - private void setPath() { - StringBuffer sb = new StringBuffer(); - if (lastBreadCrumb != null) { - sb.append(lastBreadCrumb.getPath()); - } - sb.append("/nodeType/"); - sb.append(nodeType.name()); - sb.append("/guid/"); - sb.append(guid); - sb.append("/displayName/"); - sb.append(displayName); - path = sb.toString(); - } - - public String getGuid() { - return guid; - } - - public String getDisplayName() { - return displayName; - } - - public NodeType getNodeType() { - return nodeType; - } - - /** - * The path of this breadcrumb locates it within the breadcrumbtrail, relative to the start of the trail. - * The path is composed of segments of - *

    - *
  1. The nodeType
  2. - *
  3. Guid
  4. - *
  5. Display name
  6. - *
- * The path takes the form - * /nodeType/{nodetype1}/guid/{guid1}/displayName/{displayName1}/nodeType/{nodetype2}/guid/{guid2}/displayName/{displayName2}/..... - * - * @return the path - */ - public String getPath() { - return path; - } -} - - diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumbTrail.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumbTrail.java deleted file mode 100644 index 7bc263e6c7d..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumbTrail.java +++ /dev/null @@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.ArrayList; -import java.util.List; - -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) -/** - * This contains information that a user interface can use to display a bread crumb trail. The first bread crumb in the list is the - * highest element in the bread crumb and would in Western cultures be displayed on the left. The subsequent breadcrumbs are a sequence of - * child bread crumbs. The current breadcrumb is the last element in the array - */ -public class BreadCrumbTrail { - - List breadCrumbsWithoutPaths; - public BreadCrumbTrail(List breadCrumbs) { - breadCrumbsWithoutPaths = breadCrumbs; - } - - /** - * Return breadcrumbs in the right order with the path information in them - * - * @return list of breadcrumbs - */ - - public List getBreadCrumbs() { - List fullyFormedBreadCrumbs = new ArrayList<>(); - BreadCrumb previousBreadCrumb = null; - // read the supplied breadcrumbs in reverse - for (int i= breadCrumbsWithoutPaths.size()-1; i>=0; i-- ) { - BreadCrumb breadCrumb = breadCrumbsWithoutPaths.get(i); - BreadCrumb newBreadCrumb = new BreadCrumb(breadCrumb, previousBreadCrumb); - previousBreadCrumb = newBreadCrumb; - fullyFormedBreadCrumbs.add(newBreadCrumb); - } - return fullyFormedBreadCrumbs; - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/GraphStatistics.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/GraphStatistics.java deleted file mode 100644 index c602c4238ae..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/GraphStatistics.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; - -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) -/** - * The GraphStatistics class enables the packaging and interrogation of a predictive stats - * for a potential traversal. It does NOT contain the sub-graph - that is in a Graph - * object. - * The GraphStatistics includes the nodeGUID of the node on which it is centered and the depth. - * The GraphStatistics is formed from the result of a traversal with no filtering - it includes - * 3 maps of type information - one per category - keyed by typeName, where each entry (value) - * contains the nodeType or relationshipType name and number of instances of that type in the traversal, i.e: - * { typeName --> { nodeTypeName : , count : } } - */ -public class GraphStatistics { - - - // The GraphStatistics class enables the packaging and interrogation of a predictive stats - // for a potential traversal. It does NOT contain the sub-graph - that is in a Graph - // object. - // The GraphStatistics includes the nodeGUID of the node on which it is centered and the depth. - // The GraphStatistics is formed from the result of a traversal with no filtering - it includes - // 3 maps of type information - one per category - keyed by typeName, where each entry (value) - // contains the nodeType or relationshipType name and number of instances of that type in the traversal, i.e: - // { typeName --> { nodeTypeName : , count : } } - // - - - private String nodeGUID; // must be non-null - private Map nodeCounts; // a map from nodeType name to count - private Map relationshipCounts; // a map from relationshipType name to count - private Integer depth; // the depth of traversal - - - public GraphStatistics() { - // No initialization yet - } - public GraphStatistics(String nodeGUID, int depth) { - this.nodeGUID = nodeGUID; - this.depth =depth; - } - - /* - * Getters for Jackson - */ - - public String getNodeGUID() { return nodeGUID; } - - public Map getNodeCounts() { return nodeCounts; } - - public Map getRelationshipCounts() { - return relationshipCounts; - } - - public Integer getDepth() { return depth; } - - public void setNodeGUID(String nodeGUID) { this.nodeGUID = nodeGUID; } - - public void setNodeCounts(Map nodeCounts) { this.nodeCounts = nodeCounts; } - - public void setRelationshipCounts(Map relationshipCounts) { this.relationshipCounts = relationshipCounts; } - - public void setDepth(Integer depth) { this.depth = depth; } - - @Override - public String toString() - { - return "GraphStatistics{" + - ", nodeGUID=" + nodeGUID + - ", depth=" + depth + - ", nodeCounts=" + nodeCounts + - ", relationshipCounts=" + relationshipCounts + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/NodeRelationshipStats.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/NodeRelationshipStats.java deleted file mode 100644 index 8ee2989fe8f..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/NodeRelationshipStats.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -/** - * This class holds a count associated with a node by NodeType name or a relationship by relationshipType name. - */ -public class NodeRelationshipStats { - private String nodeOrRelationshipTypeName; - private Integer count; - - public NodeRelationshipStats(String nodeOrRelationshipTypeName, Integer count) { - this.nodeOrRelationshipTypeName = nodeOrRelationshipTypeName; - this.count = count; - } - - //default constructor created for Json Jackson serialization - public NodeRelationshipStats() { - super(); - } - - /* - * Getters for Jackson - */ - - /** - * get the name - * @return name - */ - public String getNodeOrRelationshipTypeName() { return nodeOrRelationshipTypeName; } - - /** - * get the count for a type - * @return count - */ - public Integer getCount() { return count; } - - - /** - * St the type name - * @param nodeOrRelationshipTypeName name to set - */ - public void setNodeOrRelationshipTypeName(String nodeOrRelationshipTypeName) { this.nodeOrRelationshipTypeName = nodeOrRelationshipTypeName; } - - /** - * Set the could - * @param count supplied count - */ - public void setCount(Integer count) { this.count = count; } - - - - @Override - public String toString() - { - return "NodeRelationshipStats{" + - ", nodeOrRelationshipTypeName=" + nodeOrRelationshipTypeName + - ", count=" + count + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/BaseGlossaryAuthorView.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/BaseGlossaryAuthorView.java deleted file mode 100644 index 6ff61002616..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/BaseGlossaryAuthorView.java +++ /dev/null @@ -1,78 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.viewservices.glossaryauthor.auditlog.GlossaryAuthorViewAuditCode; -import org.odpi.openmetadata.viewservices.glossaryauthor.initialization.GlossaryAuthorViewInstanceHandler; -import org.slf4j.LoggerFactory; - -import java.util.Date; - -/** - * An abstract base class providing common methods for glossary authoring services. - */ -abstract public class BaseGlossaryAuthorView { - - protected static final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - protected static GlossaryAuthorViewInstanceHandler instanceHandler = new GlossaryAuthorViewInstanceHandler(); - protected static RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(GlossaryAuthorViewGlossaryRESTServices.class), - instanceHandler.getServiceName()); - - /** - * Get the appropriate response from the supplied Exception - * - * @param exception - supplied exception - * @param auditLog - auditlog (may be null if unable to initialize) - * @param className - calling class's Name - * @param methodName - calling method's name - * @return response corresponding to the exception. - */ - protected SubjectAreaOMASAPIResponse getResponseForException(Exception exception, AuditLog auditLog, String className, String methodName) { - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - if (exception instanceof OCFCheckedExceptionBase) { - response.setExceptionInfo((OCFCheckedExceptionBase) exception, className); - } else { - ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(); - messageDefinition.setMessageParameters(exception.getMessage()); - SubjectAreaCheckedException checkedException = new SubjectAreaCheckedException(messageDefinition, className, methodName, exception); - response.setExceptionInfo(checkedException, className); - if (auditLog != null) { - auditLog.logException(methodName, - GlossaryAuthorViewAuditCode.UNEXPECTED_EXCEPTION.getMessageDefinition(exception.getClass().getName(), methodName, exception.getMessage()), - exception); - } - } - return response; - } - protected FindRequest getFindRequest(String searchCriteria, Date asOfTime, Integer startingFrom, Integer pageSize, String sequencingOrderName, String sequencingProperty, Integer handlerMaxPageSize) { - FindRequest findRequest = new FindRequest(); - SequencingOrder sequencingOrder = SequencingOrder.ANY; - for (SequencingOrder possibleSequence: SequencingOrder.values()) { - if (possibleSequence.name().equals(sequencingOrderName)) { - sequencingOrder=possibleSequence; - } - - } - findRequest.setSearchCriteria(searchCriteria); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - if (pageSize == null){ - findRequest.setPageSize(handlerMaxPageSize); - } else { - findRequest.setPageSize(pageSize); - } - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - return findRequest; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewCategoryRESTServices.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewCategoryRESTServices.java deleted file mode 100644 index 91b382134e0..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewCategoryRESTServices.java +++ /dev/null @@ -1,481 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.categories.SubjectAreaCategoryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.util.Date; -import java.util.List; - -/** - * The GlossaryAuthorViewCategoryRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the Glossary Author Open Metadata - * View Service (OMVS). This interface provides view category authoring interfaces for subject area experts to author categories. - */ - -public class GlossaryAuthorViewCategoryRESTServices extends BaseGlossaryAuthorView { - private static String className = GlossaryAuthorViewCategoryRESTServices.class.getName(); - - /** - * Default constructor - */ - public GlossaryAuthorViewCategoryRESTServices() { - - } - - /** - * Create a Category - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param suppliedCategory Category to create - * @return the created category. - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse createCategory(String serverName, String userId, Category suppliedCategory) { - final String methodName = "createCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied category - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Category createdCategory = clients.categories().create(userId, suppliedCategory); - response.addResult(createdCategory); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - - /** - * Get a category. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to get - * @return response which when successful contains the category with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getCategory(String serverName, String userId, String guid) { - final String methodName = "getCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Category obtainedCategory = clients.categories().getByGUID(userId, guid); - response.addResult(obtainedCategory); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Category - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param searchCriteria String expression matching Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findCategory( - String serverName, - String userId, - Date asOfTime, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - ) { - final String methodName = "findCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - try { - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(searchCriteria); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - SubjectAreaConfigClient client = instanceHandler.getSubjectAreaConfigClient(serverName, userId, methodName); - Config subjectAreaConfig = client.getConfig(userId); - List categories = clients.categories().find(userId, findRequest, exactValue, ignoreCase, subjectAreaConfig.getMaxPageSize()); - response.addAllResults(categories); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get Category relationships - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the category relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryRelationships( - String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - - - ) { - final String methodName = "getCategoryRelationships"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - - List relationships = clients.categories().getRelationships(userId, guid, findRequest); - response.addAllResults(relationships); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Category - *

- * Status is not updated using this call. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to update - * @param category category to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse updateCategory( - String serverName, - String userId, - String guid, - Category category, - boolean isReplace - ) { - final String methodName = "updateCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied category - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Category updatedCategory; - if (isReplace) { - updatedCategory = clients.categories().replace(userId, guid, category); - } else { - updatedCategory = clients.categories().update(userId, guid, category); - } - response.addResult(updatedCategory); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Category instance - *

- * The deletion of a category is only allowed if there is no category content (i.e. no categories or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the category instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the category will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteCategory( - String serverName, - String userId, - String guid - ) { - - final String methodName = "deleteCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied category - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - clients.categories().delete(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Category - *

- * Restore allows the deleted Category to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to restore - * @return response which when successful contains the restored category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreCategory( - String serverName, - String userId, - String guid) { - final String methodName = "restoreCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied category - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Category category = clients.categories().restore(userId, guid); - response.addResult(category); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Get this Category's child Categories. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the parent category - * @param searchCriteria String expression matching child Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of child categories filtered by the search criteria if one is supplied. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- **/ - public SubjectAreaOMASAPIResponse getCategoryChildren(String serverName, - String userId, - String guid, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Integer startingFrom, - Integer pageSize) { - - final String methodName = "getCategoryChildren"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - FindRequest findRequest = new FindRequest(); - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - - try { - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - findRequest.setSearchCriteria(searchCriteria); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - List categories = ((SubjectAreaCategoryClient) clients.categories()).getCategoryChildren(userId, guid, findRequest, exactValue, ignoreCase); - response.addAllResults(categories); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get the terms that are categorized by this Category - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression to match the categorized Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of terms is categorized by this Category - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- **/ - public SubjectAreaOMASAPIResponse getCategorizedTerms(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategorizedTerms"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - FindRequest findRequest = new FindRequest(); - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - try { - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - findRequest.setSearchCriteria(searchCriteria); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - List terms = ((SubjectAreaCategoryClient)clients.categories()).getTerms(userId, guid, findRequest); - response.addAllResults(terms); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewConfigRESTServices.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewConfigRESTServices.java deleted file mode 100644 index 61fd4851050..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewConfigRESTServices.java +++ /dev/null @@ -1,394 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.categories.SubjectAreaCategoryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.util.Date; -import java.util.List; - -/** - * The GlossaryAuthorViewCategoryRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the Glossary Author Open Metadata - * View Service (OMVS). This interface provides view interfaces for subject area experts to work with the views configuration. - */ - -public class GlossaryAuthorViewConfigRESTServices extends BaseGlossaryAuthorView { - private static String className = GlossaryAuthorViewConfigRESTServices.class.getName(); - - /** - * Default constructor - */ - public GlossaryAuthorViewConfigRESTServices() { - - } - - /** - * Get the config. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid identifier of the config - current is the only valid valid at this time. - * @return response which when successful contains the category with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getConfig(String serverName, String userId, String guid) { - final String methodName = "getConfig"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - int glossaryViewMaxMageSize = instanceHandler.getGlossaryViewMaxPageSize(serverName, userId, methodName); - Config config = new Config(); - config.setMaxPageSize(glossaryViewMaxMageSize); - response.addResult(config); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Category - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param searchCriteria String expression matching Category property values . - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findCategory( - String serverName, - String userId, - Date asOfTime, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - ) { - final String methodName = "findCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - try { - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(searchCriteria); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - - List categories = clients.categories().find(userId, findRequest, exactValue, ignoreCase); - response.addAllResults(categories); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get Category relationships - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the category relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryRelationships( - String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - - - ) { - final String methodName = "getCategoryRelationships"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - - List relationships = clients.categories().getRelationships(userId, guid, findRequest); - response.addAllResults(relationships); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Category - *

- * Status is not updated using this call. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to update - * @param category category to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse updateCategory( - String serverName, - String userId, - String guid, - Category category, - boolean isReplace - ) { - final String methodName = "updateCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied category - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Category updatedCategory; - if (isReplace) { - updatedCategory = clients.categories().replace(userId, guid, category); - } else { - updatedCategory = clients.categories().update(userId, guid, category); - } - response.addResult(updatedCategory); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Category instance - *

- * The deletion of a category is only allowed if there is no category content (i.e. no categories or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the category instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the category will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteCategory( - String serverName, - String userId, - String guid - ) { - - final String methodName = "deleteCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied category - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - clients.categories().delete(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Category - *

- * Restore allows the deleted Category to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the category to restore - * @return response which when successful contains the restored category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreCategory( - String serverName, - String userId, - String guid) { - final String methodName = "restoreCategory"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied category - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Category category = clients.categories().restore(userId, guid); - response.addResult(category); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - public SubjectAreaOMASAPIResponse getCategoryChildren(String serverName, String userId, String guid, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategoryChildren"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - FindRequest findRequest = new FindRequest(); - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - try { - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - List categories = ((SubjectAreaCategoryClient) clients.categories()).getCategoryChildren(userId, guid, findRequest, false, true); - response.addAllResults(categories); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - public SubjectAreaOMASAPIResponse getCategorizedTerms(String serverName, String userId, String guid, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategorizedTerms"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - FindRequest findRequest = new FindRequest(); - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - try { - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - List terms = ((SubjectAreaCategoryClient)clients.categories()).getTerms(userId, guid, findRequest, true, false); - response.addAllResults(terms); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewGlossaryRESTServices.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewGlossaryRESTServices.java deleted file mode 100644 index 171d0697de1..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewGlossaryRESTServices.java +++ /dev/null @@ -1,608 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.glossaries.SubjectAreaGlossaryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.viewservices.glossaryauthor.handlers.BreadCrumbHandler; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.BreadCrumb; - -import java.util.Date; -import java.util.List; - -/** - * The GlossaryAuthorViewGlossaryRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the GlossaryAuthor Open Metadata - * View Service (OMVS). This interface provides view glossary authoring interfaces for subject area experts. - */ - -public class GlossaryAuthorViewGlossaryRESTServices extends BaseGlossaryAuthorView { - private static String className = GlossaryAuthorViewGlossaryRESTServices.class.getName(); - - /** - * Default constructor - */ - public GlossaryAuthorViewGlossaryRESTServices() { - - } - - /** - * Create a Glossary. There are specializations of glossaries that can also be created using this operation. - * To create a specialization, you should specify a nodeType other than Glossary in the supplied glossary. - *

- * Valid nodeTypes for this request are: - *

    - *
  • Taxonomy to create a Taxonomy
  • - *
  • CanonicalGlossary to create a canonical glossary
  • - *
  • TaxonomyAndCanonicalGlossary to create a glossary that is both a taxonomy and a canonical glosary
  • - *
  • Glossary to create a glossary that is not a taxonomy or a canonical glossary
  • - *
- * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param suppliedGlossary Glossary to create - * @return response, when successful contains the created glossary. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse createGlossary(String serverName, String userId, Glossary suppliedGlossary) { - final String methodName = "createGlossary"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied glossary - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Glossary createdGlossary = clients.glossaries().create(userId, suppliedGlossary); - response.addResult(createdGlossary); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a glossary. - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the glossary to get - * @return response which when successful contains the glossary with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getGlossary(String serverName, String userId, String guid) { - final String methodName = "getGlossary"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Glossary obtainedGlossary = clients.glossaries().getByGUID(userId, guid); - response.addResult(obtainedGlossary); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Glossary - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param searchCriteria String expression matching Glossary property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of glossaries meeting the search Criteria - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findGlossary( - String serverName, - String userId, - Date asOfTime, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - ) { - final String methodName = "findGlossary"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - if (sequencingOrder == null) { - sequencingOrder =SequencingOrder.ANY; - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder.name(), sequencingProperty, invalidParameterHandler.getMaxPagingSize()); - SubjectAreaConfigClient client = instanceHandler.getSubjectAreaConfigClient(serverName, userId, methodName); - Config subjectAreaConfig = client.getConfig(userId); - List glossaries = clients.glossaries().find(userId, findRequest, exactValue, ignoreCase, subjectAreaConfig.getMaxPageSize()); - response.addAllResults(glossaries); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get Glossary relationships - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the glossary to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the glossary relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getGlossaryRelationships( - String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - - - ) { - final String methodName = "getGlossaryRelationships"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - - List relationships = clients.glossaries().getRelationships(userId, guid, findRequest); - response.addAllResults(relationships); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Glossary - *

- * If the caller has chosen to incorporate the glossary name in their Glossary Terms or Categories qualified name, renaming the glossary will cause those - * qualified names to mismatch the Glossary name. - * If the caller has chosen to incorporate the glossary qualifiedName in their Glossary Terms or Categories qualified name, changing the qualified name of the glossary will cause those - * qualified names to mismatch the Glossary name. - * Status is not updated using this call. - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the glossary to update - * @param glossary glossary to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse updateGlossary( - String serverName, - String userId, - String guid, - Glossary glossary, - boolean isReplace - ) { - final String methodName = "updateGlossary"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied glossary - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Glossary updatedGlossary; - if (isReplace) { - updatedGlossary = clients.glossaries().replace(userId, guid, glossary); - } else { - updatedGlossary = clients.glossaries().update(userId, guid, glossary); - } - response.addResult(updatedGlossary); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Glossary instance - *

- * The deletion of a glossary is only allowed if there is no glossary content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. Soft delete is the default. - *

- * A soft delete means that the glossary instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the glossary will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the glossary to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteGlossary( - String serverName, - String userId, - String guid - ) { - - final String methodName = "deleteGlossary"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied glossary - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - clients.glossaries().delete(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Glossary - *

- * Restore allows the deleted Glossary to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the glossary to restore - * @return response which when successful contains the restored glossary - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreGlossary( - String serverName, - String userId, - String guid) { - final String methodName = "restoreGlossary"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied glossary - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Glossary glossary = clients.glossaries().restore(userId, guid); - response.addResult(glossary); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Create the supplied list of Terms in the glossary, identified by the supplied guid. Each term does not need to specify a glossary. - * - * @param serverName local UI server name - * @param userId user identifier - * @param guid guid of the glossary under which the Terms will be created - * @param terms terms to create - * @return a response which when successful contains a list of the responses from the Term creates (successful or otherwise). The order of the responses is the same as the supplied terms order. - * - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - public SubjectAreaOMASAPIResponse> createMultipleTermsInAGlossary(String serverName, String userId, String guid, Term[] terms) { - final String methodName = "createMultipleTermsInAGlossary"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - SubjectAreaOMASAPIResponse> response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - for (Term term : terms) { - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(guid); - term.setGlossary(glossarySummary); - SubjectAreaOMASAPIResponse termResponse = new SubjectAreaOMASAPIResponse(); - try { - Term createdTerm = clients.terms().create(userId, term); - termResponse.addResult(createdTerm); - } catch (Exception exception) { - termResponse = getResponseForException(exception, auditLog, className, methodName); - } - response.addResult(termResponse); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get BreadCrumbTrail. - * - * The user interface experience can start with a particular Glossary, navigate to a child Category, then to another child category then to a categories term. - * When such a user interface navigation occurs, it is helpful for the user to be displayed a 'breadcrumb' trail of where they have been, showing how nested they are in - * the glossary artifacts. The Get BreadcrumbTrail API returns information that allows the user interface to easy construct a trail of breadcrumbs. - * Each breadcrumb contains - *
    - *
  • a displayName that is intended to be shown to the user
  • - *
  • a guid that uniquely identifies a breadcrumb but is not intended to be shown to the user
  • - *
  • a types, allowing the user interface to display an appropriate icon. - *
  • a path that can be used to determine all the elements in the breadcrumb
  • - *
- * @param serverName local UI server name - * @param userId user identifier - * @param guid Glossary guid. - * @param rootCategoryGuid Root Category guid - * @param leafCategoryGuid Leaf Category Guid - * @param termGuid Term Guid. - * @return a response which when successful contains a list of breadcrumbs corresponding to the supplied guids. - * - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
- */ - public SubjectAreaOMASAPIResponse getBreadCrumbTrail( - String serverName, - String userId, - String guid, - String rootCategoryGuid, - String leafCategoryGuid, - String termGuid) { - final String methodName = "getBreadCrumbTrail"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - BreadCrumbHandler breadCrumbHandler = new BreadCrumbHandler(clients, userId); - List breadCrumbs = breadCrumbHandler.getBreadCrumbTrail(guid, rootCategoryGuid, leafCategoryGuid, termGuid); - response.addAllResults(breadCrumbs); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get the Categories owned by this glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression matching child Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the categories returned as they were at this time. null indicates at the current time. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of categories owned by the glossary - * - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - public SubjectAreaOMASAPIResponse getCategories(String serverName, - String userId, - String guid, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Boolean onlyTop, - Integer startingFrom, - Integer pageSize, - String sequencingOrder, - String sequencingProperty) { - - - final String methodName = "getCategories"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty, invalidParameterHandler.getMaxPagingSize()); - - try { - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaConfigClient client = instanceHandler.getSubjectAreaConfigClient(serverName, userId, methodName); - Config subjectAreaConfig = client.getConfig(userId); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - List categories = ((SubjectAreaGlossaryClient)clients.glossaries()).getCategories(userId, guid, findRequest, onlyTop, exactValue, ignoreCase, subjectAreaConfig.getMaxPageSize()); - response.addAllResults(categories); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Get terms that are owned by this glossary - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression matching child Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the terms returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @param pageSize the maximum number of elements that can be returned on this request. - * - * @return A list of terms owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - public SubjectAreaOMASAPIResponse getTerms(String serverName, - String userId, - String guid, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - String sequencingOrder, - String sequencingProperty) { - - - final String methodName = "getTerms"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - FindRequest findRequest = getFindRequest(searchCriteria, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty, invalidParameterHandler.getMaxPagingSize()); - try { - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaConfigClient client = instanceHandler.getSubjectAreaConfigClient(serverName, userId, methodName); - Config subjectAreaConfig = client.getConfig(userId); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - List terms = ((SubjectAreaGlossaryClient)clients.glossaries()).getTerms(userId, guid, findRequest, exactValue, ignoreCase, subjectAreaConfig.getMaxPageSize()); - response.addAllResults(terms); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewGraphRESTServices.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewGraphRESTServices.java deleted file mode 100644 index c37212e3fb0..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewGraphRESTServices.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.NodeRelationshipStats; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.GraphStatistics; - -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * The GlossaryAuthorViewProjectRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the Glossary Author Open Metadata - * View Service (OMVS). This interface provides view project authoring interfaces for subject area experts. - */ - -public class GlossaryAuthorViewGraphRESTServices extends BaseGlossaryAuthorView { - private static String className = GlossaryAuthorViewGraphRESTServices.class.getName(); - - /** - * Default constructor - */ - public GlossaryAuthorViewGraphRESTServices() { - - } - - public SubjectAreaOMASAPIResponse getGraph(String serverName, String userId, String guid, Date asOfTime, String nodeFilterStr, String relationshipFilterStr, StatusFilter statusFilter) { - final String methodName = "getGraph"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AuditLog auditLog = null; - - // should not be called without a supplied project - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - Graph graph = getGraphObject(serverName, userId, guid, asOfTime, nodeFilterStr, relationshipFilterStr, statusFilter, methodName); - response.addResult(graph); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - public SubjectAreaOMASAPIResponse getGraphCounts(String serverName, String userId, String guid, Date asOfTime, String nodeFilterStr, String relationshipFilterStr, StatusFilter statusFilter) { - final String methodName = "getGraphStatistics"; - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AuditLog auditLog = null; - - // should not be called without a supplied project - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - Graph graph = getGraphObject(serverName, userId, guid, asOfTime, nodeFilterStr, relationshipFilterStr, statusFilter, methodName); - // construct graph statistics from the graph - GraphStatistics graphStatistics = new GraphStatistics(guid, 1); - - Map nodes= graph.getNodes(); - Map relationships= graph.getRelationships(); - Map nodeCountsMap = new HashMap<>(); - Map relationshipCountsMap = new HashMap<>(); - if (nodes !=null) { - Set nodeGuids = nodes.keySet(); - for (String nodeGuid: nodeGuids) { - Node node = nodes.get(nodeGuid); - String typeName = node.getNodeType().name(); - NodeRelationshipStats countForNodeOrRelationshipType = nodeCountsMap.get(typeName); - int count =0; - if (countForNodeOrRelationshipType != null) { - count = countForNodeOrRelationshipType.getCount(); - } - countForNodeOrRelationshipType = new NodeRelationshipStats(typeName, count+1); - nodeCountsMap.put(typeName, countForNodeOrRelationshipType); - } - } - if (relationships !=null) { - Set relationshipGuids = relationships.keySet(); - for (String relationshipGuid: relationshipGuids) { - Relationship relationship = relationships.get(relationshipGuid); - String typeName = relationship.getRelationshipType().name(); - NodeRelationshipStats countForNodeOrRelationshipType = relationshipCountsMap.get(typeName); - int count =0; - if (countForNodeOrRelationshipType != null) { - count = countForNodeOrRelationshipType.getCount(); - } - countForNodeOrRelationshipType = new NodeRelationshipStats(typeName, count+1); - relationshipCountsMap.put(typeName, countForNodeOrRelationshipType); - } - } - graphStatistics.setRelationshipCounts(relationshipCountsMap); - graphStatistics.setNodeCounts(nodeCountsMap); - response.addResult(graphStatistics); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - - } - private Graph getGraphObject(String serverName, String userId, String guid, Date asOfTime, String nodeFilterStr, String relationshipFilterStr, StatusFilter statusFilter, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - SubjectAreaGraphClient graphClient = instanceHandler.getSubjectAreaGraphClient(serverName, userId, methodName); - final Stream allNodeTypesStream = Arrays.stream(NodeType.values()); - Set nodeTypes; - if (nodeFilterStr == null) { - - nodeTypes = allNodeTypesStream.collect(Collectors.toSet()); - // remove Unknown - nodeTypes.remove(NodeType.Unknown); - } else { - Set typeNames = allNodeTypesStream.map(NodeType::name).collect(Collectors.toSet()); - nodeTypes = Arrays.stream(nodeFilterStr.split(",")) - .filter(typeNames::contains) - .map(NodeType::valueOf) - .collect(Collectors.toSet()); - } - Set relationshipTypes; - final Stream allRelationshipTypesStream = Arrays.stream(RelationshipType.values()); - if (relationshipFilterStr == null) { - relationshipTypes = allRelationshipTypesStream.collect(Collectors.toSet()); - if (relationshipTypes.contains(RelationshipType.Unknown)) { - relationshipTypes.remove(RelationshipType.Unknown); - } - } else { - Set typeNames = allRelationshipTypesStream.map(RelationshipType::name).collect(Collectors.toSet()); - relationshipTypes = Arrays.stream(relationshipFilterStr.split(",")) - .filter(typeNames::contains) - .map(RelationshipType::valueOf) - .collect(Collectors.toSet()); - } - - return graphClient.getGraph(userId, guid, asOfTime, nodeTypes, relationshipTypes, statusFilter, 1); - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewProjectRESTServices.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewProjectRESTServices.java deleted file mode 100644 index 234648b3073..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewProjectRESTServices.java +++ /dev/null @@ -1,377 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.util.Date; -import java.util.List; - -/** - * The GlossaryAuthorViewProjectRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the Glossary Author Open Metadata - * View Service (OMVS). This interface provides view project authoring interfaces for subject area experts. - */ - -public class GlossaryAuthorViewProjectRESTServices extends BaseGlossaryAuthorView { - private static String className = GlossaryAuthorViewProjectRESTServices.class.getName(); - - /** - * Default constructor - */ - public GlossaryAuthorViewProjectRESTServices() { - - } - - /** - * Create a Project. - * - * Projects with the same name can be confusing. Best practise is to create projects that have unique names. - * This Create call does not police that Project names are unique. So it is possible to create projects with the same name as each other. - * - * Projects that are created using this call will be GlossaryProjects. - *

- * - * @param serverName name of the local UI server. - * @param userId unique identifier for requesting user, under which the request is performed - * @param suppliedProject Project to create - * @return the created Project. - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse createProject(String serverName, String userId, Project suppliedProject) { - final String methodName = "createProject"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied project - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Project createdProject = clients.projects().create(userId, suppliedProject); - response.addResult(createdProject); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - - /** - * Get a project. - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the project to get - * @return response which when successful contains the project with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getProject(String serverName, String userId, String guid) { - final String methodName = "getProject"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Project obtainedProject = clients.projects().getByGUID(userId, guid); - response.addResult(obtainedProject); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Project - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param searchCriteria String expression matching Project property values . - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findProject( - String serverName, - String userId, - Date asOfTime, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - ) { - final String methodName = "findProject"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(searchCriteria); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - SubjectAreaConfigClient client = instanceHandler.getSubjectAreaConfigClient(serverName, userId, methodName); - Config subjectAreaConfig = client.getConfig(userId); - List projects = clients.projects().find(userId, findRequest, exactValue, ignoreCase, subjectAreaConfig.getMaxPageSize()); - response.addAllResults(projects); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get Project relationships - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the project to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the project relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getProjectRelationships( - String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - - - ) { - final String methodName = "getProjectRelationships"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (startingFrom == null) { - startingFrom = 0; - } - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - - List relationships = clients.projects().getRelationships(userId, guid, findRequest); - response.addAllResults(relationships); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Project - *

- * Status is not updated using this call. - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the project to update - * @param project project to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated project - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse updateProject( - String serverName, - String userId, - String guid, - Project project, - boolean isReplace - ) { - final String methodName = "updateProject"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied project - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Project updatedProject; - - if (isReplace) { - updatedProject = clients.projects().replace(userId, guid, project); - } else { - updatedProject = clients.projects().update(userId, guid, project); - } - response.addResult(updatedProject); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Project instance - *

- * The deletion of a project is only allowed if there is no project content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the project instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the project will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the project to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteProject( - String serverName, - String userId, - String guid - ) { - - final String methodName = "deleteProject"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied project - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - clients.projects().delete(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Project - *

- * Restore allows the deleted Project to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName name of the local UI server. - * @param userId user identifier - * @param guid guid of the project to restore - * @return response which when successful contains the restored project - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreProject( - String serverName, - String userId, - String guid) { - final String methodName = "restoreProject"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied project - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Project project = clients.projects().restore(userId, guid); - response.addResult(project); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewRelationshipRESTServices.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewRelationshipRESTServices.java deleted file mode 100644 index cd5a7370b3e..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewRelationshipRESTServices.java +++ /dev/null @@ -1,3045 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - - -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.*; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.glossaryauthor.handlers.RelationshipHandler; - - -/** - * The GlossaryAuthorViewRelationshipRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the Glossary Author Open Metadata - * View Service (OMVS). This interface provides view Relationship authoring interfaces for subject area experts. - */ - -public class GlossaryAuthorViewRelationshipRESTServices extends BaseGlossaryAuthorView { - private static String className = GlossaryAuthorViewRelationshipRESTServices.class.getName(); - - /** - * Default constructor - */ - public GlossaryAuthorViewRelationshipRESTServices() { - - } - - /** - * Create a Hasa is the relationship between a spine object and a spine attribute. - * Note that this method does not error if the relationship ends are not spine objects or spine attributes. - * This allows the user to create terms then make them spine objects and spine attributes at a later stage. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termHasARelationship the HasA relationship - * @return response, when successful contains the created Hasa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTermHasARelationship(String serverName, String userId, HasA termHasARelationship) { - String restAPIName = "createTermHasARelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - HasA createdTermHasARelationship = handler.createTermHasARelationship(userId, termHasARelationship); - response.addResult(createdTermHasARelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HasA relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getTermHasARelationship(String serverName, String userId, String guid) { - - String restAPIName = "getTermHasARelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - HasA updatedTermHasARelationship = handler.getTermHasARelationship(userId, guid); - response.addResult(updatedTermHasARelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Hasa is the relationship between a spine object and a spine attribute. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the HasA relationship - * @param termHasARelationship the HasA relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated Hasa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTermHasARelationship(String serverName, String userId, String guid, HasA termHasARelationship, boolean isReplace) { - String restAPIName = "updateTermHasARelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - HasA updatedTermHasARelationship = handler.replaceTermHasARelationship(userId, guid, termHasARelationship); - response.addResult(updatedTermHasARelationship); - } else { - HasA updatedTermHasARelationship = handler.updateTermHasARelationship(userId, guid, termHasARelationship); - response.addResult(updatedTermHasARelationship); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HAS A relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteTermHasARelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteTermHasARelationship"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - handler.deleteTermHasARelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Term HAS A relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
  • - * - *
- */ - public SubjectAreaOMASAPIResponse restoreTermHasARelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreTermHasARelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - HasA restoredTermHasARelationship = handler.restoreTermHasARelationship(userId, guid); - response.addResult(restoredTermHasARelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a Related Term is a link between two similar Terms. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param relatedTerm the Related Term relationship - * @return response, when successful contains the created RelatedTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createRelatedTerm(String serverName, String userId, RelatedTerm relatedTerm) { - String restAPIName = "createRelatedTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - RelatedTerm createdRelatedTerm = handler.createRelatedTerm(userId, relatedTerm); - response.addResult(createdRelatedTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a Related Term is a link between two similar Terms. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getRelatedTerm(String serverName, String userId, String guid) { - - String restAPIName = "getRelatedTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - RelatedTerm updatedRelatedTerm = handler.getRelatedTerm(userId, guid); - response.addResult(updatedRelatedTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Related Term is a link between two similar Terms. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the related term relationship - * @param relatedTerm the HasA relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated RelatedTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateRelatedTerm(String serverName, String userId, String guid, RelatedTerm relatedTerm, boolean isReplace) { - String restAPIName = "updateRelatedTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - RelatedTerm updatedRelatedTerm = handler.replaceRelatedTerm(userId, guid, relatedTerm); - response.addResult(updatedRelatedTerm); - } else { - RelatedTerm updatedRelatedTerm = handler.updateRelatedTerm(userId, guid, relatedTerm); - response.addResult(updatedRelatedTerm); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Related Term is a link between two similar Terms. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the RelatedTerm relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteRelatedTerm(String serverName, String userId, String guid) { - String restAPIName = "deleteRelatedTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteRelatedTerm(userId, guid); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore Related Term is a link between two similar Terms. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreRelatedTerm(String serverName, String userId, String guid) { - String restAPIName = "restoreRelatedTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - RelatedTerm restoredRelatedTerm = handler.restoreRelatedTerm(userId, guid); - response.addResult(restoredRelatedTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a synonym relationship, which is a link between glossary terms that have the same meaning. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param synonym the synonym relationship - * @return response, when successful contains the created synonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createSynonym(String serverName, String userId, Synonym synonym) { - String restAPIName = "createSynonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Synonym createdSynonym = handler.createSynonymRelationship(userId, synonym); - response.addResult(createdSynonym); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a synonym relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getSynonym(String serverName, String userId, String guid) { - - String restAPIName = "getSynonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Synonym updatedSynonym = handler.getSynonymRelationship(userId, guid); - response.addResult(updatedSynonym); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a synonym relationship, which is a link between glossary terms that have the same meaning. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the Synonym relationship - * @param synonym the synonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated synonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateSynonym(String serverName, String userId, String guid, Synonym synonym, boolean isReplace) { - String restAPIName = "updateSynonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - Synonym updatedSynonym = handler.replaceSynonymRelationship(userId, guid, synonym); - response.addResult(updatedSynonym); - } else { - Synonym updatedSynonym = handler.updateSynonymRelationship(userId, guid, synonym); - response.addResult(updatedSynonym); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a synonym relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteSynonym(String serverName, String userId, String guid) { - String restAPIName = "deleteSynonym"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - handler.deleteSynonymRelationship(userId, guid); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore synonym relationship, which is a link between glossary terms that have the same meaning. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreSynonym(String serverName, String userId, String guid) { - String restAPIName = "restoreSynonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Synonym restoredSynonym = handler.restoreSynonymRelationship(userId, guid); - response.addResult(restoredSynonym); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create an antonym relationship, which is a link between glossary terms that have the opposite meanings. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param antonym the antonym relationship - * @return response, when successful contains the created antonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createAntonym(String serverName, String userId, Antonym antonym) { - String restAPIName = "createAntonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Antonym createdAntonym = handler.createAntonymRelationship(userId, antonym); - response.addResult(createdAntonym); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a Antonym relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getAntonym(String serverName, String userId, String guid) { - - String restAPIName = "getAntonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Antonym updatedAntonym = handler.getAntonymRelationship(userId, guid); - response.addResult(updatedAntonym); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a antonym relationship, which is a link between glossary terms that have the opposite meanings. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the Antonym relationship - * @param antonym the antonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated antonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateAntonym(String serverName, String userId, String guid, Antonym antonym, boolean isReplace) { - String restAPIName = "updateAntonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - Antonym updatedAntonym = handler.replaceAntonymRelationship(userId, guid, antonym); - response.addResult(updatedAntonym); - } else { - Antonym updatedAntonym = handler.updateAntonymRelationship(userId, guid, antonym); - response.addResult(updatedAntonym); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Antonym relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteAntonym(String serverName, String userId, String guid) { - String restAPIName = "deleteAntonym"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - handler.deleteAntonymRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore Antonym relationship, which is a link between glossary terms that have the same meaning. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreAntonym(String serverName, String userId, String guid) { - String restAPIName = "restoreAntonym"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Antonym restoredAntonym = handler.restoreAntonymRelationship(userId, guid); - response.addResult(restoredAntonym); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param categoryAnchor the categoryAnchor relationship - * @return response, when successful contains the created categoryAnchor - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTranslation(String serverName, String userId, Translation categoryAnchor) { - String restAPIName = "createTranslation"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Translation createdTranslation = handler.createTranslationRelationship(userId, categoryAnchor); - response.addResult(createdTranslation); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getTranslation(String serverName, String userId, String guid) { - - String restAPIName = "getTranslation"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Translation updatedTranslation = handler.getTranslationRelationship(userId, guid); - response.addResult(updatedTranslation); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the Translation relationship - * @param categoryAnchor the categoryAnchor relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated categoryAnchor - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTranslation(String serverName, String userId, String guid, Translation categoryAnchor, boolean isReplace) { - String restAPIName = "updateTranslation"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - Translation updatedTranslation = handler.replaceTranslationRelationship(userId, guid, categoryAnchor); - response.addResult(updatedTranslation); - } else { - Translation updatedTranslation = handler.updateTranslationRelationship(userId, guid, categoryAnchor); - response.addResult(updatedTranslation); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteTranslation(String serverName, String userId, String guid) { - String restAPIName = "deleteTranslation"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteTranslationRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreTranslation(String serverName, String userId, String guid) { - String restAPIName = "restoreTranslation"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Translation restoredTranslation = handler.restoreTranslationRelationship(userId, guid); - response.addResult(restoredTranslation); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param usedInContext the usedInContext relationship - * @return response, when successful contains the created usedInContext - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createUsedInContext(String serverName, String userId, UsedInContext usedInContext) { - String restAPIName = "createUsedInContext"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - UsedInContext createdUsedInContext = handler.createUsedInContextRelationship(userId, usedInContext); - response.addResult(createdUsedInContext); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getUsedInContext(String serverName, String userId, String guid) { - - String restAPIName = "getUsedInContext"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - UsedInContext updatedUsedInContext = handler.getUsedInContextRelationship(userId, guid); - response.addResult(updatedUsedInContext); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the UsedInContext relationship - * @param usedInContext the usedInContext relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated usedInContext - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateUsedInContext(String serverName, String userId, String guid, UsedInContext usedInContext, boolean isReplace) { - String restAPIName = "updateUsedInContext"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - UsedInContext updatedUsedInContext = handler.replaceUsedInContextRelationship(userId, guid, usedInContext); - response.addResult(updatedUsedInContext); - } else { - UsedInContext updatedUsedInContext = handler.updateUsedInContextRelationship(userId, guid, usedInContext); - response.addResult(updatedUsedInContext); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteUsedInContext(String serverName, String userId, String guid) { - String restAPIName = "deleteUsedInContext"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteUsedInContextRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreUsedInContext(String serverName, String userId, String guid) { - String restAPIName = "restoreUsedInContext"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - UsedInContext restoredUsedInContext = handler.restoreUsedInContextRelationship(userId, guid); - response.addResult(restoredUsedInContext); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param preferredTerm the preferredTerm relationship - * @return response, when successful contains the created preferredTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createPreferredTerm(String serverName, String userId, PreferredTerm preferredTerm) { - String restAPIName = "createPreferredTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - PreferredTerm createdPreferredTerm = handler.createPreferredTermRelationship(userId, preferredTerm); - response.addResult(createdPreferredTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getPreferredTerm(String serverName, String userId, String guid) { - - String restAPIName = "getPreferredTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - PreferredTerm updatedPreferredTerm = handler.getPreferredTermRelationship(userId, guid); - response.addResult(updatedPreferredTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the PreferredTerm relationship - * @param preferredTerm the preferredTerm relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated preferredTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updatePreferredTerm(String serverName, String userId, String guid, PreferredTerm preferredTerm, boolean isReplace) { - String restAPIName = "updatePreferredTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - PreferredTerm updatedPreferredTerm = handler.replacePreferredTermRelationship(userId, guid, preferredTerm); - response.addResult(updatedPreferredTerm); - } else { - PreferredTerm updatedPreferredTerm = handler.updatePreferredTermRelationship(userId, guid, preferredTerm); - response.addResult(updatedPreferredTerm); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deletePreferredTerm(String serverName, String userId, String guid) { - String restAPIName = "deletePreferredTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deletePreferredTermRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restorePreferredTerm(String serverName, String userId, String guid) { - String restAPIName = "restorePreferredTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - PreferredTerm restoredPreferredTerm = handler.restorePreferredTermRelationship(userId, guid); - response.addResult(restoredPreferredTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param validValue the validValue relationship - * @return response, when successful contains the created validValue - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createValidValue(String serverName, String userId, ValidValue validValue) { - String restAPIName = "createValidValue"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ValidValue createdValidValue = handler.createValidValueRelationship(userId, validValue); - response.addResult(createdValidValue); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getValidValue(String serverName, String userId, String guid) { - - String restAPIName = "getValidValue"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ValidValue updatedValidValue = handler.getValidValueRelationship(userId, guid); - response.addResult(updatedValidValue); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the ValidValue relationship - * @param validValue the validValue relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated validValue - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateValidValue(String serverName, String userId, String guid, ValidValue validValue, boolean isReplace) { - String restAPIName = "updateValidValue"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - ValidValue updatedValidValue = handler.replaceValidValueRelationship(userId, guid, validValue); - response.addResult(updatedValidValue); - } else { - ValidValue updatedValidValue = handler.updateValidValueRelationship(userId, guid, validValue); - response.addResult(updatedValidValue); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteValidValue(String serverName, String userId, String guid) { - String restAPIName = "deleteValidValue"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteValidValueRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a ValidValue relationship, which is link between glossary terms where one defines one of the data values for the another. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreValidValue(String serverName, String userId, String guid) { - String restAPIName = "restoreValidValue"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ValidValue restoredValidValue = handler.restoreValidValueRelationship(userId, guid); - response.addResult(restoredValidValue); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param replacementTerm the replacementTerm relationship - * @return response, when successful contains the created replacementTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createReplacementTerm(String serverName, String userId, ReplacementTerm replacementTerm) { - String restAPIName = "createReplacementTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ReplacementTerm createdReplacementTerm = handler.createReplacementTermRelationship(userId, replacementTerm); - response.addResult(createdReplacementTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getReplacementTerm(String serverName, String userId, String guid) { - - String restAPIName = "getReplacementTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ReplacementTerm updatedReplacementTerm = handler.getReplacementTermRelationship(userId, guid); - response.addResult(updatedReplacementTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the ReplacementTerm relationship - * @param replacementTerm the replacementTerm relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated replacementTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateReplacementTerm(String serverName, String userId, String guid, ReplacementTerm replacementTerm, boolean isReplace) { - String restAPIName = "updateReplacementTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - if (isReplace) { - ReplacementTerm updatedReplacementTerm = handler.replaceReplacementTermRelationship(userId, guid, replacementTerm); - response.addResult(updatedReplacementTerm); - } else { - ReplacementTerm updatedReplacementTerm = handler.updateReplacementTermRelationship(userId, guid, replacementTerm); - response.addResult(updatedReplacementTerm); - } - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteReplacementTerm(String serverName, String userId, String guid) { - String restAPIName = "deleteReplacementTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteReplacementTermRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreReplacementTerm(String serverName, String userId, String guid) { - String restAPIName = "restoreReplacementTerm"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ReplacementTerm restoredReplacementTerm = handler.restoreReplacementTermRelationship(userId, guid); - response.addResult(restoredReplacementTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a termTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termTYPEDBYRelationship the termTYPEDBYRelationship relationship - * @return response, when successful contains the created termTYPEDBYRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTermTYPEDBYRelationship(String serverName, String userId, TypedBy termTYPEDBYRelationship) { - String restAPIName = "createTermTYPEDBYRelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - TypedBy createdTermTYPEDBYRelationship = handler.createTermTYPEDBYRelationship(userId, termTYPEDBYRelationship); - response.addResult(createdTermTYPEDBYRelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a termTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TypedBy relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getTermTYPEDBYRelationship(String serverName, String userId, String guid) { - - String restAPIName = "getTermTYPEDBYRelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - TypedBy updatedTermTYPEDBYRelationship = handler.getTermTYPEDBYRelationship(userId, guid); - response.addResult(updatedTermTYPEDBYRelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a termTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the TypedBy relationship - * @param termTYPEDBYRelationship the termTYPEDBYRelationship relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated termTYPEDBYRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTermTYPEDBYRelationship(String serverName, String userId, String guid, TypedBy termTYPEDBYRelationship, boolean isReplace) { - String restAPIName = "updateTermTYPEDBYRelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - TypedBy updatedTermTYPEDBYRelationship; - if (isReplace) { - updatedTermTYPEDBYRelationship = handler.replaceTermTYPEDBYRelationship(userId, guid, termTYPEDBYRelationship); - } else { - updatedTermTYPEDBYRelationship = handler.updateTermTYPEDBYRelationship(userId, guid, termTYPEDBYRelationship); - } - - response.addResult(updatedTermTYPEDBYRelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a termTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TypedBy relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteTermTYPEDBYRelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteTermTYPEDBYRelationship"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteTermTYPEDBYRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a termTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreTermTYPEDBYRelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreTermTYPEDBYRelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - TypedBy restoredTermTYPEDBYRelationship = handler.restoreTypedByRelationship(userId, guid); - response.addResult(restoredTermTYPEDBYRelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param IsARelationship the IsA Relationship - * @return response, when successful contains the created Isa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createIsaRelationship(String serverName, String userId, IsA IsARelationship) { - String restAPIName = "createIsaRelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsA createdIsARelationship = handler.createIsaRelationship(userId, IsARelationship); - response.addResult(createdIsARelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsA Relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getIsARelationship(String serverName, String userId, String guid) { - - String restAPIName = "getIsARelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsA updatedIsARelationship = handler.getIsaRelationship(userId, guid); - response.addResult(updatedIsARelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the IsA Relationship - * @param IsARelationship the IsA Relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated Isa - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateIsARelationship(String serverName, String userId, String guid, IsA IsARelationship, boolean isReplace) { - String restAPIName = "updateIsARelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsA updatedIsARelationship; - if (isReplace) { - updatedIsARelationship = handler.replaceIsaRelationship(userId, guid, IsARelationship); - } else { - updatedIsARelationship = handler.updateIsaRelationship(userId, guid, IsARelationship); - } - response.addResult(updatedIsARelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsA Relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteIsARelationship(String serverName, String userId, String guid) { - String restAPIName = "deleteIsARelationship"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteIsaRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreIsARelationship(String serverName, String userId, String guid) { - String restAPIName = "restoreIsARelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsA restoredIsARelationship = handler.restoreIsaRelationship(userId, guid); - response.addResult(restoredIsARelationship); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param TermIsATypeOfDeprecated the TermIsATypeOfDeprecated relationship - * @return response, when successful contains the created TermIsATypeOfDeprecated - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - */ - public SubjectAreaOMASAPIResponse createTermIsATypeOfDeprecated(String serverName, String userId, IsATypeOfDeprecated TermIsATypeOfDeprecated) { - String restAPIName = "createTermIsATypeOfDeprecated"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOfDeprecated createdTermIsATypeOfDeprecated = handler.createIsATypeOfDeprecated(userId, TermIsATypeOfDeprecated); - response.addResult(createdTermIsATypeOfDeprecated); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsaTypeOf relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - */ - - public SubjectAreaOMASAPIResponse getTermIsATypeOfDeprecated(String serverName, String userId, String guid) { - - String restAPIName = "getTermIsATypeOfDeprecated"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOfDeprecated updatedTermIsATypeOfDeprecated = handler.getIsATypeOfDeprecated(userId, guid); - response.addResult(updatedTermIsATypeOfDeprecated); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the IsaTypeOf relationship - * @param TermIsATypeOfDeprecated the TermIsATypeOfDeprecated relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated TermIsATypeOfDeprecated - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - */ - public SubjectAreaOMASAPIResponse updateTermIsATypeOfDeprecated(String serverName, String userId, String guid, IsATypeOfDeprecated TermIsATypeOfDeprecated, boolean isReplace) { - String restAPIName = "updateTermIsATypeOfDeprecated"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOfDeprecated updatedTermIsATypeOfDeprecated; - if (isReplace) { - updatedTermIsATypeOfDeprecated = handler.replaceIsATypeOfDeprecated(userId, guid, TermIsATypeOfDeprecated); - } else { - updatedTermIsATypeOfDeprecated = handler.updateIsATypeOfDeprecated(userId, guid, TermIsATypeOfDeprecated); - } - - response.addResult(updatedTermIsATypeOfDeprecated); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsaTypeOf relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - */ - public SubjectAreaOMASAPIResponse deleteTermIsATypeOfDeprecated(String serverName, String userId, String guid) { - String restAPIName = "deleteTermIsATypeOfDeprecated"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteIsATypeOfDeprecated(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - */ - public SubjectAreaOMASAPIResponse restoreTermIsATypeOfDeprecated(String serverName, String userId, String guid) { - String restAPIName = "restoreTermIsATypeOfDeprecated"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOfDeprecated restoredTermIsATypeOfDeprecated = handler.restoreIsaTypeOfDeprecated(userId, guid); - response.addResult(restoredTermIsATypeOfDeprecated); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param IsATypeOf the IsATypeOf relationship - * @return response, when successful contains the created IsATypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createIsATypeOf(String serverName, String userId, IsATypeOf IsATypeOf) { - String restAPIName = "createIsATypeOf"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOf createdIsATypeOf = handler.createIsATypeOf(userId, IsATypeOf); - response.addResult(createdIsATypeOf); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsaTypeOf relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getIsATypeOf(String serverName, String userId, String guid) { - - String restAPIName = "getIsATypeOf"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOf updatedIsATypeOf = handler.getIsATypeOf(userId, guid); - response.addResult(updatedIsATypeOf); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the IsaTypeOf relationship - * @param IsATypeOf the IsATypeOf relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated IsATypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateIsATypeOf(String serverName, String userId, String guid, IsATypeOf IsATypeOf, boolean isReplace) { - String restAPIName = "updateIsATypeOf"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOf updatedIsATypeOf; - if (isReplace) { - updatedIsATypeOf = handler.replaceIsATypeOf(userId, guid, IsATypeOf); - } else { - updatedIsATypeOf = handler.updateIsATypeOf(userId, guid, IsATypeOf); - } - - response.addResult(updatedIsATypeOf); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsaTypeOf relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteIsATypeOf(String serverName, String userId, String guid) { - String restAPIName = "deleteIsATypeOf"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteIsATypeOf(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a IsATypeOf relationship, which is an inheritance relationship between two spine objects. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreIsATypeOf(String serverName, String userId, String guid) { - String restAPIName = "restoreIsATypeOf"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - IsATypeOf restoredIsATypeOf = handler.restoreIsATypeOf(userId, guid); - response.addResult(restoredIsATypeOf); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termCategorization the termCategorization relationship - * @return response, when successful contains the created termCategorization - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createTermCategorization(String serverName, String userId, Categorization termCategorization) { - String restAPIName = "createTermCategorization"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Categorization createdTermCategorization = handler.createTermCategorizationRelationship(userId, termCategorization); - response.addResult(createdTermCategorization); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorization relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getTermCategorization(String serverName, String userId, String guid) { - - String restAPIName = "getTermCategorization"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Categorization updatedTermCategorization = handler.getTermCategorizationRelationship(userId, guid); - response.addResult(updatedTermCategorization); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the TermCategorization relationship - * @param termCategorization the termCategorization relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated termCategorization - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateTermCategorization(String serverName, String userId, String guid, Categorization termCategorization, boolean isReplace) { - String restAPIName = "updateTermCategorization"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Categorization updatedTermCategorization; - if (isReplace) { - updatedTermCategorization = handler.replaceTermCategorizationRelationship(userId, guid, termCategorization); - } else { - updatedTermCategorization = handler.updateTermCategorizationRelationship(userId, guid, termCategorization); - } - - response.addResult(updatedTermCategorization); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorization relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteTermCategorization(String serverName, String userId, String guid) { - String restAPIName = "deleteTermCategorization"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteTermCategorizationRelationship(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreTermCategorization(String serverName, String userId, String guid) { - String restAPIName = "restoreTermCategorization"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - Categorization restoredTermCategorization = handler.restoreTermCategorizationRelationship(userId, guid); - response.addResult(restoredTermCategorization); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - // No modification of TermAnchor exists, because this is an anchoring relationship - - /** - * Get a termAnchor Relationship. A relationship between a Glossary and a Term. This relationship allows terms to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermAnchor relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getTermAnchor(String serverName, String userId, String guid) { - - String restAPIName = "getTermAnchor"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - TermAnchor updatedTermAnchor = handler.getTermAnchorRelationship(userId, guid); - response.addResult(updatedTermAnchor); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - // No modification of CaregoryAnchor exists, because this is an anchoring relationship - - /** - * Get a categoryAnchor Relationship. A relationship between a Glossary and a Category. This relationship allows Categories to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryAnchor relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getCategoryAnchor(String serverName, String userId, String guid) { - - String restAPIName = "getCategoryAnchor"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - CategoryAnchor updatedCategoryAnchor = handler.getCategoryAnchorRelationship(userId, guid); - response.addResult(updatedCategoryAnchor); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a project scope relationship, which is a link between the project content and the project. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param projectScope the projectScope relationship - * @return response, when successful contains the created projectScope - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createProjectScope(String serverName, String userId, ProjectScope projectScope) { - String restAPIName = "createProjectScope"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ProjectScope createdProjectScope = handler.createProjectScopeRelationship(userId, projectScope); - response.addResult(createdProjectScope); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Get a project scope relationship, which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScope relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getProjectScope(String serverName, String userId, String guid) { - String restAPIName = "getProjectScope"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ProjectScope updatedProjectScope = handler.getProjectScopeRelationship(userId, guid); - response.addResult(updatedProjectScope); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a project scope relationship, which is a link between the project content and the project. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the ProjectScope relationship - * @param projectScope the projectScope relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated projectScope - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateProjectScope(String serverName, String userId, String guid, ProjectScope projectScope, boolean isReplace) { - String restAPIName = "updateProjectScope"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ProjectScope updatedProjectScope; - if (isReplace) { - updatedProjectScope = handler.replaceProjectScopeRelationship(userId, guid, projectScope); - } else { - updatedProjectScope = handler.updateProjectScopeRelationship(userId, guid, projectScope); - } - - response.addResult(updatedProjectScope); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a project scope relationship, which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScope relationship to delete - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteProjectScope(String serverName, String userId, String guid) { - String restAPIName = "deleteProjectScope"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteProjectScopeRelationship(userId, guid); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a project scope relationship, which is a link between the project content and the project. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreProjectScope(String serverName, String userId, String guid) { - String restAPIName = "restoreProjectScope"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - ProjectScope restoredProjectScope = handler.restoreProjectScopeRelationship(userId, guid); - response.addResult(restoredProjectScope); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Create a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @return response, when successful contains the created categoryHierarchyLink relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse createCategoryHierarchyLink(String serverName, String userId, CategoryHierarchyLink categoryHierarchyLink) { - String restAPIName = "createCategoryHierarchyLink"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - CategoryHierarchyLink createdCategoryHierarchyLink = handler.createCategoryHierarchyLink(userId, categoryHierarchyLink); - response.addResult(createdCategoryHierarchyLink); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to get - * @return response which when successful contains the CategoryHierarchyLink relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getCategoryHierarchyLink(String serverName, String userId, String guid) { - String restAPIName = "getCategoryHierarchyLink"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - CategoryHierarchyLink categoryHierarchyLink = handler.getCategoryHierarchyLink(userId, guid); - response.addResult(categoryHierarchyLink); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated categoryHierarchyLink - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse updateCategoryHierarchyLink(String serverName, String userId, String guid, CategoryHierarchyLink categoryHierarchyLink, Boolean isReplace) { - String restAPIName = "updateCategoryHierarchyLink"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - CategoryHierarchyLink updatedCategoryHierarchyLink; - if (isReplace) { - updatedCategoryHierarchyLink = handler.replaceCategoryHierarchyLink(userId, guid, categoryHierarchyLink); - } else { - updatedCategoryHierarchyLink = handler.updateCategoryHierarchyLink(userId, guid, categoryHierarchyLink); - } - - response.addResult(updatedCategoryHierarchyLink); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship to delete - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteCategoryHierarchyLink(String serverName, String userId, String guid) { - String restAPIName = "deleteCategoryHierarchyLink"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - - handler.deleteCategoryHierarchyLink(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - *

- * Restore allows the deleted CategoryHierarchyLink Relationship to be made active again. Restore allows deletes to be undone. - * Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to delete - * @return response which when successful contains the restored CategoryHierarchyLink - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreCategoryHierarchyLink(String serverName, String userId, String guid) { - String restAPIName = "restoreCategoryHierarchyLink"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - CategoryHierarchyLink restoredCategoryHierarchyLink = handler.restoreCategoryHierarchyLink(userId, guid); - response.addResult(restoredCategoryHierarchyLink); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get a SemanticAssignment relationship, Links a glossary term to another element such as an asset or schema element to define its meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the SemanticAssignment relationship to get - * @return response which when successful contains the SemanticAssignment relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getSemanticAssignmentRelationship(String serverName, String userId, String guid) { - String restAPIName = "getSemanticAssignmentRelationship"; - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, restAPIName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied relationship - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, restAPIName); - RelationshipHandler handler = instanceHandler.getRelationshipHandler(serverName, userId, restAPIName); - SemanticAssignment updatedSemanticAssignment = handler.getSemanticAssignmentRelationship(userId, guid); - response.addResult(updatedSemanticAssignment); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, restAPIName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewTermRESTServices.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewTermRESTServices.java deleted file mode 100644 index 3254e4f4ffd..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/services/GlossaryAuthorViewTermRESTServices.java +++ /dev/null @@ -1,403 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria term. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.services; - -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.SubjectAreaNodeClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.terms.SubjectAreaTermClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.util.Date; -import java.util.List; - -/** - * The GlossaryAuthorViewTermRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the Glossary Author Open Metadata - * View Service (OMVS). This interface provides view term authoring interfaces for subject area experts to author terms. - */ - -public class GlossaryAuthorViewTermRESTServices extends BaseGlossaryAuthorView { - private static String className = GlossaryAuthorViewTermRESTServices.class.getName(); - - /** - * Default constructor - */ - public GlossaryAuthorViewTermRESTServices() { - - } - - /** - * Create a Term - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param suppliedTerm Term to create - * @return the created term. - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse createTerm(String serverName, String userId, Term suppliedTerm) { - final String methodName = "createTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied term - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Term createdTerm = clients.terms().create(userId, suppliedTerm); - response.addResult(createdTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - - /** - * Get a term. The server has a maximum page size defined, the number of categories (a field of Term) returned is limited by that maximum page size. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the term to get - * @return response which when successful contains the term with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse getTerm(String serverName, String userId, String guid) { - final String methodName = "getTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Term obtainedTerm = clients.terms().getByGUID(userId, guid); - response.addResult(obtainedTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Find Term - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param searchCriteria String expression matching Term property values . - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse findTerm( - String serverName, - String userId, - Date asOfTime, - String searchCriteria, - boolean exactValue, - boolean ignoreCase, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - ) { - final String methodName = "findTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - if (startingFrom == null) { - startingFrom = 0; - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(searchCriteria); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - SubjectAreaConfigClient client = instanceHandler.getSubjectAreaConfigClient(serverName, userId, methodName); - Config subjectAreaConfig = client.getConfig(userId); - List terms = clients.terms().find(userId, findRequest, exactValue, ignoreCase, subjectAreaConfig.getMaxPageSize()); - response.addAllResults(terms); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get Term relationships - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the term to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the term relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse getTermRelationships( - String serverName, - String userId, - String guid, - Date asOfTime, - Integer startingFrom, - Integer pageSize, - SequencingOrder sequencingOrder, - String sequencingProperty - - - ) { - final String methodName = "getTermRelationships"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - try { - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - if (startingFrom == null) { - startingFrom = 0; - } - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(startingFrom); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequencingOrder); - findRequest.setSequencingProperty(sequencingProperty); - - List relationships = clients.terms().getRelationships(userId, guid, findRequest); - response.addAllResults(relationships); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update a Term - *

- * Status is not updated using this call. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the term to update - * @param term term to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated term - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - public SubjectAreaOMASAPIResponse updateTerm( - String serverName, - String userId, - String guid, - Term term, - boolean isReplace - ) { - final String methodName = "updateTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied term - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Term updatedTerm; - - if (isReplace) { - updatedTerm = clients.terms().replace(userId, guid, term); - } else { - updatedTerm = clients.terms().update(userId, guid, term); - } - response.addResult(updatedTerm); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Delete a Term instance - *

- * The deletion of a term is only allowed if there is no term content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the term instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the term will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the term to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse deleteTerm( - String serverName, - String userId, - String guid - ) { - - final String methodName = "deleteTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied term - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - clients.terms().delete(userId, guid); - - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Restore a Term - *

- * Restore allows the deleted Term to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName name of the local view server. - * @param userId user identifier - * @param guid guid of the term to restore - * @return response which when successful contains the restored term - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - public SubjectAreaOMASAPIResponse restoreTerm( - String serverName, - String userId, - String guid) { - final String methodName = "restoreTerm"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - - // should not be called without a supplied term - the calling layer should not allow this. - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - Term term = clients.terms().restore(userId, guid); - response.addResult(term); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - public SubjectAreaOMASAPIResponse getCategories(String serverName, String userId, String guid, Integer startingFrom, Integer pageSize) { - final String methodName = "getCategories"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaOMASAPIResponse response = new SubjectAreaOMASAPIResponse<>(); - AuditLog auditLog = null; - FindRequest findRequest = new FindRequest(); - if (pageSize == null) { - pageSize = invalidParameterHandler.getMaxPagingSize(); - } - if (startingFrom == null) { - startingFrom = 0; - } - try { - invalidParameterHandler.validatePaging(startingFrom, pageSize, methodName); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - SubjectAreaNodeClients clients = instanceHandler.getSubjectAreaNodeClients(serverName, userId, methodName); - List categories = ((SubjectAreaTermClient) clients.terms()).getCategories(userId, guid, findRequest); - response.addAllResults(categories); - } catch (Exception exception) { - response = getResponseForException(exception, auditLog, className, methodName); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumbTrailTest.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumbTrailTest.java deleted file mode 100644 index 17e0dbcf7ce..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/properties/BreadCrumbTrailTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.properties; - -import org.junit.jupiter.api.Test; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; - - -public class BreadCrumbTrailTest { - @Test - public void testBreadCrumbTrail() { - - - BreadCrumb breadCrumb1 = new BreadCrumb("guid1", "displayName1", NodeType.Term); - BreadCrumb breadCrumb2 = new BreadCrumb("guid2", "displayName2", NodeType.Category); - BreadCrumb breadCrumb3 = new BreadCrumb("guid3", "displayName3", NodeType.Category); - BreadCrumb breadCrumb4 = new BreadCrumb("guid4", "displayName4", NodeType.Category); - BreadCrumb breadCrumb5 = new BreadCrumb("guid5", "displayName5", NodeType.Glossary); - - // test1 term cat glossary - List inputBreadCrumbs = new ArrayList<>(); - inputBreadCrumbs.add(breadCrumb1); - inputBreadCrumbs.add(breadCrumb2); - inputBreadCrumbs.add(breadCrumb5); - - BreadCrumbTrail breadCrumbTrail = new BreadCrumbTrail(inputBreadCrumbs); - List outputBreadCrumbs = breadCrumbTrail.getBreadCrumbs(); - - assertEquals(outputBreadCrumbs.get(0).getPath(), "/nodeType/Glossary/guid/guid5/displayName/displayName5"); - - // test1 term cat cat cat glossary - inputBreadCrumbs = new ArrayList<>(); - inputBreadCrumbs.add(breadCrumb1); - inputBreadCrumbs.add(breadCrumb2); - inputBreadCrumbs.add(breadCrumb3); - inputBreadCrumbs.add(breadCrumb4); - inputBreadCrumbs.add(breadCrumb5); - - breadCrumbTrail = new BreadCrumbTrail(inputBreadCrumbs); - outputBreadCrumbs = breadCrumbTrail.getBreadCrumbs(); - - assertEquals(outputBreadCrumbs.get(4).getPath(), "/nodeType/Glossary/guid/guid5/displayName/displayName5" + - "/nodeType/Category/guid/guid4/displayName/displayName4" + - "/nodeType/Category/guid/guid3/displayName/displayName3" + - "/nodeType/Category/guid/guid2/displayName/displayName2" + - "/nodeType/Term/guid/guid1/displayName/displayName1"); - - // test1 term cat cat cat glossary - inputBreadCrumbs = new ArrayList<>(); - inputBreadCrumbs.add(breadCrumb1); - inputBreadCrumbs.add(breadCrumb5); - - breadCrumbTrail = new BreadCrumbTrail(inputBreadCrumbs); - outputBreadCrumbs = breadCrumbTrail.getBreadCrumbs(); - - assertEquals(outputBreadCrumbs.get(1).getPath(), "/nodeType/Glossary/guid/guid5/displayName/displayName5" + - "/nodeType/Term/guid/guid1/displayName/displayName1"); - - - } - - -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/README.md b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/README.md deleted file mode 100644 index 69172d197e3..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Subject Area View Open Metadata View Service (OMVS) with Spring - -The Subject Area OMVS spring module uses spring to create the server-side support for the REST services. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/build.gradle b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/build.gradle deleted file mode 100644 index 503ede4adcf..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-server') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'org.springframework:spring-web' - implementation 'io.swagger.core.v3:swagger-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorGraphRESTResource.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorGraphRESTResource.java deleted file mode 100644 index 5372f8ef89f..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorGraphRESTResource.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.server; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.GraphStatistics; -import org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewGraphRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - - -/** - * The GlossaryAuthorGraphRESTResource provides the server-side implementation of the Glossary Author OMVS. - * This interface provides term authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}") - -@Tag(name="View Server: Glossary Author OMVS", description="Glossary Author OMVS supports subject matter experts who are documenting their knowledge in a glossary.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/glossary-author/overview/")) - -public class GlossaryAuthorGraphRESTResource { - private final GlossaryAuthorViewGraphRESTServices restAPI = new GlossaryAuthorViewGraphRESTServices(); - /** - * Default constructor - */ - public GlossaryAuthorGraphRESTResource() { - - } - - /** - * Get the graph of nodes and relationships radiating out from a node. - * - * Return the nodes and relationships that radiate out from the supplied node (identified by a GUID). - * The results are scoped by types of relationships, types of nodes and classifications as well as level. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid the starting point of the query. - * @param nodeFilterStr Comma separated list of node names to include in the query results. Null means include - * all entities found, irrespective of their type. - * @param relationshipFilterStr comma separated list of relationship names to include in the query results. Null means include - * all relationships found, irrespective of their type. - * @param asOfTime Requests a historical query of the relationships for the entity. Null means return the - * present values. - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * @return A graph of nodeTypes. - * - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - @GetMapping( path = "/graph/{guid}") - public SubjectAreaOMASAPIResponse getGraph(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required=false) Date asOfTime, - @RequestParam(value = "nodeFilter", required=false)String nodeFilterStr, - @RequestParam(value = "relationshipFilter", required=false)String relationshipFilterStr, - @RequestParam(value = "statusFilter", required=false)StatusFilter statusFilter // may need to extend this for controlled terms - ) { - - return restAPI.getGraph(serverName, userId, guid, asOfTime, nodeFilterStr, relationshipFilterStr, statusFilter); - } - /** - * Get the graph statistics of nodes and relationships radiating out from a node. - * - * Return the nodes and relationships statistics that radiate out from the supplied node (identified by a GUID). - * The results are scoped by types of relationships, types of nodes and classifications as well as level. - * - * The graph statistics include counts that the user can use to scope the query, to reduce the number of nodes displayed. - * This is combat the issue that a large number of nodes being displayed would make the screen too busy and unusable. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid the starting point of the query. - * @param nodeFilterStr Comma separated list of node names to include in the query results. Null means include - * all entities found, irrespective of their type. - * @param relationshipFilterStr comma separated list of relationship names to include in the query results. Null means include - * all relationships found, irrespective of their type. - * @param asOfTime Requests a historical query of the relationships for the entity. Null means return the - * present values. - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * @return A graph of nodeTypes. - * - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a find was issued but the repository does not implement find functionality in some way.
  • - *
- */ - @GetMapping( path = "/graph-counts/{guid}") - public SubjectAreaOMASAPIResponse getGraphCounts(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required=false) Date asOfTime, - @RequestParam(value = "nodeFilter", required=false)String nodeFilterStr, - @RequestParam(value = "relationshipFilter", required=false)String relationshipFilterStr, - @RequestParam(value = "statusFilter", required=false)StatusFilter statusFilter // may need to extend this for controlled terms - ) { - - return restAPI.getGraphCounts(serverName, userId, guid, asOfTime, nodeFilterStr, relationshipFilterStr, statusFilter); - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewCategoryRESTResource.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewCategoryRESTResource.java deleted file mode 100644 index 953f0cb4f7e..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewCategoryRESTResource.java +++ /dev/null @@ -1,309 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.server; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewCategoryRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - -/** - * The GlossaryAuthorRESTServicesInstance provides the org.odpi.openmetadata.viewervices.glossaryauthor.server implementation of the Glossary Author Open Metadata - * View Service (OMVS) for categories. This interface provides category authoring interfaces for subject area experts. - */ - -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/categories") - -@Tag(name="View Server: Glossary Author OMVS", description="Glossary Author OMVS supports subject matter experts who are documenting their knowledge in a glossary.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/glossary-author/overview/")) - -public class GlossaryAuthorViewCategoryRESTResource { - - private GlossaryAuthorViewCategoryRESTServices restAPI = new GlossaryAuthorViewCategoryRESTServices(); - - - /** - * Default constructor - */ - public GlossaryAuthorViewCategoryRESTResource() { - } - - - /** - * Create a Category. - *

- * Categories with the same name can be confusing. Best practise is to create categories that have unique names. - * This Create call does not police that Category names are unique. So it is possible to create categories with the same name as each other. - * - * @param serverName name of the local server. - * @param userId userid - * @param suppliedCategory Category to create. - * @return response, when successful contains the created category. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised.
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - @PostMapping - public SubjectAreaOMASAPIResponse createCategory(@PathVariable String serverName, @PathVariable String userId, - @RequestBody Category suppliedCategory) { - return restAPI.createCategory(serverName, userId, suppliedCategory); - - } - - /** - * Get a category. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the category to get - * @return response which when successful contains the category with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
- */ - @GetMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse getCategory(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getCategory(serverName, userId, guid); - - } - - /** - * Find Category - * - * @param serverName local UI server name - * @param userId userid - * @param searchCriteria String expression matching Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the categories returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of categories meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping - public SubjectAreaOMASAPIResponse findCategory(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false) Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { return restAPI.findCategory(serverName, userId, asOfTime, searchCriteria, exactValue, ignoreCase, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Category relationships. The server has a maximum page size defined, the number of relationships returned is limited by that maximum page size. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the category to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the category relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/{guid}/relationships") - public SubjectAreaOMASAPIResponse getCategoryRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false) Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getCategoryRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Update a Category - *

- * Status is not updated using this call. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the category to update - * @param suppliedCategory category to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse updateCategory( - @PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Category suppliedCategory, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - - return restAPI.updateCategory(serverName, userId, guid, suppliedCategory, isReplace); - - - } - - /** - * Delete a Category instance - *

- * The deletion of a category is only allowed if there is no category content (i.e. no categories or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the category instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the category will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the category to be deleted.= - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse deleteCategory(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid){ - return restAPI.deleteCategory(serverName, userId, guid); - } - - /** - * Restore a Category - *

- * Restore allows the deleted Category to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the category to restore - * @return response which when successful contains the restored category - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse restoreCategory(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreCategory(serverName, userId, guid); - - } - - /** - * Get the terms that are categorized by this Category - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param searchCriteria String expression to match the categorized Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of terms is categorized by this Category - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/{guid}/terms") - public SubjectAreaOMASAPIResponse getCategorizedTerms(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - return restAPI.getCategorizedTerms(serverName, userId, guid, searchCriteria, exactValue, ignoreCase, startingFrom, pageSize); - } - - /** - * Get this Category's child Categories. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the parent category - * @param searchCriteria String expression matching child Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of child categories filtered by the search criteria if one is supplied. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- **/ - @GetMapping(path = "/{guid}/categories") - public SubjectAreaOMASAPIResponse getCategoryChildren(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - - return restAPI.getCategoryChildren(serverName, userId, guid, searchCriteria, exactValue, ignoreCase, startingFrom, pageSize); - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewConfigRESTResource.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewConfigRESTResource.java deleted file mode 100644 index 35c175e8c43..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewConfigRESTResource.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.server; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewConfigRESTServices; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -/** - * The GlossaryAuthorRESTServicesInstance provides the org.odpi.openmetadata.viewservices.glossaryauthor.server implementation of the Glossary Author Open Metadata - * View Service (OMVS) for glossaries. This interface provides glossary authoring interfaces for subject area experts. - */ - -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/configs") - -@Tag(name="View Server: Glossary Author OMVS", description="Glossary Author OMVS supports subject matter experts who are documenting their knowledge in a glossary.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/glossary-author/overview/")) - -public class GlossaryAuthorViewConfigRESTResource -{ - - private final GlossaryAuthorViewConfigRESTServices restAPI = new GlossaryAuthorViewConfigRESTServices(); - - - /** - * Default constructor - */ - public GlossaryAuthorViewConfigRESTResource() { - } - - - /** - * Get a config. - * - * @param serverName local UI server name - * @param userId userid - * @param guid identifier of the configuration to get - * @return response which when successful contains the config - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
- */ - @GetMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse getGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getConfig(serverName, userId, guid); - - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewGlossaryRESTResource.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewGlossaryRESTResource.java deleted file mode 100644 index 7b470c98e69..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewGlossaryRESTResource.java +++ /dev/null @@ -1,423 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.server; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.BreadCrumb; -import org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewGlossaryRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - - -/** - * The GlossaryAuthorRESTServicesInstance provides the server implementation of the Glossary Author Open Metadata - * View Service (OMVS) for glossaries. This interface provides glossary authoring interfaces for subject area experts. - */ - -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/glossaries") - -@Tag(name="View Server: Glossary Author OMVS", description="Glossary Author OMVS supports subject matter experts who are documenting their knowledge in a glossary.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/glossary-author/overview/")) - -public class GlossaryAuthorViewGlossaryRESTResource { - - private final GlossaryAuthorViewGlossaryRESTServices restAPI = new GlossaryAuthorViewGlossaryRESTServices(); - - - /** - * Default constructor - */ - public GlossaryAuthorViewGlossaryRESTResource() { - } - - /** - * Create a Glossary. There are specializations of glossaries that can also be created using this operation. - * To create a specialization, you should specify a nodeType other than Glossary in the supplied glossary. - *

- * Valid nodeTypes for this request are: - *

    - *
  • Taxonomy to create a Taxonomy
  • - *
  • CanonicalGlossary to create a canonical glossary
  • - *
  • TaxonomyAndCanonicalGlossary to create a glossary that is both a taxonomy and a canonical glosary
  • - *
  • Glossary to create a glossary that is not a taxonomy or a canonical glossary
  • - *
- * - * @param serverName name of the local server. - * @param userId userid - * @param suppliedGlossary Glossary to create. - * @return response, when successful contains the created glossary. - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised.
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
- */ - @PostMapping() - public SubjectAreaOMASAPIResponse createGlossary(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Glossary suppliedGlossary) { - return restAPI.createGlossary(serverName, userId, suppliedGlossary); - - } - - /** - * Get a glossary. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the glossary to get - * @return response which when successful contains the glossary with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
- */ - @GetMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse getGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getGlossary(serverName, userId, guid); - - } - - /** - * Find Glossary - * - * @param serverName local UI server name - * @param userId userid - * @param searchCriteria String expression matching Glossary property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the glossaries returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * 0 means there is no limit to the page size - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of glossaries meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - @GetMapping() - public SubjectAreaOMASAPIResponse findGlossary(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") int startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.findGlossary(serverName, userId, asOfTime, searchCriteria, exactValue, ignoreCase, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Glossary relationships. The server has a maximum page size defined, the number of relationships returned is limited by that maximum page size. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the glossary to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the glossary relationships - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
- */ - @GetMapping(path = "/{guid}/relationships") - public SubjectAreaOMASAPIResponse getGlossaryRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") int startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getGlossaryRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get terms that are owned by this glossary. The server has a maximum page size defined, the number of terms returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param asOfTime the terms returned as they were at this time. null indicates at the current time. - * @param searchCriteria String expression matching child Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize Return the maximum number of elements that can be returned on this request. - * @param sequencingOrder sequencing order - * @param sequencingProperty property used for sequencing. - * @return A list of terms owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - @GetMapping(path = "/{guid}/terms") - public SubjectAreaOMASAPIResponse getGlossaryTerms(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) String sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty) { - return restAPI.getTerms(serverName, userId, guid, searchCriteria, exactValue, ignoreCase, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - - /** - * Get the Categories owned by this glossary. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the glossary to get terms - * @param searchCriteria String expression matching child Category property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the categories returned as they were at this time. null indicates at the current time. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * - * @return A list of categories owned by the glossary - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- * */ - @GetMapping(path = "/{guid}/categories") - public SubjectAreaOMASAPIResponse getGlossaryCategories(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "onlyTop", required = false, defaultValue = "true") Boolean onlyTop, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) String sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getCategories(serverName, userId, guid, searchCriteria, exactValue, ignoreCase, asOfTime, onlyTop, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Create the supplied list of Terms in the glossary, identified by the supplied guid. Each term does not need to specify a glossary. - * - * @param serverName local UI server name - * @param userId user identifier - * @param guid guid of the glossary under which the Terms will be created - * @param terms terms to create - * @return a response which when successful contains a list of the responses from the Term creates (successful or otherwise). The order of the responses is the same as the supplied terms order. - * - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
- */ - @PostMapping(path = "/{guid}/terms") - public SubjectAreaOMASAPIResponse> createMultipleTermsInAGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Term[] terms - ) { - return restAPI.createMultipleTermsInAGlossary(serverName, userId, guid, terms); - } - /** - * Get BreadCrumbTrail. - * - * The user interface experience can start with a particular Glossary, navigate to a child Category, then to another child category then to a categories term. - * When such a user interface navigation occurs, it is helpful for the user to be displayed a 'breadcrumb' trail of where they have been, showing how nested they are in - * the glossary artifacts. The Get BreadcrumbTrail API returns information that allows the user interface to easy construct a trail of breadcrumbs. - * Each breadcrumb contains - *
    - *
  • a displayName that is intended to be shown to the user
  • - *
  • a guid that uniquely identifies a breadcrumb but is not intended to be shown to the user
  • - *
  • a types, allowing the user interface to display an appropriate icon. - *
  • a path that can be used to determine all the elements in the breadcrumb
  • - *
- * @param serverName local UI server name - * @param userId user identifier - * @param guid Glossary guid. - * @param rootCategoryGuid root Category guid. If specified, the Category with this guid must reside in the supplied glossary - * @param leafCategoryGuid leaf Category guid. if specified, the Category with this guid must reside in the hierarchy under the root Category - * @param termGuid Term guid. If specified, the Term with this guid must be categorised by the rootCategory or the leafCategory if there is one, or if there are no categories owned by the Glossary. - * @return a response which when successful contains a list of breadcrumbs corresponding to the supplied guids. - * - * when not successful the following Exception responses can occur - *
    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
- */ - @GetMapping(path = "/{guid}/breadcrumbs") - public SubjectAreaOMASAPIResponse getBreadCrumbTrail( - @PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "rootCategoryGuid", required = false) String rootCategoryGuid, - @RequestParam(value = "leafCategoryGuid", required = false) String leafCategoryGuid, - @RequestParam(value = "termGuid", required = false) String termGuid) { - return restAPI.getBreadCrumbTrail( - serverName, - userId, - guid, - rootCategoryGuid, - leafCategoryGuid, - termGuid); - } - - /** - * Update a Glossary - *

- * If the caller has chosen to incorporate the glossary name in their Glossary Terms or Categories qualified name, renaming the glossary will cause those - * qualified names to mismatch the Glossary name. - * If the caller has chosen to incorporate the glossary qualifiedName in their Glossary Terms or Categories qualified name, changing the qualified name of the glossary will cause those - * qualified names to mismatch the Glossary name. - * Status is not updated using this call. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the glossary to update - * @param suppliedGlossary glossary to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated glossary - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service.
  • - *
- */ - @PutMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse updateGlossary( - @PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestBody Glossary suppliedGlossary, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - - return restAPI.updateGlossary(serverName, userId, guid, suppliedGlossary, isReplace); - - - } - - /** - * Delete a Glossary instance - *

- * The deletion of a glossary is only allowed if there is no glossary content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the glossary instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the glossary will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the glossary to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service. There is a problem retrieving properties from the metadata repository.
  • - *
  • EntityNotDeletedException a soft delete was issued but the glossary was not deleted.
  • - *
  • EntityNotPurgedException a hard delete was issued but the glossary was not purged
  • - *
- */ - @DeleteMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse deleteGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteGlossary(serverName, userId, guid); - } - - /** - * Restore a Glossary - *

- * Restore allows the deleted Glossary to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the glossary to restore - * @return response which when successful contains the restored glossary - * when not successful the following Exception responses can occur - *

    - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata repository service. There is a problem retrieving properties from the metadata repository.
  • - *
- */ - @PostMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse restoreGlossary(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreGlossary(serverName, userId, guid); - - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewProjectRESTResource.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewProjectRESTResource.java deleted file mode 100644 index 3bbcb5f81bf..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewProjectRESTResource.java +++ /dev/null @@ -1,243 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.server; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewProjectRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - -/** - * The GlossaryAuthorRESTServicesInstance provides the org.odpi.openmetadata.viewservices.glossaryauthor.server implementation of the Glossary Author Open Metadata - * View Service (OMVS) for projects. This interface provides project authoring interfaces for subject area experts. - */ - -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/projects") - -@Tag(name="View Server: Glossary Author OMVS", description="Glossary Author OMVS supports subject matter experts who are documenting their knowledge in a glossary.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/glossary-author/overview/")) - -public class GlossaryAuthorViewProjectRESTResource { - - private GlossaryAuthorViewProjectRESTServices restAPI = new GlossaryAuthorViewProjectRESTServices(); - - - /** - * Default constructor - */ - public GlossaryAuthorViewProjectRESTResource() { - } - - - /** - * Create a Project. - *

- * Projects with the same name can be confusing. Best practise is to create projects that have unique names. - * This Create call does not police that Project names are unique. So it is possible to create projects with the same name as each other. - *

- * Projects that are created using this call will be GlossaryProjects. - * - * @param serverName name of the local server. - * @param userId userid - * @param suppliedProject Project to create. - * @return response, when successful contains the created project. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping - public SubjectAreaOMASAPIResponse createProject(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Project suppliedProject) { - return restAPI.createProject(serverName, userId, suppliedProject); - - } - - /** - * Get a project. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the project to get - * @return response which when successful contains the project with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse getProject(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getProject(serverName, userId, guid); - - } - - /** - * Find Project - * - * @param serverName local UI server name - * @param userId userid - * @param searchCriteria String expression matching Project property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the projects returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of projects meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping - public SubjectAreaOMASAPIResponse findProject(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false) Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.findProject(serverName, userId, asOfTime, searchCriteria, exactValue, ignoreCase, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Project relationships. The server has a maximum page size defined, the number of relationships returned is limited by that maximum page size. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the project to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the project relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/{guid}/relationships") - public SubjectAreaOMASAPIResponse getProjectRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false) Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.getProjectRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Update a Project - *

- * Status is not updated using this call. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the project to update - * @param suppliedProject project to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated project - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse updateProject( - @PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Project suppliedProject, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - - return restAPI.updateProject(serverName, userId, guid, suppliedProject, isReplace); - - - } - - /** - * Delete a Project instance - *

- * The deletion of a project is only allowed if there is no project content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the project instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the project will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the project to be deleted. - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse deleteProject(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid){ - return restAPI.deleteProject(serverName, userId, guid); - } - - /** - * Restore a Project - *

- * Restore allows the deleted Project to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the project to restore - * @return response which when successful contains the restored project - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse restoreProject(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreProject(serverName, userId, guid); - - } -} diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewRelationshipRESTResource.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewRelationshipRESTResource.java deleted file mode 100644 index bb5c5a8ba6a..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewRelationshipRESTResource.java +++ /dev/null @@ -1,1988 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.server; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewRelationshipRESTServices; -import org.springframework.web.bind.annotation.*; - - -/** - * The GlossaryAuthorRESTServicesInstance provides the org.odpi.openmetadata.viewservices.glossaryauthor.server implementation of the Glossary Author Open Metadata - * View Service (OMVS) for relationships. This interface provides relationship authoring interfaces for subject area experts. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/relationships") - -@Tag(name="View Server: Glossary Author OMVS", description="Glossary Author OMVS supports subject matter experts who are documenting their knowledge in a glossary.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/glossary-author/overview/")) - -public class GlossaryAuthorViewRelationshipRESTResource { - private GlossaryAuthorViewRelationshipRESTServices restAPI = new GlossaryAuthorViewRelationshipRESTServices(); - - /** - * Default constructor - */ - public GlossaryAuthorViewRelationshipRESTResource() { - //SubjectAreaRESTServicesInstance registers this omas. - } - - /** - * Create a TermHasARelationship is the relationship between a spine object and a spine attribute. - * Note that this method does not error if the relationship ends are not spine objects or spine attributes. - * This allows the user to create terms then make them spine objects and spine attributes at a later stage. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termHasARelationship the HasA relationship - * @return response, when successful contains the created TermHasARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/has-as") - public SubjectAreaOMASAPIResponse createTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - - @RequestBody HasA termHasARelationship) { - return restAPI.createTermHasARelationship(serverName, userId, termHasARelationship); - } - - /** - * Get a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HAS A relationship to get - * @return response which when successful contains the term has a relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/has-as/{guid}") - public SubjectAreaOMASAPIResponse getTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermHasARelationship(serverName, userId, guid); - } - - /** - * Update a TermHasARelationship is the relationship between a spine object and a spine attribute. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param termHasARelationship the HasA relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created TermHasARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/has-as/{guid}") - public SubjectAreaOMASAPIResponse updateTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody HasA termHasARelationship, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateTermHasARelationship(serverName, userId, guid, termHasARelationship, isReplace); - } - - /** - * Delete a Term HAS A relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the HAS A relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/has-as/{guid}") - public SubjectAreaOMASAPIResponse deleteTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteTermHasARelationship(serverName, userId, guid); - } - - /** - * Restore a has a relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/has-as/{guid}") - public SubjectAreaOMASAPIResponse restoreTermHasARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTermHasARelationship(serverName, userId, guid); - } - - /** - * Create a RelatedTerm. A Related Term is a link between two similar Terms. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param relatedTermRelationship the RelatedTerm relationship - * @return response, when successful contains the created Related Term relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/related-terms") - public SubjectAreaOMASAPIResponse createRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody RelatedTerm relatedTermRelationship) { - return restAPI.createRelatedTerm(serverName, userId, relatedTermRelationship); - } - - /** - * Get a related Term relationship. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to get - * @return response which when successful contains the related term relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/related-terms/{guid}") - public SubjectAreaOMASAPIResponse getRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getRelatedTerm(serverName, userId, guid); - } - - /** - * Update a Related Term relationship. A Related Term is a link between two similar Terms. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param relatedTermRelationship the related term relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created RelatedTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/related-terms/{guid}") - public SubjectAreaOMASAPIResponse updateRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody RelatedTerm relatedTermRelationship, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateRelatedTerm(serverName, userId, guid, relatedTermRelationship, isReplace); - } - - /** - * Delete a Related Term relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Related term relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/related-terms/{guid}") - public SubjectAreaOMASAPIResponse deleteRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteRelatedTerm(serverName, userId, guid); - } - - /** - * Restore a related Term relationship. - *

- * Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the relationship to restore - * @return response which when successful contains the restored relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/related-terms/{guid}") - public SubjectAreaOMASAPIResponse restoreRelatedTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreRelatedTerm(serverName, userId, guid); - } - - /** - * Create a synonym relationship, which is a link between glossary terms that have the same meaning. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param synonym the Synonym relationship - * @return response, when successful contains the created synonym relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/synonyms") - public SubjectAreaOMASAPIResponse createSynonym(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Synonym synonym) { - return restAPI.createSynonym(serverName, userId, synonym); - } - - /** - * Get a synonym relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the synonym relationship to get - * @return response which when successful contains the synonym relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/synonyms/{guid}") - public SubjectAreaOMASAPIResponse getSynonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getSynonym(serverName, userId, guid); - } - - /** - * Update a Synonym relationship which is a link between glossary terms that have the same meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param synonym the synonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created SynonymRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/synonyms/{guid}") - public SubjectAreaOMASAPIResponse updateSynonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Synonym synonym, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateSynonym(serverName, userId, guid, synonym, isReplace); - } - - /** - * Delete a Synonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/synonyms/{guid}") - public SubjectAreaOMASAPIResponse deleteSynonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteSynonym(serverName, userId, guid); - } - - /** - * Restore a Synonym - *

- * Restore allows the deleted Synonym to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Synonym to delete - * @return response which when successful contains the restored Synonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/synonyms/{guid}") - public SubjectAreaOMASAPIResponse restoreSynonym(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreSynonym(serverName, userId, guid); - } - - /** - * Create an antonym relationship, which is a link between glossary terms that have the opposite meaning. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param antonym the Antonym relationship - * @return response, when successful contains the created antonym relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/antonyms") - public SubjectAreaOMASAPIResponse createAntonym(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Antonym antonym) { - return restAPI.createAntonym(serverName, userId, antonym); - } - - /** - * Get a antonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the related term relationship to get - * @return response which when successful contains the antonym relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/antonyms/{guid}") - public SubjectAreaOMASAPIResponse getAntonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getAntonym(serverName, userId, guid); - } - - /** - * Update a Antonym relationship which is a link between glossary terms that have the opposite meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param antonym the antonym relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created AntonymRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/antonyms/{guid}") - public SubjectAreaOMASAPIResponse updateAntonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Antonym antonym, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateAntonym(serverName, userId, guid, antonym, isReplace); - } - - /** - * Delete a Antonym relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/antonyms/{guid}") - public SubjectAreaOMASAPIResponse deleteAntonymRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteAntonym(serverName, userId, guid); - } - - /** - * Restore a Antonym - *

- * Restore allows the deleted Antonym to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Antonym to delete - * @return response which when successful contains the restored Antonym - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/antonyms/{guid}") - public SubjectAreaOMASAPIResponse restoreAntonym(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreAntonym(serverName, userId, guid); - } - - /** - * Create a translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param translation the Translation relationship - * @return response, when successful contains the created translation relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/translations") - public SubjectAreaOMASAPIResponse createTranslation(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Translation translation) { - return restAPI.createTranslation(serverName, userId, translation); - } - - /** - * Get a translation relationshiptranslation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the translation relationship to get - * @return response which when successful contains the translation relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/translations/{guid}") - public SubjectAreaOMASAPIResponse getTranslationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTranslation(serverName, userId, guid); - } - - /** - * Update a Translation relationship translation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param translation the translation relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created TranslationRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/translations/{guid}") - public SubjectAreaOMASAPIResponse updateTranslationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Translation translation, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateTranslation(serverName, userId, guid, translation, isReplace); - } - - /** - * Delete a Translation relationshiptranslation relationship, which is a link between glossary terms to provide different natural language translation of the same concept. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/translations/{guid}") - public SubjectAreaOMASAPIResponse deleteTranslationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteTranslation(serverName, userId, guid); - } - - /** - * Restore a Translation - *

- * Restore allows the deleted Translation to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Translation to delete - * @return response which when successful contains the restored Translation - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/translations/{guid}") - public SubjectAreaOMASAPIResponse restoreTranslation(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTranslation(serverName, userId, guid); - } - - /** - * Create a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param usedInContext the UsedInContext relationship - * @return response, when successful contains the created usedInContext relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/used-in-contexts") - public SubjectAreaOMASAPIResponse createusedInContext(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody UsedInContext usedInContext) { - return restAPI.createUsedInContext(serverName, userId, usedInContext); - } - - /** - * Get a usedInContext relationship, which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the usedInContext relationship to get - * @return response which when successful contains the usedInContext relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse getUsedInContextRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getUsedInContext(serverName, userId, guid); - } - - /** - * Update a UsedInContext relationship which is a link between glossary terms, where one describes the context where the other one is valid to use. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param usedInContext the used in context relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created UsedInContextRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse updateUsedInContextRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody UsedInContext usedInContext, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateUsedInContext(serverName, userId, guid, usedInContext, isReplace); - } - - /** - * Delete a UsedInContext relationship which is a link between glossary terms, where one describes the context where the other one is valid to use. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse deleteUsedInContextRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteUsedInContext(serverName, userId, guid); - } - - /** - * Restore a UsedInContext - *

- * Restore allows the deleted UsedInContext to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the UsedInContext to delete - * @return response which when successful contains the restored UsedInContext - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/used-in-contexts/{guid}") - public SubjectAreaOMASAPIResponse restoreUsedInContext(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreUsedInContext(serverName, userId, guid); - } - - /** - * Create a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param preferredTerm the preferred term relationship - * @return response, when successful contains the created preferredTerm relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/preferred-terms") - public SubjectAreaOMASAPIResponse createPreferredTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody PreferredTerm preferredTerm) { - return restAPI.createPreferredTerm(serverName, userId, preferredTerm); - } - - /** - * Get a preferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the preferredTerm relationship to get - * @return response which when successful contains the preferredTerm relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse getPreferredTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getPreferredTerm(serverName, userId, guid); - } - - /** - * Update a PreferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param preferredTerm the preferred term relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created PreferredTermRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request. - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service. - *
  • InvalidParameterException one of the parameters is null or invalid. - *
  • UnrecognizedGUIDException the supplied guid was not recognised - *
  • ClassificationException Error processing a classification - *
  • FunctionNotSupportedException Function not supported - *
  • StatusNotSupportedException A status value is not supported - *
- */ - @PutMapping(path = "/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse updatePreferredTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody PreferredTerm preferredTerm, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updatePreferredTerm(serverName, userId, guid, preferredTerm, isReplace); - } - - /** - * Delete a PreferredTerm relationship, which is a link between glossary terms, it is a Link to an alternative term that the organization prefers is used. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse deletePreferredTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deletePreferredTerm(serverName, userId, guid); - } - - /** - * Restore a PreferredTerm - *

- * Restore allows the deleted PreferredTerm to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the PreferredTerm to delete - * @return response which when successful contains the restored PreferredTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/preferred-terms/{guid}") - public SubjectAreaOMASAPIResponse restorePreferredTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restorePreferredTerm(serverName, userId, guid); - } - - - /** - * Create a validValue relationship, which is a link between glossary terms that have the same meaning. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param validValue the ValidValue relationship - * @return response, when successful contains the created validValue relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/valid-values") - public SubjectAreaOMASAPIResponse createValidValue(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody ValidValue validValue) { - return restAPI.createValidValue(serverName, userId, validValue); - } - - /** - * Get a validValue relationship, which is a link between glossary terms that have the same meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the validValue relationship to get - * @return response which when successful contains the validValue relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/valid-values/{guid}") - public SubjectAreaOMASAPIResponse getValidValueRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getValidValue(serverName, userId, guid); - } - - /** - * Update a ValidValue relationship which is a link between glossary terms that have the same meaning - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param validValue the valid value relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created ValidValueRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/valid-values/{guid}") - public SubjectAreaOMASAPIResponse updateValidValueRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody ValidValue validValue, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateValidValue(serverName, userId, guid, validValue, isReplace); - } - - - /** - * Delete a ValidValue relationship - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/valid-values/{guid}") - public SubjectAreaOMASAPIResponse deleteValidValueRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteValidValue(serverName, userId, guid); - } - - /** - * Restore a ValidValue - *

- * Restore allows the deleted ValidValue to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ValidValue to delete - * @return response which when successful contains the restored ValidValue - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/valid-values/{guid}") - public SubjectAreaOMASAPIResponse restoreValidValue(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreValidValue(serverName, userId, guid); - } - - /** - * Create a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param replacementTerm the ReplacementTerm relationship - * @return response, when successful contains the created replacementTerm relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/replacement-terms") - public SubjectAreaOMASAPIResponse createReplacementTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody ReplacementTerm replacementTerm) { - return restAPI.createReplacementTerm(serverName, userId, replacementTerm); - } - - /** - * Get a replacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the replacementTerm relationship to get - * @return response which when successful contains the replacementTerm relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse getReplacementTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getReplacementTerm(serverName, userId, guid); - } - - /** - * Update a ReplacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param replacementTerm the replacement term relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created ReplacementTermRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse updateReplacementTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody ReplacementTerm replacementTerm, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateReplacementTerm(serverName, userId, guid, replacementTerm, isReplace); - } - - /** - * Delete a ReplacementTerm relationship, which is a link to a glossary term that is replacing an obsolete glossary term. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse deleteReplacementTermRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteReplacementTerm(serverName, userId, guid); - } - - /** - * Restore a ReplacementTerm - *

- * Restore allows the deleted ReplacementTerm to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ReplacementTerm to delete - * @return response which when successful contains the restored ReplacementTerm - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/replacement-terms/{guid}") - public SubjectAreaOMASAPIResponse restoreReplacementTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreReplacementTerm(serverName, userId, guid); - } - - /** - * Create a termTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termTYPEDBYRelationship the TermTYPEDBYRelationship relationship - * @return response, when successful contains the created termTYPEDBYRelationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/typed-bys") - public SubjectAreaOMASAPIResponse createtermTYPEDBYRelationship(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody TypedBy termTYPEDBYRelationship) { - return restAPI.createTermTYPEDBYRelationship(serverName, userId, termTYPEDBYRelationship); - } - - /** - * Get a termTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termTYPEDBYRelationship relationship to get - * @return response which when successful contains the termTYPEDBYRelationship relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse getTYPEDBYRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermTYPEDBYRelationship(serverName, userId, guid); - } - - /** - * Update a TermTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param termTYPEDBYRelationship the typed by relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created TermTYPEDBYRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse updateTermTYPEDBYRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody TypedBy termTYPEDBYRelationship, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateTermTYPEDBYRelationship(serverName, userId, guid, termTYPEDBYRelationship, isReplace); - } - - /** - * Delete a TermTYPEDBYRelationship relationship, which is a link between a spine attribute and its type. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermTYPEDBYRelationship relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse deleteTypedByRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - - ) { - return restAPI.deleteTermTYPEDBYRelationship(serverName, userId, guid); - } - - /** - * Restore a Term TYPED BY relationship - *

- * Restore allows the deleted TermTYPEDBY to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermTYPEDBY to delete - * @return response which when successful contains the restored TermTYPEDBY - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/typed-bys/{guid}") - public SubjectAreaOMASAPIResponse restoreTermTYPEDBYRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTermTYPEDBYRelationship(serverName, userId, guid); - } - - /** - * Create a iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param iSARelationship the IsARelationship relationship - * @return response, when successful contains the created iSARelationship relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/is-as") - public SubjectAreaOMASAPIResponse createiSARelationship(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody IsA iSARelationship) { - return restAPI.createIsaRelationship(serverName, userId, iSARelationship); - } - - /** - * Get a iSARelationship relationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the iSARelationship relationship to get - * @return response which when successful contains the iSARelationship relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/is-as/{guid}") - public SubjectAreaOMASAPIResponse getIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getIsARelationship(serverName, userId, guid); - } - - /** - * Update a IsARelationship relationship, which is a link between a more general glossary term and a more specific definition. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param isa the is-a relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created IsARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/is-as/{guid}") - public SubjectAreaOMASAPIResponse updateIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody IsA isa, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateIsARelationship(serverName, userId, guid, isa, isReplace); - } - - /** - * Delete a IsARelationship relationship, which is a link between a more general glossary term and a more specific definition. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsARelationship relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/is-as/{guid}") - public SubjectAreaOMASAPIResponse deleteTermIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteIsARelationship(serverName, userId, guid); - } - - /** - * Restore a Isa Relationship - *

- * Restore allows the deleted Isa Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Isa Relationship to delete - * @return response which when successful contains the restored IsaRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/is-as/{guid}") - public SubjectAreaOMASAPIResponse restoreIsaRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreIsARelationship(serverName, userId, guid); - } - - - /** - * Create a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - * - *

- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param TermIsATypeOfDeprecated the TermIsATypeOfDeprecated relationship - * @return response, when successful contains the created TermIsATypeOfDeprecated relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/is-a-type-of-deprecateds") - public SubjectAreaOMASAPIResponse createTermIsATypeOfDeprecated(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody IsATypeOfDeprecated TermIsATypeOfDeprecated) { - return restAPI.createTermIsATypeOfDeprecated(serverName, userId, TermIsATypeOfDeprecated); - } - - /** - * Get a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermIsATypeOfDeprecated relationship to get - * @return response which when successful contains the TermIsATypeOfDeprecated relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse getTermIsATypeOfDeprecated(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermIsATypeOfDeprecated(serverName, userId, guid); - } - - /** - * Update a TermIsATypeOfDeprecated relationship, which is an inheritance relationship between two spine objects. - *

- * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param isatypeof the is-a-type-of relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created IsARelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse updateIsARelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody IsATypeOfDeprecated isatypeof, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateTermIsATypeOfDeprecated(serverName, userId, guid, isatypeof, isReplace); - } - - - /** - * Delete a TermIsATypeOf Relationship relationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermIsATypeOfDeprecated relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse deleteTermIsATypeOfDeprecated(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteTermIsATypeOfDeprecated(serverName, userId, guid); - } - - /** - * Restore a TermIsATypeOf Relationship relationship, which is an inheritance relationship between two spine objects. - * @deprecated IsATypeOfRelationship it is deprecated; move your instances to use IsATypeOf instead. - *

- * Restore allows the deleted Is a Type Of Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Term Is a Type Of Relationship to delete - * @return response which when successful contains the restored TermIsATypeOfDeprecated - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - - @PostMapping(path = "/is-a-type-of-deprecateds/{guid}") - public SubjectAreaOMASAPIResponse restoreTermIsATypeOfDeprecated(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTermIsATypeOfDeprecated(serverName, userId, guid); - } - - /** - * Create a IsATypeOf Relationship relationship, which is an inheritance relationship between two spine objects. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param IsATypeOf the IsATypeOf relationship - * @return response, when successful contains the created IsATypeOf relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • UnrecognizedGUIDException the supplied guid was not recognised
  • - *
  • ClassificationException Error processing a classification.
  • - *
  • StatusNotSupportedException A status value is not supported.
  • - *
  • FunctionNotSupportedException Function not supported.
  • - *
- */ - @PostMapping(path = "/is-a-type-ofs") - public SubjectAreaOMASAPIResponse createIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody IsATypeOf IsATypeOf) { - return restAPI.createIsATypeOf(serverName, userId, IsATypeOf); - } - - - /** - * Get a IsATypeOf Relationship, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf Relationship to get - * @return response which when successful contains the IsATypeOf Relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse getIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getIsATypeOf(serverName, userId, guid); - } - - /** - * Update a IsATypeOf Relationship, which is an inheritance relationship between two spine objects. - *

- * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the relationship - * @param IsATypeOf the IsATypeOfs relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created IsATypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse updateIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody IsATypeOf IsATypeOf, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateIsATypeOf(serverName, userId, guid, IsATypeOf, isReplace); - } - - - /** - * Delete a IsATypeOf, which is an inheritance relationship between two spine objects. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the IsATypeOf Relationship relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse deleteIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteIsATypeOf(serverName, userId, guid); - } - - /** - * Restore a 'IsATypeOf' Relationship - * - *

- * Restore allows the deleted 'IsATypeOf' Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Term 'IsATypeOf' Relationship to delete - * @return response which when successful contains the restoredIsATypeOf - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - - - @PostMapping(path = "/is-a-type-ofs/{guid}") - public SubjectAreaOMASAPIResponse restoreIsATypeOf(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreIsATypeOf(serverName, userId, guid); - } - - /** - * Create a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param termCategorizationRelationship the TermCategorization Relationship - * @return response, when successful contains the created termCategorization Relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/term-categorizations") - public SubjectAreaOMASAPIResponse createTermCategorization(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Categorization termCategorizationRelationship) { - return restAPI.createTermCategorization(serverName, userId, termCategorizationRelationship); - } - - /** - * Get a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termCategorization Relationship to get - * @return response which when successful contains the termCategorization Relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse getTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermCategorization(serverName, userId, guid); - } - - /** - * Update a termCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param categorization the categorization relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created termCategorization Relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse updateTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Categorization categorization, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateTermCategorization(serverName, userId, guid, categorization, isReplace); - } - - - /** - * Delete a TermCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the TermCategorization Relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse deleteTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteTermCategorization(serverName, userId, guid); - } - - /** - * Restore a TermCategorization Relationship. A relationship between a Category and a Term. This relationship allows terms to be categorized. - *

- * Restore allows the deleted TermCategorization Relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Term Is a Type Of Relationship to delete - * @return response which when successful contains the restored TermCategorization - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/term-categorizations/{guid}") - public SubjectAreaOMASAPIResponse restoreTermCategorizationRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTermCategorization(serverName, userId, guid); - } - - /** - * Get a termAnchor Relationship. A relationship between a Glossary and a Term. This relationship allows terms to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the termAnchor Relationship to get - * @return response which when successful contains the termAnchor Relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/term-anchors/{guid}") - public SubjectAreaOMASAPIResponse getTermAnchorRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTermAnchor(serverName, userId, guid); - - } - - /** - * Get a categoryAnchor Relationship. A relationship between a Glossary and a Category. This relationship allows terms to be owned by a Glossary. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the categoryAnchor Relationship to get - * @return response which when successful contains the categoryAnchor Relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/category-anchors/{guid}") - public SubjectAreaOMASAPIResponse getCategoryAnchorRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getCategoryAnchor(serverName, userId, guid); - } - - /** - * Create a project scope relationship, which is a link between the project content and the project. - * - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param projectScope the Project scope relationship - * @return response, when successful contains the created project scope relationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/project-scopes") - public SubjectAreaOMASAPIResponse createProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody ProjectScope projectScope) { - return restAPI.createProjectScope(serverName, userId, projectScope); - } - - /** - * Get a project scope relationship, which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the project scope relationship to get - * @return response which when successful contains the project scope relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse getProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getProjectScope(serverName, userId, guid); - } - - /** - * Update a Project scope relationship which is a link between the project content and the project. - *

- * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid unique identifier of the Relationship - * @param projectScope the projectScope relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the created ProjectScopeRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse updateProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody ProjectScope projectScope, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - return restAPI.updateProjectScope(serverName, userId, guid, projectScope, isReplace); - } - - /** - * Delete a Project scope relationship which is a link between the project content and the project. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the Project scope relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse deleteProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteProjectScope(serverName, userId, guid); - } - - /** - * Restore a ProjectScope, which is a link between the project content and the project. - *

- * Restore allows the deleted ProjectScopeRelationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the ProjectScopeRelationship to delete - * @return response which when successful contains the restored ProjectScopeRelationship - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/project-scopes/{guid}") - public SubjectAreaOMASAPIResponse restoreProjectScopeRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreProjectScope(serverName, userId, guid); - } - - /** - * Get a SemanticAssignment relationship, Links a glossary term to another element such as an asset or schema element to define its meaning. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the SemanticAssignment relationship to get - * @return response which when successful contains the SemanticAssignment relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/semantic-assignments/{guid}") - public SubjectAreaOMASAPIResponse getSemanticAssignmentRelationship(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getSemanticAssignmentRelationship(serverName, userId, guid); - } - /** - * Create a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @return response, when successful contains the created categoryHierarchyLink relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/category-hierarchy-links") - public SubjectAreaOMASAPIResponse createCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody CategoryHierarchyLink categoryHierarchyLink) { - return restAPI.createCategoryHierarchyLink(serverName, userId, categoryHierarchyLink); - } - - /** - * Get a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to get - * @return response which when successful contains the CategoryHierarchyLink relationship with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/category-hierarchy-links/{guid}") - public SubjectAreaOMASAPIResponse getCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getCategoryHierarchyLink(serverName, userId, guid); - } - - /** - * Update a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId userId under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship - * @param categoryHierarchyLink the CategoryHierarchyLink relationship - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return response, when successful contains the updated categoryHierarchyLink - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/category-hierarchy-links/{guid}") - public SubjectAreaOMASAPIResponse updateCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody CategoryHierarchyLink categoryHierarchyLink, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace - ) { - return restAPI.updateCategoryHierarchyLink(serverName, userId, guid, categoryHierarchyLink, isReplace); - } - - /** - * Delete a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink relationship to delete - * - * @return response for a soft delete the response contains the deleted relationship - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/category-hierarchy-links/{guid}") - public SubjectAreaOMASAPIResponse deleteCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteCategoryHierarchyLink(serverName, userId, guid); - } - - /** - * Restore a CategoryHierarchyLink Relationship. A relationship between two categories used to create nested categories. - *

- * Restore allows the deleted CategoryHierarchyLink Relationship to be made active again. Restore allows deletes to be undone. - * Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the CategoryHierarchyLink Relationship to delete - * @return response which when successful contains the restored CategoryHierarchyLink - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/category-hierarchy-links/{guid}") - public SubjectAreaOMASAPIResponse restoreCategoryHierarchyLink(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreCategoryHierarchyLink(serverName, userId, guid); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewTermRESTResource.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewTermRESTResource.java deleted file mode 100644 index e6830cb1ccb..00000000000 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/server/GlossaryAuthorViewTermRESTResource.java +++ /dev/null @@ -1,273 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria term. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.server; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewTermRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Date; - -/** - * The GlossaryAuthorRESTServicesInstance provides the server implementation of the Glossary Author Open Metadata - * View Service (OMVS) for terms. This interface provides term authoring interfaces for subject area experts. - */ - -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/terms") - -@Tag(name="View Server: Glossary Author OMVS", description="Glossary Author OMVS supports subject matter experts who are documenting their knowledge in a glossary.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/glossary-author/overview/")) - -public class GlossaryAuthorViewTermRESTResource { - - private GlossaryAuthorViewTermRESTServices restAPI = new GlossaryAuthorViewTermRESTServices(); - - - /** - * Default constructor - */ - public GlossaryAuthorViewTermRESTResource() { - } - - - /** - * Create a Term. - *

- * Terms with the same name can be confusing. Best practise is to create terms that have unique names. - * This Create call does not police that Term names are unique. So it is possible to create terms with the same name as each other. - * - * @param serverName name of the local server. - * @param userId userid - * @param suppliedTerm Term to create. - * @return response, when successful contains the created term. - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping() - public SubjectAreaOMASAPIResponse createTerm(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody Term suppliedTerm) { - return restAPI.createTerm(serverName, userId, suppliedTerm); - - } - - /** - * Get a term. The server has a maximum page size defined, the number of categories (a field of Term) returned is limited by that maximum page size. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the term to get - * @return response which when successful contains the term with the requested guid - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse getTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.getTerm(serverName, userId, guid); - - } - - /** - * Find Term - * - * @param serverName local UI server name - * @param userId userid - * @param searchCriteria String expression matching Term property values. - * @param exactValue a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned. - * @param ignoreCase a boolean, which when set means that case will be ignored, if not set that case will be respected - * @param asOfTime the terms returned as they were at this time. null indicates at the current time. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return A list of terms meeting the search Criteria - * - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping() - public SubjectAreaOMASAPIResponse findTerm(@PathVariable String serverName, @PathVariable String userId, - @RequestParam(value = "searchCriteria", required = false) String searchCriteria, - @RequestParam(value = "exactValue", required = false, defaultValue = "false") Boolean exactValue, - @RequestParam(value = "ignoreCase", required = false, defaultValue = "true") Boolean ignoreCase, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false) Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - ) { - return restAPI.findTerm(serverName, userId, asOfTime, searchCriteria, exactValue, ignoreCase, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Get Term relationships. The server has a maximum page size defined, the number of relationships returned is limited by that maximum page size. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the term to get - * @param asOfTime the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00. - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * beyond the first page of results. Zero means the results start from the first element. - * @param pageSize the maximum number of elements that can be returned on this request. - * @param sequencingOrder the sequencing order for the results. - * @param sequencingProperty the name of the property that should be used to sequence the results. - * @return a response which when successful contains the term relationships - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "/{guid}/relationships") - public SubjectAreaOMASAPIResponse getTermRelationships(@PathVariable String serverName, @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "asOfTime", required = false) Date asOfTime, - @RequestParam(value = "startingFrom", required = false) Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize, - @RequestParam(value = "sequencingOrder", required = false) SequencingOrder sequencingOrder, - @RequestParam(value = "sequencingProperty", required = false) String sequencingProperty - - ) { - return restAPI.getTermRelationships(serverName, userId, guid, asOfTime, startingFrom, pageSize, sequencingOrder, sequencingProperty); - } - - /** - * Update a Term - *

- * Status is not updated using this call. - * The Categories categorising this Term can be amended using this call. For an update (rather than a replace) with no categories supplied, no changes are made to the categories; otherwise the - * supplied categories will replace the existing ones. The server has a maximum page size defined, the number of categories returned is limited by that maximum page size. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the term to update - * @param suppliedTerm term to update - * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. - * @return a response which when successful contains the updated term - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PutMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse updateTerm( - @PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestBody Term suppliedTerm, - @RequestParam(value = "isReplace", required = false, defaultValue = "false") Boolean isReplace) { - - return restAPI.updateTerm(serverName, userId, guid, suppliedTerm, isReplace); - - - } - - /** - * Delete a Term instance - *

- * The deletion of a term is only allowed if there is no term content (i.e. no terms or categories). - *

- * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support - * is optional. - *

- * A soft delete means that the term instance will exist in a deleted state in the repository after the delete operation. This means - * that it is possible to undo the delete. - * A hard delete means that the term will not exist after the operation. - * when not successful the following Exceptions can occur - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the term to be deleted. - * - * @return a void response - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @DeleteMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse deleteTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid - ) { - return restAPI.deleteTerm(serverName, userId, guid); - } - - /** - * Restore a Term - *

- * Restore allows the deleted Term to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored. - * - * @param serverName local UI server name - * @param userId userid - * @param guid guid of the term to restore - * @return response which when successful contains the restored term - * when not successful the following Exception responses can occur - *

    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @PostMapping(path = "/{guid}") - public SubjectAreaOMASAPIResponse restoreTerm(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid) { - return restAPI.restoreTerm(serverName, userId, guid); - - } - /** - * Get the Categories categorizing this Term. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size. - * - * @param serverName serverName under which this request is performed, this is used in multi tenanting to identify the tenant - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid guid of the category to get terms - * @param startingFrom the starting element number for this set of results. This is used when retrieving elements - * @param pageSize the maximum number of elements that can be returned on this request. - * @return A list of categories categorizing this Term - * when not successful the following Exception responses can occur - *
    - *
  • UserNotAuthorizedException the requesting user is not authorized to issue this request.
  • - *
  • InvalidParameterException one of the parameters is null or invalid.
  • - *
  • PropertyServerException Property server exception.
  • - *
- */ - @GetMapping(path = "{guid}/categories") - public SubjectAreaOMASAPIResponse getTermCategories(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String guid, - @RequestParam(value = "startingFrom", required = false, defaultValue = "0") Integer startingFrom, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - - return restAPI.getCategories(serverName, userId, guid, startingFrom, pageSize); - } -} diff --git a/open-metadata-implementation/view-services/rex-view/README.md b/open-metadata-implementation/view-services/rex-view/README.md deleted file mode 100644 index c2020613644..00000000000 --- a/open-metadata-implementation/view-services/rex-view/README.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -![Technical Preview](../../../images/egeria-content-status-tech-preview.png) - -# Repository Explorer View Service - -The Repository Explorer (Rex) View Service is an Integration View Service that supports Repository Explorer UI operations -that retrieve metadata type and instance information from metadata repositories. - -The purpose of this interface is to enable a technical user (such as an Enterprise Architect) to -retrieve metadata instances from repositories and explore the connectivity of those instances to other metadata objects. -The interface enables retrieval and search and the construction of a visualization of a graph of connected objects. - -This view service calls a remote server using the [repository services client](../../repository-services/repository-services-client/README.md). - - -The module structure for the Repository Explorer OMVS is as follows: - -* [rex-view-api](rex-view-api) defines the interface to the view service. -* [rex-view-server](rex-view-server) supports an implementation of the view service. -* [rex-view-spring](rex-view-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - -Return to [open-metadata-implementation](../..). - ----- -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/view-services/rex-view/rex-view-api/README.md b/open-metadata-implementation/view-services/rex-view/rex-view-api/README.md deleted file mode 100644 index 7552ee2367a..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Repository Explorer Open Metadata View Service (OMVS) api definitions - -The Repository Explorer OMVS api support is organized in the following top level packages - -* ffdc - audit log and error log definitions -* properties - types used by the API -* rest - request body and response body definitions for REST calls - ----- -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/view-services/rex-view/rex-view-api/build.gradle b/open-metadata-implementation/view-services/rex-view/rex-view-api/build.gradle deleted file mode 100644 index b6e77508b10..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation 'org.slf4j:slf4j-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexExceptionHandler.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexExceptionHandler.java deleted file mode 100644 index 3edea29954b..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexExceptionHandler.java +++ /dev/null @@ -1,281 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.ffdc; - -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityProxyOnlyException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; - -public class RexExceptionHandler { - - - /** - * Method for capturing an exception into a REST response. - * - * Set the exception information into the response. - * This exception capture handler strips off the messageId from the front of the message as - * the message is intended for user-consumption. - * - * @param response REST Response - * @param error returned response. - * @param exceptionClassName class name of the exception to recreate - */ - public static void captureCheckedException(FFDCResponse response, - OCFCheckedExceptionBase error, - String exceptionClassName) - - { - response.setRelatedHTTPCode(error.getReportedHTTPCode()); - response.setExceptionClassName(exceptionClassName); - if (error.getReportedCaughtException() != null) - { - response.setExceptionCausedBy(error.getReportedCaughtException().getClass().getName()); - } - response.setActionDescription(error.getReportingActionDescription()); - String fullErrorMessage = error.getReportedErrorMessage(); - String errorMessageId = error.getReportedErrorMessageId(); - String trimmedErrorMessage = fullErrorMessage.substring(errorMessageId.length()+1); - response.setExceptionErrorMessage(trimmedErrorMessage); - response.setExceptionErrorMessageId(error.getReportedErrorMessageId()); - response.setExceptionErrorMessageParameters(error.getReportedErrorMessageParameters()); - response.setExceptionSystemAction(error.getReportedSystemAction()); - response.setExceptionUserAction(error.getReportedUserAction()); - response.setExceptionProperties(null); - } - - - /* - * Mapping functions for OMRS (back-end) repository services exceptions - */ - - public static RexViewServiceException mapOMRSUserNotAuthorizedException(String className, - String methodName, - UserNotAuthorizedException repositoryException) - { - String userId = repositoryException.getUserId(); - return new RexViewServiceException(RexViewErrorCode.USER_NOT_AUTHORIZED.getMessageDefinition(userId), - className, - methodName); - } - - public static RexViewServiceException mapOMRSRepositoryErrorException(String className, - String methodName, - RepositoryErrorException repositoryException) - { - - String serverName; - String reportedErrorMessageId = repositoryException.getReportedErrorMessageId(); - if (reportedErrorMessageId != null) - { - switch (reportedErrorMessageId) - { - case "OMAG-MULTI-TENANT-404-001": // platform is contactable, but repository server is not available - serverName = repositoryException.getReportedErrorMessageParameters()[0]; - return new RexViewServiceException(RexViewErrorCode.REPOSITORY_NOT_AVAILABLE.getMessageDefinition(methodName, serverName), - className, - methodName); - - case "OMRS-REST-API-503-006": // platform is not contactable, suspect wrong platform URL - serverName = repositoryException.getReportedErrorMessageParameters()[1]; - return new RexViewServiceException(RexViewErrorCode.PLATFORM_NOT_AVAILABLE.getMessageDefinition(methodName, serverName), - className, - methodName); - } - } - - /* - * This is a non-specific repository error - so just pass on the message from the original exception - */ - String message = repositoryException.getReportedErrorMessage(); - return new RexViewServiceException(RexViewErrorCode.REPOSITORY_ERROR.getMessageDefinition(methodName, message), - className, - methodName); - - - } - - public static RexViewServiceException mapOMRSInvalidParameterException(String className, String methodName, InvalidParameterException repositoryException) - { - String parameterName = repositoryException.getReportedErrorMessageParameters()[0]; - if (parameterName.equals("searchCriteria")) - parameterName = "Search Text"; - return new RexViewServiceException(RexViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, parameterName), - className, - methodName); - } - - public static RexViewServiceException mapOMRSEntityNotKnownException(String className, - String methodName, - String repositoryServerName, - boolean enterpriseOption, - EntityNotKnownException repositoryException) - { - String entityGUID = repositoryException.getReportedErrorMessageParameters()[0]; - if (! enterpriseOption) - { - /* - * Because this was a non-enterprise operation extract the server from the exception. - * It should be identical to the repositoryServerName parameter passed by the caller, but - * it's better to present the actual source of the exception. - */ - String reportingServerName = repositoryException.getReportedErrorMessageParameters()[3]; - return new RexViewServiceException(RexViewErrorCode.ENTITY_NOT_KNOWN_IN_REPOSITORY.getMessageDefinition(methodName, entityGUID, reportingServerName), - className, - methodName); - } - else - { - /* Because this was for an enterprise retrieval, do not rely on the server name in the exception - it - * could be from any of the repository servers that responded. Instead, use the repositoryServerName - * parameter from the caller. - */ - return new RexViewServiceException(RexViewErrorCode.ENTITY_NOT_KNOWN_IN_ENTERPRISE.getMessageDefinition(methodName, entityGUID, repositoryServerName), - className, - methodName); - } - } - - public static RexViewServiceException mapOMRSEntityProxyOnlyException(String className, - String methodName, - EntityProxyOnlyException repositoryException) - { - /* - * The positional parameters to this exception's message vary depending on which - * connector raised the original error code. Rather than trying to unpick this - * just include the original exception's formatted message. - */ - String exceptionMessage = repositoryException.getReportedErrorMessage(); - return new RexViewServiceException(RexViewErrorCode.ENTITY_PROXY_ONLY.getMessageDefinition(methodName, exceptionMessage), - className, - methodName); - } - public static RexViewServiceException mapOMRSEntityHistoricalNotSupportedException(String className, - String methodName, - FunctionNotSupportedException repositoryException) - { - /* - * The positional parameters to this exception's message vary depending on which - * connector raised the original error code. Rather than trying to unpick this - * just include the original exception's formatted message. - */ - String exceptionMessage = repositoryException.getReportedErrorMessage(); - return new RexViewServiceException(RexViewErrorCode.HISTORICAL_FUNCTION_NOT_SUPPORTED.getMessageDefinition(methodName, exceptionMessage), - className, - methodName); - } - - - public static RexViewServiceException mapOMRSRelationshipNotKnownException(String className, - String methodName, - String repositoryServerName, - boolean enterpriseOption, - RelationshipNotKnownException repositoryException) - { - String relationshipGUID = repositoryException.getReportedErrorMessageParameters()[0]; - if (! enterpriseOption) - { - /* - * Because this was a non-enterprise operation extract the server from the exception. - * It should be identical to the repositoryServerName parameter passed by the caller, but - * it's better to present the actual source of the exception. - */ - String reportingServerName = repositoryException.getReportedErrorMessageParameters()[2]; - return new RexViewServiceException(RexViewErrorCode.RELATIONSHIP_NOT_KNOWN_IN_REPOSITORY.getMessageDefinition(methodName, - relationshipGUID, - reportingServerName), - className, - methodName); - } - else - { - /* Because this was for an enterprise retrieval, do not rely on the server name in the exception - it - * could be from any of the repository servers that responded. Instead, use the repositoryServerName - * parameter from the caller. - */ - return new RexViewServiceException(RexViewErrorCode.RELATIONSHIP_NOT_KNOWN_IN_ENTERPRISE.getMessageDefinition(methodName, - relationshipGUID, - repositoryServerName), - className, - methodName); - } - } - - - - public static RexViewServiceException mapOMRSTypeErrorException(String className, String methodName, TypeErrorException repositoryException) - { - /* - * In the case of a PagingErrorException just wrap the existing message - */ - String exceptionMessage = repositoryException.getReportedErrorMessage(); - return new RexViewServiceException(RexViewErrorCode.TYPE_ERROR.getMessageDefinition(methodName, exceptionMessage), - className, - methodName); - } - - public static RexViewServiceException mapOMRSPropertyErrorException(String className, String methodName, PropertyErrorException repositoryException) - { - /* - * In the case of a PropertyErrorException there are many variations arising from different - * error codes. These include at least the following: - * BAD_PROPERTY_FOR_TYPE - * NO_PROPERTIES_FOR_TYPE - * BAD_PROPERTY_TYPE - * NULL_PROPERTY_NAME_FOR_INSTANCE - * NULL_PROPERTY_VALUE_FOR_INSTANCE - * NULL_PROPERTY_TYPE_FOR_INSTANCE - * NO_NEW_PROPERTIES - * BAD_PROPERTY_FOR_TYPE - * BAD_PROPERTY_FOR_INSTANCE - * NULL_PROPERTY_NAME - * and more... - * - * Rather than attempting to cover them all and pick the salient parameters - * out of their varying positions in the message parameters list, it is preferred to simply - * include the message from the original exception - which wll have been quite comprehensively - * formatted with a mixture of repository, category, type, property name, value, etc. - * - * To achieve this, the Rex error code for a property exception is very simple and accepts - * the original message. - */ - String exceptionMessage = repositoryException.getReportedErrorMessage(); - return new RexViewServiceException(RexViewErrorCode.PROPERTY_ERROR.getMessageDefinition(methodName, exceptionMessage), - className, - methodName); - } - - - public static RexViewServiceException mapOMRSPagingErrorException(String className, String methodName, PagingErrorException repositoryException) - { - /* - * In the case of a PagingErrorException just wrap the existing message - */ - String exceptionMessage = repositoryException.getReportedErrorMessage(); - return new RexViewServiceException(RexViewErrorCode.PAGING_ERROR.getMessageDefinition(methodName, exceptionMessage), - className, - methodName); - } - - - public static RexViewServiceException mapOMRSFunctionNotSupportedException(String className, String methodName, FunctionNotSupportedException repositoryException) - { - String repositoryName = repositoryException.getReportedErrorMessageParameters()[2]; - return new RexViewServiceException(RexViewErrorCode.FUNCTION_NOT_SUPPORTED_ERROR.getMessageDefinition(methodName, repositoryName ), - className, - methodName); - } - - - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewAuditCode.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewAuditCode.java deleted file mode 100644 index 792421ab81d..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewAuditCode.java +++ /dev/null @@ -1,168 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.ffdc; - - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - - -/** - * The RexAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *
    - *
  • Log Message Id - 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 RexViewAuditCode implements AuditLogMessageSet -{ - /** - * OMVS-REPOSITORY-EXPLORER-0001 - The Repository Explorer View Service (OMVS) is initializing - */ - SERVICE_INITIALIZING("OMVS-REPOSITORY-EXPLORER-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The Repository Explorer View Service (OMVS) is initializing", - "The local server is initializing the Repository Explorer OMVS. If the initialization is successful then audit message OMVS-REPOSITORY-EXPLORER-0003 will be issued, if there were errors then they should be shown in the audit log. ", - "No action is required. This is part of the normal operation of the Repository Explorer OMVS."), - - /** - * OMVS-REPOSITORY-EXPLORER-0002 - The Repository Explorer View Service (OMVS) has initialized a new instance for server {0} - */ - SERVICE_INITIALIZED("OMVS-REPOSITORY-EXPLORER-0002", - AuditLogRecordSeverityLevel.STARTUP, - "The Repository Explorer View Service (OMVS) has initialized a new instance for server {0}", - "The Repository Explorer OMVS has completed initialization. Calls will be accepted by this service, if OMRS is also configured and the view server has been started. ", - "No action is required. This is part of the normal operation of the Repository Explorer OMVS. Once the OMRS is configured and the server is started, Repository Explorer view service requests can be accepted."), - - /** - * OMVS-REPOSITORY-EXPLORER-0003 - The Repository Explorer View Service (OMVS) is shutting down - */ - SERVICE_SHUTDOWN("OMVS-REPOSITORY-EXPLORER-0003", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Repository Explorer View Service (OMVS) is shutting down", - "The local server has requested shutdown of the Repository Explorer OMVS.", - "No action is required. The operator should verify that shutdown was intended. This is part of the normal operation of the Repository Explorer OMVS."), - - /** - * OMVS-REPOSITORY-EXPLORER-0004 - The Repository Explorer View Service (OMVS) is unable to initialize a new instance; error message is {0} - */ - SERVICE_INSTANCE_FAILURE("OMVS-REPOSITORY-EXPLORER-0004", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Repository Explorer View Service (OMVS) is unable to initialize a new instance; error message is {0}", - "The view service detected an error during the start up of a specific server instance. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - - /** - * OMVS-REPOSITORY-EXPLORER-0005 - The Repository Explorer View Service (OMVS) is shutting down server instance {0} - */ - SERVICE_TERMINATING("OMVS-REPOSITORY-EXPLORER-0005", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Repository Explorer View Service (OMVS) is shutting down server instance {0}", - "The local handler has requested shut down of the Repository Explorer OMVS.", - "No action is required. This is part of the normal operation of the service."), - - /** - * OMVS-REPOSITORY-EXPLORER-0006 - The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2} - */ - UNEXPECTED_EXCEPTION("OMVS-REPOSITORY-EXPLORER-0006", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2}", - "The request returned an Exception.", - "This is probably a logic error. Review the stack trace to identify where the error " + - "occurred and work to resolve the cause.") - ; - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - - /** - * The constructor for RexViewAuditCode expects to be passed one of the enumeration rows defined in - * RexViewAuditCode above. For example: - * RexViewAuditCode auditCode = RexViewAuditCode.SERVER_NOT_AVAILABLE; - * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique identifier 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 - */ - RexViewAuditCode(String messageId, - AuditLogRecordSeverityLevel 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. - */ - 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. - */ - 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 "RexViewAuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - ", messageDefinition=" + getMessageDefinition() + - '}'; - } -} - diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewErrorCode.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewErrorCode.java deleted file mode 100644 index ea43f287a0a..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewErrorCode.java +++ /dev/null @@ -1,301 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The RexViewErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMVS - * It is used in conjunction with all OMVS 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
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: 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 user should correct the error
  • - *
- */ -public enum RexViewErrorCode implements ExceptionMessageSet -{ - SERVICE_NOT_INITIALIZED - (404, "OMVS-REPOSITORY-EXPLORER-400-001", - "The repository explorer view service has not been initialized.", - "The system is unable to perform the request because the service has not been initialized.", - "Initialize the view service retry the request."), - - INVALID_CONFIG_PROPERTY - (404, "OMVS-REPOSITORY-EXPLORER-400-002", - "The repository explorer view service configuration has an invalid or missing property, property name {0}.", - "The service is unable to initialize because the configuration is not valid or complete.", - "Correct the view service configuration and restart the view server."), - - VIEW_SERVICE_NULL_PLATFORM_NAME - (400, "OMVS-REPOSITORY-EXPLORER-400-003", - "The repository explorer view service has been called with a null platform name.", - "The system is unable to resolve the platform to query without knowing the platform name.", - "Check the configuration of the resource endpoints in the repository explorer view service configuration."), - - USER_NOT_AUTHORIZED - (400, "OMVS-REPOSITORY-EXPLORER-400-004", - "The repository explorer view service could not perform the requested operation {0} on behalf of user {1}", - "The system reported that the user is not authorized to perform the requested action.", - "Request that the name used to log in to the UI is given authority to perform the request."), - - REPOSITORY_NOT_AVAILABLE - (400, "OMVS-REPOSITORY-EXPLORER-400-005", - "The repository explorer view service operation {0} found that server {1} is not available", - "The system reported that the server is not available to perform the requested action.", - "Retry the request when the server is available."), - - PLATFORM_NOT_AVAILABLE - (400, "OMVS-REPOSITORY-EXPLORER-400-006", - "The repository explorer view service operation {0} found that the platform for server {1} is not available", - "The system reported that the platform is not reachable using the provided URL.", - "Check the platform is running and check the repository explorer resource endpoint configuration for the server and its platform."), - - REPOSITORY_ERROR - (400, "OMVS-REPOSITORY-EXPLORER-400-007", - "The repository explorer view service operation {0} encountered a problem connecting to the repository, the message is {1}", - "The system could not complete a repository operation due to the error indicated.", - "Look at the error message and check the configuration and state of the repository server."), - - INVALID_PARAMETER - (400, "OMVS-REPOSITORY-EXPLORER-400-008", - "The repository explorer view service operation {0} could not proceed with the setting of parameter {1}", - "The system detected that the parameter was not set to a valid value and could not perform the requested action.", - "Check the parameter setting and retry the operation."), - - ENTITY_NOT_KNOWN_IN_REPOSITORY - (400, "OMVS-REPOSITORY-EXPLORER-400-009", - "The repository explorer view service operation {0} found no entity with guid {1} in repository {2}", - "The system reported that the entity is not available in the specified repository.", - "If you expect that the entity exists, check the GUID is correct, try a server running a repository with the home instance or reference copy, or enable the enterprise option."), - - ENTITY_NOT_KNOWN_IN_ENTERPRISE - (400, "OMVS-REPOSITORY-EXPLORER-400-010", - "The repository explorer view service operation {0} found no entity with guid {1} at enterprise scope for repository {2}", - "The system reported that the entity is not available at enterprise scope for the specified repository server.", - "If you expect that the entity exists, check the GUID is correct and the selected repository server is in the cohort where you would expect to find the entity."), - - ENTITY_PROXY_ONLY - (400, "OMVS-REPOSITORY-EXPLORER-400-011", - "The repository explorer view service operation {0} reported that an entity is only available as a proxy - {1}", - "The system reported that the entity is only available as a proxy object.", - "Try to retrieve the entity detail from a server running a repository with the home instance or reference copy, or enable the enterprise option."), - - RELATIONSHIP_NOT_KNOWN_IN_REPOSITORY - (400, "OMVS-REPOSITORY-EXPLORER-400-012", - "The repository explorer view service operation {0} found no relationship with guid {1} in repository {2}", - "The system reported that the relationship is not available in the specified repository.", - "If you expect that the relationship exists, check the GUID is correct, try a server running a repository with the home instance or reference copy, or enable the enterprise option."), - - RELATIONSHIP_NOT_KNOWN_IN_ENTERPRISE - (400, "OMVS-REPOSITORY-EXPLORER-400-013", - "The repository explorer view service operation {0} found no relationship with guid {1} at enterprise scope for repository {2}", - "The system reported that the relationship is not available at enterprise scope for the specified repository server.", - "If you expect that the relationship exists, check the GUID is correct and the selected repository server is in the cohort where you would expect to find the relationship."), - - VIEW_SERVICE_REQUEST_BODY_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-014", - "The repository explorer view service could not perform the requested operation {0} because te requestBody was missing", - "The system could not perform the requested action.", - "Check the calling code to make sure that a requestBody is passed to the view service API."), - - TYPE_ERROR - (400, "OMVS-REPOSITORY-EXPLORER-400-015", - "The repository explorer view service operation {0} reported a type error - {1}", - "The system could not perform the requested action.", - "Check the calling code to make sure that a valid type is passed to the view service API."), - - PROPERTY_ERROR - (400, "OMVS-REPOSITORY-EXPLORER-400-016", - "The repository explorer view service operation {0} reported a property error - {1}", - "The system could not perform the requested action with the supplied properties.", - "Check the detailed message and check the properties supplied to the operation."), - - PAGING_ERROR - (400, "OMVS-REPOSITORY-EXPLORER-400-017", - "The repository explorer view service operation {0} reported a paging error - {1}", - "The system could not perform the requested action.", - "Check the calling code to make sure that the requested operation is valid."), - - FUNCTION_NOT_SUPPORTED_ERROR - (400, "OMVS-REPOSITORY-EXPLORER-400-018", - "The repository explorer view service could not perform the requested operation {0} because it is not supported by repository {1}", - "The system could not perform the requested action.", - "Check the conformance of the target repository and retry with a supported operation."), - - TYPE_SYSTEM_ENTITY_SUPERTYPE_NAME_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-019", - "The repository explorer view service method {0} detected that entity type {1} has a super type with no name, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_ENTITY_SUPERTYPE_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-020", - "The repository explorer view service method {0} detected that entity type {1} refers a super type {2} that is not in the type gallery, as returned by repository {3} on platform {4}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_ENTITY_DEF_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-021", - "The repository explorer view service method {0} detected that entity type {1} does not have an EntityDef, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_RELATIONSHIP_END_DEF_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-022", - "The repository explorer view service method {0} detected that relationship type {1} is missing a RelationshipEndDef, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_NAME_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-023", - "The repository explorer view service method {0} detected that the classification type {1} refers to a validEntityDef that has no name, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-024", - "The repository explorer view service method {0} detected that classification type {1} refers to a validEntityDef for entity type {2} that is not in the type gallery, as returned by repository {3} on platform {4}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_NAME_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-025", - "The repository explorer view service method {0} detected that the classification type {1} refers to a supertype that has no name, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-026", - "The repository explorer view service method {0} detected that the classification type {1} refers to a supertype {2} that is not in the type gallery, as returned by repository {3} on platform {4}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_DEF_MISSING - (400, "OMVS-REPOSITORY-EXPLORER-400-027", - "The repository explorer view service method {0} detected that classification type {1} does not have a ClassificationDef, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - /* - * Provide a catch-all error code in case Rex catches a Throwable. It will capture the Throwable - * and package it into the REST response, but does not specific error handling for the error - */ - UNKNOWN_ERROR - (400, "OMVS-REPOSITORY-EXPLORER-400-028", - "The repository explorer view service caught an unknown error during operation {0}. The detailed message is {1}", - "The system could not perform the requested action.", - "Please check the detailed message and the system log."), - - HISTORICAL_FUNCTION_NOT_SUPPORTED - (400, "OMVS-REPOSITORY-EXPLORER-400-029", - "The repository explorer view service operation {0} reported that a historical query cannot be issued", - "The system reported that the historical capability is not supported.", - "Either use repositories that support historical queries or queries for the current entities."), - HANDLER_INVALID - (400, "OMVS-REPOSITORY-EXPLORER-400-030", - "The repository explorer view service could not proceed as it could not create a handler for operation {0}.", - "The system could not perform the requested action.", - "Please check your view configuration exists for this tenant."), - INVALID_AS_OF_DATETIME - (400, "OMVS-REPOSITORY-EXPLORER-400-031", - "The repository explorer view service could not proceed as it was supplied a future asOfTime for operation {0}.", - "The system could not perform the requested action.", - "Please ensure that only past asOfTimes are supplied."), - ; - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - RexViewErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewServiceException.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewServiceException.java deleted file mode 100644 index 20066fdf1af..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewServiceException.java +++ /dev/null @@ -1,94 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; - -import java.io.Serial; -import java.util.Arrays; - - -/* - * This is a simple exception class that can convey the few types of exception - * that it is sensible to propagate back to the user interface. The Rex handler will - * have detected or caught each error condition, audit logged it and will then - * create a RexViewServiceException to capture the essential details that can be - * used in the UI. - */ -public class RexViewServiceException extends OCFCheckedExceptionBase -{ - @Serial - private static final long serialVersionUID = 1L; - - - /* - * Constructor - */ - public RexViewServiceException( ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) - { - super(messageDefinition, className, actionDescription); - } - - - - /** - * JSON-style toString - * - * @return string of property names and values for this enum - */ - @Override - public String toString() - { - return "RexViewServiceException{" + - ", reportedHTTPCode=" + getReportedHTTPCode() + - ", reportingClassName='" + getReportingClassName() + '\'' + - ", reportingActionDescription='" + getReportingActionDescription() + '\'' + - ", reportedErrorMessageId='" + getReportedErrorMessageId() + '\'' + - ", reportedErrorMessageParameters=" + Arrays.toString(getReportedErrorMessageParameters()) + - ", reportedSystemAction='" + getReportedSystemAction() + '\'' + - ", reportedUserAction='" + getReportedUserAction() + '\'' + - ", reportedCaughtException=" + getReportedCaughtException() + - ", relatedProperties=" + getRelatedProperties() + - '}'; - } - - /** - * 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 == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - return true; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return super.hashCode(); - } -} - diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/package-info.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/package-info.java deleted file mode 100644 index 31621d0c118..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Repository Explorer OMVS. - */ -package org.odpi.openmetadata.viewservices.rex.api.ffdc; diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/ClassificationExplorer.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/ClassificationExplorer.java deleted file mode 100644 index b0d538e9851..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/ClassificationExplorer.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - -public class ClassificationExplorer { - - private ClassificationDef classificationDef; - private List inheritedAttributes; - private List subTypeNames; - - - public ClassificationExplorer(ClassificationDef def) { - classificationDef = def; - } - - public ClassificationDef getClassificationDef() { return classificationDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public void addSubTypeName(String subTypeName) { - if (subTypeNames == null) { - subTypeNames = new ArrayList<>(); - } - subTypeNames.add(subTypeName); - } - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - if (inheritedAttributes == null) { - inheritedAttributes = new ArrayList<>(); - } - inheritedAttributes.addAll(inheritedAttrs); - } - } - -} - diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/EntityExplorer.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/EntityExplorer.java deleted file mode 100644 index 33f088a2ce4..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/EntityExplorer.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - -public class EntityExplorer { - - private EntityDef entityDef; - private List inheritedAttributes; - private List subTypeNames; - private List classificationNames; - private List relationshipNames; - private List inheritedRelationshipNames; - private List inheritedClassificationNames; - - - public EntityExplorer(EntityDef def) { - entityDef = def; - inheritedAttributes = new ArrayList<>(); - subTypeNames = new ArrayList<>(); - classificationNames = new ArrayList<>(); - relationshipNames = new ArrayList<>(); - inheritedRelationshipNames = new ArrayList<>(); - inheritedClassificationNames = new ArrayList<>(); - - } - - public EntityDef getEntityDef() { return entityDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public List getClassificationNames() { return classificationNames; } - - public List getRelationshipNames() { return relationshipNames; } - - public List getInheritedRelationshipNames() { return inheritedRelationshipNames; } - - public List getInheritedClassificationNames() { return inheritedClassificationNames; } - - public void addSubTypName(String subTypeName) { - subTypeNames.add(subTypeName); - } - - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - inheritedAttributes.addAll(inheritedAttrs); - } - } - - public void addRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - relationshipNames.add(relationshipTypeName); - } - } - - public void addInheritedRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - inheritedRelationshipNames.add(relationshipTypeName); - } - } - - public void addClassification(String classificationName) { - if (classificationName != null) { - classificationNames.add(classificationName); - } - } - - public void addInheritedClassification(String classificationName) { - if (classificationName != null) { - inheritedClassificationNames.add(classificationName); - } - } - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RelationshipExplorer.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RelationshipExplorer.java deleted file mode 100644 index 0fad0c4e50f..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RelationshipExplorer.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; - - -public class RelationshipExplorer { - - private RelationshipDef relationshipDef; - - - public RelationshipExplorer(RelationshipDef def) { - relationshipDef = def; - } - - public RelationshipDef getRelationshipDef() { return relationshipDef; } -} - diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/ResourceEndpoint.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/ResourceEndpoint.java deleted file mode 100644 index f0700d3cb25..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/ResourceEndpoint.java +++ /dev/null @@ -1,110 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.properties; - - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class ResourceEndpoint { - - - private String resourceCategory; - private String resourceDescription; - private String resourceRootURL; // e.g. "https://localhost:9443" - private String serverName; - private String platformName; - private String serverInstanceName; - - /** - * Default Constructor sets the properties to nulls - */ - public ResourceEndpoint() - { - /* - * Nothing to do. - */ - } - - - public ResourceEndpoint(String resourceCategory, String platformName, String resourceDescription, String resourceRootURL, String serverName, String serverInstanceName) { - this.resourceCategory = resourceCategory; - this.resourceDescription = resourceDescription; - this.resourceRootURL = resourceRootURL; - this.serverName = serverName; - this.platformName = platformName; - this.serverInstanceName = serverInstanceName; - } - - - /* - * Config constructor - create a ResourceEndpoint from a ResourceEndpointConfig - */ - public ResourceEndpoint(ResourceEndpointConfig cfg) { - this.resourceCategory = cfg.getResourceCategory(); - this.resourceDescription = cfg.getDescription(); - this.resourceRootURL = cfg.getPlatformRootURL(); - this.serverName = cfg.getServerName(); - this.platformName = cfg.getPlatformName(); - this.serverInstanceName = cfg.getServerInstanceName(); - } - - public String getResourceCategory() { - return resourceCategory; - } - - public void setResourceCategory(String resourceCategory) { - this.resourceCategory = resourceCategory; - } - - public String getResourceDescription() { - return resourceDescription; - } - - public void setResourceDescription(String resourceDescription) { - this.resourceDescription = resourceDescription; - } - - public String getResourceRootURL() { - return resourceRootURL; - } - - public void setResourceRootURL(String resourceRootURL) { - this.resourceRootURL = resourceRootURL; - } - - public String getServerName() { - return serverName; - } - - public void setServerName(String serverName) { - this.serverName = serverName; - } - - public String getPlatformName() { - return platformName; - } - - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - public String getServerInstanceName() { - return serverInstanceName; - } - - public void setServerInstanceName(String serverInstanceName) { - this.serverInstanceName = serverInstanceName; - } - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexEntityDigest.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexEntityDigest.java deleted file mode 100644 index 5b235b91da4..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexEntityDigest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexEntityDigest { - - private String entityGUID; - private String label; - private Integer gen; - private String metadataCollectionName; // name of the mdc that is home to this entity - private String metadataCollectionId; // id of the mdc that is home to this entity - private String provenance; // "ent" if query was at enterprise scope - // "refCopy" if not ent query and returned by repo other than home - // "home" if not ent query and returned by home repo - // "proxy" if returned as a rel end proxy - - public RexEntityDigest(String entityGUID, - String label, - Integer gen, - String metadataCollectionName, - String metadataCollectionId, - String provenance) - { - this.entityGUID = entityGUID; - this.label = label; - this.gen = gen; - this.metadataCollectionName = metadataCollectionName; - this.metadataCollectionId = metadataCollectionId; - this.provenance = provenance; - } - - /* - * Getters for Jackson - */ - - public String getEntityGUID() { return entityGUID; } - public String getLabel() { return label; } - public Integer getGen() { return gen; } - public String getMetadataCollectionName() { return metadataCollectionName; } - public String getMetadataCollectionId() { return metadataCollectionId; } - public String getProvenance() { return provenance; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - public void setLabel(String label) { this.label = label; } - public void setGen(Integer gen) { this.gen = gen; } - public void setMetadataCollectionName(String metadataCollectionName) { this.metadataCollectionName = metadataCollectionName; } - public void setMetadataCollectionId(String metadataCollectionId) { this.metadataCollectionId = metadataCollectionId; } - public void setProvenance(String provenance) { this.provenance = provenance; } - - - - @Override - public String toString() - { - return "RexEntityDigest{" + - ", entityGUID=" + entityGUID + - ", label=" + label + - ", gen=" + gen + - ", metadataCollectionName=" + metadataCollectionName + - ", metadataCollectionId=" + metadataCollectionId + - ", provenance=" + provenance + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexExpandedEntityDetail.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexExpandedEntityDetail.java deleted file mode 100644 index 7b80e5c7150..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexExpandedEntityDetail.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexExpandedEntityDetail { - - private EntityDetail entityDetail; - private RexEntityDigest entityDigest; - private String serverName; // the name of the server that returned this object - private String platformName; // the name of the platform running the server that returned this object - - - public RexExpandedEntityDetail(EntityDetail entityDetail, - String label, - String serverName, - String platformName, - String provenance) - { - this.entityDetail = entityDetail; - this.serverName = serverName; - this.platformName = platformName; - // Server-side we do not know which gen this is for - so set to 0. - this.entityDigest = new RexEntityDigest( - entityDetail.getGUID(), - label, - 0, - entityDetail.getMetadataCollectionName(), - entityDetail.getMetadataCollectionId(), - provenance ); - } - - /* - * Getters for Jackson - */ - - public EntityDetail getEntityDetail() { return entityDetail; } - public String getServerName() { return serverName; } - public String getPlatformName() { return platformName; } - public RexEntityDigest getEntityDigest() { return entityDigest; } - - public void setEntityDetail(EntityDetail entityDetail) { this.entityDetail = entityDetail; } - public void setServerName(String serverName) { this.serverName = serverName; } - public void setPlatformName(String platformName) { this.platformName = platformName; } - public void setEntityDigest(RexEntityDigest entityDigest) { this.entityDigest = entityDigest; } - - - - @Override - public String toString() - { - return "RexExpandedEntityDetail{" + - ", entityDetail=" + entityDetail + - ", entityDigest=" + entityDigest + - ", serverName=" + serverName + - ", platformName=" + platformName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexExpandedRelationship.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexExpandedRelationship.java deleted file mode 100644 index 4345361f15e..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexExpandedRelationship.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexExpandedRelationship { - - private Relationship relationship; - private RexRelationshipDigest relationshipDigest; - private RexEntityDigest entityOneDigest; - private RexEntityDigest entityTwoDigest; - private String serverName; // name of the server that returned this object - private String platformName; // the name of the platform running the server that returned this object - - - public RexExpandedRelationship(Relationship relationship, - String label, - RexEntityDigest digest1, - RexEntityDigest digest2, - String serverName, - String platformName, - String provenance) { - this.relationship = relationship; - this.relationshipDigest = new RexRelationshipDigest(relationship.getGUID(), - label, - digest1.getEntityGUID(), - digest2.getEntityGUID(), - 0, - 0, - relationship.getMetadataCollectionName(), - relationship.getMetadataCollectionId(), - provenance); - this.entityOneDigest = digest1; - this.entityTwoDigest = digest2; - this.serverName = serverName; - this.platformName = platformName; - - } - - /* - * Getters for Jackson - */ - - public Relationship getRelationship() { return relationship; } - public RexRelationshipDigest getRelationshipDigest() { return relationshipDigest; } - public RexEntityDigest getEntityOneDigest() { return entityOneDigest; } - public RexEntityDigest getEntityTwoDigest() { return entityTwoDigest; } - public String getServerName() { return serverName; } - public String getPlatformName() { return platformName; } - - - public void setRelationship(Relationship relationship) { this.relationship = relationship; } - public void setRelationshipDigest(RexRelationshipDigest relationshipDigest) { this.relationshipDigest = relationshipDigest; } - public void setEntityOneDigest(RexEntityDigest entityOneDigest) { this.entityOneDigest = entityOneDigest; } - public void setEntityTwoDigest(RexEntityDigest entityTwoDigest) { this.entityTwoDigest = entityTwoDigest; } - public void setServerName(String serverName) { this.serverName = serverName; } - public void setPlatformName(String platformName) { this.platformName = platformName; } - - - @Override - public String toString() - { - return "RexExpandedRelationship{" + - ", relationship=" + relationship + - ", relationshipDigest=" + relationshipDigest + - ", entityOneDigest=" + entityOneDigest + - ", entityTwoDigest=" + entityTwoDigest + - ", serverName=" + serverName + - ", platformName=" + platformName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexPreTraversal.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexPreTraversal.java deleted file mode 100644 index e01c7230ee5..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexPreTraversal.java +++ /dev/null @@ -1,89 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import java.util.Map; - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RexPreTraversal { - - - // The RexPreTraversal class enables the packaging and interrogation of a predictive stats - // for a potential traversal. It does NOT contain the sub-graph - that is in a RexTraversal - // object. - // The PreTraversal includes the entityGUID of the entity on which it is centered and the depth. - // The PreTraversal is formed from the result of a traversal with no filtering - it includes - // 3 maps of type information - one per category - keyed by typeName, where each entry (value) - // contains the typeGUID and number of instances of that type in the traversal, i.e: - // { typeName --> { typeGUID : , count : } } - // The typeName and typeGUID are both included in order to minimise conversion in the browser for - // display purposes. All 3 maps are keyed by typeName as names are available for classifications. - // In a RexTypeStats for a classification the typeGUID is ignored (set to null). - // A PreTraversal does not need a gen. - - - private String entityGUID; // must be non-null - private Map entityInstanceCounts; // a map from typename to stats - private Map relationshipInstanceCounts; // a map from typename to stats - private Map classificationInstanceCounts; // a map from typename to stats - private Integer depth; // the depth of traversal - - - public RexPreTraversal() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getEntityGUID() { return entityGUID; } - - public Map getEntityInstanceCounts() { return entityInstanceCounts; } - - public Map getRelationshipInstanceCounts() { - return relationshipInstanceCounts; - } - - public Map getClassificationInstanceCounts() { - return classificationInstanceCounts; - } - - public Integer getDepth() { return depth; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEntityInstanceCounts(Map entityInstanceCounts) { this.entityInstanceCounts = entityInstanceCounts; } - - public void setRelationshipInstanceCounts(Map relationshipInstanceCounts) { this.relationshipInstanceCounts = relationshipInstanceCounts; } - - public void setClassificationInstanceCounts(Map classificationInstanceCounts) { this.classificationInstanceCounts = classificationInstanceCounts; } - - public void setDepth(Integer depth) { this.depth = depth; } - - - - @Override - public String toString() - { - return "RexPreTraversal{" + - ", entityGUID=" + entityGUID + - ", depth=" + depth + - ", entityInstanceCounts=" + entityInstanceCounts + - ", relationshipInstanceCounts=" + relationshipInstanceCounts + - ", classificationInstanceCounts=" + classificationInstanceCounts + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexRelationshipAndEntitiesDigest.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexRelationshipAndEntitiesDigest.java deleted file mode 100644 index 22353dd5fcb..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexRelationshipAndEntitiesDigest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Map; - -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) -public class RexRelationshipAndEntitiesDigest { - - - // The RexSubGraph class provides a container for a set of entities and relationships. - // It is used as the return type from a relationship search, so that both the found - // relationships and the associated (related) entities can be stored together. These - // are then used to populate the RexSearchResponse. - - - - // Maps of instance digests. - // An instance summary is much smaller than the full instance. - // The entities map is keyed by entityGUID and each digest part consists of - // entityGUID, label, gen, (home) metadataCollectionName, (home) metadataCollectionId, provenance - // - // The relationships map is keyed by relationshipGUID and each digest consists of - // relationshipGUID, label, end1GUID, end2GUID, idx, gen, (home) metadataCollectionName, (home) metadataCollectionId, provenance - // - // The above value types are described by the RexEntityDigest and RexRelationshipDigest Java classes. - - private RexRelationshipDigest relationshipDigest; - private RexEntityDigest end1Digest; - private RexEntityDigest end2Digest; - - - - - public RexRelationshipAndEntitiesDigest() { - - // No initialization yet - } - - - public RexEntityDigest getEnd1Digest() { return end1Digest;} - public RexEntityDigest getEnd2Digest() { return end2Digest;} - - public RexRelationshipDigest getRelationshipDigest() { return relationshipDigest;} - - - public void setEnd1Digest(RexEntityDigest end1Digest) { this.end1Digest = end1Digest;} - public void setEnd2Digest(RexEntityDigest end2Digest) { this.end2Digest = end2Digest;} - - public void setRelationshipDigest(RexRelationshipDigest relationshipDigest) { this.relationshipDigest = relationshipDigest;} - - - @Override - public String toString() - { - return "RexRelationshipAndEntitiesDigest{" + - "relationshipDigest=" + relationshipDigest + - ", end1Digest=" + end1Digest + - ", end2Digest=" + end2Digest + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexRelationshipDigest.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexRelationshipDigest.java deleted file mode 100644 index 6267f976142..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexRelationshipDigest.java +++ /dev/null @@ -1,93 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexRelationshipDigest { - - private String relationshipGUID; - private String label; - private String end1GUID; - private String end2GUID; - private Integer idx; - private Integer gen; - private String metadataCollectionName; - private String metadataCollectionId; - private String provenance; - - public RexRelationshipDigest(String relationshipGUID, - String label, - String end1GUID, - String end2GUID, - Integer idx, - Integer gen, - String metadataCollectionName, - String metadataCollectionId, - String provenance) - { - this.relationshipGUID = relationshipGUID; - this.label = label; - this.end1GUID = end1GUID; - this.end2GUID = end2GUID; - this.idx = idx; - this.gen = gen; - this.metadataCollectionName = metadataCollectionName; - this.metadataCollectionId = metadataCollectionId; - this.provenance = provenance; - } - - /* - * Getters for Jackson - */ - - public String getRelationshipGUID() { return relationshipGUID; } - public String getEnd1GUID() { return end1GUID; } - public String getEnd2GUID() { return end2GUID; } - public String getLabel() { return label; } - public Integer getIdx() { return idx; } - public Integer getGen() { return gen; } - public String getMetadataCollectionName() { return metadataCollectionName; } - public String getMetadataCollectionId() { return metadataCollectionId; } - public String getProvenance() { return provenance; } - - public void setRelationshipGUID(String relationshipGUID) { this.relationshipGUID = relationshipGUID; } - public void setLabel(String label) { this.label = label; } - public void setEnd1GUID(String end1GUID) { this.end1GUID = end1GUID; } - public void setEnd2GUID(String end2GUID) { this.end2GUID = end2GUID; } - public void setIdx(Integer idx) { this.idx = idx; } - public void setGen(Integer gen) { this.gen = gen; } - public void setMetadataCollectionName(String metadataCollectionName) { this.metadataCollectionName = metadataCollectionName; } - public void setMetadataCollectionId(String metadataCollectionId) { this.metadataCollectionId = metadataCollectionId; } - public void setProvenance(String provenance) { this.provenance = provenance; } - - - - @Override - public String toString() - { - return "RexRelationshipDigest{" + - ", relationshipGUID=" + relationshipGUID + - ", label=" + label + - ", end1GUID=" + end1GUID + - ", end2GUID=" + end2GUID + - ", idx=" + idx + - ", gen=" + gen + - ", metadataCollectionName=" + metadataCollectionName + - ", metadataCollectionId=" + metadataCollectionId + - ", provenance=" + provenance + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexTraversal.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexTraversal.java deleted file mode 100644 index c370848e33b..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexTraversal.java +++ /dev/null @@ -1,129 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import java.util.List; -import java.util.Map; - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RexTraversal { - - - // The RexTraversal class enables the packaging and interrogation of a traversal query - // and a summary of the results - enough information for the display in Rex ut not the - // whole InstanceGraph. - // The traversal will have been centered on an entity instance and may have been filtered by - // lists of entity types, relationship types and/or classification names. - // The graph will also have been explored to the specified depth. - // Associated with the traversal (and result) is the gen in the user sequence. - // The settings of these parameters are stored in the RexTraversal. - - - // Fields that describe the query that was performed: - private String entityGUID; // must be non-null - private List entityTypeNames; // a list of type names or null - private List relationshipTypeGUIDs; // a list of type guids or null - private List classificationNames; // a list of names or null - private Integer depth; // the depth used to create the subgraph - private Integer gen; // which generation this subgraph pertains to - private String serverName; // the name of the repo server that was traversed - private String platformName; // the name of the platform for the operation - - - // Fields that contain the maps of instance summaries. - // An instance summary is much smaller than the full instance. - // The entities map is keyed by entityGUID and the value part consists of - // { entityGUID, label, gen } - // The relationships map is keyed by relationshipGUID and the value part consists of - // { relationshipGUID, end1GUID, end2GUID, idx, label, gen } - // The above value types are described by the RexEntityDigest and RexRelationshipDigest Java classes. - private Map entities; - private Map relationships; - - - public RexTraversal() { - - // No initialization yet - } - - /* - * Getters for Jackson - */ - - - public String getEntityGUID() { return entityGUID; } - - public List getEntityTypeNames() { return entityTypeNames; } - - public List getRelationshipTypeGUIDs() { - return relationshipTypeGUIDs; - } - - public List getClassificationNames() { - return classificationNames; - } - - public Integer getDepth() { return depth; } - - public Integer getGen() { return gen; } - - public Map getEntities() { return entities;} - - public Map getRelationships() { return relationships;} - - public String getServerName() { return serverName; } - - public String getPlatformName() { return platformName; } - - - - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEntityTypeNames(List entityTypeNames) { this.entityTypeNames = entityTypeNames; } - - public void setRelationshipTypeGUIDs(List relationshipTypeGUIDs) { this.relationshipTypeGUIDs = relationshipTypeGUIDs; } - - public void setClassificationNames(List classificationNames) { this.classificationNames = classificationNames; } - - public void setDepth(Integer depth) { this.depth = depth; } - - public void setGen(Integer gen) { this.gen = gen; } - - public void setEntities(Map entities) { this.entities = entities;} - - public void setRelationships(Map relationships) { this.relationships = relationships;} - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - @Override - public String toString() - { - return "RexTraversal{" + - "entityGUID=" + entityGUID + - ", depth=" + depth + - ", gen=" + gen + - ", entityTypeNames=" + entityTypeNames + - ", relationshipTypeGUIDs=" + relationshipTypeGUIDs + - ", classificationNames=" + classificationNames + - ", entities=" + entities + - ", relationships=" + relationships + - ", serverName=" + serverName + - ", platformName=" + platformName + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexTypeStats.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexTypeStats.java deleted file mode 100644 index 897720287dd..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/RexTypeStats.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexTypeStats { - - private String typeGUID; - private Integer count; - - public RexTypeStats(String typeGUID, Integer count) { - this.typeGUID = typeGUID; - this.count = count; - } - - /* - * Getters for Jackson - */ - - public String getTypeGUID() { return typeGUID; } - public Integer getCount() { return count; } - - - - public void setTypeGUID(String typeGUID) { this.typeGUID = typeGUID; } - public void setCount(Integer count) { this.count = count; } - - - - @Override - public String toString() - { - return "RexTypeStats{" + - ", typeGUID=" + typeGUID + - ", count=" + count + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/TypeExplorer.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/TypeExplorer.java deleted file mode 100644 index cc01a3111a1..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/TypeExplorer.java +++ /dev/null @@ -1,426 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.properties; - - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexViewErrorCode; - -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) -public class TypeExplorer { - - - private Map entities; - private Map relationships; - private Map classifications; - private Map enums; - - private Map entityTypeGUIDToName; - private Map entityTypeNameToGUID; - - private Map relationshipTypeGUIDToName; - private Map relationshipTypeNameToGUID; - - - public TypeExplorer() { - entities = new HashMap<>(); - relationships = new HashMap<>(); - classifications = new HashMap<>(); - enums = new HashMap<>(); - entityTypeGUIDToName = new HashMap<>(); - entityTypeNameToGUID = new HashMap<>(); - relationshipTypeGUIDToName = new HashMap<>(); - relationshipTypeNameToGUID = new HashMap<>(); - } - - /* - * Getters for Jackson - */ - public Map getEntities() { - return entities; - } - - public Map getRelationships() { - return relationships; - } - - public Map getClassifications() { - return classifications; - } - - public Map getEnums() { - return enums; - } - - public Map getEntityTypeGUIDToName() { - return entityTypeGUIDToName; - } - - public Map getEntityTypeNameToGUID() { - return entityTypeNameToGUID; - } - - public Map getRelationshipTypeGUIDToName() { - return relationshipTypeGUIDToName; - } - - public Map getRelationshipTypeNameToGUID() { - return relationshipTypeNameToGUID; - } - - public void addEntityExplorer(String entityTypeName, EntityExplorer entityExplorer) { - entities.put(entityTypeName, entityExplorer); - String typeGUID = entityExplorer.getEntityDef().getGUID(); - entityTypeGUIDToName.put(typeGUID, entityTypeName); - entityTypeNameToGUID.put(entityTypeName, typeGUID); - } - - public void addRelationshipExplorer(String relationshipTypeName, RelationshipExplorer relationshipExplorer) { - relationships.put(relationshipTypeName, relationshipExplorer); - String typeGUID = relationshipExplorer.getRelationshipDef().getGUID(); - relationshipTypeGUIDToName.put(typeGUID, relationshipTypeName); - relationshipTypeNameToGUID.put(relationshipTypeName, typeGUID); - } - - public void addClassificationExplorer(String classificationTypeName, ClassificationExplorer classificationExplorer) { - classifications.put(classificationTypeName, classificationExplorer); - } - - public void addEnumExplorer(String enumTypeName, EnumDef enumDef) { - enums.put(enumTypeName, enumDef); - } - - public void resolve(String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - { - - /* - * After all types have been loaded, call the resolver methods to expand the TEX for each type category - * Order is important, entities are expanded first. - * - * If anything untoward is spotted during one of the resolve methods, a RepositoryErrorException is thrown. - */ - - resolveEntities(platformRootURL, repositoryServerName); - resolveRelationships(platformRootURL, repositoryServerName); - resolveClassifications(platformRootURL, repositoryServerName); - - } - - private void resolveEntities(String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - { - - String methodName = "resolveEntities"; - - // For each entityExplorer add it to its superType's subTypes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - // Not every entity type has a superType - if (superType != null) { - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - // Find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_MISSING.getMessageDefinition( - methodName, entityTypeName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - superTypeExplorer.addSubTypName(entityTypeName); - } - } - - // For each entityExplorer resolve its full list of attributes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - // find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_MISSING.getMessageDefinition( - methodName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - EntityDef superDef = superTypeExplorer.getEntityDef(); - if (superDef == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_ENTITY_DEF_MISSING.getMessageDefinition( - methodName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - List superAttributes = superDef.getPropertiesDefinition(); - entityExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void resolveRelationships(String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - { - - String methodName = "resolveRelationships"; - - // For each relationshipExplorer gets its end types and add the relationship type to each of the entity types - for (String relationshipTypeName : relationships.keySet()) { - - RelationshipExplorer relationshipExplorer = relationships.get(relationshipTypeName); - RelationshipEndDef entityOneDef = relationshipExplorer.getRelationshipDef().getEndDef1(); - RelationshipEndDef entityTwoDef = relationshipExplorer.getRelationshipDef().getEndDef2(); - - if (entityOneDef != null) { - String entityOneTypeName = entityOneDef.getEntityType().getName(); - EntityExplorer entityOneExplorer = entities.get(entityOneTypeName); - entityOneExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityOneExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - else - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_RELATIONSHIP_END_DEF_MISSING.getMessageDefinition( - methodName, relationshipTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - - if (entityTwoDef != null) { - String entityTwoTypeName = entityTwoDef.getEntityType().getName(); - EntityExplorer entityTwoExplorer = entities.get(entityTwoTypeName); - entityTwoExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityTwoExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - else - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_RELATIONSHIP_END_DEF_MISSING.getMessageDefinition( - methodName, relationshipTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - - - } - } - - private void addRelationshipToSubType(String relationshipTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedRelationship(relationshipTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - } - - - private void resolveClassifications(String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - { - - String methodName = "resolveClassifications"; - - // For each classificationExplorer add its name to the known classifications for its valid entity types - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - List validEntityTypes = classificationExplorer.getClassificationDef().getValidEntityDefs(); - if (validEntityTypes != null) { - for (TypeDefLink entityType : validEntityTypes) { - String entityTypeName = entityType.getName(); - if (entityTypeName == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_NAME_MISSING.getMessageDefinition( - methodName, classificationTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - EntityExplorer entityExplorer = entities.get(entityTypeName); - if (entityExplorer == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_MISSING.getMessageDefinition( - methodName, classificationTypeName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - entityExplorer.addClassification(classificationTypeName); - List subTypeNames = entityExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) - { - addClassificationToSubType(classificationTypeName,subTypeName); - } - } - } - } - - // For each classificationExplorer add it to its superType's subTypes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - if (superType != null) { - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, classificationTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_MISSING.getMessageDefinition( - methodName, classificationTypeName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - superTypeExplorer.addSubTypeName(classificationTypeName); - } - } - - // For each classificationExplorer resolve its full list of attributes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, classificationTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_MISSING.getMessageDefinition( - methodName, classificationTypeName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - ClassificationDef superDef = superTypeExplorer.getClassificationDef(); - if (superDef == null) - { - throw new RepositoryErrorException( - RexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_DEF_MISSING.getMessageDefinition( - methodName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - List superAttributes = superDef.getPropertiesDefinition(); - classificationExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void addClassificationToSubType(String classificationTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedClassification(classificationTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addClassificationToSubType(classificationTypeName,subTypeName); - } - } - } - - public String getEntityTypeName(String entityTypeGUID) { - return entityTypeGUIDToName.get(entityTypeGUID); - } - public String getEntityTypeGUID(String entityTypeName) { - return entityTypeNameToGUID.get(entityTypeName); - } - public String getRelationshipTypeName(String relationshipTypeGUID) { return entityTypeGUIDToName.get(relationshipTypeGUID); } - public String getRelationshipTypeGUID(String relationshipTypeName) { return relationshipTypeNameToGUID.get(relationshipTypeName); } - - @Override - public String toString() - { - return "TypeExplorer{" + - "entities=" + entities + - ", relationships=" + relationships + - ", classifications=" + classifications + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/package-info.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/package-info.java deleted file mode 100644 index 565ccea4c51..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/properties/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Repository Explorer OMVS. - */ -package org.odpi.openmetadata.viewservices.rex.api.properties; diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexEntityDetailResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexEntityDetailResponse.java deleted file mode 100644 index 56086e3b8da..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexEntityDetailResponse.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.RexExpandedEntityDetail; - -import java.util.Arrays; - -public class RexEntityDetailResponse extends RexViewOMVSAPIResponse { - - private RexExpandedEntityDetail expandedEntityDetail; - - /** - * Default constructor - */ - public RexEntityDetailResponse() - { - super(); - } - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RexEntityDetailResponse(RexEntityDetailResponse template) - { - super(template); - - if (template != null) { - this.expandedEntityDetail = template.getExpandedEntityDetail(); - } - } - - - /** - * Return the expandedEntityDetail result. - * - * @return bean - */ - public RexExpandedEntityDetail getExpandedEntityDetail() - { - return expandedEntityDetail; - } - - - /** - * Set the expandedEntityDetail result. - * - * @param expandedEntityDetail - bean - */ - public void setExpandedEntityDetail(RexExpandedEntityDetail expandedEntityDetail) - { - this.expandedEntityDetail = expandedEntityDetail; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RexEntityDetailResponse{" + - "expandedEntityDetail=" + expandedEntityDetail + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} - - diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexEntityRequestBody.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexEntityRequestBody.java deleted file mode 100644 index 3977a5355a4..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexEntityRequestBody.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -import java.util.Objects; - -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) - -public class RexEntityRequestBody { - - - /* - * The RexTraversalRequestBody class provides a body for REST requests to perform a rex-traversal - */ - - private String serverName; // must be non-null - private String platformName; // must be non-null - private String entityGUID; // must be non-null, GUID of root of traversal - private Boolean enterpriseOption; // if not set will default to false - private long asOfTime = 0; // as of time to issue the query. 0 means now. - - public RexEntityRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getPlatformName() { return platformName; } - - public String getEntityGUID() { return entityGUID; } - - public Boolean getEnterpriseOption() { - if (enterpriseOption == null) - return false; - else - return enterpriseOption; - } - - public long getAsOfTime() { - return asOfTime; - } - - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setAsOfTime(long asOfTime) { - this.asOfTime = asOfTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RexEntityRequestBody)) return false; - RexEntityRequestBody that = (RexEntityRequestBody) o; - - - return Objects.equals(getAsOfTime(), that.getAsOfTime()) && Objects.equals(getServerName(), that.getServerName()) && Objects.equals(getPlatformName(), that.getPlatformName()) && Objects.equals(getEntityGUID(), that.getEntityGUID()) && Objects.equals(getEnterpriseOption(), that.getEnterpriseOption()); - } - - @Override - public int hashCode() { - return Objects.hash(getServerName(), getPlatformName(), getEntityGUID(), getEnterpriseOption(), getAsOfTime()); - } - - @Override - public String toString() { - return "RexEntityRequestBody{" + - "serverName='" + serverName + '\'' + - ", platformName='" + platformName + '\'' + - ", entityGUID='" + entityGUID + '\'' + - ", enterpriseOption=" + enterpriseOption + - ", asOfTime=" + asOfTime + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexPreTraversalResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexPreTraversalResponse.java deleted file mode 100644 index fa2b78c3d3b..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexPreTraversalResponse.java +++ /dev/null @@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.RexPreTraversal; - -import java.util.Arrays; -import java.util.Objects; - -public class RexPreTraversalResponse extends RexViewOMVSAPIResponse { - - - private RexPreTraversal rexPreTraversal; - - /** - * Default constructor - */ - public RexPreTraversalResponse() - { - super(); - } - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RexPreTraversalResponse(RexPreTraversalResponse template) - { - super(template); - - if (template != null) { - this.rexPreTraversal = template.getRexPreTraversal(); - } - } - - - /** - * Return the rexTraversal result. - * - * @return bean - */ - public RexPreTraversal getRexPreTraversal() - { - return rexPreTraversal; - } - - - /** - * Set the rexTraversal result. - * - * @param rexPreTraversal - bean - */ - public void setRexPreTraversal(RexPreTraversal rexPreTraversal) - { - this.rexPreTraversal = rexPreTraversal; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RexPreTraversalResponse)) return false; - if (!super.equals(o)) return false; - RexPreTraversalResponse that = (RexPreTraversalResponse) o; - return Objects.equals(getRexPreTraversal(), that.getRexPreTraversal()); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), getRexPreTraversal()); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RexPreTraversalResponse{" + - "rexPreTraversal=" + rexPreTraversal + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipRequestBody.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipRequestBody.java deleted file mode 100644 index a087ba04b0c..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipRequestBody.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -import java.util.Objects; - -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) - -public class RexRelationshipRequestBody { - - - /* - * The RexRelationshipRequestBody class provides a body for REST requests to retrieve relationships by GUID - */ - - private String serverName; // must be non-null - private String platformName; // must be non-null - private String relationshipGUID; // must be non-null, GUID of root of traversal - private Boolean enterpriseOption; - private long asOfTime = 0; // as of time to issue the query. 0 means now. - - public RexRelationshipRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getPlatformName() { return platformName; } - - public String getRelationshipGUID() { return relationshipGUID; } - - public Boolean getEnterpriseOption() - { - if (enterpriseOption == null) - return false; - else - return enterpriseOption; - } - - public long getAsOfTime() { - return asOfTime; - } - - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public void setRelationshipGUID(String relationshipGUID) { this.relationshipGUID = relationshipGUID; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setAsOfTime(long asOfTime) { - this.asOfTime = asOfTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RexRelationshipRequestBody)) return false; - RexRelationshipRequestBody that = (RexRelationshipRequestBody) o; - return getAsOfTime() != that.getAsOfTime() && Objects.equals(getServerName(), that.getServerName()) && Objects.equals(getPlatformName(), that.getPlatformName()) && Objects.equals(getRelationshipGUID(), that.getRelationshipGUID()) && Objects.equals(getEnterpriseOption(), that.getEnterpriseOption()); - } - - @Override - public int hashCode() { - return Objects.hash(getServerName(), getPlatformName(), getRelationshipGUID(), getEnterpriseOption(), getAsOfTime()); - } - - @Override - public String toString() - { - return "RexRelationshipRequestBody{" + - ", serverName=" + serverName + - ", platformName=" + platformName + - ", relationshipGUID=" + relationshipGUID + - ", enterpriseOption=" + enterpriseOption + - ", asOfTime=" + asOfTime + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipResponse.java deleted file mode 100644 index 66ad033f1d9..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.RexExpandedRelationship; - -import java.util.Arrays; - -public class RexRelationshipResponse extends RexViewOMVSAPIResponse { - - private RexExpandedRelationship expandedRelationship; - - /** - * Default constructor - */ - public RexRelationshipResponse() - { - super(); - } - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RexRelationshipResponse(RexRelationshipResponse template) - { - super(template); - - if (template != null) { - this.expandedRelationship = template.getExpandedRelationship(); - } - } - - - /** - * Return the expandedRelationship result. - * - * @return bean - */ - public RexExpandedRelationship getExpandedRelationship() - { - return expandedRelationship; - } - - - /** - * Set the expandedRelationship result. - * - * @param expandedRelationship - bean - */ - public void setExpandedRelationship(RexExpandedRelationship expandedRelationship) - { - this.expandedRelationship = expandedRelationship; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RexRelationshipResponse{" + - "expandedRelationship=" + expandedRelationship + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipSearchResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipSearchResponse.java deleted file mode 100644 index ea957236818..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexRelationshipSearchResponse.java +++ /dev/null @@ -1,88 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.RexEntityDigest; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexRelationshipDigest; - -import java.util.Map; - -public class RexRelationshipSearchResponse { - - private Integer httpStatusCode; - private String exceptionText; - private String serverName; - private String searchOperation; - private String searchText; - - // Fields that contain the maps of instance summaries. - // An instance summary is much smaller than the full instance. - // The entities map is keyed by entityGUID and the value part consists of - // { entityGUID, label, gen } - // The relationships map is keyed by relationshipGUID and the value part consists of - // { relationshipGUID, end1GUID, end2GUID, idx, label, gen } - // The above value types are described by the RexEntityDigest and RexRelationshipDigest Java classes. - private Map entities; - private Map relationships; - - - public RexRelationshipSearchResponse(Integer statusCode, - String exceptionText, - String serverName, - String searchText, - String searchOperation, - Map entities, - Map relationships) { - - this.httpStatusCode = statusCode; - this.exceptionText = exceptionText; - this.serverName = serverName; - this.searchText = searchText; - this.searchOperation = searchOperation; - this.entities = entities; - this.relationships = relationships; - } - - public Integer getHttpStatusCode() { - return this.httpStatusCode; - } - - public String getExceptionText() { - return this.exceptionText; - } - - public String getServerName() { return this.serverName; } - - public String getSearchText() { return this.searchText; } - - public String getSearchOperation() { return this.searchOperation; } - - public Map getEntities() { return this.entities; } - - public Map getRelationships() { - return this.relationships; - } - - public void setHttpStatusCode(Integer httpStatusCode) - { - this.httpStatusCode = httpStatusCode; - } - - public void setExceptionText(String exceptionText) - { - this.exceptionText = exceptionText; - } - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setSearchText(String searchText) { this.searchText = searchText; } - - public void setSearchOperation(String searchOperation) { this.searchOperation = searchOperation; } - - public void setEntities(Map entities) { this.entities = entities; } - - public void setRelationships(Map relationships) { this.relationships = relationships; } -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexResourceEndpointListResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexResourceEndpointListResponse.java deleted file mode 100644 index 6ef5fc3c540..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexResourceEndpointListResponse.java +++ /dev/null @@ -1,118 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.ResourceEndpoint; - -import java.util.Arrays; -import java.util.List; - -public class RexResourceEndpointListResponse extends RexViewOMVSAPIResponse { - - - - private List platformList = null; - private List serverList = null; - - /** - * Default constructor - */ - public RexResourceEndpointListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RexResourceEndpointListResponse(RexResourceEndpointListResponse template) - { - super(template); - - if (template != null) - { - this.platformList = template.getPlatformList(); - this.serverList = template.getServerList(); - } - } - - - /** - * Return the platformList. - * - * @return bean - */ - public List getPlatformList() - { - return platformList; - } - - - /** - * Set the resourceEndpointList. - * - * @param platformList - bean - */ - public void setPlatformList(List platformList) - { - this.platformList = platformList; - } - - /** - * Return the serverList. - * - * @return bean - */ - public List getServerList() - { - return serverList; - } - - - /** - * Set the resourceEndpointList. - * - * @param serverList - bean - */ - public void setServerList(List serverList) - { - this.serverList = serverList; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RexResourceEndpointListResponse{" + - "platformList='" + platformList + '\'' + - ", serverList='" + serverList + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexSearchBody.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexSearchBody.java deleted file mode 100644 index 6269e7f4598..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexSearchBody.java +++ /dev/null @@ -1,110 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import java.util.Date; -import java.util.List; -import java.util.Objects; - - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class RexSearchBody { - - - - /* - * The RexTraversalRequestBody class provides a body for REST requests to perform a rex-traversal - */ - - private String serverName; // must be non-null - private String platformName; // must be non-null - private String searchText; // must be non-null - private Boolean enterpriseOption; - private String typeName; // filter by type, or null - private List classificationNames; // Limit results of entity searches to instances with at least one of these classifications - private long asOfTime = 0; // as of time to issue the query. 0 means now. - - public RexSearchBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getPlatformName() { return platformName; } - - public String getSearchText() { return searchText; } - - public String getTypeName() { return typeName; } - - public List getClassificationNames() { return classificationNames; } - - public long getAsOfTime() { - return asOfTime; - } - - public Boolean getEnterpriseOption() { - if (enterpriseOption == null) - return false; - else - return enterpriseOption; - } - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public void setSearchText(String searchText) { this.searchText = searchText; } - - public void setTypeName(String typeName) { this.typeName = typeName; } - - public void setClassificationNames(List classificationNames ) { this.classificationNames = classificationNames; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setAsOfTime(Long asOfTime) { - this.asOfTime = asOfTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RexSearchBody)) return false; - RexSearchBody that = (RexSearchBody) o; - return getAsOfTime() == that.getAsOfTime() && Objects.equals(getServerName(), that.getServerName()) && Objects.equals(getPlatformName(), that.getPlatformName()) && Objects.equals(getSearchText(), that.getSearchText()) && Objects.equals(getEnterpriseOption(), that.getEnterpriseOption()) && Objects.equals(getTypeName(), that.getTypeName()) && Objects.equals(getClassificationNames(), that.getClassificationNames()); - } - - @Override - public int hashCode() { - return Objects.hash(getServerName(), getPlatformName(), getSearchText(), getEnterpriseOption(), getTypeName(), getClassificationNames(), getAsOfTime()); - } - - @Override - public String toString() { - return "RexSearchBody{" + - "serverName='" + serverName + '\'' + - ", platformName='" + platformName + '\'' + - ", searchText='" + searchText + '\'' + - ", enterpriseOption=" + enterpriseOption + - ", typeName='" + typeName + '\'' + - ", classificationNames=" + classificationNames + - ", asOfTime=" + asOfTime + - '}'; - } - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexSearchResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexSearchResponse.java deleted file mode 100644 index c379db621c0..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexSearchResponse.java +++ /dev/null @@ -1,88 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.RexEntityDigest; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexRelationshipAndEntitiesDigest; - -import java.util.Map; - -public class RexSearchResponse extends RexViewOMVSAPIResponse { - - - private String serverName; - private String searchCategory; // Set to either { "Entity" | "Relationship"} - private String searchText; - - /* - * Maps of digests. A digest is much smaller than the full instance. - * - * The entity digest map is keyed by entityGUID and each digest consists of - * { entityGUID, label, gen, metadataCollectionName, metadataCollectionId, provenance } - * - * The relationship digest map is keyed by relationshipGUID and each digest - * consists of a triplet of digests: - * { relationshipDigest, end1Digest, end2Digest }, where the entity digests are - * as described above and the relationship digest is similar, but pertains to a - * relationship, so it contains - * { relationshipGUID, label, end1GUID, end2GUID, idx, gen, metadataCollectionName, - * metadataCollectionId, provenance } - */ - private Map entities; - private Map relationships; - - /** - * Default constructor - */ - public RexSearchResponse() - { - super(); - } - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RexSearchResponse(RexSearchResponse template) - { - super(template); - - if (template != null) { - this.serverName = template.getServerName(); - this.searchCategory = template.getSearchCategory(); - this.searchText = template.getSearchText(); - this.entities = template.getEntities(); - this.relationships = template.getRelationships(); - } - } - - - - - public String getServerName() { return this.serverName; } - - public String getSearchText() { return this.searchText; } - - public String getSearchCategory() { return this.searchCategory; } - - public Map getEntities() { return this.entities; } - - public Map getRelationships() { - return this.relationships; - } - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setSearchText(String searchText) { this.searchText = searchText; } - - public void setSearchCategory(String searchCategory) { this.searchCategory = searchCategory; } - - public void setEntities(Map entities) { this.entities = entities; } - - public void setRelationships(Map relationships) { this.relationships = relationships; } -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTraversalRequestBody.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTraversalRequestBody.java deleted file mode 100644 index 0f93a8b2328..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTraversalRequestBody.java +++ /dev/null @@ -1,133 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import java.util.List; -import java.util.Objects; - - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class RexTraversalRequestBody { - - - /* - * The RexTraversalRequestBody class provides a body for REST requests to perform a rex-traversal - */ - - private String serverName; // must be non-null - private String platformName; // must be non-null - private String entityGUID; // must be non-null, GUID of root of traversal - private Boolean enterpriseOption; - private List entityTypeGUIDs; // a list of type guids or null - private List relationshipTypeGUIDs; // a list of type guids or null - private List classificationNames; // a list of names or null - private Integer depth; // the depth of traversal - private long asOfTime = 0; // as of time to issue the query. 0 means now. - - - public RexTraversalRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getPlatformName() { return platformName; } - - public String getEntityGUID() { return entityGUID; } - - public Boolean getEnterpriseOption() { - if (enterpriseOption == null) - return false; - else - return enterpriseOption; - } - - public List getEntityTypeGUIDs() { return entityTypeGUIDs; } - - public List getRelationshipTypeGUIDs() { - return relationshipTypeGUIDs; - } - - public List getClassificationNames() { - return classificationNames; - } - - public Integer getDepth() { return depth; } - - public long getAsOfTime() { - return asOfTime; - } - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public void setEntityGUID(String entityGUID) { this.entityGUID = entityGUID; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setEntityTypeGUIDs(List entityTypeGUIDs) { this.entityTypeGUIDs = entityTypeGUIDs; } - - public void setRelationshipTypeGUIDs(List relationshipTypeGUIDs) { - this.relationshipTypeGUIDs = relationshipTypeGUIDs; - } - - public void setClassificationNames(List classificationNames) { - this.classificationNames = classificationNames; - } - - public void setDepth(Integer depth) { this.depth = depth; } - - public void setAsOfTime(long asOfTime) { - this.asOfTime = asOfTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RexTraversalRequestBody)) return false; - RexTraversalRequestBody that = (RexTraversalRequestBody) o; - - return getAsOfTime() == that.getAsOfTime() && Objects.equals(getServerName(), that.getServerName()) && Objects.equals(getPlatformName(), that.getPlatformName()) && Objects.equals(getEntityGUID(), that.getEntityGUID()) && Objects.equals(getEnterpriseOption(), that.getEnterpriseOption()) && Objects.equals(getEntityTypeGUIDs(), that.getEntityTypeGUIDs()) && Objects.equals(getRelationshipTypeGUIDs(), that.getRelationshipTypeGUIDs()) && Objects.equals(getClassificationNames(), that.getClassificationNames()) && Objects.equals(getDepth(), that.getDepth()); - } - - @Override - public int hashCode() { - return Objects.hash(getServerName(), getPlatformName(), getEntityGUID(), getEnterpriseOption(), getEntityTypeGUIDs(), getRelationshipTypeGUIDs(), getClassificationNames(), getDepth(), getAsOfTime()); - } - - - @Override - public String toString() - { - return "RexTraversalRequestBody{" + - ", serverName=" + serverName + - ", platformName=" + platformName + - ", entityGUID=" + entityGUID + - ", depth=" + depth + - ", enterpriseOption=" + enterpriseOption + - ", entityTypeGUIDs=" + entityTypeGUIDs + - ", relationshipTypeGUIDs=" + relationshipTypeGUIDs + - ", classificationNames=" + classificationNames + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTraversalResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTraversalResponse.java deleted file mode 100644 index 34c924fa56b..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTraversalResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.RexTraversal; - -import java.util.Arrays; - -public class RexTraversalResponse extends RexViewOMVSAPIResponse { - - - private RexTraversal rexTraversal; - - /** - * Default constructor - */ - public RexTraversalResponse() - { - super(); - } - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RexTraversalResponse(RexTraversalResponse template) - { - super(template); - - if (template != null) { - this.rexTraversal = template.getRexTraversal(); - } - } - - - /** - * Return the rexTraversal result. - * - * @return bean - */ - public RexTraversal getRexTraversal() - { - return rexTraversal; - } - - - /** - * Set the rexTraversal result. - * - * @param rexTraversal - bean - */ - public void setRexTraversal(RexTraversal rexTraversal) - { - this.rexTraversal = rexTraversal; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RexTraversalResponse{" + - "rexTraversal=" + rexTraversal + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTypesRequestBody.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTypesRequestBody.java deleted file mode 100644 index 74e18d80a6c..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexTypesRequestBody.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class RexTypesRequestBody { - - - /* - * The RexTypesRequestBody class provides a body for REST requests to perform a load of type information - */ - - private String serverName; // must be non-null - private String platformName; // must be non-null - private Boolean enterpriseOption; - - - public RexTypesRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getPlatformName() { return platformName; } - - public Boolean getEnterpriseOption() { - if (enterpriseOption == null) - return false; - else - return enterpriseOption; - } - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - - - @Override - public String toString() - { - return "RexTypesRequestBody{" + - ", serverName=" + serverName + - ", platformName=" + platformName + - ", enterpriseOption=" + enterpriseOption + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexViewOMVSAPIResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexViewOMVSAPIResponse.java deleted file mode 100644 index 796a5ef3bcf..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/RexViewOMVSAPIResponse.java +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.api.rest; - -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RexViewOMVSAPIResponse provides a common header for the Repository Explorer OMVS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = TypeExplorerResponse.class, name = "TypeExplorerResponse"), - @JsonSubTypes.Type(value = RexSearchResponse.class, name = "RexSearchResponse"), - @JsonSubTypes.Type(value = RexEntityDetailResponse.class, name = "RexEntityDetailResponse"), - @JsonSubTypes.Type(value = RexPreTraversalResponse.class, name = "RexPreTraversalResponse"), - @JsonSubTypes.Type(value = RexRelationshipResponse.class, name = "RexRelationshipResponse"), - @JsonSubTypes.Type(value = RexTraversalResponse.class, name = "RexTraversalResponse") -}) - -public abstract class RexViewOMVSAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public RexViewOMVSAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RexViewOMVSAPIResponse(RexViewOMVSAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "RexViewOMVSAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/TypeExplorerResponse.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/TypeExplorerResponse.java deleted file mode 100644 index ce9470ea904..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/TypeExplorerResponse.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.rex.api.rest; - - -import org.odpi.openmetadata.viewservices.rex.api.properties.TypeExplorer; - -import java.util.Arrays; - -public class TypeExplorerResponse extends RexViewOMVSAPIResponse { - - - private TypeExplorer typeExplorer = null; - - /** - * Default constructor - */ - public TypeExplorerResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TypeExplorerResponse(TypeExplorerResponse template) - { - super(template); - - if (template != null) - { - this.typeExplorer = template.getTypeExplorer(); - } - } - - - /** - * Return the typeExplorer result. - * - * @return bean - */ - public TypeExplorer getTypeExplorer() - { - return typeExplorer; - } - - - /** - * Set the typeExplorer result. - * - * @param typeExplorer - bean - */ - public void setTypeExplorer(TypeExplorer typeExplorer) - { - this.typeExplorer = typeExplorer; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TypeExplorerResponse{" + - "typeExplorer=" + typeExplorer + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/package-info.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/package-info.java deleted file mode 100644 index 4686c148209..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/rest/package-info.java +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.viewservices.rex.api.rest; diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/README.md b/open-metadata-implementation/view-services/rex-view/rex-view-server/README.md deleted file mode 100644 index ac6c904f8bf..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Repository Explorer Open Metadata View Service (OMVS) server-side implementation - -The Repository Explorer OMVS server-side support is organized in the following top level packages - -* admin - RexViewAdmin controls this OMVS's lifecycle. It is initialised here receiving the view service configuration. It is shutdown here. -* handlers - instance handler -* server - implementation of the view service - ----- -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/view-services/rex-view/rex-view-server/build.gradle b/open-metadata-implementation/view-services/rex-view/rex-view-server/build.gradle deleted file mode 100644 index fc9964cff15..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:rex-view:rex-view-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - 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-client') - implementation 'org.springframework:spring-web' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/admin/RexViewAdmin.java b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/admin/RexViewAdmin.java deleted file mode 100644 index c357dd02ff7..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/admin/RexViewAdmin.java +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.admin; - - -import org.odpi.openmetadata.adminservices.configuration.properties.IntegrationViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.adminservices.ffdc.OMAGAdminAuditCode; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexViewAuditCode; -import org.odpi.openmetadata.viewservices.rex.server.RexViewServicesInstance; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - - -/** - * RexViewAdmin is the class that is called by the UI Server to initialize and terminate - * the Repository Explorer OMVS. The initialization call provides this OMVS with the Audit log and configuration. - */ -public class RexViewAdmin extends ViewServiceAdmin { - - private static final Logger log = LoggerFactory.getLogger(RexViewAdmin.class); - - - protected String resourceEndpointsPropertyName = "resourceEndpoints"; /* Common */ - - private AuditLog auditLog = null; - private RexViewServicesInstance instance = null; - private String serverName = null; - - /** - * Default constructor - */ - public RexViewAdmin() { - } - - /** - * Initialize the REX view service. - * - * @param serverName name of the local server - * @param viewServiceConfig specific configuration properties for this view service. - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use to issue calls to the remote server. - * @param maxPageSize maximum page size. 0 means unlimited - * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. - */ - @Override - public void initialize(String serverName, - ViewServiceConfig viewServiceConfig, - AuditLog auditLog, - String serverUserName, - int maxPageSize) - - throws OMAGConfigurationErrorException - { - - final String actionDescription = "initialize"; - - auditLog.logMessage(actionDescription, RexViewAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - this.auditLog = auditLog; - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + actionDescription); - } - - /* - * This method will be called (by Operational Services) with the view service config passed as a ViewServiceConfig. - * This is the super type of IntegrationViewServiceConfig which is what this service actually requires. - */ - IntegrationViewServiceConfig integrationViewServiceConfig; - if (viewServiceConfig instanceof IntegrationViewServiceConfig) - { - integrationViewServiceConfig = (IntegrationViewServiceConfig) viewServiceConfig; - } - else - { - logBadConfiguration(viewServiceConfig.getViewServiceName(), - "viewServiceConfig", - viewServiceConfig.toString(), - auditLog, - actionDescription); - - // unreachable - return; - } - - final String viewServiceFullName = viewServiceConfig.getViewServiceName(); - - try - { - - List resourceEndpoints = this.extractResourceEndpoints(integrationViewServiceConfig.getResourceEndpoints(), - viewServiceFullName, - auditLog); - - - - /* - * The name and rootURL of a repository server are not passed at this stage - they are not known at this stage - * because they are set at runtime by the user and potentially changed between operations. - */ - this.instance = new RexViewServicesInstance(serverName, - auditLog, - serverUserName, - maxPageSize, - resourceEndpoints); - - this.serverName = serverName; - - auditLog.logMessage(actionDescription, - RexViewAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), - viewServiceConfig.toString()); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + actionDescription); - } - - } - catch (OMAGConfigurationErrorException error) - { - throw error; - } - catch (Exception error) - { - auditLog.logException(actionDescription, - RexViewAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage()), - viewServiceConfig.toString(), - error); - - super.throwUnexpectedInitializationException(actionDescription, - ViewServiceDescription.REPOSITORY_EXPLORER.getViewServiceFullName(), - error); - } - - } - - /** - * Shutdown the rex view service. - */ - @Override - public void shutdown() { - final String actionDescription = "shutdown"; - - log.debug("==> Method: " + actionDescription); - - auditLog.logMessage(actionDescription, RexViewAuditCode.SERVICE_TERMINATING.getMessageDefinition(serverName)); - - if (instance != null) - { - this.instance.shutdown(); - } - - auditLog.logMessage(actionDescription, RexViewAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(serverName)); - - log.debug("<== Method: " + actionDescription); - - } - - - /** - * Extract the resource endpoints property from the view services option. - * - * @param resourceEndpoints options passed to the access service. - * @param viewServiceFullName name of calling service - * @param auditLog audit log for error messages - * @return null or list of resource endpoints - * @throws OMAGConfigurationErrorException the supported zones property is not a list of zone names. - */ - protected List extractResourceEndpoints(List resourceEndpoints, - String viewServiceFullName, - AuditLog auditLog) throws OMAGConfigurationErrorException - { - final String methodName = "extractResourceEndpoints"; - - /* - * Rex cannot operate without any endpoints. - * Check if resourceEndpoints is null and if so call logBadConfigProperties, which will - * log the error and throw an OMAGConfigurationErrorException - */ - if (resourceEndpoints == null || resourceEndpoints.isEmpty()) - { - - logBadConfiguration(viewServiceFullName, - resourceEndpointsPropertyName, - resourceEndpoints == null ? "null" : resourceEndpoints.toString(), - auditLog, - methodName); - - // unreachable - return null; - - } - else - { - auditLog.logMessage(methodName, - OMAGAdminAuditCode.RESOURCE_ENDPOINTS.getMessageDefinition(viewServiceFullName, - resourceEndpoints.toString())); - return resourceEndpoints; - } - } -} - diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java deleted file mode 100644 index 011f793610a..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java +++ /dev/null @@ -1,1922 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.handlers; - - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph; -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.TypeDefLink; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityProxyOnlyException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.clients.EnterpriseRepositoryServicesClient; -import org.odpi.openmetadata.repositoryservices.clients.LocalRepositoryServicesClient; -import org.odpi.openmetadata.repositoryservices.clients.MetadataCollectionServicesClient; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefGallery; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexExceptionHandler; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexViewErrorCode; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexViewServiceException; -import org.odpi.openmetadata.viewservices.rex.api.properties.ClassificationExplorer; -import org.odpi.openmetadata.viewservices.rex.api.properties.EntityExplorer; -import org.odpi.openmetadata.viewservices.rex.api.properties.RelationshipExplorer; -import org.odpi.openmetadata.viewservices.rex.api.properties.ResourceEndpoint; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexEntityDigest; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexExpandedEntityDetail; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexExpandedRelationship; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexPreTraversal; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexRelationshipAndEntitiesDigest; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexRelationshipDigest; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexTraversal; -import org.odpi.openmetadata.viewservices.rex.api.properties.RexTypeStats; -import org.odpi.openmetadata.viewservices.rex.api.properties.TypeExplorer; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; - - -/** - * The RexViewHandler is initialised with the server the call should be sent to. - * The handler exposes methods for functionality for the repository explorer view - */ -public class RexViewHandler -{ - private static final Logger log = LoggerFactory.getLogger(RexViewHandler.class); - - /* - * Specify a constant for the (max) length to which labels will be truncated. - */ - private static final int TRUNCATED_STRING_LENGTH = 24; - - - /* - * viewServiceOptions should have been validated in the Admin layer. - * The viewServiceOptions contains a list of resource endpoints that the - * view service can connect to. It is formatted like this: - * - * "resourceEndpoints" : [ - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Platform", - * "platformName" : "Platform1", - * "platformRootURL" : "https://localhost:8082", - * "description" : "Egeria deployment on local development server" - * }, - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Platform", - * "platformName" : "Platform2", - * "platformRootURL" : "https://localhost:9443", - * "description" : "Egeria deployment on local test server" - * }, - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Server", - * "serverName" : "Metadata_Server", - * "serverInstanceName" : "Metadata Server 1", - * "platformName" : "Platform1", - * "description" : "Metadata server for development testing" - * }, - * { - * "class" : "ResourceEndpointConfig", - * "resourceCategory" : "Server", - * "serverName" : "Metadata_Server2", - * "serverInstanceName" : "Metadata Server 2", - * "platformName" : "Platform2", - * "description" : "Metadata server used as home for test artefacts" - * } - * ] - */ - - private Map configuredPlatforms = null; // map is keyed using platformRootURL - private Map configuredServerInstances = null; // map is keyed using serverName+platformRootURL so each instance is unique - - - - - /** - * Default constructor for RexViewHandler - */ - public RexViewHandler() { - - } - - - /** - * Constructor for RexViewHandler with configured resourceEndpoints - * @param resourceEndpoints - list of resource endpoint configuration objects for this view service - */ - public RexViewHandler(List resourceEndpoints) { - - /* - * Populate map of resources with their endpoints.... - */ - - // TODO - It would be desirable to add validation rules to ensure uniqueness etc. - - configuredPlatforms = new HashMap<>(); - configuredServerInstances = new HashMap<>(); - - if (resourceEndpoints != null && !resourceEndpoints.isEmpty()) { - - resourceEndpoints.forEach(res -> { - - String resCategory = res.getResourceCategory(); - ResourceEndpoint rep = new ResourceEndpoint(res); - - String resName = null; - - switch (resCategory) { - case "Platform": - resName = res.getPlatformName(); - configuredPlatforms.put(resName, rep); - break; - - case "Server": - resName = res.getServerInstanceName(); - configuredServerInstances.put(resName, rep); - break; - - default: - // Unsupported category is ignored - break; - - } - }); - } - - } - - - - /** - * getResourceEndpoints - returns a list of the configured resource endpoints. Does not include discovered resource endpoints. - * - * @param userId userId under which the request is performed - * @param methodName The name of the method being invoked - * @return The resource endpoints that have been configured for the view service - * - */ - public Map> getResourceEndpoints(String userId, String methodName) - - { - Map> returnMap = new HashMap<>(); - - List platformList = null; - List serverList = null; - - if (!configuredPlatforms.isEmpty()) - { - platformList = new ArrayList<>(); - platformList.addAll(configuredPlatforms.values()); - } - - if (!configuredServerInstances.isEmpty()) - { - serverList = new ArrayList<>(); - serverList.addAll(configuredServerInstances.values()); - } - - returnMap.put("platformList",platformList); - returnMap.put("serverList",serverList); - - return returnMap; - } - - - - /** - * resolvePlatformRootURL - * - * This method will look up the configured root URL for the named platform. - * - * @param platformName - the name if the platform to be resolved (to a URL) - * @return resolved platform URL Root - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - private String resolvePlatformRootURL(String platformName, String methodName) throws RexViewServiceException - - { - String platformRootURL = null; - - if (platformName != null) { - ResourceEndpoint resource = configuredPlatforms.get(platformName); - if (resource != null) { - platformRootURL = resource.getResourceRootURL(); - } - } - if (platformName == null || platformRootURL == null) { - throw new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_NULL_PLATFORM_NAME.getMessageDefinition(), - this.getClass().getName(), - methodName); - } - - return platformRootURL; - } - - - /** - * Retrieve type information from the repository server - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param methodName The name of the method being invoked - * @return response containing the TypeExplorer object. - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - public TypeExplorer getTypeExplorer(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - String methodName) - throws - RexViewServiceException - - { - - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) - { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } - else - { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - TypeExplorer tex = new TypeExplorer(); - - TypeDefGallery typeDefGallery = repositoryServicesClient.getAllTypes(userId); - - List typeDefs = typeDefGallery.getTypeDefs(); - for (TypeDef typeDef : typeDefs) - { - TypeDefCategory tdCat = typeDef.getCategory(); - switch (tdCat) - { - case ENTITY_DEF: - EntityExplorer eex = new EntityExplorer((EntityDef) typeDef); - tex.addEntityExplorer(typeDef.getName(), eex); - break; - case RELATIONSHIP_DEF: - RelationshipExplorer rex = new RelationshipExplorer((RelationshipDef) typeDef); - tex.addRelationshipExplorer(typeDef.getName(), rex); - break; - case CLASSIFICATION_DEF: - ClassificationExplorer cex = new ClassificationExplorer((ClassificationDef) typeDef); - tex.addClassificationExplorer(typeDef.getName(), cex); - break; - default: - // Ignore this typeDef and continue with next - break; - } - } - - // Include EnumDefs in the TEX - List attributeTypeDefs = typeDefGallery.getAttributeTypeDefs(); - for (AttributeTypeDef attributeTypeDef : attributeTypeDefs) - { - AttributeTypeDefCategory tdCat = attributeTypeDef.getCategory(); - switch (tdCat) - { - case ENUM_DEF: - tex.addEnumExplorer(attributeTypeDef.getName(), (EnumDef) attributeTypeDef); - break; - default: - // Ignore this AttributeTypeDef and continue with next - break; - } - } - - // All typeDefs processed, resolve linkages and return the TEX object - // The platformRootURL and repositoryName are passed in only for error logging - tex.resolve(platformRootURL, repositoryServerName); - return tex; - - } - - - catch (UserNotAuthorizedException e) - { - throw RexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), methodName, e); - } - catch (RepositoryErrorException e) - { - throw RexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), methodName, e); - } - catch (InvalidParameterException e) - { - throw RexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), methodName, e); - } - - - } - - /** - * Retrieve entity (by GUID) from the repository server - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param entityGUID the GUID of the entity to retrieve - * @param asOfTime return the entity at this date, if null then now. - * @param methodName The name of the method being invoked - * @return response containing the RexExpandedEntityDetail object. - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - public RexExpandedEntityDetail getEntity(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - String entityGUID, - Date asOfTime, - String methodName) - throws - RexViewServiceException - - { - - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) - { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } - else - { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - /* - * Find the metadataCollectionId of the repository - this is used later to determine whether - * each returned entity is homed in the metadataCollection owned by this repository, or not. - */ - String metadataCollectionId = repositoryServicesClient.getMetadataCollectionId(userId); - - - - TypeExplorer typeExplorer = getTypeExplorer(userId, - repositoryServerName, - platformName, - enterpriseOption, - methodName); - - EntityDetail entityDetail = null; - if (asOfTime == null) { - entityDetail = repositoryServicesClient.getEntityDetail(userId, entityGUID); - } else { - entityDetail = repositoryServicesClient.getEntityDetail(userId, entityGUID, asOfTime); - } - - String label = this.chooseLabelForEntity(entityDetail, typeExplorer); - - String provenance = determineInstanceProvenance(entityDetail, metadataCollectionId, enterpriseOption); - - RexExpandedEntityDetail rexExpEntityDetail = new RexExpandedEntityDetail(entityDetail, - label, - repositoryServerName, - platformName, - provenance); - - return rexExpEntityDetail; - - } - catch (UserNotAuthorizedException e) - { - throw RexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), - methodName, - e); - } - catch (RepositoryErrorException e) - { - throw RexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), - methodName, - e); - } - catch (InvalidParameterException e) - { - throw RexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), - methodName, - e); - } - catch (EntityNotKnownException e) - { - throw RexExceptionHandler.mapOMRSEntityNotKnownException(this.getClass().getName(), - methodName, - repositoryServerName, - enterpriseOption, - e); - } - catch (EntityProxyOnlyException e) - { - throw RexExceptionHandler.mapOMRSEntityProxyOnlyException(this.getClass().getName(), methodName, e); - } - catch (FunctionNotSupportedException e) { - throw RexExceptionHandler.mapOMRSEntityHistoricalNotSupportedException(this.getClass().getName(), methodName, e); - } - } - - - /** - * Retrieve relationship (by GUID) from the repository server - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param relationshipGUID the GUID of the relationship to retrieve - * @param asOfTime return the relationship at this date, if null then now. - * @param methodName The name of the method being invoked - * @return response containing the RexExpandedEntityDetail object. - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - public RexExpandedRelationship getRelationship(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - String relationshipGUID, - Date asOfTime, - String methodName) - throws - RexViewServiceException - - { - - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) - { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } - else - { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - /* - * Find the metadataCollectionId of the repository - this is used later to determine whether - * each returned entity is homed in the metadataCollection owned by this repository, or not. - */ - String metadataCollectionId = repositoryServicesClient.getMetadataCollectionId(userId); - - - Relationship relationship = null; - if (asOfTime == null) { - relationship = repositoryServicesClient.getRelationship(userId, relationshipGUID); - } else { - relationship = repositoryServicesClient.getRelationship(userId, relationshipGUID, asOfTime); - } - // Create digests for both ends - - TypeExplorer typeExplorer = getTypeExplorer(userId, - repositoryServerName, - platformName, - enterpriseOption, - methodName); - - EntityProxy entity1 = relationship.getEntityOneProxy(); - EntityProxy entity2 = relationship.getEntityTwoProxy(); - String label1 = this.chooseLabelForEntityProxy(entity1, typeExplorer); - String label2 = this.chooseLabelForEntityProxy(entity2, typeExplorer); - - RexEntityDigest digest1 = new RexEntityDigest(entity1.getGUID(), - label1, - 0, - entity1.getMetadataCollectionName(), - entity1.getMetadataCollectionId(), - "proxy"); - RexEntityDigest digest2 = new RexEntityDigest(entity2.getGUID(), - label2, - 0, - entity2.getMetadataCollectionName(), - entity2.getMetadataCollectionId(), - "proxy"); - - String label = this.chooseLabelForRelationship(relationship); - - String provenance = determineInstanceProvenance(relationship, metadataCollectionId, enterpriseOption); - - - RexExpandedRelationship rexExpRelationship = new RexExpandedRelationship(relationship, - label, - digest1, - digest2, - repositoryServerName, - platformName, - provenance); - - return rexExpRelationship; - - } - catch (UserNotAuthorizedException e) - { - throw RexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), - methodName, - e); - } - catch (RepositoryErrorException e) - { - throw RexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), - methodName, - e); - } - catch (InvalidParameterException e) - { - throw RexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), - methodName, - e); - } - catch (RelationshipNotKnownException e) - { - throw RexExceptionHandler.mapOMRSRelationshipNotKnownException(this.getClass().getName(), - methodName, - repositoryServerName, - enterpriseOption, - e); - } - catch (FunctionNotSupportedException e) { - throw RexExceptionHandler.mapOMRSEntityHistoricalNotSupportedException(this.getClass().getName(), methodName, e); - } - - - } - - /** - * Retrieve entities (by text search) from the repository server - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param searchText the search expression that entities must match - * @param entityTypeName the name of a type used to filter the entity search - * @param classificationNames classification names to limit find by - * @param asOfTime return the entities at this date, if null then now. - * @param methodName The name of the method being invoked - * @return a map of entity digests for the entities that matched the search - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - public Map findEntities(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - String searchText, - String entityTypeName, - List classificationNames, - Date asOfTime, - String methodName) - throws - RexViewServiceException - - { - - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) - { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } - else - { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - /* - * Find the metadataCollectionId of the repository - this is used later to determine whether - * each returned entity is homed in the metadataCollection owned by this repository, or not. - */ - String metadataCollectionId = repositoryServicesClient.getMetadataCollectionId(userId); - - - TypeExplorer typeExplorer = getTypeExplorer(userId, - repositoryServerName, - platformName, - enterpriseOption, - methodName); - - - String entityTypeGUID = typeExplorer.getEntityTypeGUID(entityTypeName); - - List entities = repositoryServicesClient.findEntitiesByPropertyValue( - userId, - entityTypeGUID, - searchText, - 0, - null, - classificationNames, - asOfTime, - null, - null, - 0); - - - if (entities != null) - { - - // Process the list of EntityDetail objects and produce a map of EntityDigest objects - - Map digestMap = new HashMap<>(); - - for (int e = 0; e < entities.size(); e++) - { - EntityDetail entityDetail = entities.get(e); - String label = this.chooseLabelForEntity(entityDetail, typeExplorer); - - String provenance = determineInstanceProvenance(entityDetail, metadataCollectionId, enterpriseOption); - - RexEntityDigest entityDigest = new RexEntityDigest(entityDetail.getGUID(), - label, - 0, - entityDetail.getMetadataCollectionName(), - entityDetail.getMetadataCollectionId(), - provenance); - - digestMap.put(entityDetail.getGUID(), entityDigest); - - } - - return digestMap; - } - else - { - return null; - } - - } - - catch (UserNotAuthorizedException e) - { - throw RexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), - methodName, - e); - } - catch (RepositoryErrorException e) - { - throw RexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), - methodName, - e); - } - catch (InvalidParameterException e) - { - throw RexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), - methodName, - e); - } - catch (TypeErrorException e) - { - throw RexExceptionHandler.mapOMRSTypeErrorException(this.getClass().getName(), - methodName, - e); - } - catch (PropertyErrorException e) - { - throw RexExceptionHandler.mapOMRSPropertyErrorException(this.getClass().getName(), - methodName, - e); - } - catch (PagingErrorException e) - { - throw RexExceptionHandler.mapOMRSPagingErrorException(this.getClass().getName(), - methodName, - e); - } - catch (FunctionNotSupportedException e) - { - throw RexExceptionHandler.mapOMRSEntityHistoricalNotSupportedException(this.getClass().getName(), methodName, e); - } - - } - - - /** - * Retrieve relationships (by text search) from the repository server - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param searchText the search expression that relationships must match - * @param relationshipTypeName the name of a type used to filter the relationship search - * @param asOfTime return the relationships at this date, if null then now. - * @param methodName The name of the method being invoked - * @return a map of relationship digests for the relationships that matched the search - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - public Map findRelationships(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - String searchText, - String relationshipTypeName, - Date asOfTime, - String methodName) - throws - RexViewServiceException - - { - - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) - { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } - else - { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - /* - * Find the metadataCollectionId of the repository - this is used later to determine whether - * each returned entity is homed in the metadataCollection owned by this repository, or not. - */ - String metadataCollectionId = repositoryServicesClient.getMetadataCollectionId(userId); - - - TypeExplorer typeExplorer = getTypeExplorer(userId, - repositoryServerName, - platformName, - enterpriseOption, - methodName); - - - String relationshipTypeGUID = typeExplorer.getRelationshipTypeGUID(relationshipTypeName); - - List relationships = repositoryServicesClient.findRelationshipsByPropertyValue( - userId, - relationshipTypeGUID, - searchText, - 0, - null, - asOfTime, - null, - null, - 0); - - - if (relationships != null) - { - - // Process the list of Relationship objects and produce a list of super digests... - - Map superDigests = new HashMap<>(); - - - for (int r = 0; r < relationships.size(); r++) - { - - Relationship relationship = relationships.get(r); - String label = this.chooseLabelForRelationship(relationship); - - String provenance = determineInstanceProvenance(relationship, metadataCollectionId, enterpriseOption); - - // Create the super digest - - RexRelationshipAndEntitiesDigest superDigest = new RexRelationshipAndEntitiesDigest(); - - // Create the relationship digest - - RexRelationshipDigest relationshipDigest = new RexRelationshipDigest(relationship.getGUID(), - label, - relationship.getEntityOneProxy().getGUID(), - relationship.getEntityTwoProxy().getGUID(), - 0, - 0, - relationship.getMetadataCollectionName(), - relationship.getMetadataCollectionId(), - provenance); - - - superDigest.setRelationshipDigest(relationshipDigest); - - // Create digests for both ends - - EntityProxy entity1 = relationship.getEntityOneProxy(); - EntityProxy entity2 = relationship.getEntityTwoProxy(); - String label1 = this.chooseLabelForEntityProxy(entity1, typeExplorer); - String label2 = this.chooseLabelForEntityProxy(entity2, typeExplorer); - - RexEntityDigest digest1 = new RexEntityDigest(entity1.getGUID(), - label1, - 0, - entity1.getMetadataCollectionName(), - entity1.getMetadataCollectionId(), - "proxy"); - RexEntityDigest digest2 = new RexEntityDigest(entity2.getGUID(), - label2, - 0, - entity2.getMetadataCollectionName(), - entity2.getMetadataCollectionId(), - "proxy"); - - - superDigest.setEnd1Digest(digest1); - superDigest.setEnd2Digest(digest2); - - superDigests.put(relationship.getGUID(), superDigest); - - - } - - return superDigests; - } - else - { - return null; - } - - } - catch (UserNotAuthorizedException e) - { - throw RexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), - methodName, - e); - } - catch (RepositoryErrorException e) - { - throw RexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), - methodName, - e); - } - catch (InvalidParameterException e) - { - throw RexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), - methodName, - e); - } - catch (TypeErrorException e) - { - throw RexExceptionHandler.mapOMRSTypeErrorException(this.getClass().getName(), - methodName, - e); - } - catch (PropertyErrorException e) - { - throw RexExceptionHandler.mapOMRSPropertyErrorException(this.getClass().getName(), - methodName, - e); - } - catch (PagingErrorException e) - { - throw RexExceptionHandler.mapOMRSPagingErrorException(this.getClass().getName(), - methodName, - e); - } - catch (FunctionNotSupportedException e) - { - throw RexExceptionHandler.mapOMRSFunctionNotSupportedException(this.getClass().getName(), - methodName, - e); - } - } - - - - - /** - * Retrieve the neighborhood surrounding an entity for pre-traversal. - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param entityGUID the identity of the entity from which to traverse - * @param depth the depth to which the method should traverse - * @param asOfTime return the entities and relationships at this date, if null then now. - * @param methodName The name of the method being invoked - * @return a RexTraversal object containing the neighborhood information - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - public RexPreTraversal preTraversal(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - String entityGUID, - int depth, - long asOfTime, - String methodName) - throws - RexViewServiceException - - { - - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) - { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } - else - { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - /* - * Because we will want to extract labels based on type we'll need to know the types supported by the repository... - */ - - TypeExplorer typeExplorer = getTypeExplorer(userId, - repositoryServerName, - platformName, - enterpriseOption, - methodName); - - InstanceGraph instGraph = null; - - if (depth > 0) - { - Date asOfTimeDate = null; - if (asOfTime != 0) { - asOfTimeDate = new Date(asOfTime); - } - instGraph = repositoryServicesClient.getEntityNeighborhood(userId, - entityGUID, - null, - null, - null, - null, - asOfTimeDate, - depth); - } - - - else - { - - /* - * Since depth is 0 - use getEntityDetail instead of neighborhood - */ - - EntityDetail entityDetail = repositoryServicesClient.getEntityDetail( - userId, - entityGUID); - - // Construct an InstanceGraph containing just the entityDetail - instGraph = new InstanceGraph(); - - List entityDetailList = new ArrayList<>(); - entityDetailList.add(entityDetail); - instGraph.setEntities(entityDetailList); - - } - - - /* - * Should have an InstanceGraph with one or more entities and maybe relationships - * Parse the RexTraversal into a RexPreTraversal for the PreTraversalResponse - */ - - RexPreTraversal rexPreTraversal = new RexPreTraversal(); - - - rexPreTraversal.setEntityGUID(entityGUID); - rexPreTraversal.setDepth(depth); - - // Process entities - List entities = instGraph.getEntities(); - Map entityCountsByType = new HashMap<>(); - Map classificationCountsByType = new HashMap<>(); - if (entities != null) - { - for (EntityDetail ent : entities) - { - /* - * Process entity type information - * - * Skip the entity that the traversal started from. - * Counting the starting entity will distort the counts - */ - if (!ent.getGUID().equals(entityGUID)) - { - - InstanceType instanceType = ent.getType(); - String typeGUID = instanceType.getTypeDefGUID(); - String typeName = instanceType.getTypeDefName(); - if (entityCountsByType.get(typeName) == null) - { - // First sight of an instance of this type - RexTypeStats stats = new RexTypeStats(typeGUID, 1); - entityCountsByType.put(typeName, stats); - } - else - { - // Add to the count of instances of this type - Integer existingCount = entityCountsByType.get(typeName).getCount(); - entityCountsByType.get(typeName).setCount(existingCount + 1); - } - // Process entity classification information - List classifications = ent.getClassifications(); - if (classifications != null) - { - for (Classification classification : classifications) - { - String classificationName = classification.getName(); - if (classificationCountsByType.get(classificationName) == null) - { - // First sight of an instance of this type - RexTypeStats stats = new RexTypeStats(null, 1); - classificationCountsByType.put(classificationName, stats); - } - else - { - // Add to the count of instances of this type - Integer existingCount = classificationCountsByType.get(classificationName).getCount(); - classificationCountsByType.get(classificationName).setCount(existingCount + 1); - } - } - } - } - } - } - // Process relationships - List relationships = instGraph.getRelationships(); - Map relationshipCountsByType = new HashMap<>(); - if (relationships != null) - { - for (Relationship rel : relationships) - { - InstanceType instanceType = rel.getType(); - String typeGUID = instanceType.getTypeDefGUID(); - String typeName = instanceType.getTypeDefName(); - if (relationshipCountsByType.get(typeName) == null) - { - // First sight of an instance of this type - RexTypeStats stats = new RexTypeStats(typeGUID, 1); - relationshipCountsByType.put(typeName, stats); - } - else - { - // Add to the count of instances of this type - Integer existingCount = relationshipCountsByType.get(typeName).getCount(); - relationshipCountsByType.get(typeName).setCount(existingCount + 1); - } - } - } - // Update the rexPreTraversal - rexPreTraversal.setEntityInstanceCounts(entityCountsByType); - rexPreTraversal.setRelationshipInstanceCounts(relationshipCountsByType); - rexPreTraversal.setClassificationInstanceCounts(classificationCountsByType); - - return rexPreTraversal; - - } - catch (UserNotAuthorizedException e) - { - throw RexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), - methodName, - e); - } - catch (RepositoryErrorException e) - { - throw RexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), - methodName, - e); - } - catch (InvalidParameterException e) - { - throw RexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), - methodName, - e); - } - catch (TypeErrorException e) - { - throw RexExceptionHandler.mapOMRSTypeErrorException(this.getClass().getName(), - methodName, - e); - } - catch (PropertyErrorException e) - { - throw RexExceptionHandler.mapOMRSPropertyErrorException(this.getClass().getName(), - methodName, - e); - } - catch (FunctionNotSupportedException e) - { - throw RexExceptionHandler.mapOMRSFunctionNotSupportedException(this.getClass().getName(), - methodName, - e); - } - catch (EntityNotKnownException e) - { - throw RexExceptionHandler.mapOMRSEntityNotKnownException(this.getClass().getName(), - methodName, - repositoryServerName, - enterpriseOption, - e); - } - catch (EntityProxyOnlyException e) - { - throw RexExceptionHandler.mapOMRSEntityProxyOnlyException(this.getClass().getName(), methodName, e); - } - - - - - } - - - - /** - * Retrieve the neighborhood surrounding an entity. - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param entityGUID the identity of the entity from which to traverse - * @param depth the depth to which the method should traverse - * @param entityTypeGUIDs the GUIDs of entity types to filter the neighborhood - * @param relationshipTypeGUIDs the GUIDs of relationship types to filter the neighborhood - * @param classificationNames the names of classification types to filter the neighborhood - * @param asOfTime return the entities and relationships at this date, if null then now. - * @param methodName The name of the method being invoked - * @return a RexTraversal object containing the neighborhood information - * - * Exceptions - * @throws RexViewServiceException an error was detected and details are reported in the exception - */ - public RexTraversal traversal(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - String entityGUID, - int depth, - List entityTypeGUIDs, - List relationshipTypeGUIDs, - List classificationNames, - long asOfTime, - String methodName) - throws - RexViewServiceException - - { - Date asOfTimeDate = null; - if (asOfTime != 0) { - asOfTimeDate = new Date(asOfTime); - } - - try - { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) - { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } - else - { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - - /* - * Find the metadataCollectionId of the repository - this is used later to determine whether - * each returned entity is homed in the metadataCollection owned by this repository, or not. - */ - String metadataCollectionId = repositoryServicesClient.getMetadataCollectionId(userId); - - - - /* - * Because we will want to extract labels based on type we'll need to know the types supported by the repository... - */ - - TypeExplorer typeExplorer = getTypeExplorer(userId, - repositoryServerName, - platformName, - enterpriseOption, - methodName); - - InstanceGraph instGraph = null; - - if (depth > 0) - { - - instGraph = repositoryServicesClient.getEntityNeighborhood(userId, - entityGUID, - entityTypeGUIDs, - relationshipTypeGUIDs, - null, - classificationNames, - asOfTimeDate, - depth); - } - - - else - { - - /* - * Since depth is 0 - use getEntityDetail instead of neighborhood - */ - - EntityDetail entityDetail = repositoryServicesClient.getEntityDetail( - userId, - entityGUID); - - // Construct an InstanceGraph containing just the entityDetail - instGraph = new InstanceGraph(); - - List entityDetailList = new ArrayList<>(); - entityDetailList.add(entityDetail); - instGraph.setEntities(entityDetailList); - - } - - - // Should have an InstanceGraph with one or more entities and maybe relationships - - if (instGraph != null) - { - - RexTraversal rt = new RexTraversal(); - - /* Format the results - * - * The format of the digests in the RexTraversal is as follows: - * a map of entityGUID --> { entityGUID, label, gen } - * a map of relationshipGUID --> { relationshipGUID, end1GUID, end2GUID, idx, label, gen } - */ - - /* - * An InstanceGraph contains relationships and entities that are homed by the repository that - * created the InstanceGraph. The relationships may refer to entities that are not homed by that - * repository, so those entities will not be included in the 'entities' portion of the InstanceGraph. - * Since our RexTraversal needs to be 'complete' - i.e. we have an EntityDigest for each end of - * every relationship, we must generate digests not just from the entities lit, but also spot any - * relationship ends that are NOT in the list and generate a digest for each of them as well. - * Start by processing the homed entities. - * Then process the relationships and check fr each end of each relationship whether we need to - * augment the RexTraversal entityDigestMap. - */ - List entities = instGraph.getEntities(); - Map entityDigestMap = null; - if (entities != null && !entities.isEmpty()) - { - entityDigestMap = new HashMap<>(); - for (EntityDetail entityDetail : entities) - { - /* - * We need entityGUID, label (computed) and if !preTraversal also include gen - */ - String entGUID = entityDetail.getGUID(); - - // Pass the typeExplorer to the labeller so that it can traverse... - String entLabel = this.chooseLabelForEntity(entityDetail, typeExplorer); - - String provenance = determineInstanceProvenance(entityDetail, metadataCollectionId, enterpriseOption); - - RexEntityDigest red = new RexEntityDigest(entGUID, - entLabel, - 0, - entityDetail.getMetadataCollectionName(), - entityDetail.getMetadataCollectionId(), - provenance); - entityDigestMap.put(entGUID, red); - } - - } - - List relationships = instGraph.getRelationships(); - Map relationshipDigestMap = null; - if (relationships != null && !relationships.isEmpty()) - { - relationshipDigestMap = new HashMap<>(); - for (Relationship relationship : relationships) - { - /* - * We need: entityGUID, label (computed) and if !preTraversal also include gen - * relationshipGUID, label (computed), end1GUID, end2GUID, idx (computed), gen - */ - String relGUID = relationship.getGUID(); - String relLabel = this.chooseLabelForRelationship(relationship); - String end1GUID = relationship.getEntityOneProxy().getGUID(); - String end2GUID = relationship.getEntityTwoProxy().getGUID(); - - /* check for proxies... */ - if (entityDigestMap.get(end1GUID) == null) - { - /* add a digest for this proxy... */ - EntityProxy end1Proxy = relationship.getEntityOneProxy(); - String end1Label = this.chooseLabelForEntityProxy(end1Proxy, typeExplorer); - RexEntityDigest red = new RexEntityDigest(end1GUID, - end1Label, - 0, - end1Proxy.getMetadataCollectionName(), - end1Proxy.getMetadataCollectionId(), - "proxy" - ); - entityDigestMap.put(end1GUID, red); - } - if (entityDigestMap.get(end2GUID) == null) - { - /* add a digest for this proxy... */ - EntityProxy end2Proxy = relationship.getEntityTwoProxy(); - String end2Label = this.chooseLabelForEntityProxy(end2Proxy, typeExplorer); - RexEntityDigest red = new RexEntityDigest(end2GUID, - end2Label, - 0, - end2Proxy.getMetadataCollectionName(), - end2Proxy.getMetadataCollectionId(), - "proxy"); - entityDigestMap.put(end2GUID, red); - } - - - int idx = 0; - - String provenance = determineInstanceProvenance(relationship, metadataCollectionId, enterpriseOption); - - RexRelationshipDigest rrd = new RexRelationshipDigest(relGUID, - relLabel, - end1GUID, - end2GUID, - idx, - 0, - relationship.getMetadataCollectionName(), - relationship.getMetadataCollectionId(), - provenance); - relationshipDigestMap.put(relGUID, rrd); - } - } - - rt.setEntityGUID(entityGUID); - rt.setDepth(depth); - rt.setGen(0); - // Instead of using type guids in the traversal (which is to be sent to the browser) use type names instead. - List entityTypeNames = new ArrayList<>(); - if (entityTypeGUIDs != null && !entityTypeGUIDs.isEmpty()) - for (String entityTypeGUID : entityTypeGUIDs) - { - // Convert from typeGIUD to typeName - String entityTypeName = typeExplorer.getEntityTypeName(entityTypeGUID); - entityTypeNames.add(entityTypeName); - } - rt.setEntityTypeNames(entityTypeNames); - rt.setRelationshipTypeGUIDs(relationshipTypeGUIDs); - rt.setClassificationNames(classificationNames); - rt.setEntities(entityDigestMap); - rt.setRelationships(relationshipDigestMap); - rt.setServerName(repositoryServerName); - rt.setPlatformName(platformName); - - return rt; - } - - else - { - - String excMsg = "Could not retrieve subgraph for entity with guid" + entityGUID; - return null; - } - } - catch (UserNotAuthorizedException e) - { - throw RexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), - methodName, - e); - } - catch (RepositoryErrorException e) - { - throw RexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), - methodName, - e); - } - catch (InvalidParameterException e) - { - throw RexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), - methodName, - e); - } - catch (TypeErrorException e) - { - throw RexExceptionHandler.mapOMRSTypeErrorException(this.getClass().getName(), - methodName, - e); - } - catch (PropertyErrorException e) - { - throw RexExceptionHandler.mapOMRSPropertyErrorException(this.getClass().getName(), - methodName, - e); - } - catch (FunctionNotSupportedException e) - { - throw RexExceptionHandler.mapOMRSEntityHistoricalNotSupportedException(this.getClass().getName(), methodName, e); - } - catch (EntityNotKnownException e) - { - throw RexExceptionHandler.mapOMRSEntityNotKnownException(this.getClass().getName(), - methodName, - repositoryServerName, - enterpriseOption, - e); - } - catch (EntityProxyOnlyException e) - { - throw RexExceptionHandler.mapOMRSEntityProxyOnlyException(this.getClass().getName(), methodName, e); - } - - } - - - /** - * getLocalRepositoryServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * MetadataCollection interface. This client is used when the enterprise option is not set, and will - * connect to the local repository. - * - * @param serverName - name of the server to connect to - * @param serverRootURL - the root URL to connect to the server - * @throws InvalidParameterException - an invalid parameter was detected and reported - */ - private LocalRepositoryServicesClient getLocalRepositoryServicesClient(String serverName, - String serverRootURL) - throws - InvalidParameterException - - { - /* - * The serverName is used as the repositoryName - * The serverRootURL is used as part of the restRootURL, along with the serverName - */ - - /* - * The only exception thrown by the CTOR is InvalidParameterException, and this is not caught - * here because we want to surface it to the REST API that called this method so that the - * exception can be wrapped and a suitable indication sent in the REST Response. - */ - String restRootURL = serverRootURL + "/servers/" + serverName; - LocalRepositoryServicesClient client = new LocalRepositoryServicesClient(serverName, restRootURL); - - return client; - } - - /** - * getEnterpriseRepositoryServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * MetadataCollection interface. This client is used when the enterprise option is set, and will - * perform federation. - * - * @param serverName - name of the server to connect to - * @param serverRootURL - the root URL to connect to the server - * @throws InvalidParameterException - an invalid parameter was detected and reported - */ - private EnterpriseRepositoryServicesClient getEnterpriseRepositoryServicesClient(String serverName, - String serverRootURL) - throws - InvalidParameterException - { - - /* - * The serverName is used as the repositoryName - * The serverRootURL is used as part of the restRootURL, along with the serverName - */ - - /* - * The only exception thrown by the CTOR is InvalidParameterException, and this is not caught - * here because we want to surface it to the REST API that called this method so that the - * exception can be wrapped and a suitable indication sent in the REST Response. - */ - String restRootURL = serverRootURL + "/servers/" + serverName; - EnterpriseRepositoryServicesClient client = new EnterpriseRepositoryServicesClient(serverName, restRootURL); - - return client; - } - - private String chooseLabelForEntity(EntityDetail entityDetail, TypeExplorer typeExplorer) - { - - // By default, use the GUID of the instance. This is not a desirable - // label but if there is really nothing else to use, then the GUID is - // better than nothing at all. Maybe. - String label = entityDetail.getGUID(); - - - // Find the effective typeName - this is the highest supertype of the instance type - String instanceTypeName = null; - - InstanceType instanceType = entityDetail.getType(); - if (instanceType != null) { - instanceTypeName = instanceType.getTypeDefName(); - } - if (instanceTypeName == null || instanceTypeName.equals("")) { - // Drop out - there is no proper type information for the instance - just adopt the default set above. - return label; - } - - // We know that instanceTypeName is set to something we can use... - - // Traverse the TypeExplorer looking for the highest supertype.. - Map entityTypes = typeExplorer.getEntities(); - - String effTypeName = "DEFAULT"; - if (entityTypes != null) - { - - // Get the immediate entity instance type... - EntityExplorer eex = entityTypes.get(instanceTypeName); - TypeDefLink superType = eex.getEntityDef().getSuperType(); - while (superType != null) - { - String superTypeName = superType.getName(); - eex = entityTypes.get(superTypeName); - superType = eex.getEntityDef().getSuperType(); - } - // eex is now the effective type entry - TypeDef effectiveTypeDef = eex.getEntityDef(); - - effTypeName = effectiveTypeDef.getName(); - - } - - switch (effTypeName) { - - case "InformalTag": - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get("tagName") != null && - entityDetail.getProperties().getInstanceProperties().get("tagName").valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get("tagName").valueAsString(); - } - break; - - case "Like": - case "Rating": - if (entityDetail.getCreatedBy() != null) { - label = entityDetail.getCreatedBy(); - } - break; - - case "DataField": - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get("dataFieldName") != null && - entityDetail.getProperties().getInstanceProperties().get("dataFieldName").valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get("dataFieldName").valueAsString(); - } - break; - - case "Annotation": - case "AnnotationReview": - if (instanceTypeName != null) { - label = instanceTypeName; // use the local type name for anything under these types - } - break; - - case "LastAttachment": - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get("attachmentType") != null && - entityDetail.getProperties().getInstanceProperties().get("attachmentType").valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get("attachmentType").valueAsString(); - } - break; - - default: - // Anything that is left should be a Referenceable. - // If it has a displayName use that. - // Else if it has a name use that. - // Otherwise if it has a qualifiedName use up to the last TRUNCATED_STRING_LENGTH chars of that. - // If there is not qualifiedName drop through and use GUID (default) - if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get("displayName") != null && - entityDetail.getProperties().getInstanceProperties().get("displayName").valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get("displayName").valueAsString(); - } - else if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get("name") != null && - entityDetail.getProperties().getInstanceProperties().get("name").valueAsString() != null) { - - label = entityDetail.getProperties().getInstanceProperties().get("name").valueAsString(); - } - else if (entityDetail.getProperties() != null && - entityDetail.getProperties().getInstanceProperties() != null && - entityDetail.getProperties().getInstanceProperties().get("qualifiedName") != null) { - - String fullQN = entityDetail.getProperties().getInstanceProperties().get("qualifiedName").valueAsString(); - - int lengthQN = fullQN.length(); - if (lengthQN > TRUNCATED_STRING_LENGTH) { - String tailQN = "..." + fullQN.substring(lengthQN-TRUNCATED_STRING_LENGTH, lengthQN); - label = tailQN; - } else { - label = fullQN; - } - } - } - - return label; - - } - - - - private String chooseLabelForEntityProxy(EntityProxy entityProxy, TypeExplorer typeExplorer) - { - - // Refer to the comment in chooseLabelForEntity for labelling strategy - similar applies - // here but implementation caters for the entity only being a proxy. - // By default, use the GUID of the instance. This is not a desirable - // label but if there is really nothing else to use, then the GUID is - // better than nothing at all. Maybe. - String label = entityProxy.getGUID(); - - - // Find the effective typeName - this is the highest supertype of the instance type - String instanceTypeName = null; - - InstanceType instanceType = entityProxy.getType(); - if (instanceType != null) { - instanceTypeName = instanceType.getTypeDefName(); - } - if (instanceTypeName == null || instanceTypeName.equals("")) { - // Drop out - there is no proper type information for the instance - just adopt the default set above. - return label; - } - - // We know that instanceTypeName is set to something we can use... - - // Traverse the TypeExplorer looking for the highest supertype.. - Map entityTypes = typeExplorer.getEntities(); - - String effTypeName = "DEFAULT"; - if (entityTypes != null) - { - - // Get the immediate entity instance type... - EntityExplorer eex = entityTypes.get(instanceTypeName); - TypeDefLink superType = eex.getEntityDef().getSuperType(); - while (superType != null) - { - String superTypeName = superType.getName(); - eex = entityTypes.get(superTypeName); - superType = eex.getEntityDef().getSuperType(); - } - // eex is now the effective type entry - TypeDef effectiveTypeDef = eex.getEntityDef(); - - effTypeName = effectiveTypeDef.getName(); - } - - switch (effTypeName) { - - case "InformalTag": - if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("tagName") != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("tagName").valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get("tagName").valueAsString(); - - } - break; - - case "Like": - case "Rating": - if (entityProxy.getCreatedBy() != null) { - label = entityProxy.getCreatedBy(); - - } - break; - - case "DataField": - if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("dataFieldName") != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("dataFieldName").valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get("dataFieldName").valueAsString(); - - } - break; - - case "Annotation": - case "AnnotationReview": - if (instanceTypeName != null) { - label = instanceTypeName; // use the local type name for anything under these types - - } - break; - - default: - // Anything that is left should be a Referenceable. - // If it has a displayName use that. - // Otherwise if it has a qualifiedName use up to the last TRUNCATED_STRING_LENGTH chars of that. - // If there is not qualifiedName drop through and use GUID (default) - if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("displayName") != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("displayName").valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get("displayName").valueAsString(); - - } - else if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("name") != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("name").valueAsString() != null) { - - label = entityProxy.getUniqueProperties().getInstanceProperties().get("name").valueAsString(); - - } - else if (entityProxy.getUniqueProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties() != null && - entityProxy.getUniqueProperties().getInstanceProperties().get("qualifiedName") != null) { - - String fullQN = entityProxy.getUniqueProperties().getInstanceProperties().get("qualifiedName").valueAsString(); - - int lengthQN = fullQN.length(); - if (lengthQN > TRUNCATED_STRING_LENGTH) { - String tailQN = "..." + fullQN.substring(lengthQN-TRUNCATED_STRING_LENGTH, lengthQN); - label = tailQN; - } else { - label = fullQN; - } - } - - } - - return label; - - } - - - - private String chooseLabelForRelationship(Relationship relationship) - { - - // By default, use the GUID of the instance. This is not a desirable - // label but if there is really nothing else to use, then the GUID is - // better than nothing at all. Maybe. - String label = relationship.getGUID(); - - String instanceTypeName = null; - - InstanceType instanceType = relationship.getType(); - if (instanceType != null) { - instanceTypeName = instanceType.getTypeDefName(); - } - if (instanceTypeName == null || instanceTypeName.equals("")) { - // Drop out - there is no proper type information for the instance - just adopt the default set above. - return label; - } - - // We know that instanceTypeName is set to something we can use... - - // For now simply label relationships by type name. - label = instanceTypeName; - - return label; - - } - - - /* - * Record the provenance of the instance, in so far as this is discernible. - * Depending on whether enterprise option is enabled or not, retrieve and compare the - * metadataCollectionId from the entity with the one retrieved by the caller for the - * repository's metadataCollection. - */ - private String determineInstanceProvenance(InstanceAuditHeader instance, - String metadataCollectionId, - boolean enterpriseOption) - { - - String provenance; - if (enterpriseOption) - { - /* - * If enterprise option is set there is no way to differentiate home and reference copies. - */ - provenance = "ent"; - } - else if (instance.getMetadataCollectionId().equals(metadataCollectionId)) - { - /* - * This entity looks very at home here... - */ - provenance = "home"; - } - else - { - /* - * This instance looks like it is not at home... - */ - provenance = "refCopy"; - } - - return provenance; - - } - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewInstanceHandler.java b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewInstanceHandler.java deleted file mode 100644 index a6bd4cfa87d..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewInstanceHandler.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.server; - - -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.rex.handlers.RexViewHandler; - -/** - * RexViewInstanceHandler retrieves information from the instance map for the - * view service instances. The instance map is thread-safe. Instances are added - * and removed by the RexViewAdmin class. - */ -public class RexViewInstanceHandler extends OMVSServiceInstanceHandler -{ - - - - /** - * Default constructor registers the view service - */ - public RexViewInstanceHandler() { - - super(ViewServiceDescription.REPOSITORY_EXPLORER.getViewServiceName()); - - RexViewRegistration.registerViewService(); - } - - - /** - * The getRexHandler method retrieves the handler from the RexViewServicesInstance and returns it. - * @param userId the user performing the operation - * @param serverName the name of the server running the view-service - * @param serviceOperationName the operation to be performed - * @return RexHandler - * @throws InvalidParameterException - the server name is not recognized - * @throws UserNotAuthorizedException - the user id not permitted to perform the requested operation - * @throws PropertyServerException - the service name is not known - indicating a logic error - */ - public RexViewHandler getRexViewHandler(String userId, String serverName, String serviceOperationName) - throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - /* - * Get the RexViewServicesInstance. This is an instance associated with the UI servername (tenant). - */ - RexViewServicesInstance instance = (RexViewServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getRexViewHandler(); - } - - return null; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewRESTServices.java b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewRESTServices.java deleted file mode 100644 index b6176742112..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewRESTServices.java +++ /dev/null @@ -1,898 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.rex.server; - - -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexExceptionHandler; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexViewErrorCode; -import org.odpi.openmetadata.viewservices.rex.api.ffdc.RexViewServiceException; -import org.odpi.openmetadata.viewservices.rex.api.properties.*; -import org.odpi.openmetadata.viewservices.rex.api.rest.*; -import org.odpi.openmetadata.viewservices.rex.handlers.RexViewHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -import java.util.Date; -import java.util.List; -import java.util.Map; - - -/** - * The RexViewRESTServices provides the org.odpi.openmetadata.viewservices.rex.services implementation of the Repository Explorer Open Metadata - * View Service (OMVS). This interface provides view interfaces for enterprise architects. - */ - -public class RexViewRESTServices { - - protected static final RexViewInstanceHandler instanceHandler = new RexViewInstanceHandler(); - - private static final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(RexViewRESTServices.class), - instanceHandler.getServiceName()); - - private static final Logger log = LoggerFactory.getLogger(RexViewRESTServices.class); - - private static String className = RexViewRESTServices.class.getName(); - - /** - * Default constructor - */ - public RexViewRESTServices() { - - } - - - /** - * Retrieve platform origin - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @return response the list of resource endpoints configured for the view service - * - */ - public RexResourceEndpointListResponse getResourceEndpointList(String serverName, String userId) - { - - final String methodName = "getResourceEndpointList"; - - RexResourceEndpointListResponse response = new RexResourceEndpointListResponse(); - - AuditLog auditLog = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - RexViewHandler handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - - Map> lists = handler.getResourceEndpoints(userId, methodName); - List platformList = null; - List serverList = null; - if (lists != null) - { - platformList = lists.get("platformList"); - serverList = lists.get("serverList"); - } - response.setPlatformList(platformList); - response.setServerList(serverList); - - } - catch (InvalidParameterException error) - { - restExceptionHandler.captureInvalidParameterException(response, error); - } - catch (PropertyServerException error) - { - restExceptionHandler.capturePropertyServerException(response, error); - } - catch (UserNotAuthorizedException error) - { - restExceptionHandler.captureUserNotAuthorizedException(response, error); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - return response; - - } - - - - /** - * Load types - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody request body - * @return response the repository's type information or exception information - */ - - public TypeExplorerResponse getTypeExplorer(String serverName, String userId, RexTypesRequestBody requestBody) - { - - final String methodName = "getTypeExplorer"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - TypeExplorerResponse response = new TypeExplorerResponse(); - - if (requestBody != null) - { - - AuditLog auditLog = null; - RexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - - } - catch (InvalidParameterException error) - { - restExceptionHandler.captureInvalidParameterException(response, error); - } - catch (PropertyServerException error) - { - restExceptionHandler.capturePropertyServerException(response, error); - } - catch (UserNotAuthorizedException error) - { - restExceptionHandler.captureUserNotAuthorizedException(response, error); - } - catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - /* - * Attempt to retrieve the type information - */ - try - { - response.setTypeExplorer(handler.getTypeExplorer(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - methodName)); - } - catch (RexViewServiceException exception) - { - RexExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - RexViewServiceException exception = new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - RexExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Get entity by GUID - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody request body - * @return the created category. - * - *
    - *
  • InvalidParameterException one of the parameters is null or invalid. - *
- */ - - public RexEntityDetailResponse getEntity(String serverName, - String userId, - RexEntityRequestBody requestBody) - { - - final String methodName = "getEntity"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - RexEntityDetailResponse response = new RexEntityDetailResponse(); - - /* - * If there is no requestBody then do not proceed - just raise an exception - */ - if (requestBody != null) - { - - AuditLog auditLog = null; - RexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - /* - * Attempt to retrieve the entity - */ - - - try { - - - if (handler == null) { - - throw new RexViewServiceException(RexViewErrorCode.HANDLER_INVALID.getMessageDefinition(methodName), - className, - methodName); - } else { - long asOfTime = requestBody.getAsOfTime(); - Date asOfTimeDate = null; - if (asOfTime != 0) { - asOfTimeDate = new Date(asOfTime); - if (asOfTimeDate.after(new Date())) { - // we do not support future dates - throw new RexViewServiceException(RexViewErrorCode.INVALID_AS_OF_DATETIME.getMessageDefinition(methodName), - className, - methodName); - } - } - - response.setExpandedEntityDetail(handler.getEntity(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - requestBody.getEntityGUID(), - asOfTimeDate, - methodName)); - } - } - catch (RexViewServiceException exception) - { - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - } - - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - RexViewServiceException exception = new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Get relationship by GUID - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody request body - * @return the created category. - * - *
    - *
  • InvalidParameterException one of the parameters is null or invalid. - *
- */ - - public RexRelationshipResponse getRelationship(String serverName, - String userId, - RexRelationshipRequestBody requestBody) - { - - final String methodName = "getRelationship"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - RexRelationshipResponse response = new RexRelationshipResponse(); - - if (requestBody != null) - { - AuditLog auditLog = null; - RexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - - /* - * Attempt to retrieve the relationship - */ - try - { - if (handler == null) { - - throw new RexViewServiceException(RexViewErrorCode.HANDLER_INVALID.getMessageDefinition(methodName), - className, - methodName); - } else { - long asOfTime = requestBody.getAsOfTime(); - Date asOfTimeDate = null; - if (asOfTime != 0) { - asOfTimeDate = new Date(asOfTime); - if (asOfTimeDate.after(new Date())) { - // we do not support future dates - throw new RexViewServiceException(RexViewErrorCode.INVALID_AS_OF_DATETIME.getMessageDefinition(methodName), - className, - methodName); - } - } - - response.setExpandedRelationship(handler.getRelationship(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - requestBody.getRelationshipGUID(), - asOfTimeDate, - methodName)); - } - } - catch (RexViewServiceException exception) - { - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - RexViewServiceException exception = new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - RexExceptionHandler.captureCheckedException( response, exception, exception.getClass().getName()); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Find entities using searchText - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody request body - * @return a RexSearchResponse containing a map of entity digests that match the search parameters. - * The map has type Map of String to RexEntityDigest, where the key is the entity's GUID - * - *
    - *
  • InvalidParameterException one of the parameters is null or invalid. - *
- */ - - public RexSearchResponse findEntities(String serverName, - String userId, - RexSearchBody requestBody) { - - final String methodName = "findEntities"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - RexSearchResponse response = new RexSearchResponse(); - - if (requestBody != null) - { - - AuditLog auditLog = null; - RexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - try - { - if (handler == null) { - - throw new RexViewServiceException(RexViewErrorCode.HANDLER_INVALID.getMessageDefinition(methodName), - className, - methodName); - } else { - long asOfTime = requestBody.getAsOfTime(); - Date asOfTimeDate = null; - if (asOfTime != 0) { - asOfTimeDate = new Date(asOfTime); - if (asOfTimeDate.after(new Date())) { - // we do not support future dates - throw new RexViewServiceException(RexViewErrorCode.INVALID_AS_OF_DATETIME.getMessageDefinition(methodName), - className, - methodName); - } - } - response.setEntities(handler.findEntities(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - requestBody.getSearchText(), - requestBody.getTypeName(), - requestBody.getClassificationNames(), - asOfTimeDate, - methodName)); - - response.setSearchCategory("Entity"); - response.setSearchText(requestBody.getSearchText()); - response.setServerName(requestBody.getServerName()); - - } - } - catch (RexViewServiceException exception) - { - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - RexViewServiceException exception = new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Find relationships using searchText - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody request body - * @return a RexSearchResponse containing a map of relationship digests that match the search parameters. - * The map has type Map of String to RexRelationshipDigest, where the key is the relationship's GUID - * - *
    - *
  • InvalidParameterException one of the parameters is null or invalid. - *
- */ - - public RexSearchResponse findRelationships(String serverName, - String userId, - RexSearchBody requestBody) - { - - final String methodName = "findRelationships"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - RexSearchResponse response = new RexSearchResponse(); - - if (requestBody != null) - { - - AuditLog auditLog = null; - RexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - try - { - if (handler == null) { - - throw new RexViewServiceException(RexViewErrorCode.HANDLER_INVALID.getMessageDefinition(methodName), - className, - methodName); - } else { - long asOfTime = requestBody.getAsOfTime(); - Date asOfTimeDate = null; - if (asOfTime != 0) { - asOfTimeDate = new Date(asOfTime); - if (asOfTimeDate.after(new Date())) { - // we do not support future dates - throw new RexViewServiceException(RexViewErrorCode.INVALID_AS_OF_DATETIME.getMessageDefinition(methodName), - className, - methodName); - } - } - Map superDigests = handler.findRelationships(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - requestBody.getSearchText(), - requestBody.getTypeName(), - asOfTimeDate, - methodName); - - response.setRelationships(superDigests); - - - response.setSearchCategory("Relationship"); - response.setSearchText(requestBody.getSearchText()); - response.setServerName(requestBody.getServerName()); - } - } - catch (RexViewServiceException exception) - { - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - RexViewServiceException exception = new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * This method retrieves the neighborhood around a starting entity for pre=traversal - *

- * When exploring an entity neighborhood we return an InstanceGraph which contains - * te entities and relationships that were traversed. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param serverName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the InstanceGraph for the traersal or exception information - * - *

    - *
  • InvalidParameterException one of the parameters is null or invalid. - *
- */ - - public RexPreTraversalResponse preTraversal(String serverName, - String userId, - RexTraversalRequestBody requestBody) - { - - final String methodName = "preTraversal"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - RexPreTraversalResponse response = new RexPreTraversalResponse(); - - if (requestBody != null) - { - - AuditLog auditLog = null; - RexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - try - { - - RexPreTraversal preTraversal = handler.preTraversal(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - requestBody.getEntityGUID(), - requestBody.getDepth(), - requestBody.getAsOfTime(), - methodName); - - if (preTraversal != null) - { - response.setRexPreTraversal(preTraversal); - } - - } - catch (RexViewServiceException exception) - { - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - RexViewServiceException exception = new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * This method retrieves the neighborhood around a starting entity. - *

- * When exploring an entity neighborhood we return an InstanceGraph which contains - * te entities and relationships that were traversed. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param serverName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param requestBody request body containing parameters to formulate repository request - * @return response object containing the InstanceGraph for the traersal or exception information - * - *

    - *
  • InvalidParameterException one of the parameters is null or invalid. - *
- */ - - public RexTraversalResponse traversal(String serverName, - String userId, - RexTraversalRequestBody requestBody) - { - - final String methodName = "traversal"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - RexTraversalResponse response = new RexTraversalResponse(); - - if (requestBody != null) - { - - AuditLog auditLog = null; - RexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getRexViewHandler(userId, serverName, methodName); - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - try { - - RexTraversal traversal = handler.traversal(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - requestBody.getEntityGUID(), - requestBody.getDepth(), - requestBody.getEntityTypeGUIDs(), - requestBody.getRelationshipTypeGUIDs(), - requestBody.getClassificationNames(), - requestBody.getAsOfTime(), - methodName); - - if (traversal != null) - { - response.setRexTraversal(traversal); - } - - } - catch (RexViewServiceException exception) - { - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - RexViewServiceException exception = new RexViewServiceException(RexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - RexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewRegistration.java b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewRegistration.java deleted file mode 100644 index 568bcff0864..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewRegistration.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.server; - -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceRegistrationEntry; -import org.odpi.openmetadata.adminservices.registration.OMAGViewServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.viewservices.rex.admin.RexViewAdmin; - -/** - * RexViewRegistration registers the view service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * view service in the server and it can be configured and used. - */ -public class RexViewRegistration -{ - /** - * Pass information about this view service to the OMAG Server administration services. - */ - public static void registerViewService() - { - ViewServiceDescription myDescription = ViewServiceDescription.REPOSITORY_EXPLORER; - ViewServiceRegistrationEntry myRegistration = new ViewServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - RexViewAdmin.class.getName()); - OMAGViewServiceRegistration.registerViewService(myRegistration); - } -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewServicesInstance.java b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewServicesInstance.java deleted file mode 100644 index c7e929dcc64..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/server/RexViewServicesInstance.java +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.rex.server; - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstance; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.rex.handlers.RexViewHandler; - -import java.util.List; - - -/** - * RexViewServicesInstance caches references to objects it needs for a specific server. - * It is also responsible for registering itself in the instance map. - */ - -public class RexViewServicesInstance extends OMVSServiceInstance -{ - - private static ViewServiceDescription myDescription = ViewServiceDescription.REPOSITORY_EXPLORER; - - private RexViewHandler rexViewHandler = null; - - - /** - * Set up the Rex OMVS instance - * Unlike the superclass () Rex does not expect to be passed remoteServerName or remoteServerURL during configuration or initialization. - * This is because in Repository Explorer these are variable (set per requested operation), so the are passed by the RESTServices methods. - * - * @param serverName name of this server - * @param auditLog logging destination - * @param localServerUserId userId used for server initiated actions - * @param maxPageSize maximum page size - * @param resourceEndpoints list of resource endpoint configuration objects - */ - public RexViewServicesInstance(String serverName, - AuditLog auditLog, - String localServerUserId, - int maxPageSize, - List resourceEndpoints) - { - - - - super(serverName, - myDescription.getViewServiceName(), - auditLog, - localServerUserId, - maxPageSize, - null, // see comment above about remoteServerName - null); // .... and remoteServerURL. - - - this.rexViewHandler = new RexViewHandler(resourceEndpoints); - } - - - - /** - * Return the handler for rex view requests - * - * @return handler object - */ - RexViewHandler getRexViewHandler() - { - return rexViewHandler; - } - - - -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-spring/README.md b/open-metadata-implementation/view-services/rex-view/rex-view-spring/README.md deleted file mode 100644 index b20c27b39a4..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-spring/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Repository Explorer View Open Metadata View Service (OMVS) with Spring - -The Repository Explorer OMVS spring module uses spring to create the server-side support for the REST services. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-spring/build.gradle b/open-metadata-implementation/view-services/rex-view/rex-view-spring/build.gradle deleted file mode 100644 index 0bad02bf852..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-spring/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:rex-view:rex-view-api') - implementation project(':open-metadata-implementation:view-services:rex-view:rex-view-server') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation 'org.springframework:spring-web' - implementation 'io.swagger.core.v3:swagger-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-spring/src/main/java/org/odpi/openmetadata/viewservices/rex/server/spring/RexViewRESTResource.java b/open-metadata-implementation/view-services/rex-view/rex-view-spring/src/main/java/org/odpi/openmetadata/viewservices/rex/server/spring/RexViewRESTResource.java deleted file mode 100644 index 6073293cd84..00000000000 --- a/open-metadata-implementation/view-services/rex-view/rex-view-spring/src/main/java/org/odpi/openmetadata/viewservices/rex/server/spring/RexViewRESTResource.java +++ /dev/null @@ -1,232 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.rex.server.spring; - - -import org.odpi.openmetadata.viewservices.rex.api.rest.RexEntityDetailResponse; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexEntityRequestBody; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexPreTraversalResponse; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexRelationshipRequestBody; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexRelationshipResponse; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexResourceEndpointListResponse; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexSearchBody; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexSearchResponse; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexTraversalRequestBody; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexTraversalResponse; -import org.odpi.openmetadata.viewservices.rex.api.rest.RexTypesRequestBody; -import org.odpi.openmetadata.viewservices.rex.api.rest.TypeExplorerResponse; -import org.odpi.openmetadata.viewservices.rex.server.RexViewRESTServices; -import org.springframework.web.bind.annotation.*; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; - - - -/** - * The RexViewRESTResource provides the Spring API endpoints of the Repository Explorer Open Metadata View Service (OMVS). - * This interface provides a service for enterprise architects. - */ - -@RestController -@RequestMapping("/servers/{viewServerName}/open-metadata/view-services/rex/users/{userId}") - -@Tag(name="View Server: Rex OMVS", description="Explore instance data in a repository or cohort for visualization of graphs of related items.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/rex/overview/")) - -public class RexViewRESTResource { - - private final RexViewRESTServices restAPI = new RexViewRESTServices(); - - - /** - * Default constructor - */ - public RexViewRESTResource() { - } - - - /** - * Get the configured resource endpoints - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @return response object containing the list of resource endpoints or exception information - */ - - @GetMapping("/resource-endpoints") - public RexResourceEndpointListResponse getResourceEndpoints(@PathVariable String viewServerName, - @PathVariable String userId) { - return restAPI.getResourceEndpointList(viewServerName, userId); - - } - - - /** - * Load type information - *

- * Load type information from the repository server. This is used to populate filters. - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the repository's type information or exception information - */ - @PostMapping("/types") - public TypeExplorerResponse getTypeExplorer(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody RexTypesRequestBody body) { - return restAPI.getTypeExplorer(viewServerName, userId, body); - - } - - - /** - * This method gets an entity detail. - *

- * When retrieving a single entity we return the whole EntityDetail object. This is - * because the entity is being used as the user focus object and will be displayed in - * the details pane. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the repository's type information or exception information - */ - @PostMapping("/instances/entity") - public RexEntityDetailResponse getEntity(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody RexEntityRequestBody body) { - return restAPI.getEntity(viewServerName, userId, body); - - } - - /** - * This method gets a relationship. - *

- * When retrieving a single relationship we return the whole Relationship object. This is - * because the relationship is being used as the user focus object and will be displayed in - * the details pane. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the repository's type information or exception information - */ - @PostMapping("/instances/relationship") - public RexRelationshipResponse getRelationship(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody RexRelationshipRequestBody body) { - return restAPI.getRelationship(viewServerName, userId, body); - - } - - - /** - * This method searches for entities based on property value. - *

- * When searching for entities, we return a list of EntityDigest objects. This is - * because the digests are used to display a list of search hits to the user - * from which they can select which entities they would like to add to the graph. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the repository's type information or exception information - */ - @PostMapping("/instances/entities/by-property-value") - public RexSearchResponse findEntities(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody RexSearchBody body) { - return restAPI.findEntities(viewServerName, userId, body); - - } - - /** - * This method searches for relationships based on property value. - *

- * When searching for relationships, we return a list of RelationshipDigest objects. This is - * because the digests are used to display a list of search hits to the user - * from which they can select which relationships they would like to add to the graph. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the repository's type information or exception information - */ - @PostMapping("/instances/relationships/by-property-value") - public RexSearchResponse findRelationships(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody RexSearchBody body) { - return restAPI.findRelationships(viewServerName, userId, body); - - } - - /** - * This method retrieves the neighborhood around a starting entity for pre-traversal - *

- * When exploring an entity neighborhood we return an InstanceGraph which contains - * the entities and relationships that were traversed. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the InstanceGraph for the traversal or exception information - */ - @PostMapping("/instances/pre-traversal") - public RexPreTraversalResponse rexPreTraversal(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody RexTraversalRequestBody body) { - return restAPI.preTraversal(viewServerName, userId, body); - - - - } - - /** - * This method retrieves the neighborhood around a starting entity. - *

- * When exploring an entity neighborhood we return an InstanceGraph which contains - * the entities and relationships that were traversed. - *

- * The method used is POST because the parameters supplied by the UI to the VS are conveyed in - * the request body. - * - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the InstanceGraph for the traversal or exception information - */ - @PostMapping("/instances/traversal") - public RexTraversalResponse rexTraversal(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody RexTraversalRequestBody body) { - return restAPI.traversal(viewServerName, userId, body); - - - - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/README.md b/open-metadata-implementation/view-services/server-author-view/README.md deleted file mode 100644 index 7f22a5c62e9..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/README.md +++ /dev/null @@ -1,39 +0,0 @@ - - - -![InDev](../../../images/egeria-content-status-in-development.png#pagewidth) - -# Server Author View Service - - -The Server Author Open Metadata View Service (OMVS) is an Integration View Service that supports Server Author UI operations -that retrieve, author and deploy server configurations. - -The purpose of this interface is to enable an IT Infrastructure Architect to author servers in the Egeria eco-system. - - -This view service offers authoring capabilies; OMAG server configurations are accumulated on the -platform root url that is identified in the Server Author View configuration by the 'omagServerPlatformRootURL'. - -While authoring servers, the caller is not aware of where the server configurations are being accumulated. - -In addition to server authoring capabilities, this view service exposes a query that returns the known platforms, -as defined in the view, each platform that is returned contines the servers are stored on them. The caller can -then deploy a server that has been configured onto a particular platform. - -In this view server API, platforms and servers are refered to by name, to ease consumption by a user interface. - -This view service calls a remote platform using the [admin client](../../admin-services/admin-services-client/README.md). - -The module structure for the Server Author OMVS is as follows: - -* [server-author-view-api](server-author-view-api) defines the interface to the view service. -* [server-author-view-server](server-author-view-server) supports an implementation of the view service. -* [server-author-view-spring](server-author-view-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - -Return to [open-metadata-implementation](../..). - ----- -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/view-services/server-author-view/server-author-view-api/README.md b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/README.md deleted file mode 100644 index e6976bf2ed2..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Server Author Open Metadata View Service (OMVS) api definitions - -The Server Author OMVS api support is organized in the following top level packages - -* ffdc - audit log and error log definitions -* properties - types used by the API -* rest - the response body definitions for REST calls - ----- -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/view-services/server-author-view/server-author-view-api/build.gradle b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/build.gradle deleted file mode 100644 index 489ff14cbd8..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:platform-services:platform-services-api') - implementation project(':open-metadata-implementation:server-operations:server-operations-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-api') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:repository-services:repository-services-client') - implementation 'org.slf4j:slf4j-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -description = 'Server Author API View Services' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorExceptionHandler.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorExceptionHandler.java deleted file mode 100644 index 957bbc15b81..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorExceptionHandler.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.api.ffdc; - -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * The Server Author Exception handler maps OMAG exceptions that have been produced by the admin client into - * Server author Exceptions. - */ -public class ServerAuthorExceptionHandler { - - - /** - * Method for capturing an exception into a REST response. - * - * Set the exception information into the response. - * This exception capture handler strips off the messageId from the front of the message as - * the message is intended for user-consumption. - * - * @param response REST Response - * @param error returned response. - * @param exceptionClassName class name of the exception to recreate - */ - public static void captureCheckedException(FFDCResponse response, - OCFCheckedExceptionBase error, - String exceptionClassName) - - { - response.setRelatedHTTPCode(error.getReportedHTTPCode()); - response.setExceptionClassName(exceptionClassName); - if (error.getReportedCaughtException() != null) - { - response.setExceptionCausedBy(error.getReportedCaughtException().getClass().getName()); - } - response.setActionDescription(error.getReportingActionDescription()); - String fullErrorMessage = error.getReportedErrorMessage(); - String errorMessageId = error.getReportedErrorMessageId(); - String trimmedErrorMessage = fullErrorMessage.substring(errorMessageId.length()+1); - response.setExceptionErrorMessage(trimmedErrorMessage); - response.setExceptionErrorMessageId(error.getReportedErrorMessageId()); - response.setExceptionErrorMessageParameters(error.getReportedErrorMessageParameters()); - response.setExceptionSystemAction(error.getReportedSystemAction()); - response.setExceptionUserAction(error.getReportedUserAction()); - response.setExceptionProperties(null); - } - - - /* - * Mapping functions for OMAG (back-end) admin services exceptions - */ - - /** - * Map an OMAGNotAuthorizedException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UI - * @param className the name of the calling class - * @param methodName the name of the operation being requested - * @return mapped Server author View Exception - */ - public static ServerAuthorViewServiceException mapToUserNotAuthorizedException(String className, - String methodName) - { - return new ServerAuthorViewServiceException(ServerAuthorViewErrorCode.USER_NOT_AUTHORIZED.getMessageDefinition(), - className, - methodName); - } - - /** - * Map an OMAGInvalidParameterException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UI - * @param className the name of the calling class - * @param methodName the name of the operation being requested - * @param omagException supplied OMAGInvalidParameterException - * @return mapped Server author View Exception - */ - public static ServerAuthorViewServiceException mapOMAGInvalidParameterException(String className, - String methodName, - OMAGInvalidParameterException omagException) - { - String parameterName = omagException.getReportedErrorMessageParameters()[0]; - return new ServerAuthorViewServiceException(ServerAuthorViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, parameterName), - className, - methodName); - } - - /** - * Map an OMAG configuration exception to a ServerAuthorViewServiceException - * @param className the name of the calling class - * @param methodName the name of the operation being requested - * @param error the OMAGConfigurationErrorException error to be mapped - * @return ServerAuthorViewServiceException Server Author View Service Exception - */ - public static ServerAuthorViewServiceException mapOMAGConfigurationErrorException(String className, String methodName, OMAGConfigurationErrorException error) { - return new ServerAuthorViewServiceException(ServerAuthorViewErrorCode.CONFIG_ERROR.getMessageDefinition(methodName), - className, - methodName); - } - /** - * Map an OCF InvalidParameterException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UI - * @param className the name of the calling class - * @param methodName the name of the operation being requested - * @param error supplied OCF InvalidParameterException - * @return mapped Server author View Exception - */ - public static ServerAuthorViewServiceException mapOCFInvalidParameterException(String className, String methodName, InvalidParameterException error) { - String parameterName = error.getReportedErrorMessageParameters()[0]; - return new ServerAuthorViewServiceException(ServerAuthorViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, parameterName), - className, - methodName); - } - - public static ServerAuthorViewServiceException mapOCFPropertyServerError(String className, String methodName, PropertyServerException error) { - return new ServerAuthorViewServiceException(ServerAuthorViewErrorCode.INVALID_CONFIG_PROPERTY.getMessageDefinition(methodName), - className, - methodName); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewAuditCode.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewAuditCode.java deleted file mode 100644 index b387ce17545..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewAuditCode.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.api.ffdc; - - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - - -/** - * The ServerAuthorViewAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *

    - *
  • Log Message Id - 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 ServerAuthorViewAuditCode implements AuditLogMessageSet -{ - SERVICE_INITIALIZING("OMVS-SERVER-AUTHOR-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The Server Author View Service (OMVS) is initializing", - "The local server is initializing the Server Author OMVS. If the initialization is successful then audit message OMVS-SERVER-AUTHOR-0003 will be issued, if there were errors then they should be shown in the audit log. ", - "No action is required. This is part of the normal operation of the Server Author OMVS."), - - SERVICE_INITIALIZED("OMVS-SERVER-AUTHOR-0002", - AuditLogRecordSeverityLevel.STARTUP, - "The Server Author View Service (OMVS) is initialized", - "The Server Author OMVS has completed initialization. Calls will be accepted by this service, if OMRS is also configured and the view server has been started. ", - "No action is required. Once the OMRS is configured and the server is started, Server Author View Service requests can be accepted."), - - SERVICE_SHUTDOWN("OMVS-SERVER-AUTHOR-0003", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Server Author View Service (OMVS) is shutting down", - "The local server has requested shutdown of the Server Author OMVS.", - "No action is required. The operator should verify that shutdown was intended. This is part of the normal operation of the Server Author OMVS."), - - SERVICE_INSTANCE_FAILURE("OMVS-SERVER-AUTHOR-0004", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Server Author View Service (OMVS) is unable to initialize a new instance; error message is {0}", - "The view service detected an error during the start up of a specific server instance. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - - SERVICE_TERMINATING("OMVS-SERVER-AUTHOR-0005", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Server Author View Service (OMVS) is shutting down server instance {0}", - "The local handler has requested shut down of the Server Author OMVS.", - "No action is required. This is part of the normal operation of the service."), - - UNEXPECTED_EXCEPTION("OMVS-SERVER-AUTHOR-0006", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2}", - "The request returned an Exception.", - "This is probably a logic error. Review the stack trace to identify where the error occurred and work to resolve the cause.") - ; - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - - /** - * The constructor for ServerAuthorViewAuditCode expects to be passed one of the enumeration rows defined in - * ServerAuthorViewAuditCode above. For example: - * ServerAuthorViewAuditCode auditCode = ServerAuthorViewAuditCode.SERVER_NOT_AVAILABLE; - * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique identifier 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 - */ - ServerAuthorViewAuditCode(String messageId, - AuditLogRecordSeverityLevel 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. - */ - 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. - */ - 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 "ServerAuthorViewAuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - ", messageDefinition=" + getMessageDefinition() + - '}'; - } -} - diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewErrorCode.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewErrorCode.java deleted file mode 100644 index 221aee09499..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewErrorCode.java +++ /dev/null @@ -1,158 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The ServerAuthorViewErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMVS - * It is used in conjunction with all OMVS 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
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: 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 user should correct the error
  • - *
- */ -public enum ServerAuthorViewErrorCode implements ExceptionMessageSet -{ - SERVICE_NOT_INITIALIZED(404, "OMVS-SERVER_AUTHOR-400-001", - "The Server Author Open Metadata View Service (OMVS) has not been initialized.", - "The system is unable to perform the request because the service has not been initialized.", - "Initialize the view service retry the request."), - - INVALID_CONFIG_PROPERTY(404, "OMVS-SERVER_AUTHOR-400-002", - "The Server Author Open Metadata View Service (OMVS) configuration has an invalid or missing property, property name {0}.", - "The service is unable to initialize because the configuration is not valid or complete.", - "Correct the view service configuration and restart the view server."), - - VIEW_SERVICE_NULL_PLATFORM_NAME(400, "OMVS-SERVER_AUTHOR-400-003", - "The Server Author Open Metadata View Service (OMVS) has been called with a null platform name", - "The system is unable to resolve the platform to query without knowing what it is called.", - "The platform name is supplied by the caller to the OMAG view service. This call needs to be corrected before the view service can perform the request."), - - VIEW_SERVICE_NULL_SERVER_NAME(400, "OMVS-SERVER_AUTHOR-400-004", - "The Server Author Open Metadata View Service (OMVS) has been called with a null server name", - "The system is unable to resolve the server to query without knowing what it is called.", - "The server name is supplied by the caller to the OMAG view service. This call needs to be corrected before the view service can perform the request."), - - VIEW_SERVICE_INACTIVE_SERVER_NAME(400, "OMVS-SERVER_AUTHOR-400-005", - "The Server Author Open Metadata View Service (OMVS)'s cannot run {0}, because the view server with name {1} is not active, please contact your Platform administrator to start server {1}.", - "The system is complete the call, because the view server is not active.", - "The server name is supplied by the caller to the OMAG view service. Please ensure the named server is active and retry the call to the view service."), - - UNEXPECTED_EXCEPTION(400,"OMVS-SERVER_AUTHOR-400-006", - "An unexpected Exception occurred. The Exception message is {0}.", - "The system encountered an unexpected exception.", - "Review the exception message to assess whether this is a logic error, in which case raise a git issue against Egeria, or a resource constraint - in which case address that issue."), - - INVALID_PARAMETER(400, "OMVS-SERVER_AUTHOR-400-007", - "The server author view service operation {0} could not proceed with the setting of parameter {1}", - "The system detected that the parameter was not set to a valid value and could not perform the requested action.", - "Correct the parameter setting and retry the operation."), - - USER_NOT_AUTHORIZED(400, "OMVS-SERVER_AUTHOR-400-008", - "The server author view service was not authorized to perform the requested operation {0}", - "The system reported that server author view service was not authorized to perform the requested action.", - "Contact your platform administrator to configure the view service with appropriate credentials."), - CONFIG_ERROR(400, "OMVS-SERVER_AUTHOR-400-009", - "The server author view service requested an invalid configuration change in operation {0}", - "The system reported that server author view service requested configuration change was invalid.", - "Correct the requested configuration change and retry the operation."), - ; - - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - ServerAuthorViewErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewServiceException.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewServiceException.java deleted file mode 100644 index 613ca4c7ce4..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewServiceException.java +++ /dev/null @@ -1,96 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; - -import java.io.Serial; -import java.util.Arrays; - - -/** - * This is a simple exception class that can convey the few types of exception - * that it is sensible to propagate back to the user interface. The ServerAuthor handler will - * have detected or caught each error condition, audit logged it and will then - * create a ServerAuthorViewServiceException to capture the essential details that can be - * used in the UI. - */ -public class ServerAuthorViewServiceException extends OCFCheckedExceptionBase -{ - @Serial - private static final long serialVersionUID = 1L; - - /** - * Constructor - * @param messageDefinition message definition - * @param className class name for diagnostics purposes - * @param actionDescription current action - */ - public ServerAuthorViewServiceException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) - { - super(messageDefinition, className, actionDescription); - } - - - - /** - * JSON-style toString - * - * @return string of property names and values for this enum - */ - @Override - public String toString() - { - return "ServerAuthorViewServiceException{" + - ", reportedHTTPCode=" + getReportedHTTPCode() + - ", reportingClassName='" + getReportingClassName() + '\'' + - ", reportingActionDescription='" + getReportingActionDescription() + '\'' + - ", reportedErrorMessageId='" + getReportedErrorMessageId() + '\'' + - ", reportedErrorMessageParameters=" + Arrays.toString(getReportedErrorMessageParameters()) + - ", reportedSystemAction='" + getReportedSystemAction() + '\'' + - ", reportedUserAction='" + getReportedUserAction() + '\'' + - ", reportedCaughtException=" + getReportedCaughtException() + - ", relatedProperties=" + getRelatedProperties() + - '}'; - } - - /** - * 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 == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - return true; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return super.hashCode(); - } -} - diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/package-info.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/package-info.java deleted file mode 100644 index 1964217ae33..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Server Author OMVS. - */ -package org.odpi.openmetadata.viewservices.serverauthor.api.ffdc; diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/Platform.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/Platform.java deleted file mode 100644 index 7708848b65d..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/Platform.java +++ /dev/null @@ -1,323 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.serverauthor.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService; - -import java.util.*; - -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) -/** - * A summary of the platform for the Server Author View. It contains a name a description of the platform, a status and - * the associated servers if we can get them. It is a minimal representation of the platforms and associated stored servers, that could be - * displayed in a UI table. The platform url root and technical ids are hidden from the user interface. - */ -public class Platform { - - - private String platformName; - private String platformDescription; - private PlatformStatus platformStatus; - private Set storedServers = new HashSet<>(); - - private List accessServices; - private List engineServices; - private List integrationServices; - private List viewServices; - - /** - * Default Constructor sets the properties to nulls - */ - public Platform() { - /* - * Nothing to do. - */ - } - - /** - * Constructor - * - * @param platformName platform name - * @param platformDescription platform description - */ - public Platform(String platformName, String platformDescription) { - - this.platformName = platformName; - this.platformDescription = platformDescription; - } - - - /** - * Get the platform name - * - * @return platform name - */ - public String getPlatformName() { - return platformName; - } - - /** - * Set a meaningful name for the platform - * - * @param platformName set platform name - */ - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - /** - * Get the platform description - * - * @return platform description - */ - public String getPlatformDescription() { - return platformDescription; - } - - /** - * Set the description for the platform - * - * @param platformDescription set platform description - */ - public void setPlatformDescription(String platformDescription) { - this.platformDescription = platformDescription; - } - - /** - * Set the stored servers on this platform - * - * @return the stored servers on this platform - */ - public Set getStoredServers() { - return storedServers; - } - - /** - * Get the stored servers on this platform - * - * @param storedServers servers - */ - public void setStoredServers(Set storedServers) { - this.storedServers = storedServers; - } - - /** - * Get the access services that this platform supports. - * @return access services supported by this platform - */ - public List getAccessServices() { - return accessServices; - } - /** - * Set the access services that this platform supports. - * @param accessServices the access services that this platform supports. - */ - public void setAccessServices(List accessServices) { - this.accessServices = accessServices; - } - /** - * Get the engine services that this platform supports. - * @return engine services supported by this platform - */ - public List getEngineServices() { - return engineServices; - } - /** - * Set the engine services that this platform supports. - * @param engineServices engine services that this platform supports. - */ - public void setEngineServices(List engineServices) { - this.engineServices = engineServices; - } - /** - * Get the integration services that this platform supports. - * @return integration services supported by this platform - */ - public List getIntegrationServices() { - return integrationServices; - } - /** - * Set the integration services that this platform supports. - * @param integrationServices integration services that this platform supports. - */ - public void setIntegrationServices(List integrationServices) { this.integrationServices = integrationServices; } - /** - * Get the view services that this platform supports. - * @return view services supported by this platform - */ - public List getViewServices() { - return viewServices; - } - /** - * Set the view services that this platform supports. - * @param viewServices the view services that this platform supports. - */ - public void setViewServices(List viewServices) { - this.viewServices = viewServices; - } - - /** - * Add a stored server to the platform - * - * @param storedServer stored server to add - */ - public void addStoredServer(StoredServer storedServer) { - storedServers.add(storedServer); - } - - /** - * return the status of the platform - * - * @return the returned platform status - */ - public PlatformStatus getPlatformStatus() { - return platformStatus; - } - - /** - * Set the platform status - * - * @param platformStatus platform status to set - */ - public void setPlatformStatus(PlatformStatus platformStatus) { - this.platformStatus = platformStatus; - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - /** - * toString builder - * @param sb StringBuffer to build details in - * @return updated StringBuffer - */ - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("platform="); - sb.append("{"); - sb.append("platformName=").append(this.platformName).append(","); - sb.append("platformDescription=").append(this.platformDescription).append(","); - sb.append("platformStatus=").append(this.platformStatus).append(","); - sb.append("storedServers=["); - if (storedServers != null && storedServers.size() > 0) { - for (StoredServer storedServer : storedServers) { - sb.append(storedServer).append(','); - } - } - sb.append(']'); - sb.append("accessServices=["); - if (accessServices != null && accessServices.size() >0) { - for (RegisteredOMAGService registeredOMAGService : accessServices) { - sb.append(registeredOMAGService).append(','); - } - } - sb.append('['); - sb.append("viewServices=["); - if (viewServices !=null && viewServices.size() >0) { - for (RegisteredOMAGService registeredOMAGService : viewServices) { - sb.append(registeredOMAGService).append(','); - } - } - sb.append(']'); - sb.append("integrationServices=["); - if (integrationServices != null && integrationServices.size() >0) { - for (RegisteredOMAGService registeredOMAGService : integrationServices) { - sb.append(registeredOMAGService).append(','); - } - } - sb.append(']'); - sb.append("engineServices=["); - if (engineServices != null && engineServices.size() >0 ) { - for (RegisteredOMAGService registeredOMAGService : engineServices) { - sb.append(registeredOMAGService).append(','); - } - } - sb.append(']'); - sb.append('}'); - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - Platform platform = (Platform) o; - for (StoredServer storedServer:storedServers) { - boolean foundIt = false; - for (StoredServer platformStoredServer: platform.storedServers) { - if (Objects.equals(storedServer, platformStoredServer)) { - foundIt = true; - } - if (!foundIt) { - return false; - } - } - } - for (RegisteredOMAGService registeredOMAGService:accessServices) { - boolean foundIt = false; - for (RegisteredOMAGService platformRegisteredOMAGService: platform.accessServices) { - if (Objects.equals(registeredOMAGService, platformRegisteredOMAGService)) { - foundIt = true; - } - if (!foundIt) { - return false; - } - } - } - for (RegisteredOMAGService registeredOMAGService: engineServices) { - boolean foundIt = false; - for (RegisteredOMAGService platformRegisteredOMAGService: platform.engineServices) { - if (Objects.equals(registeredOMAGService, platformRegisteredOMAGService)) { - foundIt = true; - } - if (!foundIt) { - return false; - } - } - } - for (RegisteredOMAGService registeredOMAGService: integrationServices) { - boolean foundIt = false; - for (RegisteredOMAGService platformRegisteredOMAGService: platform.integrationServices) { - if (Objects.equals(registeredOMAGService, platformRegisteredOMAGService)) { - foundIt = true; - } - if (!foundIt) { - return false; - } - } - } - for (RegisteredOMAGService registeredOMAGService:viewServices) { - boolean foundIt = false; - for (RegisteredOMAGService platformRegisteredOMAGService: platform.viewServices) { - if (Objects.equals(registeredOMAGService, platformRegisteredOMAGService)) { - foundIt = true; - } - if (!foundIt) { - return false; - } - } - } - - return Objects.equals(platformName, platform.platformName) && - Objects.equals(platformDescription, platform.platformDescription) && - Objects.equals(platformStatus, platform.platformStatus); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), platformName, platformDescription, platformStatus, storedServers, accessServices, viewServices, integrationServices, engineServices); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/PlatformStatus.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/PlatformStatus.java deleted file mode 100644 index e0b0015da9c..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/PlatformStatus.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.api.properties; - -/** - * The status of the platform for the Server Author View. - */ -public enum PlatformStatus { - - UNKNOWN (0, "", "Unknown platform status."), - ACTIVE (1, "Active", "The platform is active."), - NOT_CONTACTABLE (2, "Not contactable", "The platform is not contactable."), - OTHER (99, "Other", "The platform has some other status."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor sets up the specific values for an enum instance. - * - * @param ordinal int enum value ordinal - * @param name String name - * @param description String description - */ - PlatformStatus(int ordinal, - String name, - String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the descriptive name for the enum. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "InstanceStatus{" + - "ordinal=" + ordinal + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/ResourceEndpoint.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/ResourceEndpoint.java deleted file mode 100644 index 529732ce4c3..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/ResourceEndpoint.java +++ /dev/null @@ -1,216 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.serverauthor.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; - -import java.util.Objects; - -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) -/** - * Resource endpoint defines a resource for the Server author. - */ -public class ResourceEndpoint { - - private String resourceCategory; - private String resourceDescription; - private String resourceRootURL; // e.g. "https://localhost:9443" - private String serverName; - private String platformName; - private String serverInstanceName; - - /** - * Default Constructor sets the properties to nulls - */ - public ResourceEndpoint() - { - /* - * Nothing to do. - */ - } - - /** - * Constructor - * @param resourceCategory resource category - * @param platformName platform name - * @param resourceDescription resource description - * @param resourceRootURL resource root URL - * @param serverName server anme - * @param serverInstanceName server instance name - */ - public ResourceEndpoint(String resourceCategory, String platformName, String resourceDescription, String resourceRootURL, String serverName, String serverInstanceName) { - this.resourceCategory = resourceCategory; - this.resourceDescription = resourceDescription; - this.resourceRootURL = resourceRootURL; - this.serverName = serverName; - this.platformName = platformName; - this.serverInstanceName = serverInstanceName; - } - - - /** - * Config constructor - create a ResourceEndpoint from a ResourceEndpointConfig - * @param cfg resource end point configuration - */ - public ResourceEndpoint(ResourceEndpointConfig cfg) { - this.resourceCategory = cfg.getResourceCategory(); - this.resourceDescription = cfg.getDescription(); - this.resourceRootURL = cfg.getPlatformRootURL(); - this.serverName = cfg.getServerName(); - this.platformName = cfg.getPlatformName(); - this.serverInstanceName = cfg.getServerInstanceName(); - } - - /** - * get the resource category - * @return the resource caegory - */ - public String getResourceCategory() { - return resourceCategory; - } - - /** - * Set the resource category - * @param resourceCategory the resource category - */ - public void setResourceCategory(String resourceCategory) { - this.resourceCategory = resourceCategory; - } - - /** - * Get the resource description - * @return resource description - */ - public String getResourceDescription() { - return resourceDescription; - } - - /** - * Set the resource description - * @param resourceDescription resource description - */ - public void setResourceDescription(String resourceDescription) { - this.resourceDescription = resourceDescription; - } - - /** - * get the resource root URL - * @return resource root URL - */ - public String getResourceRootURL() { - return resourceRootURL; - } - - /** - * set the resource root URL - * @param resourceRootURL resource root URL - */ - public void setResourceRootURL(String resourceRootURL) { - this.resourceRootURL = resourceRootURL; - } - - /** - * get the server anme - * @return server name - */ - - - public String getServerName() { - return serverName; - } - - /** - * Set the server name - * @param serverName server name - */ - public void setServerName(String serverName) { - this.serverName = serverName; - } - - /** - * Get the platform name - * @return platform name - */ - public String getPlatformName() { - return platformName; - } - - /** - * Set a meaningful name for the platform - * @param platformName set platform name - */ - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - /** - * Get server instance name - * @return server instance name - */ - public String getServerInstanceName() { - return serverInstanceName; - } - - /** - * set server instance name - * @param serverInstanceName name of server instance - */ - public void setServerInstanceName(String serverInstanceName) { - this.serverInstanceName = serverInstanceName; - } - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - /** - * toString builder - * @param sb StringBuffer to build details in - * @return updated StringBuffer - */ - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("resourceEndPoint="); - sb.append("{"); - sb.append("resourceCategory=").append(this.resourceCategory).append(","); - sb.append("resourceDescription=").append(this.resourceDescription).append(","); - sb.append("resourceRootURL=").append(this.resourceRootURL).append(","); - sb.append("serverName=").append(this.serverName).append(","); - sb.append("platformName=").append(this.platformName).append(","); - sb.append("serverInstanceName=").append(this.serverInstanceName).append(","); - sb.append('}'); - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - ResourceEndpoint resourceEndPoint = (ResourceEndpoint) o; - - return Objects.equals(resourceCategory, resourceEndPoint.resourceCategory) && - Objects.equals(resourceDescription, resourceEndPoint.resourceDescription) && - Objects.equals(resourceRootURL, resourceEndPoint.resourceRootURL) && - Objects.equals(serverName, resourceEndPoint.serverName) && - Objects.equals(platformName, resourceEndPoint.platformName) && - Objects.equals(serverName, resourceEndPoint.resourceRootURL) && - Objects.equals(serverInstanceName, resourceEndPoint.serverInstanceName) - ; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(),resourceCategory, resourceDescription, resourceRootURL, platformName, serverName, serverInstanceName ); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/StoredServer.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/StoredServer.java deleted file mode 100644 index 9228405e180..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/StoredServer.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.serverauthor.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -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) -/** - * The is the Server Author View Service's concept of a stored server, it is a minimal representation of the stored server, including - * its name, description and type; so a UI could use this information to show a meaningful summary of the stored server. - */ -public class StoredServer { - - private String storedServerName; - private String storedServerDescription; - private String serverType; - private String serverStatus; - - /** - * Default Constructor sets the properties to nulls - */ - public StoredServer() { - /* - * Nothing to do. - */ - } - - /** - * Constructor - * - * @param storedServerName storedServer name - * @param storedServerDescription storedServer description - * @param serverType meaningful name of the type of the server - */ - public StoredServer(String storedServerName, String storedServerDescription, String serverType) { - - this.storedServerName = storedServerName; - this.storedServerDescription = storedServerDescription; - this.serverType = serverType; - } - - - /** - * Get the storedServer name - * - * @return storedServer name - */ - public String getStoredServerName() { - return storedServerName; - } - - /** - * Set a meaningful name for the storedServer - * - * @param storedServerName set storedServer name - */ - public void setStoredServerName(String storedServerName) { - this.storedServerName = storedServerName; - } - - /** - * Get the storedServer description - * - * @return storedServer description - */ - public String getStoredServerDescription() { - return storedServerDescription; - } - - /** - * Set the description for the storedServer - * - * @param storedServerDescription set storedServer description - */ - public void setStoredServerDescription(String storedServerDescription) { - this.storedServerDescription = storedServerDescription; - } - - /** - * Get the type of the stored Server - * - * @return server type - */ - public String getServerType() { - return serverType; - } - - /** - * Set the type for the storedServer - * - * @param serverType set storedServer type - */ - public void setServerType(String serverType) { - this.serverType = serverType; - } - - /** - * Set the status for the storedServer - * - * @param serverStatus set storedServer status - */ - public void setServerStatus(String serverStatus) { - this.serverStatus = serverStatus; - } - /** - * Get the status of the stored Server - * - * @return server status - */ - public String getServerStatus() { - return serverStatus; - } - - - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - - /** - * toString builder - * @param sb StringBuffer to build details in - * @return updated StringBuffer - */ - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("storedServer="); - sb.append("{"); - sb.append("storedServerName=").append(this.storedServerName).append(","); - sb.append("storedServerDescription=").append(this.storedServerDescription).append(","); - sb.append('}'); - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - StoredServer storedServer = (StoredServer) o; - - return Objects.equals(storedServerName, storedServer.storedServerName) && - Objects.equals(storedServerDescription, storedServer.storedServerDescription); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), storedServerName, storedServerDescription); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/package-info.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/package-info.java deleted file mode 100644 index 5ed1880eda8..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/properties/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Server Author OMVS. - */ -package org.odpi.openmetadata.viewservices.serverauthor.api.properties; diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorConfigurationResponse.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorConfigurationResponse.java deleted file mode 100644 index ef11b2d84c9..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorConfigurationResponse.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.serverauthor.api.rest; - - -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; - -import java.util.Arrays; - -/** - * A server Author response containing an Open Metadata and governance (OMAG) Server configuration - */ -public class ServerAuthorConfigurationResponse extends ServerAuthorViewOMVSAPIResponse { - /** - * Associated Omag server config - */ - OMAGServerConfig omagServerConfig = null; - - /** - * Default constructor - */ - public ServerAuthorConfigurationResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAuthorConfigurationResponse(ServerAuthorConfigurationResponse template) - { - super(template); - - if (template != null) - { - this.omagServerConfig = template.getOmagServerConfig(); - } - } - - /** - * Get the Open Metadata and governance (OMAG) Server configuration - * @return the omag server configuration - */ - public OMAGServerConfig getOmagServerConfig() { - return omagServerConfig; - } - - /** - * set the Open Metadata and governance (OMAG) Server configuration - * @param omagServerConfig the omag server configuration - */ - public void setOmagServerConfig(OMAGServerConfig omagServerConfig) { - this.omagServerConfig = omagServerConfig; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ServerAuthorResponse{" + - "omagServerConfig=" + omagServerConfig + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorPlatformsResponse.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorPlatformsResponse.java deleted file mode 100644 index a3ce1f5132a..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorPlatformsResponse.java +++ /dev/null @@ -1,84 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.serverauthor.api.rest; - -import org.odpi.openmetadata.viewservices.serverauthor.api.properties.Platform; - -import java.util.Arrays; -import java.util.Set; - -/** - * A Server Author response containing the known platforms - */ -public class ServerAuthorPlatformsResponse extends ServerAuthorViewOMVSAPIResponse { - /** - * Associated platform - */ - Set platforms = null; - - /** - * Default constructor - */ - public ServerAuthorPlatformsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAuthorPlatformsResponse(ServerAuthorPlatformsResponse template) - { - super(template); - - if (template != null) - { - this.platforms = template.getPlatforms(); - } - } - - /** - * Get the platforms - * @return the platforms - */ - public Set getPlatforms() { - return platforms; - } - - /** - * set the platforms - * @param platforms the platforms - */ - public void setPlatforms(Set platforms) { - this.platforms = platforms; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ServerAuthorResponse{" + - "platform=" + platforms + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorResourceEndpointListResponse.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorResourceEndpointListResponse.java deleted file mode 100644 index 59f14f1868d..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorResourceEndpointListResponse.java +++ /dev/null @@ -1,96 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.serverauthor.api.rest; - -import org.odpi.openmetadata.viewservices.serverauthor.api.properties.ResourceEndpoint; - -import java.util.Arrays; -import java.util.List; - -/** - * Server Author's list of Resource endpoints, which contains the list of platforms. - */ -public class ServerAuthorResourceEndpointListResponse extends ServerAuthorViewOMVSAPIResponse { - - - /** - * Platform list - */ - private List platformList = null; - - /** - * Default constructor - */ - public ServerAuthorResourceEndpointListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAuthorResourceEndpointListResponse(ServerAuthorResourceEndpointListResponse template) - { - super(template); - - if (template != null) - { - this.platformList = template.getPlatformList(); - } - } - - - /** - * Return the platformList. - * - * @return bean - */ - public List getPlatformList() - { - return platformList; - } - - - /** - * Set the resourceEndpointList. - * - * @param platformList - bean - */ - public void setPlatformList(List platformList) - { - this.platformList = platformList; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ServerAuthorResourceEndpointListResponse{" + - "platformList='" + platformList + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorViewOMVSAPIResponse.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorViewOMVSAPIResponse.java deleted file mode 100644 index fb4c2ed6691..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/ServerAuthorViewOMVSAPIResponse.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ServerAuthorViewOMVSAPIResponse provides a common header for the Server Author OMVS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = ServerAuthorConfigurationResponse.class, name = "ServerAuthorConfigurationResponse"), - @JsonSubTypes.Type(value = ServerAuthorResourceEndpointListResponse.class, name = "ServerAuthorResourceEndpointListResponse") -}) - -public abstract class ServerAuthorViewOMVSAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public ServerAuthorViewOMVSAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAuthorViewOMVSAPIResponse(ServerAuthorViewOMVSAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "ServerAuthorViewOMVSAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/SupportedAuditLogSeveritiesResponse.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/SupportedAuditLogSeveritiesResponse.java deleted file mode 100644 index c79fce7a690..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/SupportedAuditLogSeveritiesResponse.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.serverauthor.api.rest; - -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogReportSeverity; -import java.util.Arrays; -import java.util.List; - - -/** - * A supported severities for audit log response containing the known platforms - */ -public class SupportedAuditLogSeveritiesResponse extends ServerAuthorViewOMVSAPIResponse { - /** - * Associated platform - */ - List severities = null; - - /** - * Default constructor - */ - public SupportedAuditLogSeveritiesResponse() { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SupportedAuditLogSeveritiesResponse(SupportedAuditLogSeveritiesResponse template) { - super(template); - - if (template != null) { - this.severities = template.getSeverities(); - } - } - - /** - * Get the severities for the audit log - * - * @return severities - */ - public List getSeverities() { - return severities; - } - - /** - * Set the severities for the audit log - * - * @param severities severities. - */ - public void setSeverities(List severities) { - this.severities = severities; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append("ServerAuthorResponse{"); - sb.append("severities= ["); - for (OMRSAuditLogReportSeverity omrsAuditLogReportSeverity : severities) { - sb.append(omrsAuditLogReportSeverity).append(","); - } - sb.append("]"); - sb.append(", exceptionClassName=").append(getExceptionClassName()); - sb.append(", exceptionCausedBy=").append(getExceptionCausedBy()); - sb.append(", actionDescription=").append(getActionDescription()); - sb.append(", relatedHTTPCode=").append(getRelatedHTTPCode()); - sb.append(", exceptionErrorMessage=").append(getExceptionErrorMessage()); - sb.append(", exceptionErrorMessageId=").append(getExceptionErrorMessageId()); - sb.append(", exceptionErrorMessageParameters=").append(Arrays.toString(getExceptionErrorMessageParameters())); - sb.append(", exceptionSystemAction=").append(getExceptionSystemAction()); - sb.append(", exceptionUserAction=").append(getExceptionUserAction()); - sb.append(", exceptionProperties=").append(getExceptionProperties()); - sb.append('}'); - return sb.toString(); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/package-info.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/package-info.java deleted file mode 100644 index 1562943afae..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/rest/package-info.java +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.viewservices.serverauthor.api.rest; diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/README.md b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/README.md deleted file mode 100644 index 069cfbdf2dc..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/README.md +++ /dev/null @@ -1,15 +0,0 @@ - - - -#Server author Open Metadata View Service (OMVS) server-side implementation - -The Server Author OMVS server-side support is organized in the following top level packages - -* admin - ServerAuthorAdmin controls this OMVS's lifecycle. It is initialised here receiving the view service configuration. It is shutdown here. -* handlers - instance handler -* server - implementation of the view service -* initialization - classes involved with registering nd setting up the instance of the view server - ----- -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/view-services/server-author-view/server-author-view-server/build.gradle b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/build.gradle deleted file mode 100644 index 50efaf4ec75..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:server-author-view:server-author-view-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:admin-services:admin-services-client') - implementation project(':open-metadata-implementation:platform-services:platform-services-api') - implementation project(':open-metadata-implementation:platform-services:platform-services-client') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-api') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Server Author Server View Services' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/admin/ServerAuthorViewAdmin.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/admin/ServerAuthorViewAdmin.java deleted file mode 100644 index 648023f270c..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/admin/ServerAuthorViewAdmin.java +++ /dev/null @@ -1,225 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.admin; - - -import org.odpi.openmetadata.adminservices.configuration.properties.IntegrationViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin; -import org.odpi.openmetadata.adminservices.ffdc.OMAGAdminAuditCode; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorViewAuditCode; -import org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorViewErrorCode; -import org.odpi.openmetadata.viewservices.serverauthor.initialization.ServerAuthorViewServicesInstance; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - - -/** - * ServerAuthorViewAdmin is the class that is called by the UI Server to initialize and terminate - * the Server Author OMVS. The initialization call provides this OMVS with the Audit log and configuration. - */ -public class ServerAuthorViewAdmin extends ViewServiceAdmin { - - private static final Logger log = LoggerFactory.getLogger(ServerAuthorViewAdmin.class); - - /** - * resource endpoints property name - */ - protected String resourceEndpointsPropertyName = "resourceEndpoints"; /* Common */ - - - private AuditLog auditLog = null; - private String serverUserName = null; - private ServerAuthorViewServicesInstance instance = null; - private String serverName = null; - - /** - * Default constructor - */ - public ServerAuthorViewAdmin() { - } - - /** - * Initialize the Server Author view service. - * - * @param serverName name of the local server - * @param viewServiceConfig specific configuration properties for this view service. - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use to issue calls to the remote server. - * @param maxPageSize maximum page size. 0 means unlimited - * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. - */ - @Override - public void initialize(String serverName, - ViewServiceConfig viewServiceConfig, - AuditLog auditLog, - String serverUserName, - int maxPageSize) throws OMAGConfigurationErrorException - - { - - final String actionDescription = "initialize"; - - auditLog.logMessage(actionDescription, ServerAuthorViewAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - this.auditLog = auditLog; - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + actionDescription); - } - - /* - * This method will be called (by Operational Services) with the view service config passed as a ViewServiceConfig. - * This is the super type of IntegrationViewServiceConfig which is what this service actually requires. - */ - - IntegrationViewServiceConfig integrationViewServiceConfig = null; - if (viewServiceConfig instanceof IntegrationViewServiceConfig) { - integrationViewServiceConfig = (IntegrationViewServiceConfig) viewServiceConfig; - } - else { - logBadConfiguration(viewServiceConfig.getViewServiceName(), - "viewServiceConfig", - viewServiceConfig.toString(), - auditLog, - actionDescription); - - // unreachable - return; - } - - final String viewServiceFullName = viewServiceConfig.getViewServiceName(); - - try { - - List resourceEndpoints = this.extractResourceEndpoints(integrationViewServiceConfig.getResourceEndpoints(), - viewServiceFullName, - auditLog); - - - - - - - /* - * Pick up the remote omag platform url from the config - */ - this.instance = new ServerAuthorViewServicesInstance(serverName, - auditLog, - serverUserName, - maxPageSize, - viewServiceConfig.getOMAGServerPlatformRootURL(), - resourceEndpoints - ); - - this.serverUserName = serverUserName; - this.serverName = serverName; - - auditLog.logMessage(actionDescription, - ServerAuthorViewAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), - viewServiceConfig.toString()); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + actionDescription); - } - - } - catch (OMAGConfigurationErrorException error) - { - throw error; - } - catch (Throwable error) - { - auditLog.logException(actionDescription, - ServerAuthorViewAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage()), - viewServiceConfig.toString(), - error); - - super.throwUnexpectedInitializationException(actionDescription, - ViewServiceDescription.SERVER_AUTHOR.getViewServiceFullName(), - error); - } - - } - - /** - * Shutdown the Server Author view service. - */ - @Override - public void shutdown() { - final String actionDescription = "shutdown"; - - log.debug("==> Method: " + actionDescription); - - auditLog.logMessage(actionDescription, ServerAuthorViewAuditCode.SERVICE_TERMINATING.getMessageDefinition(serverName)); - - if (instance != null) - { - this.instance.shutdown(); - } - - auditLog.logMessage(actionDescription, ServerAuthorViewAuditCode.SERVICE_SHUTDOWN.getMessageDefinition()); - - log.debug("<== Method: " + actionDescription); - - } - - - - /** - * Extract the resource endpoints property from the view services option. - * - * @param resourceEndpoints options passed to the access service. - * @param viewServiceFullName name of calling service - * @param auditLog audit log for error messages - * @return null or list of resource endpoints - * @throws OMAGConfigurationErrorException the supported zones property is not a list of zone names. - */ - protected List extractResourceEndpoints(List resourceEndpoints, - String viewServiceFullName, - AuditLog auditLog) throws OMAGConfigurationErrorException - { - final String methodName = "extractResourceEndpoints"; - - final String parameterName = "resourceEndpoints"; - - try { - - /* - * Server Author cannot operate without any endpoints. - * Check if resourceEndpoints is null and if so throw am exception, which will be caught and logged by logBadConfigProperties, which will throw OMAGConfigurationErrorException... - */ - if (resourceEndpoints == null) { - - throw new InvalidParameterException(ServerAuthorViewErrorCode.INVALID_CONFIG_PROPERTY.getMessageDefinition(parameterName), - this.getClass().getName(), - methodName, - parameterName); - - } else { - auditLog.logMessage(methodName, OMAGAdminAuditCode.RESOURCE_ENDPOINTS.getMessageDefinition(viewServiceFullName, resourceEndpoints.toString())); - return resourceEndpoints; - } - - } catch (Exception error) { - - logBadConfigProperties(viewServiceFullName, - resourceEndpointsPropertyName, - "null", - auditLog, - methodName, - error); - - // unreachable - return null; - } - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/handlers/ServerAuthorViewHandler.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/handlers/ServerAuthorViewHandler.java deleted file mode 100644 index bc78534fdf2..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/handlers/ServerAuthorViewHandler.java +++ /dev/null @@ -1,1017 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.handlers; - -import org.odpi.openmetadata.adminservices.client.*; -import org.odpi.openmetadata.adminservices.client.MetadataAccessStoreConfigurationClient; -import org.odpi.openmetadata.adminservices.configuration.properties.*; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException; -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.platformservices.client.PlatformServicesClient; -import org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorExceptionHandler; -import org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorViewErrorCode; -import org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorViewServiceException; -import org.odpi.openmetadata.viewservices.serverauthor.api.properties.Platform; -import org.odpi.openmetadata.viewservices.serverauthor.api.properties.PlatformStatus; -import org.odpi.openmetadata.viewservices.serverauthor.api.properties.ResourceEndpoint; -import org.odpi.openmetadata.viewservices.serverauthor.api.properties.StoredServer; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogReportSeverity; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - - -import java.util.*; - - -/** - * The ServerAuthorViewHandler is initialised with the server the call should be sent to. - * The handler exposes methods for functionality for the Server Author view allowing servers to authored and deployed - * onto a platform. - * - * The handler implements server authoring capabilies, OMAG server configurations are accumulated on the - * platform that is identified in the Server author View configuration. While authoring servers, the caller is - * not aware of where the server configurations are being accumulated. - * - * In addition to server authoring capabilities, this handler allows the known platforms, as defined in the view - * configuration to be queried to see what servers are configured on them. The call can then deploy a server that has - * been configured onto a particular platform. - * - */ -public class ServerAuthorViewHandler { - - private static final String className = ServerAuthorViewHandler.class.getName(); - - - /* - * viewServiceOptions should have been validated in the Admin layer. - * The viewServiceOptions contains a list of resource endpoints that the - * view service can connect to. It is formatted like this: - * "resourceEndpoints" : [ - { - resourceCategory : "Platform", - resourceName : "Platform2", - resourceRootURL : "https://localhost:9443" - }, - { - resourceCategory : "Platform", - resourceName : "Platform1", - resourceRootURL : "https://localhost:8082" - } - ] - */ - private Map configuredPlatforms = null; // map is keyed using platformRootURL - private Map configuredServerInstances = null; // map is keyed using serverName+platformRootURL so each instance is unique - private String userId = null; - private String platformURL = null; - - /** - * Default constructor for ServerAuthorViewHandler - */ - public ServerAuthorViewHandler() { - - } - - - /** - * ServerAuthorViewHandler constructor with configured resourceEndpoints - * - * @param localServerUserId admin userid - * @param metadataServerURL url of the platform to issue admin calls to store configuration - * @param resourceEndpoints list of platforms - */ - public ServerAuthorViewHandler(String localServerUserId, String metadataServerURL, List resourceEndpoints) { - - this.userId = localServerUserId; - this.platformURL = metadataServerURL; - /* - * Populate map of resources with their endpoints.... - */ - - // TODO - It would be desirable to add validation rules to ensure uniqueness etc. - - configuredPlatforms = new HashMap<>(); - configuredServerInstances = new HashMap<>(); - - if (resourceEndpoints != null && !resourceEndpoints.isEmpty()) { - - resourceEndpoints.forEach(res -> { - - String resCategory = res.getResourceCategory(); - ResourceEndpoint rep = new ResourceEndpoint(res); - - String resName = null; - - switch (resCategory) { - case "Platform": - resName = res.getPlatformName(); - configuredPlatforms.put(resName, rep); - break; - // At this time there is no need to pick up servers from the config for this view service. - default: - // Unsupported category is ignored - break; - - } - }); - } - } - - /** - * getResourceEndpoints - returns a list of the configured resource endpoints. Does not include discovered resource endpoints. - * - * @return the map of resource endpoints - */ - public Map> getResourceEndpoints() { - - Map> returnMap = new HashMap<>(); - - List platformList = null; - List serverList = null; - - if (!configuredPlatforms.isEmpty()) { - platformList = new ArrayList<>(); - platformList.addAll(configuredPlatforms.values()); - } - - if (!configuredServerInstances.isEmpty()) { - serverList = new ArrayList<>(); - serverList.addAll(configuredServerInstances.values()); - } - - returnMap.put("platformList", platformList); - - return returnMap; - } - - /** - * Get the server configurations associated with the platforms that this view service knows about as well as the - * services it supports. - * - * @param userId userId under which the request is performed - * @param methodName The name of the method being invoked - * @param auditLog auditLog - * @return the known platforms, which if active will contain their associated omag server configurations - * @throws ServerAuthorViewServiceException the server author view has detected an error - */ - public Set getKnownPlatforms(String userId, String methodName, AuditLog auditLog) throws ServerAuthorViewServiceException { - Set knownPlatforms = new HashSet<>(); - try { - for (String platformName : configuredPlatforms.keySet()) { - ResourceEndpoint resourceEndpoint = configuredPlatforms.get(platformName); - Platform platform = new Platform(resourceEndpoint.getPlatformName(), resourceEndpoint.getResourceDescription()); - platform.setPlatformStatus(PlatformStatus.UNKNOWN); - // need to use the other constructor to pass the user and password from the configuration - Set omagServerConfigSet = null; - try { - String platFormEndpoint = resourceEndpoint.getResourceRootURL(); - OMAGServerPlatformConfigurationClient omagServerPlatformConfigurationClient = new OMAGServerPlatformConfigurationClient(userId, platFormEndpoint); - omagServerConfigSet = omagServerPlatformConfigurationClient.getAllServerConfigurations(); - platform.setPlatformStatus(PlatformStatus.ACTIVE); - - // populate the platform with summaries of each server. - for (OMAGServerConfig omagServerConfig : omagServerConfigSet) { - String serverName = omagServerConfig.getLocalServerName(); - StoredServer storedServer = new StoredServer(); - storedServer.setStoredServerName(serverName); - storedServer.setServerType(omagServerConfig.getLocalServerType()); - storedServer.setStoredServerDescription(omagServerConfig.getLocalServerDescription()); - platform.addStoredServer(storedServer); - } - PlatformServicesClient platformServicesClient = new PlatformServicesClient(platformName, platFormEndpoint); - - List accessServiceList = platformServicesClient.getAccessServices(userId); - platform.setAccessServices(accessServiceList); - - List engineServicesList = platformServicesClient.getEngineServices(userId); - platform.setEngineServices(engineServicesList); - - List integrationServiceList = platformServicesClient.getIntegrationServices(userId); - platform.setIntegrationServices(integrationServiceList); - - List viewServiceList = platformServicesClient.getViewServices(userId); - platform.setViewServices(viewServiceList); - - } catch (OMAGConfigurationErrorException e) { - // if we have a configuration error, this is likely because we could not contact the platform using the platform root URL - // configured in this view service. - platform.setPlatformStatus(PlatformStatus.NOT_CONTACTABLE); - } catch (PropertyServerException e) { - // create a new platform object in case it is partially filled in. - platform = new Platform(); - platform.setPlatformStatus(PlatformStatus.NOT_CONTACTABLE); - } catch (InvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOCFInvalidParameterException(className, methodName, error); - } catch (UserNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } - knownPlatforms.add(platform); - } - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } - - return knownPlatforms; - } - - - /** - * resolvePlatformRootURL - *

- * This method will look up the configured root URL for the named platform. - * - * @param platformName - * @return resolved platform URL Root - * @throws OMAGInvalidParameterException in valid platform name parameter - */ - private String resolvePlatformRootURL(String platformName, String methodName) throws ServerAuthorViewServiceException { - String platformRootURL = null; - - if (platformName != null) { - ResourceEndpoint resource = configuredPlatforms.get(platformName); - if (resource != null) { - platformRootURL = resource.getResourceRootURL(); - } - } - if (platformName == null || platformRootURL == null) { - throw new ServerAuthorViewServiceException(ServerAuthorViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, "platformName"), - className, - methodName); - } - - return platformRootURL; - } - - /** - * Set the local repository to be in memory for the named server - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server being configured - * @throws ServerAuthorViewServiceException server author exception - */ - public void setInMemLocalRepository(String className, String methodName, String serverToBeConfiguredName - ) throws ServerAuthorViewServiceException { - - try { - MetadataAccessStoreConfigurationClient configurationClient = new MetadataAccessStoreConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL - ); - configurationClient.setInMemLocalRepository(); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Set the local repository to be graph for the named server - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server being configured - * @param storageProperties storage properties - * @throws ServerAuthorViewServiceException server author exception - */ - public void setGraphLocalRepository(String className, String methodName, String serverToBeConfiguredName, Map storageProperties) throws ServerAuthorViewServiceException { - try { - MetadataAccessStoreConfigurationClient configurationClient = new MetadataAccessStoreConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL - ); - configurationClient.setGraphLocalRepository(storageProperties); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Set the local repository to be read only for the named server - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server being configured - * @throws ServerAuthorViewServiceException server author exception - */ - public void setReadOnlyLocalRepository(String className, String methodName, String serverToBeConfiguredName) throws ServerAuthorViewServiceException { - try { - MetadataAccessStoreConfigurationClient configurationClient = new MetadataAccessStoreConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL - ); - configurationClient.setReadOnlyLocalRepository(); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - /** - * Provide the connection to the local repository - used when the local repository mode is set to plugin repository. - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to be configured. - * @param connection connection to the OMRS repository connector. - * @throws ServerAuthorViewServiceException a server author exception - */ - public void setPluginRepositoryConnection(String className, String methodName, String serverToBeConfiguredName, Connection connection) throws ServerAuthorViewServiceException { - try { - MetadataAccessStoreConfigurationClient configurationClient = new MetadataAccessStoreConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL - ); - configurationClient.setPluginRepositoryConnection(connection); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Get the stored configuration for the named server - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeRetrievedName name of the server whose configuration is to be retrieved - * @return the omag server configuration - * @throws ServerAuthorViewServiceException server author exception - */ - public OMAGServerConfig getStoredConfiguration(String className, String methodName, String serverToBeRetrievedName) throws ServerAuthorViewServiceException { - OMAGServerConfig config = null; - - - try { - OMAGServerConfigurationClient adminServicesClient = new OMAGServerConfigurationClient(this.userId, - serverToBeRetrievedName, - this.platformURL); - config = adminServicesClient.getOMAGServerConfig(); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - return config; - } - - /** - * Deploy an OMAG Server configuration onto a target platform. - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param destinationPlatformName platform onto which the server is to be deployed - * @param serverToBeDeployedName name of the server to deploy - * @throws ServerAuthorViewServiceException server author exception - */ - public void deployOMAGServerConfig(String className, String methodName, String destinationPlatformName, String serverToBeDeployedName) throws ServerAuthorViewServiceException { - try { - String destinationPlatformRootURL = resolvePlatformRootURL(destinationPlatformName, methodName); - OMAGServerConfigurationClient adminServicesClient = new OMAGServerConfigurationClient(this.userId, - serverToBeDeployedName, - this.platformURL); - adminServicesClient.deployOMAGServerConfig(destinationPlatformRootURL); - - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Set an OMAG Server's configuration - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to be configured - * @param omagServerConfig the server configuration we are setting - * @throws ServerAuthorViewServiceException server author exception - */ - public void setOMAGServerConfig(String className, String methodName, String serverToBeConfiguredName, OMAGServerConfig omagServerConfig) throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient adminServicesClient = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - adminServicesClient.setOMAGServerConfig(omagServerConfig); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Configure an access service - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param serviceURLMarker identifier of the access service to configure - * @param accessServiceOptions access service options - * @throws ServerAuthorViewServiceException server author exception - */ - public void configureAccessService(String className, String methodName, String serverToBeConfiguredName, String serviceURLMarker, Map accessServiceOptions) throws ServerAuthorViewServiceException { - try { - MetadataAccessPointConfigurationClient client = new MetadataAccessPointConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - if (accessServiceOptions == null) { - accessServiceOptions = new HashMap<>(); - } - client.configureAccessService(serviceURLMarker, accessServiceOptions); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Disable an access service - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param serviceURLMarker identifier of the access service to configure - * @throws ServerAuthorViewServiceException server author exception - */ - public void disableAccessService(String className, String methodName, String serverToBeConfiguredName, String serviceURLMarker) throws ServerAuthorViewServiceException { - try { - MetadataAccessPointConfigurationClient client = new MetadataAccessPointConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.disableAccessService(serviceURLMarker); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Configure all access services - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param accessServiceOptions access service options to apply to all access services - * @throws ServerAuthorViewServiceException server author exception - */ - public void configureAllAccessServices(String className, String methodName, String serverToBeConfiguredName, Map accessServiceOptions) throws ServerAuthorViewServiceException { - try { - MetadataAccessPointConfigurationClient client = new MetadataAccessPointConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - if (accessServiceOptions == null) { - accessServiceOptions = new HashMap<>(); - } - client.configureAllAccessServices(accessServiceOptions); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Configure an view service - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param serviceURLMarker identifier of the view service to configure - * @param viewServiceOptions view service options - * @throws ServerAuthorViewServiceException server author exception - */ - public void configureViewService(String className, String methodName, String serverToBeConfiguredName, String serviceURLMarker, Map viewServiceOptions) throws ServerAuthorViewServiceException { - try { - ViewServerConfigurationClient client = new ViewServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - if (viewServiceOptions == null) { - viewServiceOptions = new HashMap<>(); - } - client.configureViewService(null, null, serviceURLMarker, viewServiceOptions); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Disable an view service - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param serviceURLMarker identifier of the view service to configure - * @throws ServerAuthorViewServiceException server author exception - */ - public void disableViewService(String className, String methodName, String serverToBeConfiguredName, String serviceURLMarker) throws ServerAuthorViewServiceException { - try { - ViewServerConfigurationClient client = new ViewServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.disableViewService(serviceURLMarker); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Configure an engine service - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param serviceURLMarker identifier of the engine service to configure - * @param engineServiceOptions engine service options - * @param engines engines - * @throws ServerAuthorViewServiceException server author exception - */ - public void configureEngineService(String className, String methodName, String serverToBeConfiguredName, String serviceURLMarker, Map engineServiceOptions, List engines) throws ServerAuthorViewServiceException { - try { - EngineHostConfigurationClient client = new EngineHostConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.configureEngineService(null, null, serviceURLMarker, engineServiceOptions, engines); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Disable an view service - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param serviceURLMarker identifier of the view service to configure - * @throws ServerAuthorViewServiceException server author exception - */ - public void disableEngineService(String className, String methodName, String serverToBeConfiguredName, String serviceURLMarker) throws ServerAuthorViewServiceException { - try { - ViewServerConfigurationClient client = new ViewServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.disableViewService(serviceURLMarker); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - - /** - * set the Enterprise Access config - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param enterpriseAccessConfig enterprise access config - * @throws ServerAuthorViewServiceException server author exception - */ - public void setEnterpriseAccessConfig(String className, String methodName, String serverToBeConfiguredName, EnterpriseAccessConfig enterpriseAccessConfig) throws ServerAuthorViewServiceException { - try { - MetadataAccessPointConfigurationClient client = new MetadataAccessPointConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.setEnterpriseAccessConfig(enterpriseAccessConfig); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * set the Event bus - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param connectorProvider connector provider name - * @param topicURLRoot topic URL root - * @param configurationProperties configuration properties - * @throws ServerAuthorViewServiceException server author exception - */ - public void setEventBus(String className, String methodName, String serverToBeConfiguredName, String connectorProvider, String topicURLRoot, Map configurationProperties) - throws ServerAuthorViewServiceException { - try { - - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.setEventBus(connectorProvider, topicURLRoot, configurationProperties); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * set the default audit log - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @throws ServerAuthorViewServiceException server author exception - */ - public void setDefaultAuditLog(String className, String methodName, String serverToBeConfiguredName) throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.setDefaultAuditLog(); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * add a console audit log - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param supportedSeverities a list of support severities - * @throws ServerAuthorViewServiceException server author exception - */ - public void addConsoleAuditLogDestination(String className, String methodName, String serverToBeConfiguredName, List supportedSeverities) - throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.addConsoleAuditLogDestination(supportedSeverities); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * add a SLF4J audit log - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param supportedSeverities a list of support severities - * @throws ServerAuthorViewServiceException server author exception - */ - public void addSLF4JAuditLogDestination(String className, String methodName, String serverToBeConfiguredName, List supportedSeverities) - throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.addSLF4JAuditLogDestination(supportedSeverities); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * add a File audit log destination - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param supportedSeverities a list of support severities - * @throws ServerAuthorViewServiceException server author exception - */ - public void addFileAuditLogDestination(String className, String methodName, String serverToBeConfiguredName, List supportedSeverities) - throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.addFileAuditLogDestination(supportedSeverities); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * add a Event Topic audit log destination - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param supportedSeverities a list of support severities - * @throws ServerAuthorViewServiceException server author exception - */ - public void addEventTopicAuditLogDestination(String className, String methodName, String serverToBeConfiguredName, List supportedSeverities) - throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.addEventTopicAuditLogDestination(supportedSeverities); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * add an audit log destination specified by a connection - * - * @param className class Name for diagnostic purposes - * @param methodName current operation - * @param serverToBeConfiguredName name of the server to being configured - * @param connection connection to use for the audit log destination - * @throws ServerAuthorViewServiceException server author exception - */ - public void addAuditLogDestination(String className, String methodName, String serverToBeConfiguredName, Connection connection) - throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.addAuditLogDestination(connection); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - /** - * Update an audit log destination that is identified with the supplied destination name with - * the supplied connection object. - * - * @param className class name used for diagnostics - * @param methodName the current operation - * @param serverToBeConfiguredName name of the server to be configured. - * @param auditLogDestinationName name of the audit log destination to be updated - * @param auditLogDestination connection object that defines the audit log destination - * @throws ServerAuthorViewServiceException a server author exception - */ - public void updateAuditLogDestination(String className, String methodName, String serverToBeConfiguredName, String auditLogDestinationName, Connection auditLogDestination) - throws ServerAuthorViewServiceException { - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.updateAuditLogDestination(auditLogDestinationName, auditLogDestination); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - /** - * Delete an audit log destination that is identified with the supplied destination name - * - * @param className class name used for diagnostics - * @param methodName the current operation - * @param serverToBeConfiguredName name of the server to be configured. - * @param auditLogDestinationName name of the audit log destination to be deleted - * @throws ServerAuthorViewServiceException a server author exception - */ - public void deleteAuditLogDestination(String className, String methodName, String serverToBeConfiguredName, String auditLogDestinationName) throws ServerAuthorViewServiceException{ - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.clearAuditLogDestination(auditLogDestinationName); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - - /** - * Get the active configuration of the named server - * - * @param className class name used for diagnostics - * @param methodName the current operation - * @param serverToRetrieveName the server to retrieve name - * @return the activate configuration or - * @throws ServerAuthorViewServiceException a server author exception - */ - public OMAGServerConfig getActiveConfiguration(String className, String methodName, String serverToRetrieveName) - throws ServerAuthorViewServiceException { - OMAGServerConfig config = null; - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToRetrieveName, - this.platformURL); - config = client.getOMAGServerInstanceConfig(); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - return config; - } - - /** - * Activate the stored configuration for the named server on the named destination platform - * - * @param className class name for diagnostics - * @param methodName action being performed - * @param destinationPlatformName name of the platform name on which the configuration should be activated - * @param serverToBeActivatedName server name of the configuration to activate - */ - public void activateWithStoredConfig(String className, String methodName, String - destinationPlatformName, String serverToBeActivatedName) { - // TODO not yet implemented - - } - - /** - * Deactivate the stored configuration for the named server on the named destination platform permanently. The configuration associated with this - * server is deleted, so it cannot be activated again. - *

- * To activate this server again on this platform, a new configuration must be created, which can then be activated. - * - * @param className class name for diagnostics - * @param methodName action being performed - * @param destinationPlatformName name of the platform name on which the configuration should be activated - * @param serverToBeDeactivatedName server name of the configuration to deactivate - */ - public void deactivateServerPermanently(String className, String methodName, String - destinationPlatformName, String serverToBeDeactivatedName) { - // TODO not yet implemented - } - - /** - * Deactivate the stored configuration for the named server on the named destination platform temporarily. The configuration - * still exists after this operation, so it can be activated again - * - * @param className class name for diagnostics - * @param methodName action being performed - * @param destinationPlatformName name of the platform name on which the configuration should be activated - * @param serverToBeDeactivatedName server name of the configuration to deactivate - */ - public void deactivateServerTemporarily(String className, String methodName, String destinationPlatformName, String serverToBeDeactivatedName) { - // TODO not yet implemented - } - - /** - * Get the supported severities for the audit log - * - * @return the list of the supported severities for the audit log - */ - public List getSupportedAuditLogSeverities() { - return OMRSAuditLogRecordSeverity.getSeverityList(); - } - /** - * Clear the audit log destinations associated with the server being configured - * - * @param serverToBeConfiguredName name of the server to be configured. - * @throws ServerAuthorViewServiceException a server author exception - * - */ - public void clearAuditLogDestinations(String serverToBeConfiguredName) throws ServerAuthorViewServiceException { - final String methodName = "clearAuditLogDestinations"; - try { - OMAGServerConfigurationClient client = new OMAGServerConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.clearAuditLogDestinations(); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGConfigurationErrorException error) { - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - /** - * Enable registration of server to an open metadata repository cohort using the default topic structure (DEDICATED_TOPICS). - * - * A cohort is a group of open metadata - * repositories that are sharing metadata. An OMAG server can connect to zero, one or more cohorts. - * Each cohort needs a unique name. The members of the cohort use a shared topic to exchange registration - * information and events related to changes in their supported metadata types and instances. - * They are also able to query each other's metadata directly through REST calls. - * - * @param serverToBeConfiguredName server being configured - * @param cohortName name of the cohort. - * @throws ServerAuthorViewServiceException error occurred during the registration of the cohort - */ - public void addCohortRegistration(String serverToBeConfiguredName, - String cohortName - ) throws ServerAuthorViewServiceException { - final String methodName = "addCohortRegistration"; - try { - MetadataAccessStoreConfigurationClient client = new MetadataAccessStoreConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.addCohortRegistration(cohortName,null); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGConfigurationErrorException error) { - // if we have a configuration error, this is likely because we could not contact the platform using the platform root URL - // configured in this view service. - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } - /** - * Unregister this server from an open metadata repository cohort. - * - * @param serverToBeConfiguredName server being configured - * @param cohortName name of the cohort. - * @throws ServerAuthorViewServiceException error occurred during the unregistration of the cohort - */ - public void removeCohortRegistration(String serverToBeConfiguredName, String cohortName ) throws ServerAuthorViewServiceException { - final String methodName = "removeCohortRegistration"; - try { - MetadataAccessStoreConfigurationClient client = new MetadataAccessStoreConfigurationClient(this.userId, - serverToBeConfiguredName, - this.platformURL); - client.clearCohortRegistration(cohortName); - } catch (OMAGInvalidParameterException error) { - throw ServerAuthorExceptionHandler.mapOMAGInvalidParameterException(className, methodName, error); - } catch (OMAGNotAuthorizedException error) { - throw ServerAuthorExceptionHandler.mapToUserNotAuthorizedException(className, methodName); - } catch (OMAGConfigurationErrorException error) { - // if we have a configuration error, this is likely because we could not contact the platform using the platform root URL - // configured in this view service. - throw ServerAuthorExceptionHandler.mapOMAGConfigurationErrorException(className, methodName, error); - } - } -} - diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewInstanceHandler.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewInstanceHandler.java deleted file mode 100644 index 1ef201a1d80..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewInstanceHandler.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.initialization; - - -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.serverauthor.handlers.ServerAuthorViewHandler; - - -/** - * ServerAuthorViewInstanceHandler retrieves information from the instance map for the - * view service instances. The instance map is thread-safe. Instances are added - * and removed by the ServerAuthorViewAdmin class. - */ -public class ServerAuthorViewInstanceHandler extends OMVSServiceInstanceHandler { - - - /** - * Default constructor registers the view service - */ - public ServerAuthorViewInstanceHandler() { - - super(ViewServiceDescription.SERVER_AUTHOR.getViewServiceName()); - - ServerAuthorViewRegistration.registerViewService(); - } - - - /** - * The getServerAuthorViewHandler method retrieves the handler from the ServerAuthorViewServicesInstance and returns it. - * - * @param userId the user performing the operation - * @param serverName the name of the server running the view-service - * @param serviceOperationName the operation to be performed - * @return ServerAuthorViewHandler - * @throws InvalidParameterException - the server name is not recognized - * @throws UserNotAuthorizedException - the user id not permitted to perform the requested operation - * @throws PropertyServerException - the service name is not known - indicating a logic error - */ - public ServerAuthorViewHandler getServerAuthorViewHandler(String userId, String serverName, String serviceOperationName) - throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException { - - /* - * Get the ServerAuthorViewServicesInstance. This is an instance associated with the UI servername (tenant). - */ - ServerAuthorViewServicesInstance instance = (ServerAuthorViewServicesInstance) super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - if (instance != null) { - return instance.getServerAuthorViewHandler(); - } - - return null; - } - - -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewRegistration.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewRegistration.java deleted file mode 100644 index 240ccc0554e..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewRegistration.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.initialization; - -import org.odpi.openmetadata.adminservices.registration.OMAGViewServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceRegistrationEntry; -import org.odpi.openmetadata.viewservices.serverauthor.admin.ServerAuthorViewAdmin; - - -/** - * ServerAuthorViewRegistration registers the view service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * view service in the server and it can be configured and used. - */ -public class ServerAuthorViewRegistration -{ - /** - * Pass information about this view service to the OMAG Server administration services. - */ - public static void registerViewService() - { - ViewServiceDescription myDescription = ViewServiceDescription.SERVER_AUTHOR; - ViewServiceRegistrationEntry myRegistration = new ViewServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - ServerAuthorViewAdmin.class.getName()); - OMAGViewServiceRegistration.registerViewService(myRegistration); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewServicesInstance.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewServicesInstance.java deleted file mode 100644 index 5f09190ad9d..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/initialization/ServerAuthorViewServicesInstance.java +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.initialization; - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstance; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.serverauthor.handlers.ServerAuthorViewHandler; - -import java.util.List; - - -/** - * ServerAuthorViewServicesInstance caches references to objects it needs for a specific server. - * It is also responsible for registering itself in the instance map. - */ - -public class ServerAuthorViewServicesInstance extends OMVSServiceInstance -{ - - private static ViewServiceDescription myDescription = ViewServiceDescription.SERVER_AUTHOR; - - private ServerAuthorViewHandler serverAuthorViewHandler = null; - - - - /** - * Set up the Server Author OMVS instance - * Unlike the superclass () ServerAuthor does not expect to be passed remoteServerName or remoteServerURL during configuration or initialization. - * This is because in ServerAuthor these are variable (set per requested operation), so the are passed by the RESTServices methods. - * - * @param serverName name of this server - * @param auditLog logging destination - * @param localServerUserId userId used for server initiated actions - * @param maxPageSize maximum page size - * @param metadataServerURL metadata server URL - * @param resourceEndpoints a list of resource endpoints. - * - */ - public ServerAuthorViewServicesInstance(String serverName, - AuditLog auditLog, - String localServerUserId, - int maxPageSize, - String metadataServerURL, - List resourceEndpoints) - { - - - - super(serverName, - myDescription.getViewServiceName(), - auditLog, - localServerUserId, - maxPageSize, - null, // remoteServerName is not meaningful for this view service - metadataServerURL); - - - this.serverAuthorViewHandler = new ServerAuthorViewHandler(localServerUserId, metadataServerURL, resourceEndpoints); - } - - /** - * Return the handler for Server Author view requests - * - * @return handler object - */ - public ServerAuthorViewHandler getServerAuthorViewHandler() - { - return serverAuthorViewHandler; - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/services/ServerAuthorViewRESTServices.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/services/ServerAuthorViewRESTServices.java deleted file mode 100644 index ae68a084625..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/services/ServerAuthorViewRESTServices.java +++ /dev/null @@ -1,1236 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.serverauthor.services; - -import org.odpi.openmetadata.adminservices.configuration.properties.CohortTopicStructure; -import org.odpi.openmetadata.adminservices.configuration.properties.EnterpriseAccessConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.rest.EngineServiceRequestBody; -import org.odpi.openmetadata.adminservices.rest.SuccessMessageResponse; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorExceptionHandler; -import org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorViewServiceException; -import org.odpi.openmetadata.viewservices.serverauthor.api.properties.ResourceEndpoint; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorPlatformsResponse; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorResourceEndpointListResponse; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.SupportedAuditLogSeveritiesResponse; -import org.odpi.openmetadata.viewservices.serverauthor.handlers.ServerAuthorViewHandler; -import org.odpi.openmetadata.viewservices.serverauthor.initialization.ServerAuthorViewInstanceHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; -import java.util.Map; - - -/** - * The ServerAuthorViewRESTServices provides the org.odpi.openmetadata.viewservices.serverauthor.services implementation of the Server Author Open Metadata - * View Service (OMVS). This interface provides view interfaces for IT Infrastructure Administrators. - */ - -public class ServerAuthorViewRESTServices { - - private static final String className = ServerAuthorViewRESTServices.class.getName(); - private static final Logger log = LoggerFactory.getLogger(ServerAuthorViewRESTServices.class); - private static final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - /** - * instance handler - */ - protected static ServerAuthorViewInstanceHandler instanceHandler = new ServerAuthorViewInstanceHandler(); - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(ServerAuthorViewRESTServices.class), instanceHandler.getServiceName()); - - - /** - * Default constructor - */ - public ServerAuthorViewRESTServices() { - - } - - /** - * Retrieve the known platforms - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @return response the list of resource endpoints configured for the view service - */ - public ServerAuthorResourceEndpointListResponse getResourceEndpointList(String serverName, String userId) { - - final String methodName = "getResourceEndpointList"; - - ServerAuthorResourceEndpointListResponse response = new ServerAuthorResourceEndpointListResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler handler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - Map> lists = handler.getResourceEndpoints(); - List platformList = null; - if (lists != null) { - platformList = lists.get("platformList"); - } - response.setPlatformList(platformList); - - } catch (InvalidParameterException error) { - restExceptionHandler.captureInvalidParameterException(response, error); - } catch (PropertyServerException error) { - restExceptionHandler.capturePropertyServerException(response, error); - } catch (UserNotAuthorizedException error) { - restExceptionHandler.captureUserNotAuthorizedException(response, error); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - return response; - - } - - /** - * Set up an in memory local repository. This repository uses hashmaps to store content. It is useful - * for demos, testing and POCs. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public FFDCResponseBase setInMemLocalRepository(String userId, String serverName, String serverToBeConfiguredName) { - final String methodName = "setInMemLocalRepository"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - FFDCResponseBase response = new ServerAuthorConfigurationResponse(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setInMemLocalRepository(className, methodName, serverToBeConfiguredName); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Set up a graph store as the local repository. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param storageProperties properties used to configure the back end storage for the graph - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public FFDCResponseBase setGraphLocalRepository(String userId, String serverName, String serverToBeConfiguredName, Map storageProperties) { - final String methodName = "setGraphLocalRepository"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - FFDCResponseBase response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setGraphLocalRepository(className, methodName, serverToBeConfiguredName, storageProperties); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Set up a read only local repository. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public FFDCResponseBase setReadOnlyLocalRepository(String userId, String serverName, String serverToBeConfiguredName) { - final String methodName = "setGraphLocalRepository"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - FFDCResponseBase response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setReadOnlyLocalRepository(className, methodName, serverToBeConfiguredName); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Provide the connection to the local repository - used when the local repository mode is set to plugin repository. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param connection connection to the OMRS repository connector. - * @return FFDCResponseBase VoidResponse or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or repositoryProxyConnection parameter or - * OMAGConfigurationErrorException the local repository mode has not been set - */ - public FFDCResponseBase setPluginRepositoryConnection(String userId, String serverName, String serverToBeConfiguredName, Connection connection) { - final String methodName = "setPluginRepositoryConnection"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - FFDCResponseBase response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setPluginRepositoryConnection(className, methodName, serverToBeConfiguredName, connection); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - - - /** - * Return the stored configuration document for the server. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param serverToBeRetrievedName name of the server to be retrieved for configuration. - * @return OMAGServerConfig properties or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse getStoredConfiguration(String userId, String serverName, String serverToBeRetrievedName) { - final String methodName = "getStoredConfiguration"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - OMAGServerConfig config = serverAuthorViewHandler.getStoredConfiguration(className, methodName, serverToBeRetrievedName); - response = new ServerAuthorConfigurationResponse(); - response.setOmagServerConfig(config); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Push the configuration for the server to another OMAG Server Platform. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the config is to be deployed to - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException there is a problem using the supplied configuration or - * OMAGInvalidParameterException invalid serverName or destinationPlatform parameter. - */ - public ServerAuthorConfigurationResponse deployOMAGServerConfig(String userId, String serverName, String destinationPlatformName, String serverToBeConfiguredName) { - final String methodName = "deployOMAGServerConfig"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.deployOMAGServerConfig(className, methodName, destinationPlatformName, serverToBeConfiguredName); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Set up the configuration properties for an OMAG Server in a single command. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param serverToBeConfiguredName name of the server to be configured. - * @param omagServerConfig configuration for the server - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or OMAGServerConfig parameter. - */ - public ServerAuthorConfigurationResponse setOMAGServerConfig(String userId, String serverName, String serverToBeConfiguredName, OMAGServerConfig omagServerConfig) { - final String methodName = "setOMAGServerConfig"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setOMAGServerConfig(className, methodName, serverToBeConfiguredName, omagServerConfig); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (InvalidParameterException error) { - restExceptionHandler.captureInvalidParameterException(response, error); - } catch (PropertyServerException error) { - restExceptionHandler.capturePropertyServerException(response, error); - } catch (UserNotAuthorizedException error) { - restExceptionHandler.captureUserNotAuthorizedException(response, error); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Enable a single access service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param accessServiceOptions property name/value pairs used to configure the access services - * @param serviceURLMarker string indicating which access service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse configureAccessService(String userId, String serverName, String serverToBeConfiguredName, String serviceURLMarker, Map accessServiceOptions) { - final String methodName = "configureAccessService"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.configureAccessService(className, methodName, serverToBeConfiguredName, serviceURLMarker, accessServiceOptions); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Disable a single access service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param serviceURLMarker string indicating which access service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse disableAccessService(String userId, String serverName, String serverToBeConfiguredName, String serviceURLMarker) { - final String methodName = "disableAccessService"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.disableAccessService(className, methodName, serverToBeConfiguredName, serviceURLMarker); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Enable all access services that are registered with this server platform. - * The access services are set up to use the default event bus. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param accessServiceOptions property name/value pairs used to configure the access services - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse configureAllAccessServices(String userId, String serverName, String serverToBeConfiguredName, Map accessServiceOptions) { - final String methodName = "configureAllAccessServices"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.configureAllAccessServices(className, methodName, serverToBeConfiguredName, accessServiceOptions); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Enable a single view service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param viewServiceOptions property name/value pairs used to configure the view services - * @param serviceURLMarker string indicating which view service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse configureViewService(String userId, String serverName, String serverToBeConfiguredName, String serviceURLMarker, Map viewServiceOptions) { - final String methodName = "configureViewService"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.configureViewService(className, methodName, serverToBeConfiguredName, serviceURLMarker, viewServiceOptions); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Disable a single view service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param serviceURLMarker string indicating which view service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse disableViewService(String userId, String serverName, String serverToBeConfiguredName, String serviceURLMarker) { - final String methodName = "disableViewService"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.disableViewService(className, methodName, serverToBeConfiguredName, serviceURLMarker); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Enable a single engine service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param serviceURLMarker string indicating which engine service it is configuring - * @param requestBody request body - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse configureEngineService(String userId, String serverName, String serverToBeConfiguredName, String serviceURLMarker, EngineServiceRequestBody requestBody) { - final String methodName = "configureEngineService"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.configureEngineService(className, methodName, serverToBeConfiguredName, serviceURLMarker, requestBody.getEngineServiceOptions(), requestBody.getEngines()); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Disable a single engine service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param serviceURLMarker string indicating which engine service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse disableEngineService(String userId, String serverName, String serverToBeConfiguredName, String serviceURLMarker) { - final String methodName = "disableEngineService"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.disableEngineService(className, methodName, serverToBeConfiguredName, serviceURLMarker); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Set up the configuration that controls the enterprise repository services. These services are part - * of the Open Metadata Repository Services (OMRS). They provide federated queries and federated event - * notifications that cover metadata from the local repository plus any repositories connected via - * open metadata repository cohorts. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param serverToBeConfiguredName server to be configured name - * @param enterpriseAccessConfig enterprise repository services configuration properties. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or enterpriseAccessConfig parameter or - * OMAGConfigurationErrorException unusual state in the admin server. - */ - public ServerAuthorConfigurationResponse setEnterpriseAccessConfig(String userId, String serverName, String serverToBeConfiguredName, EnterpriseAccessConfig enterpriseAccessConfig) { - final String methodName = "setEnterpriseAccessConfig"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setEnterpriseAccessConfig(className, methodName, serverToBeConfiguredName, enterpriseAccessConfig); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Set up the default event bus for embedding in event-driven connector. The resulting connector will - * be used for example, in the OMRS Topic Connector for each cohort, the in and out topics for each Access Service and - * possibly the local repository's event mapper. - *

- * When the event bus is configured, it is used only on future configuration. It does not effect - * existing configuration. - * - * @param userId user that is issuing the request. - * @param serverName server name to be configured. - * @param serverToBeConfiguredName server to be configured name - * @param connectorProvider connector provider for the event bus (if it is null then Kafka is assumed). - * @param topicURLRoot the common root of the topics used by the open metadata server. - * @param configurationProperties property name/value pairs used to configure the connection to the event bus connector - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException it is too late to configure the event bus - other configuration already exists or - * OMAGInvalidParameterException invalid serverName or serviceMode parameter. - */ - public ServerAuthorConfigurationResponse setEventBus(String userId, String serverName, String serverToBeConfiguredName, String connectorProvider, String topicURLRoot, Map configurationProperties) { - final String methodName = "setEventBus"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setEventBus(className, methodName, serverToBeConfiguredName, connectorProvider, topicURLRoot, configurationProperties); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Set up the default audit log for the server. This adds the console audit log destination. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public ServerAuthorConfigurationResponse setDefaultAuditLog(String userId, String serverName, String serverToBeConfiguredName) { - final String methodName = "setDefaultAuditLog"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.setDefaultAuditLog(className, methodName, serverToBeConfiguredName); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Set up the console audit log for the server. This writes selected parts of the audit log record to stdout. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public ServerAuthorConfigurationResponse addConsoleAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, List supportedSeverities) { - final String methodName = "addConsoleAuditLogDestination"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.addConsoleAuditLogDestination(className, methodName, serverToBeConfiguredName, supportedSeverities); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (InvalidParameterException error) { - restExceptionHandler.captureInvalidParameterException(response, error); - } catch (PropertyServerException error) { - restExceptionHandler.capturePropertyServerException(response, error); - } catch (UserNotAuthorizedException error) { - restExceptionHandler.captureUserNotAuthorizedException(response, error); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Add an audit log destination that creates slf4j records. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public ServerAuthorConfigurationResponse addSLF4JAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, List supportedSeverities) { - final String methodName = "addSLF4JAuditLogDestination"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.addSLF4JAuditLogDestination(className, methodName, serverToBeConfiguredName, supportedSeverities); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Add an audit log destination that creates log records as JSON files in a shared directory. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public ServerAuthorConfigurationResponse addFileAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, List supportedSeverities) { - final String methodName = "addFileAuditLogDestination"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.addFileAuditLogDestination(className, methodName, serverToBeConfiguredName, supportedSeverities); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Add an audit log destination that sends each log record as an event on the supplied event topic. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public ServerAuthorConfigurationResponse addEventTopicAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, List supportedSeverities) { - final String methodName = "addEventTopicAuditLogDestination"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.addEventTopicAuditLogDestination(className, methodName, serverToBeConfiguredName, supportedSeverities); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Add an audit log destination that is defined by the supplied connection object. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param connection connection object that defines the audit log destination - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - public ServerAuthorConfigurationResponse addAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, Connection connection) { - final String methodName = "addAuditLogDestination"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.addAuditLogDestination(className, methodName, serverToBeConfiguredName, connection); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Update an audit log destination that is identified with the supplied destination name with - * the supplied connection object. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param auditLogDestinationName name of the audit log destination to be updated - * @param auditLogDestination connection object that defines the audit log destination - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public ServerAuthorConfigurationResponse updateAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, String auditLogDestinationName, Connection auditLogDestination) { - final String methodName = "updateAuditLogDestination"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.updateAuditLogDestination(className, methodName, serverToBeConfiguredName, auditLogDestinationName, auditLogDestination); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - /** - * Delete an audit log destination that is identified with the supplied destination name - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param auditLogDestinationName name of the audit log destination to be deleted - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName. - */ - public ServerAuthorConfigurationResponse deleteAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, String auditLogDestinationName) { - final String methodName = "clearAuditLogDestination"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.deleteAuditLogDestination(className, methodName, serverToBeConfiguredName, auditLogDestinationName); - response = getStoredConfiguration(userId, serverName, serverToBeConfiguredName); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - - } - - /** - * Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeActivatedName name of the server to be activated - * @return the current active configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the server name is invalid or - * OMAGConfigurationErrorException there is a problem using the supplied configuration. - */ - public ServerAuthorConfigurationResponse activateWithStoredConfig(String userId, String serverName, String destinationPlatformName, String serverToBeActivatedName) { - final String methodName = "activateWithStoredConfig"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.activateWithStoredConfig(className, methodName, destinationPlatformName, serverToBeActivatedName); - OMAGServerConfig config = serverAuthorViewHandler.getActiveConfiguration(className, methodName, serverToBeActivatedName); - response.setOmagServerConfig(config); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Temporarily deactivate open metadata and governance server. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeDeactivatedName name of the server to be deactivated - * @return the current stored configuration that has been deactivated or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the serverName is invalid. - */ - public ServerAuthorConfigurationResponse deactivateTemporarily(String userId, String serverName, String destinationPlatformName, String serverToBeDeactivatedName) { - final String methodName = "deactivateTemporarily"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.deactivateServerTemporarily(className, methodName, destinationPlatformName, serverToBeDeactivatedName); - OMAGServerConfig config = serverAuthorViewHandler.getStoredConfiguration(className, methodName, serverToBeDeactivatedName); - response.setOmagServerConfig(config); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Permanently deactivate any open metadata and governance services and unregister from - * any cohorts. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeDeactivatedName name of the server to be deactivated permanently - * @return Success Message response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the serverName is invalid. - */ - public SuccessMessageResponse deactivatePermanently(String userId, String serverName, String destinationPlatformName, String serverToBeDeactivatedName) { - final String methodName = "activateWithStoredConfig"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SuccessMessageResponse response = new SuccessMessageResponse(); - response.setSuccessMessage("Activate the server"); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - serverAuthorViewHandler.deactivateServerPermanently(className, methodName, destinationPlatformName, serverToBeDeactivatedName); - } catch (InvalidParameterException error) { - restExceptionHandler.captureInvalidParameterException(response, error); - } catch (PropertyServerException error) { - restExceptionHandler.capturePropertyServerException(response, error); - } catch (UserNotAuthorizedException error) { - restExceptionHandler.captureUserNotAuthorizedException(response, error); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - - } - - /** - * Return the configuration used for the current active instance of the server. Null is returned if - * the server instance is not running. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeConfiguredName server to be configured name - * @return configuration properties used to initialize the server or null if not running or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the server name is invalid or - * OMAGConfigurationErrorException there is a problem using the supplied configuration. - */ - public ServerAuthorConfigurationResponse getActiveConfiguration(String userId, String serverName, String destinationPlatformName, String serverToBeConfiguredName) { - final String methodName = "getStoredConfiguration"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAuthorConfigurationResponse response = new ServerAuthorConfigurationResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - ServerAuthorViewHandler serverAuthorViewHandler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - OMAGServerConfig config = serverAuthorViewHandler.getActiveConfiguration(className, methodName, serverToBeConfiguredName); - response.setOmagServerConfig(config); - } catch (InvalidParameterException error) { - restExceptionHandler.captureInvalidParameterException(response, error); - } catch (PropertyServerException error) { - restExceptionHandler.capturePropertyServerException(response, error); - } catch (UserNotAuthorizedException error) { - restExceptionHandler.captureUserNotAuthorizedException(response, error); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - /** - * Get the server configurations associated with the platforms that this view service knows about. - * @param userId user that is issuing the request - * @param serverName local server name - * @return the known platforms, which if active will include he servers that are configured or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the server name is invalid or - * ServerAuthorViewServiceException The Server Author has detected an error. - */ - public ServerAuthorPlatformsResponse getKnownPlatforms(String userId, String serverName) { - String methodName = "getKnownPlatforms"; - if (log.isDebugEnabled()) { - log.debug("Entering method: " + methodName + " with serverName " + serverName); - } - ServerAuthorPlatformsResponse response = new ServerAuthorPlatformsResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - // get the defined platforms from the config - ServerAuthorViewHandler handler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - response.setPlatforms(handler.getKnownPlatforms(userId, methodName, auditLog)); - } catch (ServerAuthorViewServiceException error) { - ServerAuthorExceptionHandler.captureCheckedException(response, error, className); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - if (log.isDebugEnabled()) { - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - } - return response; - } - /** - * Get the audit log supported severities for the server being configured - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return a list of supported audit log severities - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public SupportedAuditLogSeveritiesResponse getAuditLogDestinationSupportedSeverities(String userId, String serverName, String serverToBeConfiguredName) { - String methodName = " getAuditLogDestinationSupportedSeverities"; - if (log.isDebugEnabled()) { - log.debug("Entering method: " + methodName + " with serverName " + serverName); - } - SupportedAuditLogSeveritiesResponse response = new SupportedAuditLogSeveritiesResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - // get the defined platforms from the config - ServerAuthorViewHandler handler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - response.setSeverities(handler.getSupportedAuditLogSeverities()); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - if (log.isDebugEnabled()) { - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - } - return response; - - } - /** - * Clear the audit log destinations associated with the server being configured - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return a list of supported audit log severities - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - public VoidResponse clearAuditLogDestinations(String userId, String serverName, String serverToBeConfiguredName) { - String methodName = "clearAuditLogDestinations"; - if (log.isDebugEnabled()) { - log.debug("Entering method: " + methodName + " with serverName " + serverName); - } - VoidResponse response = new VoidResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - // get the defined platforms from the config - ServerAuthorViewHandler handler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - handler.clearAuditLogDestinations(serverToBeConfiguredName); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - if (log.isDebugEnabled()) { - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - } - return response; - } - /** - * Enable registration of server to an open metadata repository cohort using the default topic structure (DEDICATED_TOPICS). - * - * A cohort is a group of open metadata - * repositories that are sharing metadata. An OMAG server can connect to zero, one or more cohorts. - * Each cohort needs a unique name. The members of the cohort use a shared topic to exchange registration - * information and events related to changes in their supported metadata types and instances. - * They are also able to query each other's metadata directly through REST calls. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName server to be configured - * @param cohortName name of the cohort. - * @return VoidResponse or - * ServerAuthorException if the supplied userId is not authorized to issue this command or - * invalid serverName, cohortName or serviceMode parameter or - * or the cohort registration failed - */ - public VoidResponse addCohortRegistration(String userId, String serverName, String serverToBeConfiguredName, String cohortName) { - String methodName = "addCohortRegistration"; - if (log.isDebugEnabled()) { - log.debug("Entering method: " + methodName + " with serverName " + serverName + " server To Be Configured Name " + serverToBeConfiguredName); - } - VoidResponse response = new VoidResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - // register new cohort - ServerAuthorViewHandler handler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - handler.addCohortRegistration(serverToBeConfiguredName, cohortName); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - if (log.isDebugEnabled()) { - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - } - return response; - } - /** - * Unregister this server from an open metadata repository cohort. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of server to pass the request to - * @param cohortName name of the cohort. - * @return VoidResponse or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName, cohortName or serviceMode parameter. - */ - public VoidResponse removeCohortRegistration(String userId, String serverName, String serverToBeConfiguredName, String cohortName) { - String methodName = "removeCohortRegistration"; - if (log.isDebugEnabled()) { - log.debug("Entering method: " + methodName + " with serverName " + serverName + " server To Be Configured Name " + serverToBeConfiguredName); - } - VoidResponse response = new VoidResponse(); - - AuditLog auditLog = null; - try { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - // unregister cohort - ServerAuthorViewHandler handler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName); - handler.removeCohortRegistration(serverToBeConfiguredName, cohortName); - } catch (Exception exception) { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - if (log.isDebugEnabled()) { - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - } - return response; - } - -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/README.md b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/README.md deleted file mode 100644 index fa8aed38f92..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Server Author View Open Metadata View Service (OMVS) with Spring - -The Server Author OMVS spring module uses spring to create the server-side support for the REST services. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/build.gradle b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/build.gradle deleted file mode 100644 index 058de8c9d3d..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:view-services:server-author-view:server-author-view-api') - implementation project(':open-metadata-implementation:view-services:server-author-view:server-author-view-server') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation 'org.springframework:spring-web' - implementation 'io.swagger.core.v3:swagger-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'com.google.code.findbugs:jsr305' - -} - -description = 'Server Author Spring View Services' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigAccessServicesViewResource.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigAccessServicesViewResource.java deleted file mode 100644 index 228cb601af7..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigAccessServicesViewResource.java +++ /dev/null @@ -1,121 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.server.spring; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.adminservices.configuration.properties.EnterpriseAccessConfig; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.services.ServerAuthorViewRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Map; - -/** - * ConfigAccessServicesResource provides the configuration for setting up the Open Metadata Access - * Services (OMASs). - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/server-author/users/{userId}/servers/{serverToBeConfiguredName}") - -@Tag(name="View Server: Server Author OMVS", description="The Server Author OMVS is for user interfaces supporting the creating and editing of OMAG Server Configuration Documents.", - externalDocs=@ExternalDocumentation(description="Further information", - url="https://egeria-project.org/services/omvs/server-author/overview")) - -public class ConfigAccessServicesViewResource -{ - private final ServerAuthorViewRESTServices adminAPI = new ServerAuthorViewRESTServices(); - - - - /** - * Enable a single access service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param accessServiceOptions property name/value pairs used to configure the access services - * @param serviceURLMarker string indicating which access service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @PostMapping(path = "/access-services/{serviceURLMarker}") - public ServerAuthorConfigurationResponse configureAccessService(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String serviceURLMarker, - @RequestBody(required = false) Map accessServiceOptions) - { - return adminAPI.configureAccessService(userId, serverName, serverToBeConfiguredName, serviceURLMarker, accessServiceOptions); - } - - - /** - * Disable a single access service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param serviceURLMarker string indicating which access service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @DeleteMapping(path = "/access-services/{serviceURLMarker}") - public ServerAuthorConfigurationResponse disableAccessService( @PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String serviceURLMarker) - { - return adminAPI.disableAccessService(userId, serverName, serverToBeConfiguredName, serviceURLMarker); - } - - - /** - * Enable all access services that are registered with this server platform. - * The access services are set up to use the default event bus. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param accessServiceOptions property name/value pairs used to configure the access services - * @return the current stored configuration - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @PostMapping(path = "/access-services") - public ServerAuthorConfigurationResponse configureAllAccessServices(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody(required = false) Map accessServiceOptions) - { - return adminAPI.configureAllAccessServices(userId, serverName, serverToBeConfiguredName, accessServiceOptions); - } - - /** - * Set up the configuration that controls the enterprise repository services. These services are part - * of the Open Metadata Repository Services (OMRS). They provide federated queries and federated event - * notifications that cover metadata from the local repository plus any repositories connected via - * open metadata repository cohorts. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param serverToBeConfiguredName name of the server to be configured. - * @param enterpriseAccessConfig enterprise repository services configuration properties. - * @return the current stored configuration - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or enterpriseAccessConfig parameter or - * OMAGConfigurationErrorException unusual state in the admin server. - */ - @PostMapping(path = "/enterprise-access/configuration") - public ServerAuthorConfigurationResponse setEnterpriseAccessConfig(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody EnterpriseAccessConfig enterpriseAccessConfig) - { - return adminAPI.setEnterpriseAccessConfig(userId, serverName, serverToBeConfiguredName, enterpriseAccessConfig); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigDefaultsViewResource.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigDefaultsViewResource.java deleted file mode 100644 index 77742aef234..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigDefaultsViewResource.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.odpi.openmetadata.viewservices.serverauthor.server.spring;/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.services.ServerAuthorViewRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Map; - -/** - * ConfigDefaultsResource sets properties in the configuration document that are used as - * default values when configuring the subsystems in an OMAG Server. If these values - * are updated after a subsystem is configured, they do not impact that subsystem's configuration. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/server-author/users/{userId}/servers/{serverToBeConfiguredName}") - -@Tag(name="View Server: Server Author OMVS", description="The Server Author OMVS is for user interfaces supporting the creating and editing of OMAG Server Configuration Documents.", - externalDocs=@ExternalDocumentation(description="Further information", - url="https://egeria-project.org/services/omvs/server-author/overview")) - -public class ConfigDefaultsViewResource -{ - private final ServerAuthorViewRESTServices adminAPI = new ServerAuthorViewRESTServices(); - - /** - * Set up the default event bus for embedding in event-driven connector. The resulting connector will - * be used for example, in the OMRS Topic Connector for each cohort, the in and out topics for each Access Service and - * possibly the local repository's event mapper. - *

- * When the event bus is configured, it is used only on future configuration. It does not affect - * existing configuration. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param connectorProvider connector provider for the event bus (if it is null then Kafka is assumed). - * @param topicURLRoot the common root of the topics used by the open metadata server. - * @param configurationProperties property name/value pairs used to configure the connection to the event bus connector - * @return the current stored configuration - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException it is too late to configure the event bus - other configuration already exists or - * OMAGInvalidParameterException invalid serverName or serviceMode parameter. - */ - @PostMapping(path = "/event-bus") - public ServerAuthorConfigurationResponse setEventBus(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestParam(required = false) String connectorProvider, - @RequestParam(required = false) String topicURLRoot, - @RequestBody (required = false) Map configurationProperties) - { - return adminAPI.setEventBus(userId, serverName, serverToBeConfiguredName, connectorProvider, topicURLRoot, configurationProperties); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigRepositoryServicesViewResource.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigRepositoryServicesViewResource.java deleted file mode 100644 index 934093660c6..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigRepositoryServicesViewResource.java +++ /dev/null @@ -1,358 +0,0 @@ -package org.odpi.openmetadata.viewservices.serverauthor.server.spring;/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.SupportedAuditLogSeveritiesResponse; -import org.odpi.openmetadata.viewservices.serverauthor.services.ServerAuthorViewRESTServices; -import org.springframework.lang.Nullable; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.Map; - -/** - * ConfigRepositoryServicesResource provides the configuration services for setting - * up the repository services subsystems. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/server-author/users/{userId}/servers/{serverToBeConfiguredName}") - -@Tag(name="View Server: Server Author OMVS", description="The Server Author OMVS is for user interfaces supporting the creating and editing of OMAG Server Configuration Documents.", - externalDocs=@ExternalDocumentation(description="Further information", - url="https://egeria-project.org/services/omvs/server-author/overview")) - -class ConfigRepositoryServicesViewResource { - private final ServerAuthorViewRESTServices serverAPI = new ServerAuthorViewRESTServices(); - - /** - * Set up an in memory local repository. This repository uses hashmaps to store content. It is useful - * for demos, testing and POCs. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param requestBody null request body - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @SuppressWarnings(value = "unused") - @PostMapping(path = "/local-repository/mode/in-memory-repository") - public FFDCResponseBase setInMemLocalRepository(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody(required = false) NullRequestBody requestBody) { - return serverAPI.setInMemLocalRepository(userId, serverName, serverToBeConfiguredName); - } - - - /** - * Set up a graph store as the local repository. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param storageProperties properties used to configure the back end storage for the graph - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/local-repository/mode/local-graph-repository") - public FFDCResponseBase setGraphLocalRepository(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - // @RequestBody Map storageProperties) - // TODO resolve Nullable - @RequestBody @Nullable Map storageProperties) - { - return serverAPI.setGraphLocalRepository(userId, serverName, serverToBeConfiguredName, storageProperties); - } - - - /** - * Set up a read only local repository. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/local-repository/mode/read-only-repository") - public FFDCResponseBase setGraphLocalRepository(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName) { - return serverAPI.setReadOnlyLocalRepository(userId, serverName, serverToBeConfiguredName); - } - /** - * Provide the connection to the local repository - used when the local repository mode is set to plugin repository. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param connection connection to the OMRS repository connector. - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or repositoryProxyConnection parameter or - * OMAGConfigurationErrorException the local repository mode has not been set - */ - @PostMapping(path = "/local-repository/mode/plugin-repository/connection") - public FFDCResponseBase setPluginRepositoryConnection(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody Connection connection) - { - return serverAPI.setPluginRepositoryConnection(userId, serverName, serverToBeConfiguredName, connection); - } - - /* - * ============================================================= - * Configure basic options using defaults - */ - - /** - * Set up the default audit log for the server. This adds the console audit log destination. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/audit-log-destinations/default") - public ServerAuthorConfigurationResponse setDefaultAuditLog(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName) { - return serverAPI.setDefaultAuditLog(userId, serverName, serverToBeConfiguredName); - } - - /** - * Set up the console audit log for the server. This writes selected parts of the audit log record to stdout. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/audit-log-destinations/console") - public ServerAuthorConfigurationResponse addConsoleAuditLogDestination(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody List supportedSeverities) { - return serverAPI.addConsoleAuditLogDestination(userId, serverName, serverToBeConfiguredName, supportedSeverities); - } - - - /** - * Add an audit log destination that creates slf4j records. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/audit-log-destinations/slf4j") - public ServerAuthorConfigurationResponse addSLF4JAuditLogDestination(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody List supportedSeverities) { - return serverAPI.addSLF4JAuditLogDestination(userId, serverName, serverToBeConfiguredName, supportedSeverities); - } - - - /** - * Add an audit log destination that creates log records as JSON files in a shared directory. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/audit-log-destinations/files") - public ServerAuthorConfigurationResponse addFileAuditLogDestination(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody List supportedSeverities) { - return serverAPI.addFileAuditLogDestination(userId, serverName, serverToBeConfiguredName, supportedSeverities); - } - - - /** - * Add an audit log destination that sends each log record as an event on the supplied event topic. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param supportedSeverities list of severities that should be logged to this destination (empty list means all) - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/audit-log-destinations/event-topic") - public ServerAuthorConfigurationResponse addEventTopicAuditLogDestination(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody List supportedSeverities) { - return serverAPI.addEventTopicAuditLogDestination(userId, serverName, serverToBeConfiguredName, supportedSeverities); - } - - - /** - * Add an audit log destination that is defined by the supplied connection object. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param connection connection object that defines the audit log destination - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or localRepositoryMode parameter. - */ - @PostMapping(path = "/audit-log-destinations/connection") - public ServerAuthorConfigurationResponse addAuditLogDestination(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @RequestBody Connection connection) { - return serverAPI.addAuditLogDestination(userId, serverName, serverToBeConfiguredName, connection); - } - /** - * Update an audit log destination that is identified with the supplied destination name with - * the supplied connection object. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param auditLogDestinationName name of the audit log destination to be updated - * @param auditLogDestination connection object that defines the audit log destination - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @PutMapping(path = "/audit-log-destinations/connection/{auditLogDestinationName}") - public ServerAuthorConfigurationResponse updateAuditLogDestination(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String auditLogDestinationName, - @RequestBody Connection auditLogDestination) - { - return serverAPI.updateAuditLogDestination(userId, serverName, serverToBeConfiguredName, auditLogDestinationName, auditLogDestination); - } - /** - * Delete an audit log destination that is identified with the supplied destination name - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param auditLogDestinationName name of the audit log destination to be deleted - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName. - */ - @DeleteMapping(path = "/audit-log-destinations/connection/{auditLogDestinationName}") - public ServerAuthorConfigurationResponse deleteAuditLogDestination(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String auditLogDestinationName) - { - return serverAPI.deleteAuditLogDestination(userId, serverName, serverToBeConfiguredName, auditLogDestinationName); - } - - /** - * Get the audit log supported severities for the server being configured - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return a list of supported audit log severities - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @GetMapping(path = "/audit-log-destinations") - public SupportedAuditLogSeveritiesResponse getAuditLogDestinationSupportedSeverities(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName) { - return serverAPI.getAuditLogDestinationSupportedSeverities(userId, serverName, serverToBeConfiguredName); - } - - /** - * Clear the audit log destinations associated with the server being configured - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @return a list of supported audit log severities - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @DeleteMapping(path = "/audit-log-destinations") - public FFDCResponseBase deleteAuditLogDestinationSupportedSeverities(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName) { - return serverAPI.clearAuditLogDestinations(userId, serverName, serverToBeConfiguredName); - } - - /** - * Enable registration of server to an open metadata repository cohort using the default topic structure (DEDICATED_TOPICS). - *

- * A cohort is a group of open metadata - * repositories that are sharing metadata. An OMAG server can connect to zero, one or more cohorts. - * Each cohort needs a unique name. The members of the cohort use a shared topic to exchange registration - * information and events related to changes in their supported metadata types and instances. - * They are also able to query each other's metadata directly through REST calls. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param cohortName name of the cohort. - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName, cohortName or serviceMode parameter or - * OMAGConfigurationErrorException the event bus is not set. - */ - @PostMapping(path = "/cohorts/{cohortName}") - public VoidResponse addCohortRegistration(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String cohortName) - { - return serverAPI.addCohortRegistration(userId, serverName, serverToBeConfiguredName, cohortName); - } - /** - * Unregister this server from an open metadata repository cohort. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param cohortName name of the cohort. - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName, cohortName or serviceMode parameter. - */ - @DeleteMapping(path = "/cohorts/{cohortName}") - public VoidResponse removeCohortRegistration(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String cohortName) - { - return serverAPI.removeCohortRegistration(userId, serverName, serverToBeConfiguredName, cohortName); - } - - -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigViewResource.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigViewResource.java deleted file mode 100644 index a00f9798ab6..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigViewResource.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.odpi.openmetadata.viewservices.serverauthor.server.spring;/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorPlatformsResponse; -import org.odpi.openmetadata.viewservices.serverauthor.services.ServerAuthorViewRESTServices; -import org.springframework.web.bind.annotation.*; - - -/** - * OMAGServerConfigResource returns the current configuration document for the server. If the - * configuration document is not found, a new one is created. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/server-author/users/{userId}") - -@Tag(name="View Server: Server Author OMVS", description="The Server Author OMVS is for user interfaces supporting the creating and editing of OMAG Server Configuration Documents.", - externalDocs=@ExternalDocumentation(description="Further information", - url="https://egeria-project.org/services/omvs/server-author/overview")) - -public class ConfigViewResource -{ - private final ServerAuthorViewRESTServices adminAPI = new ServerAuthorViewRESTServices(); - - /** - * Return the known platforms - * - * @param userId user that is issuing the request - * @param serverName local server name - * @return OMAGServerConfig properties or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @GetMapping(path = "/platforms") - public ServerAuthorPlatformsResponse getKnownPlatforms(@PathVariable String userId, - @PathVariable String serverName) - { - return adminAPI.getKnownPlatforms(userId, serverName); - } - - /** - * Return the stored configuration document for the server. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param serverBeingRetrievedName name of the server to be retrieved for configuration. - * @return OMAGServerConfig properties or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @GetMapping(path = "/servers/{serverBeingRetrievedName}/configuration") - public ServerAuthorConfigurationResponse getStoredConfiguration(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverBeingRetrievedName) - { - return adminAPI.getStoredConfiguration(userId, serverName, serverBeingRetrievedName); - } - - - /** - * Set up the configuration properties for an OMAG Server in a single command. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param serverBeingConfiguredName name of the server to be configured - * @param omagServerConfig configuration for the server - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException invalid serverName or OMAGServerConfig parameter. - */ - @PostMapping(path = "/servers/{serverBeingConfiguredName}/configuration") - public ServerAuthorConfigurationResponse setOMAGServerConfig(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverBeingConfiguredName, - @RequestBody OMAGServerConfig omagServerConfig) - { - return adminAPI.setOMAGServerConfig(userId, serverName, serverBeingConfiguredName, omagServerConfig); - } - - /** - * Push the configuration for the server to another OMAG Server Platform. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param serverBeingDeployedName name of the server to be configured. - * @param destinationPlatformName name of the platform where the config is to be deployed to - * @return void response or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException there is a problem using the supplied configuration or - * OMAGInvalidParameterException invalid serverName or destinationPlatform parameter. - */ - @PostMapping(path = "/servers/{serverBeingDeployedName}/configuration/deploy") - public ServerAuthorConfigurationResponse deployOMAGServerConfig(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverBeingDeployedName, - @RequestParam(value = "destinationPlatformName") String destinationPlatformName) - { - return adminAPI.deployOMAGServerConfig(userId, serverName, destinationPlatformName, serverBeingDeployedName); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigViewServicesViewResource.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigViewServicesViewResource.java deleted file mode 100644 index 3bcdd821789..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/ConfigViewServicesViewResource.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.server.spring; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.services.ServerAuthorViewRESTServices; -import org.springframework.web.bind.annotation.*; - -import java.util.Map; - -/** - * ConfigViewServicesResource provides the configuration for setting up the Open Metadata View - * Services (OMVSs). - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/server-author/users/{userId}/servers/{serverToBeConfiguredName}") - -@Tag(name="View Server: Server Author OMVS", description="The Server Author OMVS is for user interfaces supporting the creating and editing of OMAG Server Configuration Documents.", - externalDocs=@ExternalDocumentation(description="Further information", - url="https://egeria-project.org/services/omvs/server-author/overview")) - -public class ConfigViewServicesViewResource -{ - private final ServerAuthorViewRESTServices adminAPI = new ServerAuthorViewRESTServices(); - - - - /** - * Enable a single view service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param viewServiceOptions property name/value pairs used to configure the view services - * @param serviceURLMarker string indicating which view service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @PostMapping(path = "/view-services/{serviceURLMarker}") - public ServerAuthorConfigurationResponse configureViewService(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String serviceURLMarker, - @RequestBody(required = false) Map viewServiceOptions) - { - return adminAPI.configureViewService(userId, serverName, serverToBeConfiguredName, serviceURLMarker, viewServiceOptions); - } - - - /** - * Disable a single view service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param serviceURLMarker string indicating which view service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @DeleteMapping(path = "/view-services/{serviceURLMarker}") - public ServerAuthorConfigurationResponse disableViewService( @PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String serviceURLMarker) - { - return adminAPI.disableViewService(userId, serverName, serverToBeConfiguredName, serviceURLMarker); - } - -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/EngineHostServicesViewResource.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/EngineHostServicesViewResource.java deleted file mode 100644 index e97534256d1..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/EngineHostServicesViewResource.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.serverauthor.server.spring; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.adminservices.rest.EngineServiceRequestBody; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.services.ServerAuthorViewRESTServices; -import org.springframework.web.bind.annotation.*; - -/** - * EngineHostServicesViewResource provides the configuration for setting up an Engine Host. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/server-author/users/{userId}/servers/{serverToBeConfiguredName}") - -@Tag(name="View Server: Server Author OMVS", description="The Server Author OMVS is for user interfaces supporting the creating and editing of OMAG Server Configuration Documents.", - externalDocs=@ExternalDocumentation(description="Further information", - url="https://egeria-project.org/services/omvs/server-author/overview")) - -public class EngineHostServicesViewResource -{ - private final ServerAuthorViewRESTServices adminAPI = new ServerAuthorViewRESTServices(); - - - - - /** - * Enable a single engine service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param requestBody Engine host service request body - * @param serviceURLMarker string indicating which engine service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @PostMapping(path = "/engine-services/{serviceURLMarker}") - public ServerAuthorConfigurationResponse configureEngineService(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String serviceURLMarker, - @RequestBody EngineServiceRequestBody requestBody) - - - - { - return adminAPI.configureEngineService(userId, serverName, serverToBeConfiguredName, serviceURLMarker, requestBody); - } - - - /** - * Disable a single engine service. - * - * @param userId user that is issuing the request. - * @param serverName local server name. - * @param serverToBeConfiguredName name of the server to be configured. - * @param serviceURLMarker string indicating which engine service it is configuring - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGConfigurationErrorException the event bus has not been configured or - * OMAGInvalidParameterException invalid serverName parameter. - */ - @DeleteMapping(path = "/engine-services/{serviceURLMarker}") - public ServerAuthorConfigurationResponse disableEngineService( @PathVariable String userId, - @PathVariable String serverName, - @PathVariable String serverToBeConfiguredName, - @PathVariable String serviceURLMarker) - { - return adminAPI.disableEngineService(userId, serverName, serverToBeConfiguredName, serviceURLMarker); - } -} diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/OperationalServicesViewResource.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/OperationalServicesViewResource.java deleted file mode 100644 index 49d4183876b..00000000000 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-spring/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/server/spring/OperationalServicesViewResource.java +++ /dev/null @@ -1,150 +0,0 @@ -package org.odpi.openmetadata.viewservices.serverauthor.server.spring;/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.adminservices.rest.SuccessMessageResponse; -import org.odpi.openmetadata.viewservices.serverauthor.api.rest.ServerAuthorConfigurationResponse; -import org.odpi.openmetadata.viewservices.serverauthor.services.ServerAuthorViewRESTServices; -import org.springframework.web.bind.annotation.*; - -/** - * OperationalServicesResource provides the REST API for controlling the start up, management and - * shutdown of services in the OMAG Server. - */ -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/view-services/server-author/users/{userId}/servers/{serverToBeConfiguredName}") - -@Tag(name="View Server: Server Author OMVS", description="The Server Author OMVS is for user interfaces supporting the creating and editing of OMAG Server Configuration Documents.", - externalDocs=@ExternalDocumentation(description="Further information", - url="https://egeria-project.org/services/omvs/server-author/overview")) - - -public class OperationalServicesViewResource -{ - private final ServerAuthorViewRESTServices operationalServices = new ServerAuthorViewRESTServices(); - - /* - * ======================================================================================== - * Activate and deactivate the open metadata and governance capabilities in the OMAG Server - */ - - /** - * Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the server name is invalid or - * OMAGConfigurationErrorException there is a problem using the supplied configuration. - */ - @PostMapping(path = "/instance") - - @Operation(summary="Activate server with stored configuration document", - description="Activate the named OMAG server using the appropriate configuration document found in the configuration store.", - externalDocs=@ExternalDocumentation(description="Configuration Documents", - url="https://egeria-project.org/concepts/configuration-document")) - - public ServerAuthorConfigurationResponse activateWithStoredConfig(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String destinationPlatformName, - @PathVariable String serverToBeConfiguredName) - { - return operationalServices.activateWithStoredConfig(userId, serverName, destinationPlatformName, serverToBeConfiguredName ); - } - - /** - * Temporarily deactivate any open metadata and governance services. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the serverName is invalid. - */ - @DeleteMapping(path = "/instance") - - @Operation(summary="Shutdown server", - description="Temporarily shutdown the named OMAG server. This server can be restarted as a later time.") - - public ServerAuthorConfigurationResponse deactivateTemporarily(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String destinationPlatformName, - @PathVariable String serverToBeConfiguredName) - { - return operationalServices.deactivateTemporarily(userId, serverName, destinationPlatformName, serverToBeConfiguredName); - } - - - /** - * Permanently deactivate any open metadata and governance services and unregister from - * any cohorts. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeConfiguredName name of the server to be configured. - * @return the current stored configuration or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the serverName is invalid. - */ - @DeleteMapping(path = "") - - @Operation(summary="Shutdown and delete server", - description="Permanently shutdown the named OMAG server and delete its configuration. The server will also be removed " + - "from any open metadata repository cohorts it has registered with.") - - public SuccessMessageResponse deactivatePermanently(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String destinationPlatformName, - @PathVariable String serverToBeConfiguredName) - { - return operationalServices.deactivatePermanently(userId, serverName, destinationPlatformName, serverToBeConfiguredName); - } - - - /* - /*deploy - * ============================================================= - * Operational status and control - */ - - /** - * Return the configuration used for the current active instance of the server. Null is returned if - * the server instance is not running. - * - * @param userId user that is issuing the request - * @param serverName local server name - * @param destinationPlatformName Name of the platform where the server lives - * @param serverToBeConfiguredName name of the server to be configured. - * @return configuration properties used to initialize the server or null if not running or - * OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or - * OMAGInvalidParameterException the server name is invalid or - * OMAGConfigurationErrorException there is a problem using the supplied configuration. - */ - @GetMapping(path = "/instance/configuration") - - @Operation(summary="Retrieve active server's running configuration", - description="Retrieve the configuration document used to start a running instance of a server. The stored configuration " + - "document may have changed since the server was started. This operation makes it possible to verify the " + - "configuration values actually being used in the running server. \n" + - "\n" + - "Null is returned if the server is not running.", - externalDocs=@ExternalDocumentation(description="Configuration Documents", - url="https://egeria-project.org/concepts/configuration-document/")) - - public ServerAuthorConfigurationResponse getActiveConfiguration(@PathVariable String userId, - @PathVariable String serverName, - @PathVariable String destinationPlatformName, - @PathVariable String serverToBeConfiguredName) - { - return operationalServices.getActiveConfiguration(userId, serverName, destinationPlatformName, serverToBeConfiguredName); - } - -} diff --git a/open-metadata-implementation/view-services/tex-view/README.md b/open-metadata-implementation/view-services/tex-view/README.md deleted file mode 100644 index 0f948ed14d2..00000000000 --- a/open-metadata-implementation/view-services/tex-view/README.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -![Technical Preview](../../../images/egeria-content-status-tech-preview.png) - -# Open Metadata View Services (OMVS) - -Develop an explorer interface to support the Type Explorer UI, which enables a technical user (such as an Enterprise Architect) to -retrieve open metadata type information from repositories and explore the attributes of each type and the possible combinations of -entities, relationships and classifications. The interface retrieves the type information and display it both visually, as graphs -of entity type inheritance and the possible relationships in which each entity type can participate; the display also includes a -detailed textual description of the attributes and possible relationships and classification for each entity type. The textual -display also shows the attributes and entity types for each relationship. - -This OMVS calls a remote server using the [repository services client](../../repository-services/repository-services-client/README.md). - - -The module structure for the Type Explorer OMVS is as follows: - -* [tex-view-api](tex-view-api) defines the interface to the view service. -* [tex-view-server](tex-view-server) supports an implementation of the view service. -* [tex-view-spring](tex-view-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - -Return to [open-metadata-implementation](../..). - ----- -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/view-services/tex-view/tex-view-api/README.md b/open-metadata-implementation/view-services/tex-view/tex-view-api/README.md deleted file mode 100644 index 8f1cde8c477..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Type Explorer Open Metadata View Service (OMVS) api definitions - -The Type Explorer OMVS api support is organized in the following top level packages - -* ffdc - audit log and error log definitions -* properties - types used by the API -* rest - request body and response body definitions for REST calls - ----- -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/view-services/tex-view/tex-view-api/build.gradle b/open-metadata-implementation/view-services/tex-view/tex-view-api/build.gradle deleted file mode 100644 index 456ed4730d0..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation 'org.slf4j:slf4j-api' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexExceptionHandler.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexExceptionHandler.java deleted file mode 100644 index 38cd031f5c8..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexExceptionHandler.java +++ /dev/null @@ -1,116 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.ffdc; - -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityProxyOnlyException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; - -public class TexExceptionHandler { - - - /** - * Method for capturing an exception into a REST response. - * - * Set the exception information into the response. - * This exception capture handler strips off the messageId from the front of the message as - * the message is intended for user-consumption. - * - * @param response REST Response - * @param error returned response. - * @param exceptionClassName class name of the exception to recreate - */ - public static void captureCheckedException(FFDCResponse response, - OCFCheckedExceptionBase error, - String exceptionClassName) - - { - response.setRelatedHTTPCode(error.getReportedHTTPCode()); - response.setExceptionClassName(exceptionClassName); - if (error.getReportedCaughtException() != null) - { - response.setExceptionCausedBy(error.getReportedCaughtException().getClass().getName()); - } - response.setActionDescription(error.getReportingActionDescription()); - String fullErrorMessage = error.getReportedErrorMessage(); - String errorMessageId = error.getReportedErrorMessageId(); - String trimmedErrorMessage = fullErrorMessage.substring(errorMessageId.length()+1); - response.setExceptionErrorMessage(trimmedErrorMessage); - response.setExceptionErrorMessageId(error.getReportedErrorMessageId()); - response.setExceptionErrorMessageParameters(error.getReportedErrorMessageParameters()); - response.setExceptionSystemAction(error.getReportedSystemAction()); - response.setExceptionUserAction(error.getReportedUserAction()); - response.setExceptionProperties(null); - } - - - /* - * Mapping functions for OMRS (back-end) repository services exceptions - */ - - public static TexViewServiceException mapOMRSUserNotAuthorizedException(String className, - String methodName, - UserNotAuthorizedException repositoryException) - { - String userId = repositoryException.getUserId(); - return new TexViewServiceException(TexViewErrorCode.USER_NOT_AUTHORIZED.getMessageDefinition(userId), - className, - methodName); - } - - public static TexViewServiceException mapOMRSRepositoryErrorException(String className, - String methodName, - RepositoryErrorException repositoryException) - { - - String serverName; - String reportedErrorMessageId = repositoryException.getReportedErrorMessageId(); - if (reportedErrorMessageId != null) - { - switch (reportedErrorMessageId) - { - case "OMAG-MULTI-TENANT-404-001": // platform is contactable, but repository server is not available - serverName = repositoryException.getReportedErrorMessageParameters()[0]; - return new TexViewServiceException(TexViewErrorCode.REPOSITORY_NOT_AVAILABLE.getMessageDefinition(methodName, serverName), - className, - methodName); - - case "OMRS-REST-API-503-006": // platform is not contactable, suspect wrong platform URL - serverName = repositoryException.getReportedErrorMessageParameters()[1]; - return new TexViewServiceException(TexViewErrorCode.PLATFORM_NOT_AVAILABLE.getMessageDefinition(methodName, serverName), - className, - methodName); - } - } - - /* - * This is a non-specific repository error - so just pass on the message from the original exception - */ - String message = repositoryException.getReportedErrorMessage(); - return new TexViewServiceException(TexViewErrorCode.REPOSITORY_ERROR.getMessageDefinition(methodName, message), - className, - methodName); - - } - - public static TexViewServiceException mapOMRSInvalidParameterException(String className, String methodName, InvalidParameterException repositoryException) - { - String parameterName = repositoryException.getReportedErrorMessageParameters()[0]; - if (parameterName.equals("searchCriteria")) - parameterName = "Search Text"; - return new TexViewServiceException(TexViewErrorCode.INVALID_PARAMETER.getMessageDefinition(methodName, parameterName), - className, - methodName); - } - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewAuditCode.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewAuditCode.java deleted file mode 100644 index 867ec8b0c88..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewAuditCode.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.ffdc; - - -import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; - - -/** - * The TexAuditCode is used to define the message content for the OMRS Audit Log. - * The 5 fields in the enum are: - *

    - *
  • Log Message Id - 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 TexViewAuditCode implements AuditLogMessageSet -{ - SERVICE_INITIALIZING("OMVS-TYPE-EXPLORER-0001", - AuditLogRecordSeverityLevel.STARTUP, - "The Type Explorer View Service (OMVS) is initializing", - "The local server is initializing the Type Explorer OMVS. If the initialization is successful then audit message OMVS-TYPE-EXPLORER-0003 will be issued, if there were errors then they should be shown in the audit log. ", - "No action is required. This is part of the normal operation of the Type Explorer OMVS."), - - SERVICE_INITIALIZED("OMVS-TYPE-EXPLORER-0002", - AuditLogRecordSeverityLevel.STARTUP, - "The Type Explorer View Service (OMVS) has initialized a new instance for server {0}", - "The Type Explorer OMVS has completed initialization. Calls will be accepted by this service, if OMRS is also configured and the view server has been started. ", - "No action is required. This is part of the normal operation of the Repository Explorer OMVS. Once the OMRS is configured and the server is started, Type Explorer view service requests can be accepted."), - - SERVICE_SHUTDOWN("OMVS-TYPE-EXPLORER-0003", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Type Explorer View Service (OMVS) is shutting down", - "The local server has requested shutdown of the Type Explorer OMVS.", - "No action is required. The operator should verify that shutdown was intended. This is part of the normal operation of the Type Explorer OMVS."), - - SERVICE_INSTANCE_FAILURE("OMVS-TYPE-EXPLORER-0004", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Type Explorer View Service (OMVS) is unable to initialize a new instance; error message is {0}", - "The view service detected an error during the start up of a specific server instance. Its services are not available for the server.", - "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), - - SERVICE_TERMINATING("OMVS-TYPE-EXPLORER-0005", - AuditLogRecordSeverityLevel.SHUTDOWN, - "The Type Explorer View Service (OMVS) is shutting down server instance {0}", - "The local handler has requested shut down of the Type Explorer OMVS.", - "No action is required. This is part of the normal operation of the service."), - - UNEXPECTED_EXCEPTION("OMVS-TYPE-EXPLORER-0006", - AuditLogRecordSeverityLevel.EXCEPTION, - "The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2}", - "The request returned an Exception.", - "This is probably a logic error. Review the stack trace to identify where the error occurred and work to resolve the cause.") - ; - - private final String logMessageId; - private final AuditLogRecordSeverityLevel severity; - private final String logMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor for TexViewAuditCode expects to be passed one of the enumeration rows defined in - * TexViewAuditCode above. For example: - * TexViewAuditCode auditCode = TexViewAuditCode.SERVER_NOT_AVAILABLE; - * This will expand out to the 5 parameters shown below. - * - * @param messageId - unique identifier 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 - */ - TexViewAuditCode(String messageId, - AuditLogRecordSeverityLevel 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. - */ - 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. - */ - 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 "TexViewAuditCode{" + - "logMessageId='" + logMessageId + '\'' + - ", severity=" + severity + - ", logMessage='" + logMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - ", messageDefinition=" + getMessageDefinition() + - '}'; - } -} - diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewErrorCode.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewErrorCode.java deleted file mode 100644 index 7552b3e5b1a..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewErrorCode.java +++ /dev/null @@ -1,240 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The TexViewErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMVS - * It is used in conjunction with all OMVS 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
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: 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 user should correct the error
  • - *
- */ -public enum TexViewErrorCode implements ExceptionMessageSet -{ - SERVICE_NOT_INITIALIZED - (404, "OMVS-TYPE-EXPLORER-400-001", - "The Type Explorer Open Metadata View Service (OMVS) has not been initialized.", - "The system is unable to perform the request because the service has not been initialized.", - "Initialize the view service retry the request."), - - INVALID_CONFIG_PROPERTY - (404, "OMVS-TYPE-EXPLORER-400-002", - "The Type Explorer Open Metadata View Service (OMVS) configuration has an invalid or missing property, property name {0}.", - "The service is unable to initialize because the configuration is not valid or complete.", - "Correct the view service configuration and restart the view server."), - - VIEW_SERVICE_NULL_PLATFORM_NAME - (400, "OMVS-TYPE-EXPLORER-400-003", - "The Type Explorer Open Metadata View Service (OMVS) has been called with a null platform name", - "The system is unable to resolve the platform to query without knowing what it is called.", - "The platform name is supplied by the caller to the OMAG view service. This call needs to be corrected before the view service can perform the request."), - - VIEW_SERVICE_NULL_SERVER_NAME - (400, "OMVS-TYPE-EXPLORER-400-004", - "The Type Explorer Open Metadata View Service (OMVS) has been called with a null server name", - "The system is unable to resolve the server to query without knowing what it is called.", - "The server name is supplied by the caller to the OMAG view service. This call needs to be corrected before the view service can perform the request."), - - VIEW_SERVICE_UNKNOWN_SERVER_NAME - (400, "OMVS-TYPE-EXPLORER-400-005", - "The Type Explorer Open Metadata View Service (OMVS)'s {0} method has been called with an unknown server name of {1}", - "The system is unable to resolve the server name.", - "The server name is supplied by the caller to the OMAG view service. Please ensure a known server name is passed and retry the call to the view service."), - - USER_NOT_AUTHORIZED - (400, "OMVS-TYPE-EXPLORER-400-006", - "The type explorer view service could not perform the requested operation {0} on behalf of user {1}", - "The system reported that the user is not authorized to perform the requested action.", - "Request that the name used to log in to the UI is given authority to perform the request."), - - REPOSITORY_NOT_AVAILABLE - (400, "OMVS-TYPE-EXPLORER-400-007", - "The type explorer view service operation {0} found that server {1} is not available", - "The system reported that the server is not available to perform the requested action.", - "Retry the request when the server is available."), - - PLATFORM_NOT_AVAILABLE - (400, "OMVS-TYPE-EXPLORER-400-008", - "The type explorer view service operation {0} found that the platform for server {1} is not available", - "The system reported that the platform is not reachable using the provided URL.", - "Check the platform is running and check the type explorer resource endpoint configuration for the server and its platform."), - - REPOSITORY_ERROR - (400, "OMVS-TYPE-EXPLORER-400-009", - "The type explorer view service operation {0} encountered a problem with the repository, the message is {1}", - "The system could not complete a repository operation due to the error indicated.", - "Look at the error message and check the configuration and state of the repository server."), - - INVALID_PARAMETER - (400, "OMVS-TYPE-EXPLORER-400-010", - "The type explorer view service operation {0} could not proceed with the setting of parameter {1}", - "The system detected that the parameter was not set to a valid value and could not perform the requested action.", - "Check the parameter setting and retry the operation."), - - VIEW_SERVICE_REQUEST_BODY_MISSING - (400, "OMVS-TYPE-EXPLORER-400-011", - "The type explorer view service could not perform the requested operation {0} because te requestBody was missing", - "The system could not perform the requested action.", - "Check the calling code to make sure that a requestBody is passed to the view service API."), - - TYPE_SYSTEM_ENTITY_DEF_MISSING - (400, "OMVS-TYPE-EXPLORER-400-012", - "The type explorer view service method {0} detected that entity type {1} does not have an EntityDef, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_ENTITY_SUPERTYPE_NAME_MISSING - (400, "OMVS-TYPE-EXPLORER-400-013", - "The type explorer view service method {0} detected that entity type {1} has a super type with no name, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_ENTITY_SUPERTYPE_MISSING - (400, "OMVS-TYPE-EXPLORER-400-014", - "The type explorer view service method {0} detected that entity type {1} refers a super type {2} that is not in the type gallery, as returned by repository {3} on platform {4}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_RELATIONSHIP_DEF_MISSING - (400, "OMVS-TYPE-EXPLORER-400-015", - "The type explorer view service method {0} detected that relationship type {1} does not have a RelationshipDef, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_RELATIONSHIP_END_DEF_MISSING - (400, "OMVS-TYPE-EXPLORER-400-016", - "The type explorer view service method {0} detected that relationship type {1} is missing a RelationshipEndDef, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_DEF_MISSING - (400, "OMVS-TYPE-EXPLORER-400-017", - "The type explorer view service method {0} detected that classification type {1} does not have a ClassificationDef, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_NAME_MISSING - (400, "OMVS-TYPE-EXPLORER-400-018", - "The type explorer view service method {0} detected that the classification type {1} refers to a validEntityDef that has no name, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_MISSING - (400, "OMVS-TYPE-EXPLORER-400-019", - "The type explorer view service method {0} detected that classification type {1} refers to a validEntityDef for entity type {2} that is not in the type gallery, as returned by repository {3} on platform {4}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_NAME_MISSING - (400, "OMVS-TYPE-EXPLORER-400-020", - "The type explorer view service method {0} detected that the classification type {1} refers to a supertype that has no name, as returned by repository {2} on platform {3}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery."), - - TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_MISSING - (400, "OMVS-TYPE-EXPLORER-400-021", - "The type explorer view service method {0} detected that the classification type {1} refers to a supertype {2} that is not in the type gallery, as returned by repository {3} on platform {4}", - "The system could not resolve the type system.", - "Check the type system returned by the repository's getAllTypes method returns a complete and consistent TypeDefGallery.") - - ; - - private final int httpErrorCode; - private final String errorMessageId; - private final String errorMessage; - private final String systemAction; - private final String userAction; - - - /** - * The constructor expects to be passed one of the enumeration rows defined above. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique id 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 - */ - TexViewErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = 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 new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * 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) - { - ExceptionMessageDefinition messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - 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 "ErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewServiceException.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewServiceException.java deleted file mode 100644 index 8f3bb8c2c02..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewServiceException.java +++ /dev/null @@ -1,94 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; - -import java.io.Serial; -import java.util.Arrays; - - -/* - * This is a simple exception class that can convey the few types of exception - * that it is sensible to propagate back to the user interface. The Tex handler will - * have detected or caught each error condition, audit logged it and will then - * create a TexViewServiceException to capture the essential details that can be - * used in the UI. - */ -public class TexViewServiceException extends OCFCheckedExceptionBase -{ - @Serial - private static final long serialVersionUID = 1L; - - - /* - * Constructor - */ - public TexViewServiceException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) - { - super(messageDefinition, className, actionDescription); - } - - - - /** - * JSON-style toString - * - * @return string of property names and values for this enum - */ - @Override - public String toString() - { - return "TexViewServiceException{" + - ", reportedHTTPCode=" + getReportedHTTPCode() + - ", reportingClassName='" + getReportingClassName() + '\'' + - ", reportingActionDescription='" + getReportingActionDescription() + '\'' + - ", reportedErrorMessageId='" + getReportedErrorMessageId() + '\'' + - ", reportedErrorMessageParameters=" + Arrays.toString(getReportedErrorMessageParameters()) + - ", reportedSystemAction='" + getReportedSystemAction() + '\'' + - ", reportedUserAction='" + getReportedUserAction() + '\'' + - ", reportedCaughtException=" + getReportedCaughtException() + - ", relatedProperties=" + getRelatedProperties() + - '}'; - } - - /** - * 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 == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - return true; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return super.hashCode(); - } -} - diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/package-info.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/package-info.java deleted file mode 100644 index f3fc3ccccc3..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Type Explorer OMVS. - */ -package org.odpi.openmetadata.viewservices.tex.api.ffdc; diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/ClassificationExplorer.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/ClassificationExplorer.java deleted file mode 100644 index 2044d583faa..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/ClassificationExplorer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.properties; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - -public class ClassificationExplorer { - - private ClassificationDef classificationDef; - private List inheritedAttributes; - private List subTypeNames; - - - public ClassificationExplorer(ClassificationDef def) { - classificationDef = def; - } - - public ClassificationDef getClassificationDef() { return classificationDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public void addSubTypeName(String subTypeName) { - if (subTypeNames == null) { - subTypeNames = new ArrayList<>(); - } - subTypeNames.add(subTypeName); - } - - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - if (inheritedAttributes == null) { - inheritedAttributes = new ArrayList<>(); - } - inheritedAttributes.addAll(inheritedAttrs); - } - } - -} - diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/EntityExplorer.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/EntityExplorer.java deleted file mode 100644 index 5b62a8dfc66..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/EntityExplorer.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.properties; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; - -import java.util.ArrayList; -import java.util.List; - - -public class EntityExplorer { - - private EntityDef entityDef; - private List inheritedAttributes; - private List subTypeNames; - private List classificationNames; - private List relationshipNames; - private List inheritedRelationshipNames; - private List inheritedClassificationNames; - - - public EntityExplorer(EntityDef def) { - entityDef = def; - inheritedAttributes = new ArrayList<>(); - subTypeNames = new ArrayList<>(); - classificationNames = new ArrayList<>(); - relationshipNames = new ArrayList<>(); - inheritedRelationshipNames = new ArrayList<>(); - inheritedClassificationNames = new ArrayList<>(); - - } - - public EntityDef getEntityDef() { return entityDef; } - - public List getInheritedAttributes() { return inheritedAttributes; } - - public List getSubTypeNames() { return subTypeNames; } - - public List getClassificationNames() { return classificationNames; } - - public List getRelationshipNames() { return relationshipNames; } - - public List getInheritedRelationshipNames() { return inheritedRelationshipNames; } - - public List getInheritedClassificationNames() { return inheritedClassificationNames; } - - public void addSubTypName(String subTypeName) { - subTypeNames.add(subTypeName); - } - - public void addInheritedAttributes(List inheritedAttrs) { - if (inheritedAttrs != null) { - inheritedAttributes.addAll(inheritedAttrs); - } - } - - public void addRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - relationshipNames.add(relationshipTypeName); - } - } - - public void addInheritedRelationship(String relationshipTypeName) { - if (relationshipTypeName != null) { - inheritedRelationshipNames.add(relationshipTypeName); - } - } - - public void addClassification(String classificationName) { - if (classificationName != null) { - classificationNames.add(classificationName); - } - } - - public void addInheritedClassification(String classificationName) { - if (classificationName != null) { - inheritedClassificationNames.add(classificationName); - } - } - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/RelationshipExplorer.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/RelationshipExplorer.java deleted file mode 100644 index b7bb9752453..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/RelationshipExplorer.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.properties; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; - - -public class RelationshipExplorer { - - private RelationshipDef relationshipDef; - - - public RelationshipExplorer(RelationshipDef def) { - relationshipDef = def; - } - - public RelationshipDef getRelationshipDef() { return relationshipDef; } -} - diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/ResourceEndpoint.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/ResourceEndpoint.java deleted file mode 100644 index 5d457b2c2fe..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/ResourceEndpoint.java +++ /dev/null @@ -1,107 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.tex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; - -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) -public class ResourceEndpoint { - - private String resourceCategory; - private String resourceDescription; - private String resourceRootURL; // e.g. "https://localhost:9443" - private String serverName; - private String platformName; - private String serverInstanceName; - - /** - * Default Constructor sets the properties to nulls - */ - public ResourceEndpoint() - { - /* - * Nothing to do. - */ - } - - - public ResourceEndpoint(String resourceCategory, String platformName, String resourceDescription, String resourceRootURL, String serverName, String serverInstanceName) { - this.resourceCategory = resourceCategory; - this.resourceDescription = resourceDescription; - this.resourceRootURL = resourceRootURL; - this.serverName = serverName; - this.platformName = platformName; - this.serverInstanceName = serverInstanceName; - } - - - /* - * Config constructor - create a ResourceEndpoint from a ResourceEndpointConfig - */ - public ResourceEndpoint(ResourceEndpointConfig cfg) { - this.resourceCategory = cfg.getResourceCategory(); - this.resourceDescription = cfg.getDescription(); - this.resourceRootURL = cfg.getPlatformRootURL(); - this.serverName = cfg.getServerName(); - this.platformName = cfg.getPlatformName(); - this.serverInstanceName = cfg.getServerInstanceName(); - } - - public String getResourceCategory() { - return resourceCategory; - } - - public void setResourceCategory(String resourceCategory) { - this.resourceCategory = resourceCategory; - } - - public String getResourceDescription() { - return resourceDescription; - } - - public void setResourceDescription(String resourceDescription) { - this.resourceDescription = resourceDescription; - } - - public String getResourceRootURL() { - return resourceRootURL; - } - - public void setResourceRootURL(String resourceRootURL) { - this.resourceRootURL = resourceRootURL; - } - - public String getServerName() { - return serverName; - } - - public void setServerName(String serverName) { - this.serverName = serverName; - } - - public String getPlatformName() { - return platformName; - } - - public void setPlatformName(String platformName) { - this.platformName = platformName; - } - - public String getServerInstanceName() { - return serverInstanceName; - } - - public void setServerInstanceName(String serverInstanceName) { - this.serverInstanceName = serverInstanceName; - } - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/TypeExplorer.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/TypeExplorer.java deleted file mode 100644 index 343fc82c55c..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/TypeExplorer.java +++ /dev/null @@ -1,501 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexViewErrorCode; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefStatus.DEPRECATED_TYPEDEF; - - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TypeExplorer { - - - private Map entities; - private Map relationships; - private Map classifications; - private Map enums; - - private Map entityTypeGUIDToName; - private Map entityTypeNameToGUID; - - private Map relationshipTypeGUIDToName; - private Map relationshipTypeNameToGUID; - - - public TypeExplorer() { - entities = new HashMap<>(); - relationships = new HashMap<>(); - classifications = new HashMap<>(); - enums = new HashMap<>(); - entityTypeGUIDToName = new HashMap<>(); - entityTypeNameToGUID = new HashMap<>(); - relationshipTypeGUIDToName = new HashMap<>(); - relationshipTypeNameToGUID = new HashMap<>(); - } - - /* - * Getters for Jackson - */ - public Map getEntities() { - return entities; - } - - public Map getRelationships() { - return relationships; - } - - public Map getClassifications() { - return classifications; - } - - public Map getEnums() { - return enums; - } - - public Map getEntityTypeGUIDToName() { - return entityTypeGUIDToName; - } - - public Map getEntityTypeNameToGUID() { - return entityTypeNameToGUID; - } - - public Map getRelationshipTypeGUIDToName() { - return relationshipTypeGUIDToName; - } - - public Map getRelationshipTypeNameToGUID() { - return relationshipTypeNameToGUID; - } - - public void addEntityExplorer(String entityTypeName, EntityExplorer entityExplorer) { - entities.put(entityTypeName, entityExplorer); - String typeGUID = entityExplorer.getEntityDef().getGUID(); - entityTypeGUIDToName.put(typeGUID, entityTypeName); - entityTypeNameToGUID.put(entityTypeName, typeGUID); - } - - public void addRelationshipExplorer(String relationshipTypeName, RelationshipExplorer relationshipExplorer) { - relationships.put(relationshipTypeName, relationshipExplorer); - String typeGUID = relationshipExplorer.getRelationshipDef().getGUID(); - relationshipTypeGUIDToName.put(typeGUID, relationshipTypeName); - relationshipTypeNameToGUID.put(relationshipTypeName, typeGUID); - } - - public void addClassificationExplorer(String classificationTypeName, ClassificationExplorer classificationExplorer) { - classifications.put(classificationTypeName, classificationExplorer); - } - - public void addEnumExplorer(String enumTypeName, EnumDef enumDef) { - enums.put(enumTypeName, enumDef); - } - - public void resolve(boolean includeDeprecatedTypes, - String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - { - - /* - * After all types have been loaded, call the resolver methods to expand the TEX for each type category - * Order is important, entities are expanded first. - * - * If anything untoward is spotted during one of the resolve methods, a RepositoryErrorException is thrown. - */ - - resolveEntities(includeDeprecatedTypes, platformRootURL, repositoryServerName); - resolveRelationships(includeDeprecatedTypes, platformRootURL, repositoryServerName); - resolveClassifications(includeDeprecatedTypes, platformRootURL, repositoryServerName); - - } - - private void resolveEntities(boolean includeDeprecatedTypes, - String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - - { - String methodName = "resolveEntities"; - - // For each entity type, check whether deprecated and if it should be included - Map includedEntities = new HashMap<>(); - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - EntityDef entityDef = entityExplorer.getEntityDef(); - if (entityDef == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_ENTITY_DEF_MISSING.getMessageDefinition( - methodName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - if (includeDeprecatedTypes || entityDef.getStatus() != DEPRECATED_TYPEDEF) { - includedEntities.put(entityTypeName, entityExplorer); - } - - } - entities = includedEntities; - - // For each entityExplorer add it to its superType's subTypes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - // Not every entity type has a superType - if (superType != null) { - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - // Find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_MISSING.getMessageDefinition( - methodName, entityTypeName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - superTypeExplorer.addSubTypName(entityTypeName); - } - } - - // For each entityExplorer resolve its full list of attributes - for (String entityTypeName : entities.keySet()) { - EntityExplorer entityExplorer = entities.get(entityTypeName); - TypeDefLink superType = entityExplorer.getEntityDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - // find supertype in explorer - EntityExplorer superTypeExplorer = entities.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_ENTITY_SUPERTYPE_MISSING.getMessageDefinition( - methodName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - EntityDef superDef = superTypeExplorer.getEntityDef(); - if (superDef == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_ENTITY_DEF_MISSING.getMessageDefinition( - methodName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - List superAttributes = superDef.getPropertiesDefinition(); - entityExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void resolveRelationships(boolean includeDeprecatedTypes, - String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - { - - String methodName = "resolveRelationships"; - - // For each relationship type, check whether deprecated and if it should be included - Map includedRelationships = new HashMap<>(); - for (String relationshipTypeName : relationships.keySet()) { - RelationshipExplorer relationshipExplorer = relationships.get(relationshipTypeName); - RelationshipDef relationshipDef = relationshipExplorer.getRelationshipDef(); - if (relationshipDef == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_RELATIONSHIP_DEF_MISSING.getMessageDefinition( - methodName, relationshipTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - if (includeDeprecatedTypes || relationshipDef.getStatus() != DEPRECATED_TYPEDEF) { - includedRelationships.put(relationshipTypeName, relationshipExplorer); - } - } - relationships = includedRelationships; - - // For each relationshipExplorer gets its end types and add the relationship type to each of the entity types - // If not including deprecated types and an entity type for an end is deprecated, ignore the entity type. - - for (String relationshipTypeName : relationships.keySet()) { - - RelationshipExplorer relationshipExplorer = relationships.get(relationshipTypeName); - RelationshipEndDef entityOneDef = relationshipExplorer.getRelationshipDef().getEndDef1(); - RelationshipEndDef entityTwoDef = relationshipExplorer.getRelationshipDef().getEndDef2(); - - if (entityOneDef != null) { - String entityOneTypeName = entityOneDef.getEntityType().getName(); - EntityExplorer entityOneExplorer = entities.get(entityOneTypeName); - if (entityOneExplorer != null) - { - entityOneExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityOneExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) - { - addRelationshipToSubType(relationshipTypeName, subTypeName); - } - } - } - else - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_RELATIONSHIP_END_DEF_MISSING.getMessageDefinition( - methodName, relationshipTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - - if (entityTwoDef != null) { - String entityTwoTypeName = entityTwoDef.getEntityType().getName(); - EntityExplorer entityTwoExplorer = entities.get(entityTwoTypeName); - if (entityTwoExplorer != null) - { - entityTwoExplorer.addRelationship(relationshipTypeName); - List subTypeNames = entityTwoExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) - { - addRelationshipToSubType(relationshipTypeName, subTypeName); - } - } - } - else - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_RELATIONSHIP_END_DEF_MISSING.getMessageDefinition( - methodName, relationshipTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - } - } - - private void addRelationshipToSubType(String relationshipTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedRelationship(relationshipTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addRelationshipToSubType(relationshipTypeName,subTypeName); - } - } - } - - - private void resolveClassifications(boolean includeDeprecatedTypes, - String platformRootURL, - String repositoryServerName) - - throws RepositoryErrorException - { - - String methodName = "resolveClassifications"; - - // For each classification type, check whether deprecated and if it should be included - Map includedClassifications = new HashMap<>(); - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - ClassificationDef classificationDef = classificationExplorer.getClassificationDef(); - if (classificationDef == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_DEF_MISSING.getMessageDefinition( - methodName, classificationTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - if (includeDeprecatedTypes || classificationDef.getStatus() != DEPRECATED_TYPEDEF) { - includedClassifications.put(classificationTypeName, classificationExplorer); - } - } - classifications = includedClassifications; - - - // For each classificationExplorer add its name to the known classifications for its valid entity types - // If not including deprecated types and an entity type for an end is deprecated, ignore the entity type. - - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - List validEntityTypes = classificationExplorer.getClassificationDef().getValidEntityDefs(); - if (validEntityTypes != null) { - for (TypeDefLink entityType : validEntityTypes) - { - String entityTypeName = entityType.getName(); - if (entityTypeName == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_NAME_MISSING.getMessageDefinition( - methodName, classificationTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - EntityExplorer entityExplorer = entities.get(entityTypeName); - if (entityExplorer == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_VALID_ENTITY_MISSING.getMessageDefinition( - methodName, classificationTypeName, entityTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - entityExplorer.addClassification(classificationTypeName); - List subTypeNames = entityExplorer.getSubTypeNames(); - for (String subTypeName : subTypeNames) - { - addClassificationToSubType(classificationTypeName, subTypeName); - } - } - } - } - - // For each classificationExplorer add it to its superType's subTypes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - if (superType != null) { - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, classificationTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_MISSING.getMessageDefinition( - methodName, classificationTypeName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - superTypeExplorer.addSubTypeName(classificationTypeName); - } - } - - // For each classificationExplorer resolve its full list of attributes - for (String classificationTypeName : classifications.keySet()) { - ClassificationExplorer classificationExplorer = classifications.get(classificationTypeName); - TypeDefLink superType = classificationExplorer.getClassificationDef().getSuperType(); - while (superType != null) { - // add supertype's attributes to subtype - String superTypeName = superType.getName(); - if (superTypeName == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_NAME_MISSING.getMessageDefinition( - methodName, classificationTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - // find supertype in explorer - ClassificationExplorer superTypeExplorer = classifications.get(superTypeName); - if (superTypeExplorer == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_SUPERTYPE_MISSING.getMessageDefinition( - methodName, classificationTypeName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - ClassificationDef superDef = superTypeExplorer.getClassificationDef(); - if (superDef == null) - { - throw new RepositoryErrorException( - TexViewErrorCode.TYPE_SYSTEM_CLASSIFICATION_DEF_MISSING.getMessageDefinition( - methodName, superTypeName, repositoryServerName, platformRootURL), - this.getClass().getName(), - methodName); - } - List superAttributes = superDef.getPropertiesDefinition(); - classificationExplorer.addInheritedAttributes(superAttributes); - superType = superDef.getSuperType(); - } - } - } - - private void addClassificationToSubType(String classificationTypeName, String entityTypeName) { - - EntityExplorer entityExplorer = entities.get(entityTypeName); - entityExplorer.addInheritedClassification(classificationTypeName); - - // And recurse downwards... - List subTypeNames = entityExplorer.getSubTypeNames(); - if (!subTypeNames.isEmpty()) { - for (String subTypeName : subTypeNames) { - addClassificationToSubType(classificationTypeName,subTypeName); - } - } - } - - public String getEntityTypeName(String entityTypeGUID) { - return entityTypeGUIDToName.get(entityTypeGUID); - } - public String getEntityTypeGUID(String entityTypeName) { - return entityTypeNameToGUID.get(entityTypeName); - } - public String getRelationshipTypeName(String relationshipTypeGUID) { return entityTypeGUIDToName.get(relationshipTypeGUID); } - public String getRelationshipTypeGUID(String relationshipTypeName) { return relationshipTypeNameToGUID.get(relationshipTypeName); } - - @Override - public String toString() - { - return "TypeExplorer{" + - "entities=" + entities + - ", relationships=" + relationships + - ", classifications=" + classifications + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/package-info.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/package-info.java deleted file mode 100644 index 7ba47906fc6..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/properties/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package provides the definition of the Java API for the Type Explorer OMVS. - */ -package org.odpi.openmetadata.viewservices.tex.api.properties; diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexResourceEndpointListResponse.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexResourceEndpointListResponse.java deleted file mode 100644 index 19576c58055..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexResourceEndpointListResponse.java +++ /dev/null @@ -1,120 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.tex.api.rest; - - - - -import org.odpi.openmetadata.viewservices.tex.api.properties.ResourceEndpoint; - -import java.util.Arrays; -import java.util.List; - -public class TexResourceEndpointListResponse extends TexViewOMVSAPIResponse { - - - - private List platformList = null; - private List serverList = null; - - /** - * Default constructor - */ - public TexResourceEndpointListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TexResourceEndpointListResponse(TexResourceEndpointListResponse template) - { - super(template); - - if (template != null) - { - this.platformList = template.getPlatformList(); - this.serverList = template.getServerList(); - } - } - - - /** - * Return the platformList. - * - * @return bean - */ - public List getPlatformList() - { - return platformList; - } - - - /** - * Set the resourceEndpointList. - * - * @param platformList - bean - */ - public void setPlatformList(List platformList) - { - this.platformList = platformList; - } - - /** - * Return the serverList. - * - * @return bean - */ - public List getServerList() - { - return serverList; - } - - - /** - * Set the resourceEndpointList. - * - * @param serverList - bean - */ - public void setServerList(List serverList) - { - this.serverList = serverList; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TexResourceEndpointListResponse{" + - "platformList='" + platformList + '\'' + - ", serverList='" + serverList + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexTypesRequestBody.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexTypesRequestBody.java deleted file mode 100644 index c56a9785093..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexTypesRequestBody.java +++ /dev/null @@ -1,79 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -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) -public class TexTypesRequestBody { - - - /* - * The TexTypesRequestBody class provides a body for REST requests to perform a load of type information - */ - - private String serverName; // must be non-null - private String platformName; // must be non-null - private Boolean enterpriseOption; // if not set will default to false - private Boolean deprecationOption; // if not set will default to false - - - public TexTypesRequestBody() { - // No initialization yet - } - - /* - * Getters for Jackson - */ - - public String getServerName() { return serverName; } - - public String getPlatformName() { return platformName; } - - public Boolean getEnterpriseOption() - { - if (enterpriseOption == null) - return false; - else - return enterpriseOption; - } - - public Boolean getDeprecationOption() { - if (deprecationOption == null) - return false; - else - return deprecationOption; - } - - - public void setServerName(String serverName) { this.serverName = serverName; } - - public void setPlatformName(String platformName) { this.platformName = platformName; } - - public void setEnterpriseOption(Boolean enterpriseOption) { this.enterpriseOption = enterpriseOption; } - - public void setDeprecationOption(Boolean deprecationOption) { this.deprecationOption = deprecationOption; } - - - @Override - public String toString() - { - return "TexTypesRequestBody{" + - ", serverName=" + serverName + - ", platformName=" + platformName + - ", enterpriseOption=" + enterpriseOption + - ", deprecationOption=" + deprecationOption + - '}'; - } - - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexViewOMVSAPIResponse.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexViewOMVSAPIResponse.java deleted file mode 100644 index c74d66a8488..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TexViewOMVSAPIResponse.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.api.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TexViewOMVSAPIResponse provides a common header for the Type Explorer OMVS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = TypeExplorerResponse.class, name = "TypeExplorerResponse") -}) - -public abstract class TexViewOMVSAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public TexViewOMVSAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TexViewOMVSAPIResponse(TexViewOMVSAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "TexViewOMVSAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TypeExplorerResponse.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TypeExplorerResponse.java deleted file mode 100644 index 87012264a68..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/TypeExplorerResponse.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.tex.api.rest; - - -import org.odpi.openmetadata.viewservices.tex.api.properties.TypeExplorer; - -import java.util.Arrays; - -public class TypeExplorerResponse extends TexViewOMVSAPIResponse { - - - private TypeExplorer typeExplorer = null; - - /** - * Default constructor - */ - public TypeExplorerResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TypeExplorerResponse(TypeExplorerResponse template) - { - super(template); - - if (template != null) - { - this.typeExplorer = template.getTypeExplorer(); - } - } - - - /** - * Return the typeExplorer result. - * - * @return bean - */ - public TypeExplorer getTypeExplorer() - { - return typeExplorer; - } - - - /** - * Set the typeExplorer result. - * - * @param typeExplorer - bean - */ - public void setTypeExplorer(TypeExplorer typeExplorer) - { - this.typeExplorer = typeExplorer; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TypeExplorerResponse{" + - "typeExplorer=" + typeExplorer + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/package-info.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/package-info.java deleted file mode 100644 index 4c4aa06cb74..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/rest/package-info.java +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.viewservices.tex.api.rest; diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-server/README.md b/open-metadata-implementation/view-services/tex-view/tex-view-server/README.md deleted file mode 100644 index d0f48e66f69..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Type Explorer Open Metadata View Service (OMVS) server-side implementation - -The Type Explorer OMVS server-side support is organized in the following top level packages - -* admin - TexViewAdmin controls this OMVS's lifecycle. It is initialised here receiving the view service configuration. It is shutdown here. -* handlers - instance handler -* server - implementation of the view service - ----- -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/view-services/tex-view/tex-view-server/build.gradle b/open-metadata-implementation/view-services/tex-view/tex-view-server/build.gradle deleted file mode 100644 index 1ea36b0eaf8..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:tex-view:tex-view-api') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:common-services:multi-tenant') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - 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-client') - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/admin/TexViewAdmin.java b/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/admin/TexViewAdmin.java deleted file mode 100644 index cc6325af233..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/admin/TexViewAdmin.java +++ /dev/null @@ -1,213 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.admin; - - -import org.odpi.openmetadata.adminservices.configuration.properties.IntegrationViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin; -import org.odpi.openmetadata.adminservices.ffdc.OMAGAdminAuditCode; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexViewAuditCode; -import org.odpi.openmetadata.viewservices.tex.server.TexViewServicesInstance; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - - -/** - * TexViewAdmin is the class that is called by the UI Server to initialize and terminate - * the Type Explorer OMVS. The initialization call provides this OMVS with the Audit log and configuration. - */ -public class TexViewAdmin extends ViewServiceAdmin { - - private static final Logger log = LoggerFactory.getLogger(TexViewAdmin.class); - - - protected String resourceEndpointsPropertyName = "resourceEndpoints"; /* Common */ - - private AuditLog auditLog = null; - private TexViewServicesInstance instance = null; - private String serverName = null; - - /** - * Default constructor - */ - public TexViewAdmin() - { - } - - /** - * Initialize the TEX view service. - * - * @param serverName name of the local server - * @param viewServiceConfig specific configuration properties for this view service. - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use to issue calls to the remote server. - * @param maxPageSize maximum page size. 0 means unlimited - * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. - */ - @Override - public void initialize(String serverName, - ViewServiceConfig viewServiceConfig, - AuditLog auditLog, - String serverUserName, - int maxPageSize) throws OMAGConfigurationErrorException - { - - final String actionDescription = "initialize"; - - auditLog.logMessage(actionDescription, TexViewAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); - - this.auditLog = auditLog; - - if (log.isDebugEnabled()) - { - log.debug("==> Method: " + actionDescription); - } - - /* - * This method will be called (by Operational Services) with the view service config passed as a ViewServiceConfig. - * This is the super type of IntegrationViewServiceConfig which is what this service actually requires. - */ - - IntegrationViewServiceConfig integrationViewServiceConfig; - if (viewServiceConfig instanceof IntegrationViewServiceConfig) - { - integrationViewServiceConfig = (IntegrationViewServiceConfig) viewServiceConfig; - } - else - { - logBadConfiguration(viewServiceConfig.getViewServiceName(), - "viewServiceConfig", - viewServiceConfig.toString(), - auditLog, - actionDescription); - - // unreachable - return; - } - - final String viewServiceFullName = viewServiceConfig.getViewServiceName(); - - try - { - - List resourceEndpoints = this.extractResourceEndpoints(integrationViewServiceConfig.getResourceEndpoints(), - viewServiceFullName, - auditLog); - - - - /* - * The name and rootURL of a repository server are not passed at this stage - they are not known at this stage - * because they are set at runtime by the user and potentially changed between operations. - */ - this.instance = new TexViewServicesInstance(serverName, - auditLog, - serverUserName, - maxPageSize, - resourceEndpoints); - - this.serverName = serverName; - - auditLog.logMessage(actionDescription, - TexViewAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), - viewServiceConfig.toString()); - - if (log.isDebugEnabled()) - { - log.debug("<== Method: " + actionDescription); - } - - } - catch (OMAGConfigurationErrorException error) - { - throw error; - } - catch (Throwable error) - { - auditLog.logException(actionDescription, - TexViewAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage()), - viewServiceConfig.toString(), - error); - - super.throwUnexpectedInitializationException(actionDescription, - ViewServiceDescription.TYPE_EXPLORER.getViewServiceFullName(), - error); - } - - } - - /** - * Shutdown the tex view service. - */ - @Override - public void shutdown() - { - final String actionDescription = "shutdown"; - - log.debug("==> Method: " + actionDescription); - - auditLog.logMessage(actionDescription, TexViewAuditCode.SERVICE_TERMINATING.getMessageDefinition(serverName)); - - if (instance != null) - { - this.instance.shutdown(); - } - - auditLog.logMessage(actionDescription, TexViewAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(serverName)); - - log.debug("<== Method: " + actionDescription); - - } - - - /** - * Extract the resource endpoints property from the view services option. - * - * @param resourceEndpoints options passed to the access service. - * @param viewServiceFullName name of calling service - * @param auditLog audit log for error messages - * @return null or list of resource endpoints - * @throws OMAGConfigurationErrorException the supported zones property is not a list of zone names. - */ - protected List extractResourceEndpoints(List resourceEndpoints, - String viewServiceFullName, - AuditLog auditLog) - throws OMAGConfigurationErrorException - { - final String methodName = "extractResourceEndpoints"; - - /* - * Tex cannot operate without any endpoints. - * Check if resourceEndpoints is null and if so call logBadConfigProperties, which will - * log the error and throw an OMAGConfigurationErrorException - */ - if (resourceEndpoints == null || resourceEndpoints.isEmpty()) - { - - logBadConfiguration(viewServiceFullName, - resourceEndpointsPropertyName, - resourceEndpoints == null ? "null" : resourceEndpoints.toString(), - auditLog, - methodName); - - // unreachable - return null; - - } - else - { - auditLog.logMessage(methodName, - OMAGAdminAuditCode.RESOURCE_ENDPOINTS.getMessageDefinition(viewServiceFullName, - resourceEndpoints.toString())); - return resourceEndpoints; - } - - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/handlers/TexViewHandler.java b/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/handlers/TexViewHandler.java deleted file mode 100644 index cfe41ba605f..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/handlers/TexViewHandler.java +++ /dev/null @@ -1,381 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.handlers; - - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.clients.EnterpriseRepositoryServicesClient; -import org.odpi.openmetadata.repositoryservices.clients.LocalRepositoryServicesClient; -import org.odpi.openmetadata.repositoryservices.clients.MetadataCollectionServicesClient; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefGallery; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexExceptionHandler; -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexViewErrorCode; -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexViewServiceException; -import org.odpi.openmetadata.viewservices.tex.api.properties.ClassificationExplorer; -import org.odpi.openmetadata.viewservices.tex.api.properties.EntityExplorer; -import org.odpi.openmetadata.viewservices.tex.api.properties.RelationshipExplorer; -import org.odpi.openmetadata.viewservices.tex.api.properties.ResourceEndpoint; -import org.odpi.openmetadata.viewservices.tex.api.properties.TypeExplorer; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * The TexViewHandler is initialised with the server the call should be sent to. - * The handler exposes methods for functionality for the type explorer view - */ -public class TexViewHandler -{ - private static final Logger log = LoggerFactory.getLogger(TexViewHandler.class); - - /* - * Specify a constant for the (max) length to which labels will be truncated. - */ - private static final int TRUNCATED_STRING_LENGTH = 24; - - - /* - * viewServiceOptions should have been validated in the Admin layer. - * The viewServiceOptions contains a list of resource endpoints that the - * view service can connect to. It is formatted like this: - * "resourceEndpoints" : [ - { - resourceCategory : "Platform", - resourceName : "Platform2", - resourceRootURL : "https://localhost:9443" - }, - { - resourceCategory : "Platform", - resourceName : "Platform1", - resourceRootURL : "https://localhost:8082" - }, - { - resourceCategory : "Server", - resourceName : "Metadata_Server1", - resourceRootURL : "https://localhost:8082" - }, - { - resourceCategory : "Server", - resourceName : "Metadata_Server2", - resourceRootURL : "https://localhost:9443" - } - ] - */ - private Map configuredPlatforms = null; // map is keyed using platformRootURL - private Map configuredServerInstances = null; // map is keyed using serverName+platformRootURL so each instance is unique - - - - /** - * Default constructor for TexViewHandler - */ - public TexViewHandler() { - - } - - - /** - * TexViewHandler constructor with configured resourceEndpoints - * @param resourceEndpoints - list of resource endpoint configuration objects for this view service - */ - public TexViewHandler(List resourceEndpoints) { - - /* - * Populate map of resources with their endpoints.... - */ - - // TODO - It would be desirable to add validation rules to ensure uniqueness etc. - - configuredPlatforms = new HashMap<>(); - configuredServerInstances = new HashMap<>(); - - if (resourceEndpoints != null && !resourceEndpoints.isEmpty()) { - - resourceEndpoints.forEach(res -> { - - String resCategory = res.getResourceCategory(); - ResourceEndpoint rep = new ResourceEndpoint(res); - - String resName = null; - - switch (resCategory) { - case "Platform": - resName = res.getPlatformName(); - configuredPlatforms.put(resName, rep); - break; - - case "Server": - resName = res.getServerInstanceName(); - configuredServerInstances.put(resName, rep); - break; - - default: - // Unsupported category is ignored - break; - - } - }); - } - } - - /** - * getResourceEndpoints - returns a list of the configured resource endpoints. Does not include discovered resource endpoints. - * - * @param userId userId under which the request is performed - * @param methodName The name of the method being invoked - * @return The resource endpoints that have been configured for the view service - * - */ - public Map> getResourceEndpoints(String userId, String methodName) - - { - - Map> returnMap = new HashMap<>(); - - List platformList = null; - List serverList = null; - - if (!configuredPlatforms.isEmpty()) - { - platformList = new ArrayList<>(); - platformList.addAll(configuredPlatforms.values()); - } - - if (!configuredServerInstances.isEmpty()) - { - serverList = new ArrayList<>(); - serverList.addAll(configuredServerInstances.values()); - } - - returnMap.put("platformList",platformList); - returnMap.put("serverList",serverList); - - return returnMap; - } - - - - /** - * resolvePlatformRootURL - * - * This method will look up the configured root URL for the named platform. - * - * @param platformName - the name if the platform to be resolved (to a URL) - * @return resolved platform URL Root - * Exceptions - * @throws TexViewServiceException an error was detected and details are reported in the exception - */ - private String resolvePlatformRootURL(String platformName, String methodName) throws TexViewServiceException - - { - String platformRootURL = null; - - if (platformName != null) { - ResourceEndpoint resource = configuredPlatforms.get(platformName); - if (resource != null) { - platformRootURL = resource.getResourceRootURL(); - } - } - if (platformName == null || platformRootURL == null) { - throw new TexViewServiceException(TexViewErrorCode.VIEW_SERVICE_NULL_PLATFORM_NAME.getMessageDefinition(), - this.getClass().getName(), - methodName); - } - - return platformRootURL; - } - - - - - - - /** - * Retrieve type information from the repository server - * @param userId userId under which the request is performed - * @param repositoryServerName The name of the repository server to interrogate - * @param platformName The name of the platform running the repository server to interrogate - * @param enterpriseOption Whether the query is at cohort level or server specific - * @param deprecationOption only include deprecated types if this option is true - * @param methodName The name of the method being invoked - * @return response containing the TypeExplorer object. - * - * Exceptions - * @throws TexViewServiceException an error was detected and details are reported in the exception - */ - public TypeExplorer getTypeExplorer(String userId, - String repositoryServerName, - String platformName, - boolean enterpriseOption, - boolean deprecationOption, - String methodName) - throws - TexViewServiceException - - { - - try { - - String platformRootURL = resolvePlatformRootURL(platformName, methodName); - - /* - * Switch between local and enterprise services clients depending - * on enterprise option... - */ - MetadataCollectionServicesClient repositoryServicesClient; - - if (!enterpriseOption) { - repositoryServicesClient = this.getLocalRepositoryServicesClient(repositoryServerName, platformRootURL); - } else { - repositoryServicesClient = this.getEnterpriseRepositoryServicesClient(repositoryServerName, platformRootURL); - } - - TypeExplorer tex = new TypeExplorer(); - - TypeDefGallery typeDefGallery = repositoryServicesClient.getAllTypes(userId); - - List typeDefs = typeDefGallery.getTypeDefs(); - for (TypeDef typeDef : typeDefs) { - TypeDefCategory tdCat = typeDef.getCategory(); - switch (tdCat) { - case ENTITY_DEF: - EntityExplorer eex = new EntityExplorer((EntityDef) typeDef); - tex.addEntityExplorer(typeDef.getName(), eex); - break; - case RELATIONSHIP_DEF: - RelationshipExplorer rex = new RelationshipExplorer((RelationshipDef) typeDef); - tex.addRelationshipExplorer(typeDef.getName(), rex); - break; - case CLASSIFICATION_DEF: - ClassificationExplorer cex = new ClassificationExplorer((ClassificationDef) typeDef); - tex.addClassificationExplorer(typeDef.getName(), cex); - break; - default: - // Ignore this typeDef and continue with next - break; - } - } - - // Include EnumDefs in the TEX - List attributeTypeDefs = typeDefGallery.getAttributeTypeDefs(); - for (AttributeTypeDef attributeTypeDef : attributeTypeDefs) { - AttributeTypeDefCategory tdCat = attributeTypeDef.getCategory(); - switch (tdCat) { - case ENUM_DEF: - tex.addEnumExplorer(attributeTypeDef.getName(), (EnumDef) attributeTypeDef); - break; - default: - // Ignore this AttributeTypeDef and continue with next - break; - } - } - - // All typeDefs processed, resolve linkages and return the TEX object - // The platformRootURL and repositoryName are passed in only for error logging - tex.resolve(deprecationOption, platformRootURL, repositoryServerName); - return tex; - - } - catch (UserNotAuthorizedException e) - { - throw TexExceptionHandler.mapOMRSUserNotAuthorizedException(this.getClass().getName(), methodName, e); - } - catch (RepositoryErrorException e) - { - throw TexExceptionHandler.mapOMRSRepositoryErrorException(this.getClass().getName(), methodName, e); - } - catch (InvalidParameterException e) - { - throw TexExceptionHandler.mapOMRSInvalidParameterException(this.getClass().getName(), methodName, e); - } - } - - - - - /** - * getLocalRepositoryServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * MetadataCollection interface. This client is used when the enterprise option is not set, and will - * connect to the local repository. - * - * @param serverName - name of the server to connect to - * @param serverRootURL - the root URL to connect to the server - * @throws InvalidParameterException - an invalid parameter was detected and reported - */ - private LocalRepositoryServicesClient getLocalRepositoryServicesClient(String serverName, - String serverRootURL) - throws - InvalidParameterException - - { - /* - * The serverName is used as the repositoryName - * The serverRootURL is used as part of the restRootURL, along with the serverName - */ - - /* - * The only exception thrown by the CTOR is InvalidParameterException, and this is not caught - * here because we want to surface it to the REST API that called this method so that the - * exception can be wrapped and a suitable indication sent in the REST Response. - */ - String restRootURL = serverRootURL + "/servers/" + serverName; - LocalRepositoryServicesClient client = new LocalRepositoryServicesClient(serverName, restRootURL); - - return client; - } - - /** - * getEnterpriseRepositoryServicesClient - * - * This method will get the above client object, which then provides access to all the methods of the - * MetadataCollection interface. This client is used when the enterprise option is set, and will - * perform federation. - * - * @param serverName - name of the server to connect to - * @param serverRootURL - the root URL to connect to the server - * @throws InvalidParameterException - an invalid parameter was detected and reported - */ - private EnterpriseRepositoryServicesClient getEnterpriseRepositoryServicesClient(String serverName, - String serverRootURL) - throws - InvalidParameterException - { - /* - * The serverName is used as the repositoryName - * The serverRootURL is used as part of the restRootURL, along with the serverName - */ - - /* - * The only exception thrown by the CTOR is InvalidParameterException, and this is not caught - * here because we want to surface it to the REST API that called this method so that the - * exception can be wrapped and a suitable indication sent in the REST Response. - */ - String restRootURL = serverRootURL + "/servers/" + serverName; - EnterpriseRepositoryServicesClient client = new EnterpriseRepositoryServicesClient(serverName, restRootURL); - - return client; - } - - - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewInstanceHandler.java b/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewInstanceHandler.java deleted file mode 100644 index bc18546e874..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewInstanceHandler.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.server; - - -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.tex.handlers.TexViewHandler; - -/** - * TexViewInstanceHandler retrieves information from the instance map for the - * view service instances. The instance map is thread-safe. Instances are added - * and removed by the TexViewAdmin class. - */ -public class TexViewInstanceHandler extends OMVSServiceInstanceHandler -{ - - - - /** - * Default constructor registers the view service - */ - public TexViewInstanceHandler() { - - super(ViewServiceDescription.TYPE_EXPLORER.getViewServiceName()); - - TexViewRegistration.registerViewService(); - } - - - /** - * The getTexHandler method retrieves the handler from the TexViewServicesInstance and returns it. - * @param userId the user performing the operation - * @param serverName the name of the server running the view-service - * @param serviceOperationName the operation to be performed - * @return RexHandler - * @throws InvalidParameterException - the server name is not recognized - * @throws UserNotAuthorizedException - the user id not permitted to perform the requested operation - * @throws PropertyServerException - the service name is not known - indicating a logic error - */ - public TexViewHandler getTexViewHandler(String userId, String serverName, String serviceOperationName) - throws - InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - - /* - * Get the TexViewServicesInstance. This is an instance associated with the UI servername (tenant). - */ - TexViewServicesInstance instance = (TexViewServicesInstance)super.getServerServiceInstance(userId, - serverName, - serviceOperationName); - - if (instance != null) - { - return instance.getTexViewHandler(); - } - - return null; - } - - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewRESTServices.java b/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewRESTServices.java deleted file mode 100644 index 6e8b2fb393e..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewRESTServices.java +++ /dev/null @@ -1,207 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.tex.server; - - -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexExceptionHandler; -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexViewErrorCode; -import org.odpi.openmetadata.viewservices.tex.api.ffdc.TexViewServiceException; -import org.odpi.openmetadata.viewservices.tex.api.properties.ResourceEndpoint; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.tex.api.rest.TexResourceEndpointListResponse; -import org.odpi.openmetadata.viewservices.tex.api.rest.TexTypesRequestBody; -import org.odpi.openmetadata.viewservices.tex.api.rest.TypeExplorerResponse; -import org.odpi.openmetadata.viewservices.tex.handlers.TexViewHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; -import java.util.Map; - - -/** - * The TexViewRESTServices provides the org.odpi.openmetadata.viewservices.tex.services implementation of the Type Explorer Open Metadata - * View Service (OMVS). This interface provides view interfaces for enterprise architects. - */ - -public class TexViewRESTServices { - - protected static TexViewInstanceHandler instanceHandler = new TexViewInstanceHandler(); - - private static RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - - private static RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(TexViewRESTServices.class), - instanceHandler.getServiceName()); - - private static final Logger log = LoggerFactory.getLogger(TexViewRESTServices.class); - - - /** - * Default constructor - */ - public TexViewRESTServices() - { - - } - - - /** - * Retrieve platform origin - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @return response the list of resource endpoints configured for the view service - */ - public TexResourceEndpointListResponse getResourceEndpointList(String serverName, String userId) - { - - final String methodName = "getResourceEndpointList"; - - TexResourceEndpointListResponse response = new TexResourceEndpointListResponse(); - - AuditLog auditLog = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - TexViewHandler handler = instanceHandler.getTexViewHandler(userId, serverName, methodName); - - Map> lists = handler.getResourceEndpoints(userId, methodName); - List platformList = null; - List serverList = null; - if (lists != null) - { - platformList = lists.get("platformList"); - serverList = lists.get("serverList"); - } - response.setPlatformList(platformList); - response.setServerList(serverList); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch (Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - return response; - - } - - - /** - * Load types - * - * @param serverName name of the local view server. - * @param userId userId under which the request is performed - * @param requestBody request body - * @return response the repository's type information or exception information - */ - - public TypeExplorerResponse getTypeExplorer(String serverName, String userId, TexTypesRequestBody requestBody) - { - - final String methodName = "getTypeExplorer"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - - TypeExplorerResponse response = new TypeExplorerResponse(); - - if (requestBody != null) - { - - AuditLog auditLog = null; - TexViewHandler handler = null; - - try - { - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler = instanceHandler.getTexViewHandler(userId, serverName, methodName); - - } - catch (InvalidParameterException exception) - { - restExceptionHandler.captureInvalidParameterException(response, exception); - } - catch (PropertyServerException exception) - { - restExceptionHandler.capturePropertyServerException(response, exception); - } - catch (UserNotAuthorizedException exception) - { - restExceptionHandler.captureUserNotAuthorizedException(response, exception); - } - catch ( Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - - - /* - * Attempt to retrieve the type information - */ - try - { - - response.setTypeExplorer(handler.getTypeExplorer(userId, - requestBody.getServerName(), - requestBody.getPlatformName(), - requestBody.getEnterpriseOption(), - requestBody.getDeprecationOption(), - methodName)); - - } - catch (TexViewServiceException exception) - { - TexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - catch ( Exception exception) - { - restExceptionHandler.captureExceptions(response, exception, methodName, auditLog); - } - } - else - { - /* - * Raise (and immediately capture) a RexViewServicesException - */ - TexViewServiceException exception = new TexViewServiceException(TexViewErrorCode.VIEW_SERVICE_REQUEST_BODY_MISSING.getMessageDefinition(), - this.getClass().getName(), - methodName); - - TexExceptionHandler.captureCheckedException(response, exception, exception.getClass().getName()); - } - - - log.debug("Returning from method: " + methodName + " with response: " + response.toString()); - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - - } - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewRegistration.java b/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewRegistration.java deleted file mode 100644 index a1a953e328a..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewRegistration.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.server; - -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceRegistrationEntry; -import org.odpi.openmetadata.adminservices.registration.OMAGViewServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.viewservices.tex.admin.TexViewAdmin; - -/** - * TexViewRegistration registers the view service with the OMAG Server administration services. - * This registration must be driven once at server start up. The OMAG Server administration services - * then use this registration information as confirmation that there is an implementation of this - * view service in the server and it can be configured and used. - */ -public class TexViewRegistration -{ - /** - * Pass information about this view service to the OMAG Server administration services. - */ - public static void registerViewService() - { - ViewServiceDescription myDescription = ViewServiceDescription.TYPE_EXPLORER; - ViewServiceRegistrationEntry myRegistration = new ViewServiceRegistrationEntry(myDescription, - ServiceOperationalStatus.ENABLED, - TexViewAdmin.class.getName()); - OMAGViewServiceRegistration.registerViewService(myRegistration); - } -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewServicesInstance.java b/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewServicesInstance.java deleted file mode 100644 index 167488043f3..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-server/src/main/java/org/odpi/openmetadata/viewservices/tex/server/TexViewServicesInstance.java +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.tex.server; - -import org.odpi.openmetadata.adminservices.configuration.properties.ResourceEndpointConfig; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstance; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.viewservices.tex.handlers.TexViewHandler; - -import java.util.List; - - -/** - * TexViewServicesInstance caches references to objects it needs for a specific server. - * It is also responsible for registering itself in the instance map. - */ - -public class TexViewServicesInstance extends OMVSServiceInstance -{ - - private static ViewServiceDescription myDescription = ViewServiceDescription.TYPE_EXPLORER; - - private TexViewHandler texViewHandler = null; - - - /** - * Set up the Tex OMVS instance - * Unlike the superclass () Tex does not expect to be passed remoteServerName or remoteServerURL during configuration or initialization. - * This is because in Type Explorer these are variable (set per requested operation), so the are passed by the RESTServices methods. - * - * @param serverName name of this server - * @param auditLog logging destination - * @param localServerUserId userId used for server initiated actions - * @param maxPageSize maximum page size - */ - public TexViewServicesInstance(String serverName, - AuditLog auditLog, - String localServerUserId, - int maxPageSize, - List resourceEndpoints) - { - - - - super(serverName, - myDescription.getViewServiceName(), - auditLog, - localServerUserId, - maxPageSize, - null, // see comment above about remoteServerName - null); // .... and remoteServerURL. - - - this.texViewHandler = new TexViewHandler(resourceEndpoints); - } - - - - /** - * Return the handler for Tex view requests - * - * @return handler object - */ - TexViewHandler getTexViewHandler() - { - return texViewHandler; - } - - - -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-spring/README.md b/open-metadata-implementation/view-services/tex-view/tex-view-spring/README.md deleted file mode 100644 index 120f8a5d55f..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-spring/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Type Explorer View Open Metadata View Service (OMVS) with Spring - -The Type Explorer OMVS spring module uses spring to create the server-side support for the REST services. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-spring/build.gradle b/open-metadata-implementation/view-services/tex-view/tex-view-spring/build.gradle deleted file mode 100644 index 6714b361222..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-spring/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:view-services:tex-view:tex-view-api') - implementation project(':open-metadata-implementation:view-services:tex-view:tex-view-server') - implementation 'org.springframework:spring-web' - implementation 'io.swagger.core.v3:swagger-annotations' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-spring/src/main/java/org/odpi/openmetadata/viewservices/tex/server/spring/TexViewRESTResource.java b/open-metadata-implementation/view-services/tex-view/tex-view-spring/src/main/java/org/odpi/openmetadata/viewservices/tex/server/spring/TexViewRESTResource.java deleted file mode 100644 index 0918faf4011..00000000000 --- a/open-metadata-implementation/view-services/tex-view/tex-view-spring/src/main/java/org/odpi/openmetadata/viewservices/tex/server/spring/TexViewRESTResource.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -/* Copyright Contributors to the ODPi Egeria category. */ -package org.odpi.openmetadata.viewservices.tex.server.spring; - - -import org.odpi.openmetadata.viewservices.tex.api.rest.TexResourceEndpointListResponse; -import org.odpi.openmetadata.viewservices.tex.api.rest.TexTypesRequestBody; -import org.odpi.openmetadata.viewservices.tex.api.rest.TypeExplorerResponse; -import org.odpi.openmetadata.viewservices.tex.server.TexViewRESTServices; -import org.springframework.web.bind.annotation.*; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; - - - -/** - * The TexViewRESTResource provides the Spring API endpoints of the Type Explorer Open Metadata View Service (OMVS). - * This interface provides a service for enterprise architects. - */ - -@RestController -@RequestMapping("/servers/{viewServerName}/open-metadata/view-services/tex/users/{userId}") - -@Tag(name="View Server: Tex OMVS", description="Explore type information in a repository or cohort for visualization of graphs of related types.", - externalDocs=@ExternalDocumentation(description="Further Information", - url="https://egeria-project.org/services/omvs/tex/overview/")) - -public class TexViewRESTResource { - - private final TexViewRESTServices restAPI = new TexViewRESTServices(); - - - /** - * Default constructor - */ - public TexViewRESTResource() { - } - - /** - * Get the configured resource endpoints - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @return response object containing the list of resource endpoints or exception information - */ - - @GetMapping("/resource-endpoints") - public TexResourceEndpointListResponse getResourceEndpoints(@PathVariable String viewServerName, - @PathVariable String userId) { - return restAPI.getResourceEndpointList(viewServerName, userId); - - } - - /** - * Load type information - *

- * Load type information from the repository server. This is used to populate filters. - * - * @param viewServerName name of the server running the view-service. - * @param userId user account under which to conduct operation. - * @param body request body containing parameters to formulate repository request - * @return response object containing the repository's type information or exception information - */ - @PostMapping("/types") - public TypeExplorerResponse getTypeExplorer(@PathVariable String viewServerName, - @PathVariable String userId, - @RequestBody TexTypesRequestBody body) { - return restAPI.getTypeExplorer(viewServerName, userId, body); - - } - -} diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/README.md b/open-metadata-resources/open-metadata-samples/access-services-samples/README.md index 475d9eff2ae..efa3df4fac3 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/README.md +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/README.md @@ -5,13 +5,11 @@ The following samples show how to use the Open Metadata Access Services (OMASs) clients. +* **[Asset Management Samples](asset-management-samples)** illustrates how to work with assets. * **[Governance Program OMAS Client Samples](governance-program-client-samples)** illustrates how to create and maintain definitions related to a governance program. -* **[Glossary Manager Samples](glossary-manager-samples)** show how to manage updates to glossary terms. - -* **[Subject Area OMAS Client Samples](subject-area-client-samples)** illustrates how to create and maintain -semantic information in glossaries. This includes glossary terms and subject areas. +* **[Glossary Workflow Samples](glossary-workflow-samples)** show how to manage updates to glossary terms. ---- diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/README.md b/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/README.md deleted file mode 100644 index 3e25416c21e..00000000000 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/README.md +++ /dev/null @@ -1,15 +0,0 @@ - - - -# Subject Area Open Metadata Access Service (OMAS) Client Samples - -These samples shows how to call the Subject Area OMAS's client. -There is a sample for each of the Subject Area OMAS's interfaces. - -* **[Subject Area Categories](subject-area-categories-sample)** shows how to create a hierarchy of categories. - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/README.md b/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/README.md deleted file mode 100644 index 7a8f8ba0eb3..00000000000 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/README.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Subject Area Categories Sample - -The [Coco Pharmaceuticals case study](https://odpi.github.io/data-governance/coco-pharmaceuticals/) involves the definition of subject areas. -This sample is code that defines the subject areas -referred to in [Defining Subject Areas](https://github.com/odpi/data-governance/blob/main/docs/coco-pharmaceuticals/scenarios/defining-subject-areas/README.md). - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/build.gradle deleted file mode 100644 index f03845b0212..00000000000 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id 'application' - id "com.github.johnrengelman.shadow" -} - -dependencies { - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-client') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - compileOnly project(':open-metadata-implementation:common-services:ffdc-services') - runtimeOnly 'ch.qos.logback:logback-classic' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') - runtimeOnly project(':open-metadata-implementation:user-security:token-manager') -} - -description = 'Subject Area OMAS Samples' - -java { - withJavadocJar() -} - -shadowJar { - mainClassName = 'org.odpi.openmetadata.accessservices.subjectarea.samples.definition.SubjectAreaDefinitionSample' - archiveClassifier = 'jar-with-dependencies' -} diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/samples/definition/SubjectAreaDefinitionSample.java b/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/samples/definition/SubjectAreaDefinitionSample.java deleted file mode 100644 index 0c94ea9515a..00000000000 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/samples/definition/SubjectAreaDefinitionSample.java +++ /dev/null @@ -1,344 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.samples.definition; - -import org.odpi.openmetadata.accessservices.subjectarea.SubjectArea; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaImpl; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.http.HttpHelper; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * SubjectAreaDefinition Sample provides a client program that calls the Subject Area OMAS to create a category hierarchy - * that matches the subject area definitions defined by Coco Pharmaceuticals. - */ -public class SubjectAreaDefinitionSample -{ - /* - * Subject areas for Coco Pharmaceuticals sample. - */ - private static final String ORGANIZATION = "Organization"; - private static final String HOSPITAL = "Hospital"; - private static final String SUPPLIER = "Supplier"; - private static final String PERSON = "Person"; - private static final String PATIENT = "Patient"; - private static final String CLINICIAN = "Clinician"; - private static final String EMPLOYEE = "Employee"; - private static final String COLLABORATOR = "Collaborator"; - private static final String CLINICAL = "Clinical"; - private static final String SYMPTOM = "Symptom"; - private static final String MEASUREMENT = "Measurement"; - private static final String PRESCRIPTION = "Prescription"; - private static final String OUTCOME = "Outcome"; - private static final String TREATMENT = "Treatment"; - private static final String PRODUCT = "Product"; - private static final String ORDER = "Order"; - private static final String RECIPE = "Recipe"; - private static final String SERVICE_QUALITY = "Service Quality"; - private static final String CONTRACT = "Contract"; - private static final String STOCK = "Stock"; - private static final String DISTRIBUTION = "Distribution"; - private static final String INVOICE = "Invoice"; - - private static final String GLOSSARY_NAME = "Coco Pharmaceuticals Common Data Definitions"; - private static final String GLOSSARY_DESCRIPTION = "Coco Pharmaceuticals semantic definitions for personalized medicine."; - private static final String DEFAULT_SERVER_NAME = "simple-metadata-store"; - private static final String DEFAULT_USERID = "erinoverview"; - private static final String DEFAULT_URL = "https://localhost:9443"; - - private final String serverURLRoot; - private final String clientUserId; - private final String serverName; - private SubjectAreaNodeClient subjectAreaGlossary = null; - private SubjectAreaNodeClient subjectAreaCategory =null; - - - /** - * Constructor - * - * @param serverURLRoot server platform to connect to. - * @param serverName server to connect to. - * @param clientUserId user id to use to access metadata. - */ - private SubjectAreaDefinitionSample(String serverURLRoot, String serverName, String clientUserId) - { - this.serverURLRoot = serverURLRoot; - this.serverName = serverName; - this.clientUserId = clientUserId; - } - - /** - * Run the sample - * @throws SubjectAreaCheckedException error - */ - private void run() throws SubjectAreaCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException - { - SubjectArea subjectArea = new SubjectAreaImpl(this.serverName, this.serverURLRoot); - subjectAreaGlossary = subjectArea.nodeClients().glossaries(); - subjectAreaCategory = subjectArea.nodeClients().categories(); - - System.out.println("----------------------------"); - System.out.println("Creating the Coco Pharmaceutical Glossary for Subject Area Definitions : "); - - Glossary glossary = createGlossary(clientUserId, GLOSSARY_NAME, GLOSSARY_DESCRIPTION); - - /* - * create Organisation subject areas - */ - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - SubjectAreaDefinition organisation = createTopSubjectAreaDefinition(ORGANIZATION,glossaryGuid); - createChildSubjectAreaDefinition(HOSPITAL,organisation,glossaryGuid); - createChildSubjectAreaDefinition(SUPPLIER,organisation,glossaryGuid); - - /* - * create Person subject areas - */ - SubjectAreaDefinition person = createTopSubjectAreaDefinition(PERSON,glossaryGuid); - createChildSubjectAreaDefinition(PATIENT,person,glossaryGuid); - createChildSubjectAreaDefinition(CLINICIAN,person,glossaryGuid); - createChildSubjectAreaDefinition(EMPLOYEE,person,glossaryGuid); - createChildSubjectAreaDefinition(COLLABORATOR,person,glossaryGuid); - - /* - * create Clinical subject areas - */ - SubjectAreaDefinition clinical = createTopSubjectAreaDefinition(CLINICAL,glossaryGuid); - createChildSubjectAreaDefinition(SYMPTOM,clinical,glossaryGuid); - createChildSubjectAreaDefinition(MEASUREMENT,clinical,glossaryGuid); - createChildSubjectAreaDefinition(PRESCRIPTION,clinical,glossaryGuid); - createChildSubjectAreaDefinition(OUTCOME,clinical,glossaryGuid); - - /* - * create Treatment subject areas - */ - SubjectAreaDefinition treatment = createTopSubjectAreaDefinition(TREATMENT,glossaryGuid); - createChildSubjectAreaDefinition(PRODUCT,treatment,glossaryGuid); - createChildSubjectAreaDefinition(ORDER,treatment,glossaryGuid); - createChildSubjectAreaDefinition(RECIPE,treatment,glossaryGuid); - - /* - * create Service Quality subject areas - */ - SubjectAreaDefinition serviceQuality = createTopSubjectAreaDefinition(SERVICE_QUALITY,glossaryGuid); - createChildSubjectAreaDefinition(CONTRACT,serviceQuality,glossaryGuid); - createChildSubjectAreaDefinition(STOCK,serviceQuality,glossaryGuid); - createChildSubjectAreaDefinition(DISTRIBUTION,serviceQuality,glossaryGuid); - createChildSubjectAreaDefinition(INVOICE,serviceQuality,glossaryGuid); - } - - - /** - * Create a top level subject area definition - this means a Subject Area Definition that does not have a superCategory. - * @param name name of the Subject Area Definition to create - * @param glossaryGuid guid of the glossary to associate the Subject Area with. - * @return SubjectAreaDefinition the created Subject Area Definition - */ - private SubjectAreaDefinition createTopSubjectAreaDefinition( String name, String glossaryGuid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - System.out.println("----------------------------"); - System.out.println("Creating a top level Subject Area Definition called " + name); - SubjectAreaDefinition subjectAreaDefinition = new SubjectAreaDefinition(); - subjectAreaDefinition.setName(name); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - subjectAreaDefinition.setGlossary(glossarySummary); - return subjectAreaCategory.create(clientUserId, subjectAreaDefinition); - } - - - /** - * Create a child Subject Area Definition - this means a Subject Area Definition that has a superCategory. - * - * @param name name of the Subject Area Definition to create - * @param parent parent Category - * @param glossaryGuid guid of the glossary to associate the Subject Area with. - */ - private void createChildSubjectAreaDefinition(String name, - SubjectAreaDefinition parent, - String glossaryGuid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - SubjectAreaDefinition subjectAreaDefinition = new SubjectAreaDefinition(); - subjectAreaDefinition.setName(name); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - subjectAreaDefinition.setGlossary(glossarySummary); - CategorySummary parentCategorysummary = new CategorySummary(); - parentCategorysummary.setGuid(parent.getSystemAttributes().getGUID()); - subjectAreaDefinition.setParentCategory(parentCategorysummary); - SubjectAreaDefinition newSubjectAreaDefinition = subjectAreaCategory.create(clientUserId, subjectAreaDefinition); - if (newSubjectAreaDefinition != null) - { - System.out.println("Created Subject Area Definition " + newSubjectAreaDefinition.getName() + " with guid " + newSubjectAreaDefinition.getSystemAttributes().getGUID() + ", parent SubjectArea Definition is " + parent.getName()); - } - } - - - /** - * Create a Glossary - * - * @param userId user id - * @param glossaryName name of the glossary to create - * @param glossaryDescription description of the Glossary - * @return created glossary - */ - private Glossary createGlossary(String userId, - String glossaryName, - String glossaryDescription) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - Glossary glossary = new Glossary(); - glossary.setName(glossaryName); - glossary.setDescription(glossaryDescription); - return subjectAreaGlossary.create(userId, glossary); - } - - - /** - * The main program takes the URL root for the server. - * - * @param args URL root for the OMAG server platform; OMAG server name; userId - * @throws IOException IO Exception - */ - public static void main(String[] args) throws IOException - { - String serverURLRoot = SubjectAreaDefinitionSample.getUrl(args); - String serverName = SubjectAreaDefinitionSample.getServerName(args); - String clientUserId = SubjectAreaDefinitionSample.getUserId(args); - - System.out.println("==============================="); - System.out.println("Subject Area Definition Sample "); - System.out.println("==============================="); - System.out.println("Running against OMAG server platform: " + serverURLRoot); - System.out.println("OMAG server platform: " + serverName); - System.out.println("Using userId: " + clientUserId); - - HttpHelper.noStrictSSL(); - - try - { - SubjectAreaDefinitionSample sample = new SubjectAreaDefinitionSample(serverURLRoot, - serverName, - clientUserId); - - sample.run(); - } - catch (Throwable error) - { - System.out.println("Exception: " + error.getClass().getName() + " with message " + error.getMessage()); - System.exit(-1); - } - } - - - /** - * This method gets the url that the sample will use to issue calls to the server. - *

- * If arguments are supplied then the first parameter is used as the url. - *

- * If no url is supplied then prompt the user to enter a valid url, enter means to use the default url. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occurred while getting input from the user. - */ - public static String getUrl(String args[]) throws IOException - { - String url = null; - if (args.length > 0) - { - url = args[0]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter the OMAG Server platform URL. Press enter to get the default (" + DEFAULT_URL + ")):"); - url = br.readLine(); - if (url.equals("")) - { - url = DEFAULT_URL; - } - - } - return url; - } - - - /** - * This method gets the server name that the sample will use to issue calls to the server. - *

- * If arguments are supplied then the second parameter is used as a server name. - *

- * If no name is supplied then prompt the user to enter a valid server name, enter means to use the default server name. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occurred while getting input from the user. - */ - public static String getServerName(String args[]) throws IOException - { - String name = null; - if (args.length > 1) - { - name = args[1]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a OMAG Server Name. Press enter to get the default (" + DEFAULT_SERVER_NAME + ")):"); - name = br.readLine(); - if (name.equals("")) - { - name = DEFAULT_SERVER_NAME; - } - - } - return name; - } - - - /** - * This method gets the userId that the sample will use to issue calls to the server. - *

- * If arguments are supplied then the third parameter is used as a userId. - *

- * If no userId is supplied then prompt the user to enter a valid userId, enter means to use the default userId. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occurred while getting input from the user. - */ - public static String getUserId(String args[]) throws IOException - { - String userId = null; - if (args.length > 1) - { - userId = args[1]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a userId. Press enter to get the default (" + DEFAULT_USERID + ")):"); - userId = br.readLine(); - if (userId.equals("")) - { - userId = DEFAULT_USERID; - } - - } - return userId; - } - -} diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/src/main/resources/logback.xml b/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/src/main/resources/logback.xml deleted file mode 100644 index 065f9a5ef2e..00000000000 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/subject-area-client-samples/subject-area-categories-sample/src/main/resources/logback.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - diff --git a/open-metadata-test/open-metadata-fvt/README.md b/open-metadata-test/open-metadata-fvt/README.md index 547c8c11f19..cf3d5fa0de2 100644 --- a/open-metadata-test/open-metadata-fvt/README.md +++ b/open-metadata-test/open-metadata-fvt/README.md @@ -10,8 +10,8 @@ needed by their consumers. * **[access-services-fvt](access-services-fvt)** - provides an FVT test suite for each of the Open Metadata Access Services (OMAS). They each focus on the functional correctness of a specific OMAS. -* **[open-types-fvt](open-types-fvt)** - uses code generated ot build a bean layer from the open metadata types -and then tests the resulting beans. + +* **[fvt-utilities](fvt-utilities)** - provides utilities used by the FVTs. # NOTE @@ -26,13 +26,11 @@ This is a current list of known port usage * 10445 Asset Owner * 10446 Data Manager * 10447 Digital Architecture -* 10448 Subject Area -* 10450 Discovery Engine * 10451 Governance Engine * 10452 Governance Program * 10453 Analytics Modeling * 10455 Stewardship Action -* 10454 Glossary Author (view services) + ---- Return to [open-metadata-test](..) diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/README.md b/open-metadata-test/open-metadata-fvt/access-services-fvt/README.md index 0a16e4353bc..5166a47b0b6 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/README.md +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/README.md @@ -13,11 +13,9 @@ ensure they function correctly. Each aims to test the client-server dependency * **[data-engine-fvt](data-engine-fvt)** - provides the resources to run Data Engine OMAS FVTs. * **[data-manager-fvt](data-manager-fvt)** - provides the resources to run Data Manager OMAS FVTs. * **[digital-architecture-fvt](digital-architecture-fvt)** - provides the resources to run Digital Architecture FVTs. -* **[discovery-engine-fvt](discovery-engine-fvt)** - provides the resources to run Discovery Engine OMAS FVTs. * **[governance-server-fvt](governance-server-fvt)** - provides the resources to run Governance Engine OMAS FVTs. * **[governance-program-fvt](governance-program-fvt)** - provides the resources to run Governance Program OMAS FVTs. * **[stewardship-action-fvt](stewardship-action-fvt)** - provides the resources to run Stewardship Action OMAS FVTs. -* **[subject-area-fvt](subject-area-fvt)** - provides the resources to run Subject Area OMAS FVTs. ---- diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/build.gradle deleted file mode 100644 index c188cab502c..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/build.gradle +++ /dev/null @@ -1,130 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ -plugins { - // Include plug-in for starting a new process - id 'com.github.psxpaul.execfork' - id 'java' -} - -apply plugin: "com.github.psxpaul.execfork" -apply plugin: 'groovy' - -dependencies { - implementation project (":open-metadata-implementation:access-services:data-engine:data-engine-api") - implementation project (":open-metadata-implementation:frameworks:open-connector-framework") - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project (":open-metadata-implementation:access-services:data-engine:data-engine-client") - implementation project (":open-metadata-implementation:repository-services:repository-services-apis") - implementation project (":open-metadata-implementation:repository-services:repository-services-client") - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-test:open-metadata-fvt:fvt-utilities') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - testImplementation project (":open-metadata-distribution:omag-server-platform") - testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' - testImplementation ("org.junit.jupiter:junit-jupiter-api") - testImplementation ("org.junit.jupiter:junit-jupiter-params") - implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') - testImplementation 'org.junit.jupiter:junit-jupiter-engine' - testImplementation localGroovy() - testImplementation 'org.apache.commons:commons-lang3' -} - -description = 'Data Engine OMAS FVT' - -java { - withJavadocJar() -} - -def applicationProperties = new Properties() -file("src/test/resources/application.properties").withInputStream { applicationProperties.load(it) } -def baseURL = applicationProperties.getProperty('base.url') + ":" + applicationProperties.getProperty('server.port') -def serverInMemory = applicationProperties.getProperty('server.in-memory-graph.name') -def delay = applicationProperties.getProperty('delay') -def user = applicationProperties.getProperty('user') -def port = applicationProperties.getProperty('server.port') - -// Local properties to use -ext - { - distdir="../../../../../../open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${project.version}-distribution.tar.gz" - } - - -// Build the groovy test script -sourceSets.test.java.srcDirs = [] -sourceSets.test.groovy.srcDirs = ["src/test/java", "src/test/script"] - -// Initially we launch as an app -- though there may be a better way of running this in the existing jvm - -task startPlatform(dependsOn: ['cleanData',':open-metadata-distribution:omag-server-platform:unzip','prepareDirs'], type: com.github.psxpaul.task.ExecFork) { - // Start some external service - executable = System.properties.'java.home' + '/bin/java' - workingDir = layout.buildDirectory.dir('run') - args = [ "-Dserver.port=" + port, - "-Dloader.path=${distdir}/assembly/platform/lib", - "-Dspring.config.location=../../../../../../test.application.properties", - "-jar", - "${distdir}/assembly/platform/omag-server-platform-${project.version}.jar" ] - // Setting the output directories to be the same for ALL FVTs acts as a synchronization mechanism - // - alternatively we need to ensure the server port is unique per test - standardOutput = layout.buildDirectory.file("chassis.log") - errorOutput = layout.buildDirectory.file("chassis-error.log") - stopAfter = test - waitForPort = Integer.parseInt(port) - timeout = 180 - - //waitForOutput = 'has started' -} - - -// Configuration of the platform - -task configServer(dependsOn: ['startPlatform','classes'], type: JavaExec) { - mainClass = 'configureStartServer' - classpath = sourceSets.test.runtimeClasspath - - systemProperties = [ - 'name': 'Egeria chassis', - 'baseURL': baseURL, - 'servermem': serverInMemory, - 'delay': delay, - 'user': user, - 'connectorTypeArchive': 'src/test/resources/DataStoreConnectorTypes.json' - ] -} - - -task prepareDirs { - mustRunAfter clean - doLast { - mkdir layout.buildDirectory.dir('run') - } -} - -task cleanData(type: Delete) { - delete files("${buildDir}/run/data") -} - -// The actual tests (Integration only) - -test { - description 'Run Integration Tests' - group = 'verification' - outputs.upToDateWhen {return false} - systemProperties = [ - 'fvt.url': baseURL - ] - useJUnitPlatform() - testLogging.showStandardStreams = true - dependsOn configServer - -} - -// Resolves logging conflict with Jena -loggingCapabilities { - enforceLogback()// Configuration goes here -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/ConnectionAndEndpointSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/ConnectionAndEndpointSetupService.java deleted file mode 100644 index e8037e888f4..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/ConnectionAndEndpointSetupService.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * Connection and Endpoint are generated when creating data files. This class only triggers requests via client to delete - */ -public class ConnectionAndEndpointSetupService { - - /** - * Delete a Connection using the dataEngineClient provided - * - * @param userId user - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteConnection(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete Connection. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteConnection(userId, qualifiedName, guid); - } - - /** - * Delete an Endpoint using the dataEngineClient provided - * - * @param userId user - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteEndpoint(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete Endpoint. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteEndpoint(userId, qualifiedName, guid); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/DataStoreAndRelationalTableSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/DataStoreAndRelationalTableSetupService.java deleted file mode 100644 index 7c09f533128..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/DataStoreAndRelationalTableSetupService.java +++ /dev/null @@ -1,276 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalColumn; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.ArrayList; -import java.util.List; - -/** - * Generates test data of type RelationalTable and subtypes of DataStore, and triggers requests via client for aforementioned types - */ -public class DataStoreAndRelationalTableSetupService { - - private final String DATABASE_QUALIFIED_NAME = "database-qualified-name"; - private final String DATABASE_SCHEMA_QUALIFIED_NAME = "database-schema-qualified-name"; - - /** - * Upsert a Database using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param database database to upsert. If null, a default will be used - * - * @return Database instance containing sent values - */ - public Database upsertDatabase(String userId, DataEngineClient dataEngineClient, Database database) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(database == null){ - database = getDefaultDatabase(); - } - dataEngineClient.upsertDatabase(userId, database); - return database; - } - - private Database getDefaultDatabase(){ - Database database = new Database(); - database.setQualifiedName(DATABASE_QUALIFIED_NAME); - database.setDisplayName("database-display-name"); - database.setDescription("database-description"); - database.setDatabaseType("database-type"); - database.setDatabaseVersion("database-version"); - database.setDatabaseInstance("database-instance"); - database.setDatabaseImportedFrom("database-imported-from"); - database.setNetworkAddress("database-network-address"); - return database; - } - - /** - * Delete a Database using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteDatabase(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete Database. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteDatabase(userId, qualifiedName, guid); - } - - /** - * Upsert a DatabaseSchema using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param databaseSchema database to upsert. If null, a default will be used - * @param databaseQualifiedName the database's qualified name - * @param incomplete determines if the database schema is complete or not - * - * @return DatabaseSchema instance containing sent values - */ - public DatabaseSchema upsertDatabaseSchema(String userId, DataEngineClient dataEngineClient, DatabaseSchema databaseSchema, - String databaseQualifiedName, boolean incomplete) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(databaseSchema == null) { - databaseSchema = getDefaultDatabaseSchema(); - } - dataEngineClient.upsertDatabaseSchema(userId, databaseSchema, databaseQualifiedName); - return databaseSchema; - } - - private DatabaseSchema getDefaultDatabaseSchema() { - DatabaseSchema databaseSchema = new DatabaseSchema(); - databaseSchema.setQualifiedName(DATABASE_SCHEMA_QUALIFIED_NAME); - databaseSchema.setDisplayName("database-schema-display-name"); - databaseSchema.setDescription("database-schema-description"); - return databaseSchema; - } - - /** - * Delete a DatabaseSchema using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteDatabaseSchema(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - - if(qualifiedName == null || guid == null) { - throw new IllegalArgumentException("Unable to delete DatabaseSchema. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteDatabaseSchema(userId, qualifiedName, guid); - } - - /** - * Upsert a DataFile using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param dataFile data file to upsert. If null, a default will be used - * - * @return DataFile instance containing sent values - */ - public DataFile upsertDataFile(String userId, DataEngineClient dataEngineClient, DataFile dataFile) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(dataFile == null){ - dataFile = getDefaultDataFile(); - } - dataEngineClient.upsertDataFile(userId, dataFile); - return dataFile; - } - - private DataFile getDefaultDataFile(){ - DataFile dataFile = new DataFile(); - dataFile.setQualifiedName("data-file-qualified-name"); - dataFile.setDisplayName("data-file-display-name"); - dataFile.setDescription("data-file-description"); - dataFile.setFileType("data-file-type"); - dataFile.setProtocol("data-file-protocol"); - dataFile.setNetworkAddress("data-file-network-address"); - dataFile.setPathName("/data-file-pathname"); - dataFile.setColumns(buildTabularColumns()); - return dataFile; - } - - private List buildTabularColumns(){ - List columns = new ArrayList<>(); - - Attribute column = new Attribute(); - column.setQualifiedName("column-qualified-name"); - column.setDisplayName("column-display-name"); - column.setDescription("column-description"); - columns.add(column); - - return columns; - } - - /** - * Delete a DataFile using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteDataFile(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete RelationalTable. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteDataFile(userId, qualifiedName, guid); - } - - /** - * Upsert a RelationalTable using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param relationalTable relational table to upsert. If null, a default will be used - * @param databaseSchemaQualifiedName the name of the database schema to which it should be linked - * @param incomplete determines if the relational table is incomplete or not - * - * @return RelationalTable instance containing sent values - */ - public RelationalTable upsertRelationalTable(String userId, DataEngineClient dataEngineClient, RelationalTable relationalTable, - String databaseSchemaQualifiedName, boolean incomplete) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(relationalTable == null) { - relationalTable = getDefaultRelationalTable(); - } - dataEngineClient.upsertRelationalTable(userId, relationalTable, databaseSchemaQualifiedName); - return relationalTable; - } - - private RelationalTable getDefaultRelationalTable(){ - RelationalTable relationalTable = new RelationalTable(); - relationalTable.setQualifiedName("relational-table-qualified-name"); - relationalTable.setDisplayName("relational-table-display-name"); - relationalTable.setDescription("relational-table-description"); - relationalTable.setType("relational-table-type"); - relationalTable.setColumns(buildRelationalColumns()); - return relationalTable; - } - - private List buildRelationalColumns(){ - List columns = new ArrayList<>(); - - RelationalColumn column = new RelationalColumn(); - column.setQualifiedName("relational-column-qualified-name"); - column.setDisplayName("relational-column-display-name"); - column.setDescription("relational-column-description"); - column.setDataType("relational-column-data-type"); - columns.add(column); - - return columns; - } - - /** - * Delete a RelationalTable using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteRelationalTable(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete RelationalTable. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteRelationalTable(userId, qualifiedName, guid); - } - - /** - * Delete a FileFolder using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteFolder(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete FileFolder. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteFolder(userId, qualifiedName, guid); - } - - /** - * Delete a SchemaType using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteSchemaType(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete SchemaType. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteSchemaType(userId, qualifiedName, guid); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/EngineSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/EngineSetupService.java deleted file mode 100644 index 963d4429803..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/EngineSetupService.java +++ /dev/null @@ -1,71 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * Generates test data of type SoftwareCapability, and triggers requests via client for aforementioned type - */ -public class EngineSetupService { - - public EngineSetupService() { } - - /** - * Registers an external data engine source. - * - * @param userId the user which creates the data engine - * @param dataEngineOMASClient the data engine client that is used to create the external data engine - * @param engine capability to create. If null, a default will be used - * - * @return engine containing sent values - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws ConnectorCheckedException there are errors in the initialization of the connector. - * @throws PropertyServerException there is a problem retrieving information from the property server(s). - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public Engine createExternalDataEngine(String userId, DataEngineClient dataEngineOMASClient, - Engine engine) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, ConnectorCheckedException { - if(engine == null){ - engine = getDefaultEngine(); - } - dataEngineOMASClient.createExternalDataEngine(userId, engine); - return engine; - } - - /** - * Delete a SoftwareCapability using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteExternalDataEngine(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid ) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, ConnectorCheckedException { - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete External Tool. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteExternalDataEngine(userId, qualifiedName, guid); - } - - private Engine getDefaultEngine(){ - Engine engine = new Engine(); - engine.setName("Data Engine Display Name"); - engine.setQualifiedName("DataEngine"); - engine.setDescription("Data Engine Description"); - engine.setEngineType("DataEngine"); - engine.setEngineVersion("1"); - engine.setPatchLevel("2"); - engine.setSource("source"); - return engine; - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/FindSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/FindSetupService.java deleted file mode 100644 index c7d54ba6ab6..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/FindSetupService.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.rest.FindRequestBody; -import org.odpi.openmetadata.accessservices.dataengine.model.Identifiers; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; - -import java.util.Objects; - -/** - * Triggers find requests via client - */ -public class FindSetupService { - - public FindSetupService() { } - - /** - * Finds an entity via DataEngine OMAS - * - * @param userId the user which creates the data engine - * @param dataEngineOMASClient the data engine client that is used to create the external data engine - * @param qualifiedName qualified name by which to find entity - * @param type type by which to find entity (optional) - * @param externalSourceName external source name by which to find entity (optional) - * - * @return list of guids that matched - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws ConnectorCheckedException there are errors in the initialization of the connector. - * @throws PropertyServerException there is a problem retrieving information from the property server(s). - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public GUIDListResponse find(String userId, DataEngineClient dataEngineOMASClient, String qualifiedName, String type, - String externalSourceName) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, ConnectorCheckedException, - FunctionNotSupportedException { - - if(Objects.isNull(qualifiedName)){ - throw new IllegalArgumentException("Parameter required: qualifiedName"); - } - FindRequestBody findRequestBody = getDefaultFindRequestBody(qualifiedName, type, externalSourceName); - return dataEngineOMASClient.find(userId, findRequestBody); - } - - private FindRequestBody getDefaultFindRequestBody(String qualifiedName, String type, String externalSourceName){ - Identifiers identifiers = new Identifiers(); - identifiers.setQualifiedName(qualifiedName); - - FindRequestBody findRequestBody = new FindRequestBody(); - findRequestBody.setExternalSourceName(externalSourceName); - findRequestBody.setType(type); - findRequestBody.setIdentifiers(identifiers); - return findRequestBody; - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/LineageSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/LineageSetupService.java deleted file mode 100644 index edf920e8a83..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/LineageSetupService.java +++ /dev/null @@ -1,322 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.PortType; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessContainmentType; -import org.odpi.openmetadata.accessservices.dataengine.model.ProcessHierarchy; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Generates lineage test data, and triggers requests via client for types involved in lineage - */ -public class LineageSetupService { - - private static final String DISPLAY_NAME_SUFFIX = "displayName"; - private static final String SEPARATOR = "_"; - private static final String ATTRIBUTE = "attribute"; - private static final String PORT_IMPLEMENTATION = "portImplementation"; - private static final String SCHEMA_TYPE = "schemaType"; - private static final String JOB_PROCESS = "jobProcess"; - private static final String STAGE_PROCESS = "stageProcess"; - - private static final String VIRTUAL = "virtual"; - private static final String CSV = "csv"; - private static final String DATABASE = "database"; - - private static final String JOB_NAME = "flow1"; - - private static final String FIRST_STAGE_PROCESS_NAME = "fileInput"; - private static final String FIRST_STAGE_INPUT_PORT_NAME = "names"; - private static final String FIRST_STAGE_OUTPUT_PORT_NAME = "readFile"; - - private static final String SECOND_STAGE_PROCESS_NAME = "rename"; - private static final String SECOND_STAGE_INPUT_PORT_NAME = "readFile"; - private static final String SECOND_STAGE_OUTPUT_PORT_NAME = "writeTable"; - - private static final String THIRD_STAGE_PROCESS_NAME = "databaseOutput"; - private static final String THIRD_STAGE_INPUT_PORT_NAME = "writeTable"; - private static final String THIRD_STAGE_OUTPUT_PORT_NAME = "employeeName"; - - private final List csvHeaderAttributeNames; - private final List databaseTableAttributeNames; - - private final Map csvToDatabase = new HashMap<>(); - - private final Map> jobProcessDataFlowsProxies = new HashMap<>(); - - public LineageSetupService() { - csvToDatabase.put("last", "surname"); - csvToDatabase.put("location", "locid"); - csvToDatabase.put("id", "empid"); - csvToDatabase.put("first", "fname"); - - csvHeaderAttributeNames = new ArrayList<>(csvToDatabase.keySet()); - databaseTableAttributeNames = new ArrayList<>(csvToDatabase.values()); - - csvHeaderAttributeNames.forEach(headerAttribute -> jobProcessDataFlowsProxies.put(headerAttribute, - getDataFlowAttributesForColumn(headerAttribute))); - } - - /** - * retrieves the list of qualified names for the attributes that are linked in data flows, in the order they can be - * traversed from the CSV column to the DB column. This list is retrieved for each of the columns. This is the order in - * which the process was constructed and intended to be and is used by the FVT to check the result of all the creation calls. - * - * @return a map of data flow attribute names in order for each CSV column - */ - public Map> getJobProcessDataFlowsProxiesByCsvColumn() { - return jobProcessDataFlowsProxies; - } - - /** - * Creates the job process containing all the stage processes, port implementations, schemas, attributes and virtual assets - * - * @param userId the user which created the job process - * @param dataEngineOMASClient the data engine client that is used to create the job process - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws ConnectorCheckedException there are errors in the initialization of the connector. - * @throws PropertyServerException there is a problem retrieving information from the property server(s). - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public List createJobProcessWithContent(String userId, DataEngineClient dataEngineOMASClient) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException, - ConnectorCheckedException { - createVirtualAssets(userId, dataEngineOMASClient); - - List processes = new ArrayList<>(); - processes.add(createFirstStageProcess(userId, dataEngineOMASClient)); - processes.add(createSecondStageProcess(userId, dataEngineOMASClient)); - processes.add(createThirdStageProcess(userId, dataEngineOMASClient)); - processes.add(createJobProcess(userId, dataEngineOMASClient)); - return processes; - } - - private List getDataFlowAttributesForColumn(String name) { - List attributes = new ArrayList<>(); - attributes.add(getAttributeName(VIRTUAL, CSV, PortType.INOUT_PORT.getName(), name)); - attributes.add(getAttributeName(FIRST_STAGE_PROCESS_NAME, FIRST_STAGE_INPUT_PORT_NAME, PortType.INPUT_PORT.getName(), name)); - attributes.add(getAttributeName(FIRST_STAGE_PROCESS_NAME, FIRST_STAGE_OUTPUT_PORT_NAME, PortType.OUTPUT_PORT.getName(), name)); - attributes.add(getAttributeName(SECOND_STAGE_PROCESS_NAME, SECOND_STAGE_INPUT_PORT_NAME, PortType.INPUT_PORT.getName(), name)); - String newName = csvToDatabase.get(name); - attributes.add(getAttributeName(SECOND_STAGE_PROCESS_NAME, SECOND_STAGE_OUTPUT_PORT_NAME, PortType.OUTPUT_PORT.getName(), newName)); - attributes.add(getAttributeName(THIRD_STAGE_PROCESS_NAME, THIRD_STAGE_INPUT_PORT_NAME, PortType.INPUT_PORT.getName(), newName)); - attributes.add(getAttributeName(THIRD_STAGE_PROCESS_NAME, THIRD_STAGE_OUTPUT_PORT_NAME, PortType.OUTPUT_PORT.getName(), newName)); - attributes.add(getAttributeName(VIRTUAL, DATABASE, PortType.INOUT_PORT.getName(), newName)); - return attributes; - } - - public void createVirtualAssets(String userId, DataEngineClient dataEngineOMASClient) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ConnectorCheckedException { - List csvAttributes = createAttributes(csvHeaderAttributeNames, VIRTUAL, CSV, PortType.INOUT_PORT); - SchemaType csvSchemaType = createSchemaType(VIRTUAL, CSV, csvAttributes); - dataEngineOMASClient.createOrUpdateSchemaType(userId, csvSchemaType); - - List databaseAttributes = createAttributes(databaseTableAttributeNames, VIRTUAL, DATABASE, PortType.INOUT_PORT); - SchemaType dbSchemaType = createSchemaType(VIRTUAL, DATABASE, databaseAttributes); - dataEngineOMASClient.createOrUpdateSchemaType(userId, dbSchemaType); - } - - public DataFlow createDataFlow(String dataSupplier, String dataConsumer) { - DataFlow dataFlow = new DataFlow(); - dataFlow.setDataSupplier(dataSupplier); - dataFlow.setDataConsumer(dataConsumer); - return dataFlow; - } - - private Process createJobProcess(String userId, DataEngineClient dataEngineOMASClient) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ConnectorCheckedException { - Process job = new Process(); - String name = getJobProcessName(); - job.setQualifiedName(name); - job.setDisplayName(getDisplayName(name)); - - List dataFlows = createDataFlows(FIRST_STAGE_PROCESS_NAME, SECOND_STAGE_PROCESS_NAME, - FIRST_STAGE_OUTPUT_PORT_NAME, SECOND_STAGE_INPUT_PORT_NAME, PortType.OUTPUT_PORT.getName(), - PortType.INPUT_PORT.getName(), csvHeaderAttributeNames); - dataFlows.addAll(createDataFlows(SECOND_STAGE_PROCESS_NAME, THIRD_STAGE_PROCESS_NAME, - SECOND_STAGE_OUTPUT_PORT_NAME, THIRD_STAGE_INPUT_PORT_NAME, PortType.OUTPUT_PORT.getName(), - PortType.INPUT_PORT.getName(), databaseTableAttributeNames)); - - dataEngineOMASClient.createOrUpdateProcess(userId, job); - dataEngineOMASClient.addDataFlows(userId, dataFlows); - - List processHierarchies = new ArrayList<>(); - processHierarchies.add(getProcessHierarchy(getStageProcessName(FIRST_STAGE_PROCESS_NAME), name)); - processHierarchies.add(getProcessHierarchy(getStageProcessName(SECOND_STAGE_PROCESS_NAME), name)); - processHierarchies.add(getProcessHierarchy(getStageProcessName(THIRD_STAGE_PROCESS_NAME), name)); - for(ProcessHierarchy processHierarchy : processHierarchies) { - dataEngineOMASClient.addProcessHierarchy(userId, processHierarchy); - } - - return job; - } - - private ProcessHierarchy getProcessHierarchy(String childQualifiedName, String parentQualifiedName) { - ProcessHierarchy processHierarchy = new ProcessHierarchy(); - processHierarchy.setChildProcess(childQualifiedName); - processHierarchy.setParentProcess(parentQualifiedName); - processHierarchy.setProcessContainmentType(ProcessContainmentType.OWNED); - - return processHierarchy; - } - - private Process createFirstStageProcess(String userId, DataEngineClient dataEngineOMASClient) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ConnectorCheckedException { - Process firstStageProcess = createStageProcess(FIRST_STAGE_PROCESS_NAME, FIRST_STAGE_INPUT_PORT_NAME, FIRST_STAGE_OUTPUT_PORT_NAME, - csvHeaderAttributeNames, csvHeaderAttributeNames); - - List dataFlows = createDataFlows(VIRTUAL, FIRST_STAGE_PROCESS_NAME, - CSV, FIRST_STAGE_INPUT_PORT_NAME, PortType.INOUT_PORT.getName(), PortType.INPUT_PORT.getName(), csvHeaderAttributeNames); - - dataFlows.addAll(createDataFlows(FIRST_STAGE_PROCESS_NAME, FIRST_STAGE_PROCESS_NAME, - FIRST_STAGE_INPUT_PORT_NAME, FIRST_STAGE_OUTPUT_PORT_NAME, PortType.INPUT_PORT.getName(), - PortType.OUTPUT_PORT.getName(), csvHeaderAttributeNames)); - - dataEngineOMASClient.createOrUpdateProcess(userId, firstStageProcess); - dataEngineOMASClient.addDataFlows(userId, dataFlows); - return firstStageProcess; - } - - private Process createSecondStageProcess(String userId, DataEngineClient dataEngineOMASClient) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ConnectorCheckedException { - Process secondStageProcess = createStageProcess(SECOND_STAGE_PROCESS_NAME, SECOND_STAGE_INPUT_PORT_NAME, SECOND_STAGE_OUTPUT_PORT_NAME, - csvHeaderAttributeNames, databaseTableAttributeNames); - - List dataFlows = new ArrayList<>(); - csvToDatabase.forEach((csvColumn, databaseColumn) -> { - String sourceName = getAttributeName(SECOND_STAGE_PROCESS_NAME, SECOND_STAGE_INPUT_PORT_NAME, PortType.INPUT_PORT.getName(), csvColumn); - String targetName = - getAttributeName(SECOND_STAGE_PROCESS_NAME, SECOND_STAGE_OUTPUT_PORT_NAME, PortType.OUTPUT_PORT.getName(), databaseColumn); - DataFlow dataFlow = createDataFlow(sourceName, targetName); - dataFlows.add(dataFlow); - }); - - dataEngineOMASClient.createOrUpdateProcess(userId, secondStageProcess); - dataEngineOMASClient.addDataFlows(userId, dataFlows); - return secondStageProcess; - } - - private Process createThirdStageProcess(String userId, DataEngineClient dataEngineOMASClient) - throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ConnectorCheckedException { - Process thirdStageProcess = createStageProcess(THIRD_STAGE_PROCESS_NAME, THIRD_STAGE_INPUT_PORT_NAME, THIRD_STAGE_OUTPUT_PORT_NAME, - databaseTableAttributeNames, databaseTableAttributeNames); - - List dataFlows = createDataFlows(THIRD_STAGE_PROCESS_NAME, THIRD_STAGE_PROCESS_NAME, THIRD_STAGE_INPUT_PORT_NAME, - THIRD_STAGE_OUTPUT_PORT_NAME, PortType.INPUT_PORT.getName(), PortType.OUTPUT_PORT.getName(), databaseTableAttributeNames); - - dataFlows.addAll(createDataFlows(THIRD_STAGE_PROCESS_NAME, VIRTUAL, THIRD_STAGE_OUTPUT_PORT_NAME, - DATABASE, PortType.OUTPUT_PORT.getName(), PortType.INOUT_PORT.getName(), databaseTableAttributeNames)); - - dataEngineOMASClient.createOrUpdateProcess(userId, thirdStageProcess); - dataEngineOMASClient.addDataFlows(userId, dataFlows); - return thirdStageProcess; - } - - private List createDataFlows(String sourceProcessName, String targetProcessName, String sourcePort, String targetPort, - String sourcePortType, String targetPortType, List attributeNames) { - List dataFlows = new ArrayList<>(); - attributeNames.forEach(csvColumn -> { - String sourceName = getAttributeName(sourceProcessName, sourcePort, sourcePortType, csvColumn); - String targetName = getAttributeName(targetProcessName, targetPort, targetPortType, csvColumn); - DataFlow dataFlow = createDataFlow(sourceName, targetName); - dataFlows.add(dataFlow); - }); - return dataFlows; - } - - private Process createStageProcess(String processName, String inputPortName, String outputPortName, List inputAttributeNames, - List outputAttributeNames) { - PortImplementation inputPortImplementation = - createPortImplementationWithSchema(inputAttributeNames, processName, inputPortName, PortType.INPUT_PORT); - PortImplementation outputPortImplementation = - createPortImplementationWithSchema(outputAttributeNames, processName, outputPortName, PortType.OUTPUT_PORT); - List portImplementations = Arrays.asList(inputPortImplementation, outputPortImplementation); - Process process = new Process(); - String name = getStageProcessName(processName); - process.setQualifiedName(name); - process.setDisplayName(getDisplayName(name)); - process.setPortImplementations(portImplementations); - return process; - } - - private PortImplementation createPortImplementationWithSchema(List attributeNames, String processName, String portName, - PortType portType) { - List attributes = createAttributes(attributeNames, processName, portName, portType); - SchemaType schemaType = createSchemaType(processName, portName, attributes); - return createPortImplementation(processName, portName, schemaType, portType); - } - - private PortImplementation createPortImplementation(String processName, String portName, SchemaType schemaType, PortType portType) { - PortImplementation portImplementation = new PortImplementation(); - portImplementation.setSchemaType(schemaType); - String name = getPortImplementationName(processName, portName); - portImplementation.setQualifiedName(name); - portImplementation.setDisplayName(name + SEPARATOR); - portImplementation.setPortType(portType); - return portImplementation; - } - - private SchemaType createSchemaType(String processName, String portName, List attributes) { - SchemaType schemaType = new SchemaType(); - String name = getSchemaTypeName(processName, portName); - schemaType.setQualifiedName(name); - schemaType.setDisplayName(getDisplayName(name)); - schemaType.setAttributeList(attributes); - return schemaType; - } - - private List createAttributes(List attributeNames, String processName, String portName, PortType portType) { - List attributes = new ArrayList<>(); - attributeNames.forEach(attributeName -> { - Attribute attribute = new Attribute(); - String name = getAttributeName(processName, portName, portType.getName(), attributeName); - attribute.setQualifiedName(name); - attribute.setDisplayName(getDisplayName(name)); - attributes.add(attribute); - }); - return attributes; - } - - private String getJobProcessName() { - return JOB_PROCESS + SEPARATOR + JOB_NAME; - } - - private String getStageProcessName(String processName) { - return STAGE_PROCESS + SEPARATOR + processName; - } - - private String getPortImplementationName(String processName, String portName) { - return String.join(SEPARATOR, PORT_IMPLEMENTATION, processName, portName); - } - - private String getSchemaTypeName(String processName, String portName) { - return String.join(SEPARATOR, SCHEMA_TYPE, processName, portName); - } - - private String getAttributeName(String processName, String portName, String portType, String attributeName) { - return String.join(SEPARATOR, ATTRIBUTE, processName, portName, portType, attributeName); - } - - private String getDisplayName(String name) { - return name + SEPARATOR + DISPLAY_NAME_SUFFIX; - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/PlatformConnectionProvider.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/PlatformConnectionProvider.java deleted file mode 100644 index 699f9507203..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/PlatformConnectionProvider.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.junit.jupiter.params.provider.Arguments; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineRESTClient; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; - -import java.io.FileInputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.Properties; -import java.util.stream.Stream; - -/** - * The class is used to generate the arguments for the FVT tests. The arguments are taken from a properties file and used to - * create proper helper services objects and proper data engine clients. The numner of Arguments in the Stream retrieved - * gives the number of runs for each of the FVT methods. If in the properties file we have both in memory and local graph servers - * enabled, then we will have 2 Arguments retrieved. For local runs of FVTs, we can disable one of the servers and run - * against local platform. - */ -public class PlatformConnectionProvider { - - private static final String APPLICATION_PROPERTIES = "application.properties"; - - private static final String USER = "user"; - private static final String BASE_URL = "base.url"; - private static final String PORT = "server.port"; - private static final String SERVER_IN_MEMORY_NAME = "server.in-memory-graph.name"; - private static final String SERVER_IN_MEMORY_ENABLED = "server.in-memory-graph.enabled"; - - private static final String EXTERNAL_SOURCE_NAME = "DataEngine"; - - private static DataEngineRESTClient dataEngineRESTClientInMemory; - private static RepositoryService repositoryServiceInMemory; - - protected static Stream getConnectionDetails() throws IOException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException { - String appConfigPath = Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResource(APPLICATION_PROPERTIES)).getPath(); - - Properties properties = new Properties(); - properties.load(new FileInputStream(appConfigPath)); - String userId = properties.getProperty(USER); - String serverPlatformRootURL = properties.getProperty(BASE_URL) + ":" + properties.getProperty(PORT); - - List servers = new ArrayList<>(); - if (Boolean.parseBoolean(properties.getProperty(SERVER_IN_MEMORY_ENABLED))) { - String inMemoryServerName = properties.getProperty(SERVER_IN_MEMORY_NAME); - if (dataEngineRESTClientInMemory == null) { - dataEngineRESTClientInMemory = new DataEngineRESTClient(inMemoryServerName, serverPlatformRootURL); - dataEngineRESTClientInMemory.setExternalSourceName(EXTERNAL_SOURCE_NAME); - } - if (repositoryServiceInMemory == null) { - repositoryServiceInMemory = new RepositoryService(inMemoryServerName, userId, serverPlatformRootURL); - } - servers.add(Arguments.of(userId, dataEngineRESTClientInMemory, repositoryServiceInMemory)); - } - - return servers.stream(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/PortSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/PortSetupService.java deleted file mode 100644 index 14133c65af9..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/PortSetupService.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.PortType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * Generates test data of type PortImplementation and triggers requests via client for aforementioned type - */ -public class PortSetupService { - - /** - * Creates a PortImplementation or updates one. - * - * @param userId the user which creates the data engine - * @param dataEngineClient the data engine client that is used to create the external data engine - * @param portImplementation port implementation to upsert. If null, a default will be used - * @param processQualifiedName process qualified name. Required - * - * @return portImplementation - */ - public PortImplementation createOrUpdatePortImplementation(String userId, DataEngineClient dataEngineClient, - PortImplementation portImplementation, String processQualifiedName) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(processQualifiedName == null || processQualifiedName.isEmpty()){ - throw new IllegalArgumentException("processQualifiedName is null"); - } - if(portImplementation == null) { - portImplementation = getDefaultPortImplementation(); - } - dataEngineClient.createOrUpdatePortImplementation(userId, portImplementation, processQualifiedName); - return portImplementation; - } - - private PortImplementation getDefaultPortImplementation() { - PortImplementation portImplementation = new PortImplementation(); - portImplementation.setQualifiedName("port-implementation-qualified-name"); - portImplementation.setDisplayName("port-implementation-display-name"); - portImplementation.setPortType(PortType.INPUT_PORT); - return portImplementation; - } - - /** - * Delete a PortImplementation using the dataEngineClient provided - * - * @param userId user - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deletePortImplementation(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete PortImplementation. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deletePortImplementation(userId, qualifiedName, guid); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/ProcessSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/ProcessSetupService.java deleted file mode 100644 index 07ddbe60723..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/ProcessSetupService.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -/** - * Generates test data of type Process, and triggers requests via client for aforementioned type - */ -public class ProcessSetupService { - - /** - * Creates a simple process or updates one. - * - * @param userId the user which creates the data engine - * @param dataEngineClient the data engine client that is used to create the external data engine - * @param process process to upsert. If null, a default will be used - * - * @return process - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws ConnectorCheckedException there are errors in the initialization of the connector. - * @throws PropertyServerException there is a problem retrieving information from the property server(s). - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public Process createOrUpdateSimpleProcess(String userId, DataEngineClient dataEngineClient, Process process) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(process == null) { - process = getDefaultProcess(); - } - dataEngineClient.createOrUpdateProcess(userId, process); - return process; - } - - private Process getDefaultProcess() { - Process process; - process = new Process(); - process.setQualifiedName("simple-process-qualified-name"); - process.setDisplayName("simple-process-display-name"); - process.setName("simple-process-name"); - process.setDescription("simple-process-description"); - process.setOwner("simple-process-owner"); - return process; - } - - /** - * Delete a Process using the dataEngineClient provided - * - * @param userId user - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - * - * @return process - * - * @throws InvalidParameterException one of the parameters is null or invalid. - * @throws ConnectorCheckedException there are errors in the initialization of the connector. - * @throws PropertyServerException there is a problem retrieving information from the property server(s). - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public void deleteProcess(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - if(qualifiedName == null || guid == null){ - throw new IllegalArgumentException("Unable to delete External Tool. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteProcess(userId, qualifiedName, guid); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/RepositoryService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/RepositoryService.java deleted file mode 100644 index 64d744c6afe..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/RepositoryService.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.repositoryservices.clients.LocalRepositoryServicesClient; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.MatchCriteria; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -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.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * This class aims to offer support for the FVT in regards to calling the LocalRepositoryServicesClient. - * It contains calls to various LocalRepositoryServicesClient methods that retrieve the proxies names from data flows, - * that find relationships based on GUID, that find GUIDs based on qualified names or software sever capabilities - * also based on qualified names. - */ -public class RepositoryService { - - private static final String QUALIFIED_NAME = "qualifiedName"; - - private static final String TABULAR_COLUMN_TYPE_GUID = "d81a0425-4e9b-4f31-bc1c-e18c3566da10"; - private static final String DATA_FLOW_TYPE_GUID = "d2490c0c-06cc-458a-add2-33cf2f5dd724"; - - private static final int PAGE_SIZE = 100; - - private final String userId; - private final LocalRepositoryServicesClient client; - - public RepositoryService(String serverName, String userId, String serverPlatformRootURL) - throws InvalidParameterException { - this.userId = userId; - this.client = new LocalRepositoryServicesClient("repository", serverPlatformRootURL + - "/servers/" + serverName); - } - - /** - * Given a list of relationships for the given attribute, the method calculates a list of qualified names indicating - * the other proxies involved in data flow relationships. - * - * @param lineageRelationships the lineage relationships correlated to the given attribute - * @param currentAttribute the attribute for which the data flows proxies are calculated - * @return a list of qualified names indicating the other proxies in the data flows - */ - public List getDataFlowsProxiesQualifiedNames(List lineageRelationships, String currentAttribute) { - return lineageRelationships - .stream() - .map(lineage -> { - String entityTwo = lineage.getEntityTwoProxy().getUniqueProperties().getPropertyValue(QUALIFIED_NAME).valueAsString(); - if (entityTwo.equals(currentAttribute)) { - return lineage.getEntityOneProxy().getUniqueProperties().getPropertyValue(QUALIFIED_NAME).valueAsString(); - } - return entityTwo; - }) - .collect(Collectors.toList()); - } - - /** - * Given the GUID of an entity the method retrieves the relationships in which the entity is involved via a - * LocalRepositoryServicesClient call. - * - * @param entityGUID the GUID of the entity - * @return the list of relationships in which the entity is involved - */ - public List findDataFlowRelationshipsByGUID(String entityGUID) throws UserNotAuthorizedException, - EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - return client.getRelationshipsForEntity(userId, entityGUID, DATA_FLOW_TYPE_GUID, 0, - null, null, null, SequencingOrder.ANY, PAGE_SIZE); - } - - /** - * Based on a searchCriteria the method searches for an entity which has the qualified name equal to the search - * criteria. The search is done through a LocalRepositoryServicesClient call. - * - * @param entityValue the search criteria used to search for a qualified name - * @return entity detail - */ - public EntityDetail findEntityByQualifiedName(String entityValue, String typeGUID) throws UserNotAuthorizedException, FunctionNotSupportedException, - InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException { - InstanceProperties matchProperties = new InstanceProperties(); - - PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); - primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValue.setPrimitiveValue(entityValue); - - Map propertiesMap = new HashMap<>(); - propertiesMap.put(QUALIFIED_NAME, primitivePropertyValue); - matchProperties.setInstanceProperties(propertiesMap); - - List entityDetails = client.findEntitiesByProperty(userId, typeGUID, matchProperties, - MatchCriteria.ANY, 0, null, null, null, null, SequencingOrder.ANY, PAGE_SIZE); - - if (entityDetails == null || entityDetails.isEmpty()) { - return null; - } - return entityDetails.get(0); - } - - /** - * Find an entity by using the search criteria given as parameter in a call to the LocalRepositoryServicesClient - * - * @param typeGuid guid of expected type - * @param searchCriteria the property value used to search and identify the engine - * - * @return a list of EntityDetails that contain the found engine - */ - public List findEntityByPropertyValue(String typeGuid, String searchCriteria) throws UserNotAuthorizedException, - FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, - TypeErrorException, PagingErrorException { - - return client.findEntitiesByPropertyValue(userId, typeGuid, searchCriteria, 0, null, - null, null, null, SequencingOrder.ANY, PAGE_SIZE); - } - - /** - * Extract the entity at the other end of a relationship. Disregard edge orientation - * - * @param startEntityGuid guid of known entity - * @param relationshipTypeGuid guid of relationship type - * - * @return a list of EntityDetails found at the other end of designated relationship types - */ - public List getRelatedEntities(String startEntityGuid, String relationshipTypeGuid) - throws UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, - RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException { - - - List relationships = client.getRelationshipsForEntity(userId, startEntityGuid, relationshipTypeGuid, - 0, null, null, null, SequencingOrder.ANY, PAGE_SIZE); - - return relationships.stream().map( - r -> startEntityGuid.equals(r.getEntityOneProxy().getGUID()) ? r.getEntityTwoProxy() : r.getEntityOneProxy() - ).map(EntityProxy::getGUID) - .map( - guid -> { - try { - return client.getEntityDetail(userId, guid); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - ).collect(Collectors.toList()); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/TopicAndEventTypeSetupService.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/TopicAndEventTypeSetupService.java deleted file mode 100644 index 7a897daf49c..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/TopicAndEventTypeSetupService.java +++ /dev/null @@ -1,174 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine; - -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.Collections; - -/** - * Generates test data of type Topic and EventType, and triggers requests via client for aforementioned types - */ -public class TopicAndEventTypeSetupService { - /** - * Upsert a Topic using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param topic topic to upsert. If null, a default will be used - * - * @return Topic instance containing sent values - */ - public Topic upsertTopic(String userId, DataEngineClient dataEngineClient, Topic topic) throws UserNotAuthorizedException, - ConnectorCheckedException, - PropertyServerException, - InvalidParameterException { - if (topic == null) { - topic = getDefaultTopic(); - } - dataEngineClient.upsertTopic(userId, topic); - return topic; - } - - /** - * Delete a Topic using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteTopic(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) throws UserNotAuthorizedException, - ConnectorCheckedException, - PropertyServerException, - InvalidParameterException { - - if (qualifiedName == null || guid == null) { - throw new IllegalArgumentException("Unable to delete Topic. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteTopic(userId, qualifiedName, guid); - } - - /** - * Upsert a DatabaseSchema using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param eventType eventType to upsert. If null, a default will be used - * @param topicQualifiedName the topic's qualified name - * - * @return EventType instance containing sent values - */ - public EventType upsertEventType(String userId, DataEngineClient dataEngineClient, EventType eventType, String topicQualifiedName) throws - UserNotAuthorizedException, - ConnectorCheckedException, - PropertyServerException, - InvalidParameterException { - if (eventType == null) { - eventType = getDefaultEventType(); - } - dataEngineClient.upsertEventType(userId, eventType, topicQualifiedName); - return eventType; - } - - /** - * Delete an EventType using the dataEngineClient received - * - * @param userId user id - * @param dataEngineClient data engine client - * @param qualifiedName qualified name - * @param guid guid - */ - public void deleteEventType(String userId, DataEngineClient dataEngineClient, String qualifiedName, String guid) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException { - - if (qualifiedName == null || guid == null) { - throw new IllegalArgumentException("Unable to delete DatabaseSchema. QualifiedName and Guid are both required. Missing at least one"); - } - dataEngineClient.deleteEventType(userId, qualifiedName, guid); - } - - private Topic getDefaultTopic() { - Topic topic = new Topic(); - - topic.setQualifiedName("default-topic-qualified-name"); - topic.setDisplayName("default-topic-display-name"); - topic.setDescription("default-topic-description"); - topic.setTopicType("default-topic-type"); - - return topic; - } - - private EventType getDefaultEventType() { - EventType eventType = new EventType(); - - eventType.setQualifiedName("default-event-type-qualified-name"); - eventType.setDisplayName("default-event-type-display-name"); - eventType.setDescription("default-event-type-description"); - eventType.setAttributeList(Collections.singletonList(getDefaultEventSchemaAttribute())); - - return eventType; - } - - private Attribute getDefaultEventSchemaAttribute() { - Attribute attribute = new Attribute(); - - attribute.setQualifiedName("default-event-schema-attribute-qualified-name"); - attribute.setDisplayName("default-vent-schema-attribute-display-name"); - - return attribute; - } - - public Topic getTopicWithEventType() { - Topic topic = new Topic(); - topic.setQualifiedName("topic-qualified-name"); - topic.setDisplayName("topic-display-name"); - topic.setDescription("topic-description"); - topic.setTopicType("topic-type"); - - EventType eventType = new EventType(); - eventType.setDisplayName("event-type-display-name"); - eventType.setQualifiedName("event-type-qualified-name"); - eventType.setDescription("event-type-description"); - - Attribute attribute = new Attribute(); - attribute.setDisplayName("attribute-display-name"); - attribute.setQualifiedName("attribute-qualified-name"); - - eventType.setAttributeList(Collections.singletonList(attribute)); - topic.setEventTypes(Collections.singletonList(eventType)); - - return topic; - } - - public Topic getDeleteTopic() { - Topic topic = new Topic(); - topic.setQualifiedName("topic-to-delete-qualified-name"); - topic.setDisplayName("topic-to-delete-display-name"); - topic.setDescription("topic-to-delete-description"); - topic.setTopicType("topic-type"); - - return topic; - } - - public EventType getDeleteEventType() { - EventType eventType = new EventType(); - eventType.setDisplayName("event-type-to-delete-display-name"); - eventType.setQualifiedName("event-type--to-delete-qualified-name"); - eventType.setDescription("event-type--to-delete-description"); - - Attribute attribute = new Attribute(); - attribute.setDisplayName("attribute--to-delete-display-name"); - attribute.setQualifiedName("attribute--to-delete-qualified-name"); - - eventType.setAttributeList(Collections.singletonList(attribute)); - return eventType; - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/ConnectionAndEndpointFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/ConnectionAndEndpointFVT.java deleted file mode 100644 index e79aad8a788..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/ConnectionAndEndpointFVT.java +++ /dev/null @@ -1,116 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - -/** - * Holds FVTs related to types Connection and Endpoint - */ -public class ConnectionAndEndpointFVT extends DataEngineFVT { - - private static final String COLON = ":"; - private static final String CONNECTION = " Connection"; - private static final String ENDPOINT = " Endpoint"; - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteConnectionAndEndpoint(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - DataFile dataFile = dataStoreAndRelationalTableSetupService.upsertDataFile(userId, dataEngineClient, getDataFile()); - - // assert Connection - String fileType = dataFile.getFileType(); - String qualifiedName = dataFile.getQualifiedName(); - String connectionQualifiedName = getConnectionQualifiedName(fileType, qualifiedName); - List connections = repositoryService.findEntityByPropertyValue(CONNECTION_TYPE_GUID, connectionQualifiedName); - assertNotNull(connections); - assertEquals(1, connections.size()); - - EntityDetail connectionAsEntityDetail = connections.get(0); - assertEquals(connectionQualifiedName, connectionAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - - // assert Endpoint - String endpointQualifiedName = getEndpointQualifiedName(fileType, qualifiedName); - List endpoints = repositoryService.findEntityByPropertyValue(ENDPOINT_TYPE_GUID, endpointQualifiedName); - assertNotNull(endpoints); - assertEquals(1, endpoints.size()); - - EntityDetail endpointAsEntityDetail = endpoints.get(0); - assertEquals(endpointQualifiedName, endpointAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - - //delete Endpoint - connectionAndEndpointSetupService.deleteEndpoint(userId, dataEngineClient, endpointQualifiedName, - endpointAsEntityDetail.getGUID()); - List deletedEndpoints = repositoryService.findEntityByPropertyValue(ENDPOINT_TYPE_GUID, endpointQualifiedName); - assertNull(deletedEndpoints); - - //delete Connection - connectionAndEndpointSetupService.deleteConnection(userId, dataEngineClient, connectionQualifiedName, - connectionAsEntityDetail.getGUID()); - List deletedConnections = repositoryService.findEntityByPropertyValue(CONNECTION_TYPE_GUID, connectionQualifiedName); - assertNull(deletedConnections); - } - - private DataFile getDataFile(){ - DataFile dataFile = new DataFile(); - dataFile.setQualifiedName("connection-and-endpoint-data-file-qualified-name"); - dataFile.setDisplayName("connection-and-endpoint-data-file-display-name"); - dataFile.setDescription("connection-and-endpoint-data-file-description"); - dataFile.setFileType("DataFile"); - dataFile.setProtocol("connection-and-endpoint-data-file-protocol"); - dataFile.setNetworkAddress("connection-and-endpoint-data-file-network-address"); - dataFile.setPathName("/connection-and-endpoint-data-file-pathname/"); - dataFile.setColumns(buildTabularColumns()); - return dataFile; - } - - private List buildTabularColumns(){ - List columns = new ArrayList<>(); - - Attribute column = new Attribute(); - column.setQualifiedName("connection-and-endpoint-column-qualified-name"); - column.setDisplayName("connection-and-endpoint-column-display-name"); - column.setDescription("connection-and-endpoint-column-description"); - columns.add(column); - - return columns; - } - - private String getConnectionQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + COLON + assetQualifiedName + CONNECTION; - } - - private String getEndpointQualifiedName(String assetTypeName, String assetQualifiedName) { - return assetTypeName + COLON + assetQualifiedName + ENDPOINT; - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/DataEngineFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/DataEngineFVT.java deleted file mode 100644 index 5bb795fd0b5..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/DataEngineFVT.java +++ /dev/null @@ -1,200 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - -import org.odpi.openmetadata.accessservices.dataengine.ConnectionAndEndpointSetupService; -import org.odpi.openmetadata.accessservices.dataengine.DataStoreAndRelationalTableSetupService; -import org.odpi.openmetadata.accessservices.dataengine.FindSetupService; -import org.odpi.openmetadata.accessservices.dataengine.LineageSetupService; -import org.odpi.openmetadata.accessservices.dataengine.PortSetupService; -import org.odpi.openmetadata.accessservices.dataengine.ProcessSetupService; -import org.odpi.openmetadata.accessservices.dataengine.EngineSetupService; -import org.odpi.openmetadata.accessservices.dataengine.TopicAndEventTypeSetupService; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.Port; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.http.HttpHelper; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -/** - * Base class for FVTs in data-engine-fvt module - */ -public class DataEngineFVT { - - protected static final String SOFTWARE_SERVER_CAPABILITY_TYPE_GUID = "fe30a033-8f86-4d17-8986-e6166fa24177"; - protected static final String DATABASE_TYPE_GUID = "0921c83f-b2db-4086-a52c-0d10e52ca078"; - protected static final String DEPLOYED_DATABASE_SCHEMA_TYPE_GUID = "eab811ec-556a-45f1-9091-bc7ac8face0f"; - protected static final String DATAFILE_TYPE_GUID = "10752b4a-4b5d-4519-9eae-fdd6d162122f"; - protected static final String RELATIONAL_TABLE_TYPE_GUID = "ce7e72b8-396a-4013-8688-f9d973067425"; - protected static final String PROCESS_TYPE_GUID = "d8f33bd7-afa9-4a11-a8c7-07dcec83c050"; - protected static final String PORT_IMPLEMENTATION_TYPE_GUID = "ADbbdF06-a6A3-4D5F-7fA3-DB4Cb0eDeC0E"; - protected static final String OWNERSHIP_CLASSIFICATION_GUID = "8139a911-a4bd-432b-a9f4-f6d11c511abe"; - protected static final String PROCESS_PORT_RELATIONSHIP_GUID = "fB4E00CF-37e4-88CE-4a94-233BAdB84DA2"; - protected static final String PROCESS_HIERARCHY_RELATIONSHIP_GUID = "70dbbda3-903f-49f7-9782-32b503c43e0e"; - protected static final String PORT_SCHEMA_RELATIONSHIP_GUID = "B216fA00-8281-F9CC-9911-Ae6377f2b457"; - protected static final String ATTRIBUTE_FOR_SCHEMA_RELATIONSHIP_GUID = "86b176a2-015c-44a6-8106-54d5d69ba661"; - protected static final String DATA_FLOW_RELATIONSHIP_GUID = "d2490c0c-06cc-458a-add2-33cf2f5dd724"; - protected static final String ASSET_SCHEMA_TYPE_RELATIONSHIP_GUID = "815b004d-73c6-4728-9dd9-536f4fe803cd"; - protected static final String NESTED_SCHEMA_ATTRIBUTE_RELATIONSHIP_GUID = "0ffb9d87-7074-45da-a9b0-ae0859611133"; - protected static final String CONNECTION_TYPE_GUID = "114e9f8f-5ff3-4c32-bd37-a7eb42712253"; - protected static final String ENDPOINT_TYPE_GUID = "dbc20663-d705-4ff0-8424-80c262c6b8e7"; - protected static final String FILE_FOLDER_TYPE_GUID = "229ed5cc-de31-45fc-beb4-9919fd247398"; - protected static final String TABULAR_SCHEMA_TYPE_TYPE_GUID = "248975ec-8019-4b8a-9caf-084c8b724233"; - protected static final String TOPIC_TYPE_GUID = "29100f49-338e-4361-b05d-7e4e8e818325"; - protected static final String EVENT_TYPE_TYPE_GUID = "8bc88aba-d7e4-4334-957f-cfe8e8eadc32"; - protected static final String EVENT_SCHEMA_ATTRIBUTE_TYPE_GUID = "5be4ee8f-4d0c-45cd-a411-22a468950342"; - protected static final String TABULAR_COLUMN_TYPE_GUID = "d81a0425-4e9b-4f31-bc1c-e18c3566da10"; - - protected static final String DESCRIPTION = "description"; - protected static final String NAME = "name"; - protected static final String PATCH_LEVEL = "patchLevel"; - protected static final String QUALIFIED_NAME = "qualifiedName"; - protected static final String DISPLAY_NAME = "displayName"; - protected static final String SOURCE = "source"; - protected static final String FILE_TYPE = "fileType"; - protected static final String CAPABILITY_VERSION = "capabilityVersion"; - protected static final String CAPABILITY_TYPE = "deployedImplementationType"; - protected static final String DEPLOYED_IMPLEMENTATION_TYPE = "deployedImplementationType"; - protected static final String DATABASE_VERSION = "databaseVersion"; - protected static final String INSTANCE = "instance"; - protected static final String IMPORTED_FROM = "importedFrom"; - protected static final String OWNER = "owner"; - protected static final String PORT_TYPE = "portType"; - protected static final String TOPIC_TYPE = "topicType"; - - protected static final String DATA_ENGINE = "DataEngine"; - protected static final String ADMIN = "admin"; - - public DataEngineFVT() { - HttpHelper.noStrictSSL(); - } - - protected final LineageSetupService lineageSetupService = new LineageSetupService(); - protected final EngineSetupService engineSetupService = new EngineSetupService(); - protected final DataStoreAndRelationalTableSetupService dataStoreAndRelationalTableSetupService = new DataStoreAndRelationalTableSetupService(); - protected final ProcessSetupService processSetupService = new ProcessSetupService(); - protected final PortSetupService portSetupService = new PortSetupService(); - protected final ConnectionAndEndpointSetupService connectionAndEndpointSetupService = new ConnectionAndEndpointSetupService(); - protected final FindSetupService findSetupService = new FindSetupService(); - protected final TopicAndEventTypeSetupService topicAndEventTypeSetupService = new TopicAndEventTypeSetupService(); - - protected EntityDetail assertProcess(Process process, List processes) { - assertNotNull(processes); - assertEquals(1, processes.size()); - - EntityDetail processAsEntityDetail = processes.get(0); - assertEquals(process.getQualifiedName(), processAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(process.getDisplayName(), processAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(process.getName(), processAsEntityDetail.getProperties().getPropertyValue(NAME).valueAsString()); - assertEquals(process.getDescription(), processAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - assertEquals(process.getOwner(), getOwnership(processAsEntityDetail)); - - return processAsEntityDetail; - } - - private String getOwnership(EntityDetail entityDetail){ - return entityDetail.getClassifications().stream() - .filter(c -> c.getType().getTypeDefGUID().equals(OWNERSHIP_CLASSIFICATION_GUID)) - .map(c -> c.getProperties().getPropertyValue(OWNER).valueAsString()) - .findFirst().orElse(null); - } - - - protected EntityDetail assertDatabase(Database database, List databases) { - assertNotNull(databases); - assertEquals(1, databases.size()); - - EntityDetail databaseAsEntityDetail = databases.get(0); - assertEquals(database.getDisplayName(), databaseAsEntityDetail.getProperties().getPropertyValue(NAME).valueAsString()); - assertEquals(database.getDescription(), databaseAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - assertEquals(database.getDatabaseType(), databaseAsEntityDetail.getProperties().getPropertyValue(DEPLOYED_IMPLEMENTATION_TYPE).valueAsString()); - assertEquals(database.getDatabaseVersion(), databaseAsEntityDetail.getProperties().getPropertyValue(DATABASE_VERSION).valueAsString()); - assertEquals(database.getDatabaseInstance(), databaseAsEntityDetail.getProperties().getPropertyValue(INSTANCE).valueAsString()); - assertEquals(database.getDatabaseImportedFrom(), databaseAsEntityDetail.getProperties().getPropertyValue(IMPORTED_FROM).valueAsString()); - return databaseAsEntityDetail; - } - - protected EntityDetail assertDatabaseSchema(DatabaseSchema databaseSchema, List databaseSchemas) { - assertNotNull(databaseSchemas); - assertEquals(1, databaseSchemas.size()); - - EntityDetail databaseAsEntityDetail = databaseSchemas.get(0); - assertEquals(databaseSchema.getDisplayName(), databaseAsEntityDetail.getProperties().getPropertyValue(NAME).valueAsString()); - assertEquals(databaseSchema.getDescription(), databaseAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - return databaseAsEntityDetail; - } - - protected EntityDetail assertRelationalTable(RelationalTable relationalTable, List relationalTables) { - assertNotNull(relationalTables); - assertEquals(1, relationalTables.size()); - - EntityDetail relationalTableAsEntityDetail = relationalTables.get(0); - assertEquals(relationalTable.getDisplayName(), - relationalTableAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(relationalTable.getDescription(), - relationalTableAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - return relationalTableAsEntityDetail; - } - - protected EntityDetail assertDataFile(DataFile dataFile, List dataFiles) { - assertNotNull(dataFiles); - assertEquals(1, dataFiles.size()); - - EntityDetail dataFileAsEntityDetail = dataFiles.get(0); - assertEquals(dataFile.getDisplayName(), dataFileAsEntityDetail.getProperties().getPropertyValue(NAME).valueAsString()); - assertEquals(dataFile.getQualifiedName(), dataFileAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(dataFile.getDescription(), dataFileAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - assertEquals(dataFile.getFileType(), dataFileAsEntityDetail.getProperties().getPropertyValue(FILE_TYPE).valueAsString()); - return dataFileAsEntityDetail; - } - - protected EntityDetail assertPort(Port port, List ports) { - assertNotNull(ports); - assertEquals(1, ports.size()); - - EntityDetail portImplementationAsEntityDetail = ports.get(0); - assertEquals(port.getQualifiedName(), - portImplementationAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(port.getDisplayName(), - portImplementationAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(port.getPortType().getName(), - portImplementationAsEntityDetail.getProperties().getPropertyValue(PORT_TYPE).valueAsString()); - return portImplementationAsEntityDetail; - } - - protected EntityDetail assertTopic(Topic topic, List topics) { - assertNotNull(topics); - assertEquals(1, topics.size()); - - EntityDetail topicAsEntityDetail = topics.get(0); - assertEquals(topic.getDisplayName(), topicAsEntityDetail.getProperties().getPropertyValue(NAME).valueAsString()); - assertEquals(topic.getDescription(), topicAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - assertEquals(topic.getTopicType(), topicAsEntityDetail.getProperties().getPropertyValue(TOPIC_TYPE).valueAsString()); - - return topicAsEntityDetail; - } - - protected void assertEventType(EventType eventType, EntityDetail eventTypeAsEntityDetail) { - assertNotNull(eventTypeAsEntityDetail); - - assertEquals(eventType.getDisplayName(), eventTypeAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(eventType.getDescription(), eventTypeAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - } - - protected void assertEventSchemaAttribute(Attribute attribute, EntityDetail attributeAsEntityDetail) { - assertNotNull(attributeAsEntityDetail); - - assertEquals(attribute.getDisplayName(), attributeAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/DataStoreAndRelationalTableFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/DataStoreAndRelationalTableFVT.java deleted file mode 100644 index 947db2f5084..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/DataStoreAndRelationalTableFVT.java +++ /dev/null @@ -1,371 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalColumn; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - -/** - * Holds FVTs related to types Database, RelationalTable and DataFile - */ -public class DataStoreAndRelationalTableFVT extends DataEngineFVT { - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upsertDatabase(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Database database = dataStoreAndRelationalTableSetupService.upsertDatabase(userId, dataEngineClient, null); - - // assert Database - List databases = repositoryService.findEntityByPropertyValue(DATABASE_TYPE_GUID, database.getQualifiedName()); - assertDatabase(database, databases); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteDatabase(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Database database = dataStoreAndRelationalTableSetupService.upsertDatabase(userId, dataEngineClient, getDatabaseToDelete()); - - // assert Database - List databases = repositoryService.findEntityByPropertyValue(DATABASE_TYPE_GUID, database.getQualifiedName()); - EntityDetail databaseAsEntityDetail = assertDatabase(database, databases); - - // delete Database - dataStoreAndRelationalTableSetupService.deleteDatabase(userId, dataEngineClient, database.getQualifiedName(), - databaseAsEntityDetail.getGUID()); - List databasesAfterDelete = repositoryService - .findEntityByPropertyValue(DATABASE_TYPE_GUID, database.getQualifiedName()); - assertNull(databasesAfterDelete); - } - - private Database getDatabaseToDelete(){ - Database database = new Database(); - database.setQualifiedName("to-delete-database-qualified-name"); - database.setDisplayName("to-delete-database-display-name"); - database.setDescription("to-delete-database-description"); - database.setDatabaseType("to-delete-database-type"); - database.setDatabaseVersion("to-delete-database-version"); - database.setDatabaseInstance("to-delete-database-instance"); - database.setDatabaseImportedFrom("to-delete-database-imported-from"); - database.setNetworkAddress("to-delete-database-network-address"); - return database; - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upsertDatabaseSchema(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Database database = dataStoreAndRelationalTableSetupService.upsertDatabase(userId, dataEngineClient, null); - DatabaseSchema databaseSchema = dataStoreAndRelationalTableSetupService.upsertDatabaseSchema(userId, - dataEngineClient, null, database.getQualifiedName(), false); - - // assert DatabaseSchema - List databaseSchemas = repositoryService.findEntityByPropertyValue(DEPLOYED_DATABASE_SCHEMA_TYPE_GUID, - databaseSchema.getQualifiedName()); - assertDatabaseSchema(databaseSchema, databaseSchemas); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteDatabaseSchema(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Database database = dataStoreAndRelationalTableSetupService.upsertDatabase(userId, dataEngineClient, getDatabaseToDelete()); - DatabaseSchema databaseSchema = dataStoreAndRelationalTableSetupService.upsertDatabaseSchema(userId, - dataEngineClient, getDatabaseSchemaToDelete(), database.getQualifiedName(), false); - - // assert DatabaseSchema - List databaseSchemas = repositoryService.findEntityByPropertyValue(DEPLOYED_DATABASE_SCHEMA_TYPE_GUID, - databaseSchema.getQualifiedName()); - EntityDetail databaseSchemaAsEntityDetail = assertDatabaseSchema(databaseSchema, databaseSchemas); - - // delete DatabaseSchema - dataStoreAndRelationalTableSetupService.deleteDatabaseSchema(userId, dataEngineClient, databaseSchema.getQualifiedName(), - databaseSchemaAsEntityDetail.getGUID()); - List databaseSchemasAfterDelete = repositoryService - .findEntityByPropertyValue(DEPLOYED_DATABASE_SCHEMA_TYPE_GUID, databaseSchema.getQualifiedName()); - assertNull(databaseSchemasAfterDelete); - } - - private DatabaseSchema getDatabaseSchemaToDelete() { - DatabaseSchema databaseSchema = new DatabaseSchema(); - databaseSchema.setQualifiedName("to-delete-database-schema-qualified-name"); - databaseSchema.setDisplayName("to-delete-database-schema-display-name"); - databaseSchema.setDescription("to-delete-database-schema-description"); - return databaseSchema; - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upsertRelationalTable(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Database database = dataStoreAndRelationalTableSetupService.upsertDatabase(userId, dataEngineClient, null); - DatabaseSchema databaseSchema = dataStoreAndRelationalTableSetupService.upsertDatabaseSchema(userId, dataEngineClient, - null, database.getQualifiedName(), false); - RelationalTable relationalTable = dataStoreAndRelationalTableSetupService.upsertRelationalTable(userId, dataEngineClient, - null, databaseSchema.getQualifiedName(), false); - - // assert Relational Table - List relationalTables = repositoryService - .findEntityByPropertyValue(RELATIONAL_TABLE_TYPE_GUID, relationalTable.getQualifiedName()); - EntityDetail relationalTableAsEntityDetail = assertRelationalTable(relationalTable, relationalTables); - - // assert Relational DB Schema Type - List relationalSchemas = repositoryService - .getRelatedEntities(relationalTableAsEntityDetail.getGUID(), ATTRIBUTE_FOR_SCHEMA_RELATIONSHIP_GUID); - assertNotNull(relationalSchemas); - assertEquals(1, relationalSchemas.size()); - - EntityDetail relationalDbSchemaAsEntityDetail = relationalSchemas.get(0); - assertEquals("SchemaOf:" + databaseSchema.getQualifiedName(), - relationalDbSchemaAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - - // assert Relational Columns - List relationalColumns = repositoryService - .getRelatedEntities(relationalTableAsEntityDetail.getGUID(), NESTED_SCHEMA_ATTRIBUTE_RELATIONSHIP_GUID); - assertNotNull(relationalColumns); - assertEquals(1, relationalColumns.size()); - - EntityDetail relationalColumnAsEntityDetail = relationalColumns.get(0); - assertEquals(relationalTable.getColumns().get(0).getDisplayName(), - relationalColumnAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(relationalTable.getColumns().get(0).getDescription(), - relationalColumnAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteRelationalTable(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Database database = dataStoreAndRelationalTableSetupService.upsertDatabase(userId, dataEngineClient, null); - DatabaseSchema databaseSchema = dataStoreAndRelationalTableSetupService.upsertDatabaseSchema(userId, dataEngineClient, - null, database.getQualifiedName(), false); - RelationalTable relationalTable = dataStoreAndRelationalTableSetupService.upsertRelationalTable(userId, - dataEngineClient, getRelationalTableToDelete(), databaseSchema.getQualifiedName(), false); - - // assert Relational Table - List relationalTables = repositoryService - .findEntityByPropertyValue(RELATIONAL_TABLE_TYPE_GUID, relationalTable.getQualifiedName()); - EntityDetail relationalTableAsEntityDetail = assertRelationalTable(relationalTable, relationalTables); - - // delete Relational Table - dataStoreAndRelationalTableSetupService.deleteRelationalTable(userId, dataEngineClient, relationalTable.getQualifiedName(), - relationalTableAsEntityDetail.getGUID()); - List relationalTablesToDelete = repositoryService - .findEntityByPropertyValue(RELATIONAL_TABLE_TYPE_GUID, relationalTable.getQualifiedName()); - assertNull(relationalTablesToDelete); - } - - private RelationalTable getRelationalTableToDelete(){ - RelationalTable relationalTable = new RelationalTable(); - relationalTable.setQualifiedName("to-delete-to-delete-relational-table-qualified-name"); - relationalTable.setDisplayName("to-delete-relational-table-display-name"); - relationalTable.setDescription("to-delete-relational-table-description"); - relationalTable.setType("to-delete-relational-table-type"); - relationalTable.setColumns(buildToDeleteRelationalColumns()); - return relationalTable; - } - - private List buildToDeleteRelationalColumns(){ - List columns = new ArrayList<>(); - - RelationalColumn column = new RelationalColumn(); - column.setQualifiedName("to-delete-relational-column-qualified-name"); - column.setDisplayName("to-delete-relational-column-display-name"); - column.setDescription("to-delete-relational-column-description"); - column.setDataType("to-delete-relational-column-data-type"); - columns.add(column); - - return columns; - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upsertDataFile(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - DataFile dataFile = dataStoreAndRelationalTableSetupService.upsertDataFile(userId, dataEngineClient, null); - - // assert Data File - List dataFiles = repositoryService - .findEntityByPropertyValue(DATAFILE_TYPE_GUID, dataFile.getQualifiedName()); - EntityDetail dataFileAsEntityDetail = assertDataFile(dataFile, dataFiles); - - // assert Tabular Schema Type - List tabularSchemas = repositoryService - .getRelatedEntities(dataFileAsEntityDetail.getGUID(), ASSET_SCHEMA_TYPE_RELATIONSHIP_GUID); - assertNotNull(tabularSchemas); - assertEquals(1, tabularSchemas.size()); - - EntityDetail tabularSchemaTypeAsEntityDetail = tabularSchemas.get(0); - assertEquals("Schema", tabularSchemaTypeAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(dataFileAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString() + "::schema", - tabularSchemaTypeAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - - // assert Tabular Column - List tabularColumns = repositoryService - .getRelatedEntities(tabularSchemaTypeAsEntityDetail.getGUID(), ATTRIBUTE_FOR_SCHEMA_RELATIONSHIP_GUID); - assertNotNull(tabularColumns); - assertEquals(1, tabularColumns.size()); - - EntityDetail tabularColumnAsEntityDetail = tabularColumns.get(0); - assertEquals(dataFile.getColumns().get(0).getDisplayName(), - tabularColumnAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(dataFile.getColumns().get(0).getDescription(), - tabularColumnAsEntityDetail.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteDataFileAndFileFolder(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - Engine engine = engineSetupService - .createExternalDataEngine(userId, dataEngineClient, null); - DataFile dataFile = dataStoreAndRelationalTableSetupService - .upsertDataFile(userId, dataEngineClient, getDataFileToDelete()); - - // assert Data File - List dataFiles = repositoryService - .findEntityByPropertyValue(DATAFILE_TYPE_GUID, dataFile.getQualifiedName()); - EntityDetail dataFileAsEntityDetail = assertDataFile(dataFile, dataFiles); - - // delete Data File - dataStoreAndRelationalTableSetupService.deleteDataFile(userId, dataEngineClient, dataFile.getQualifiedName(), - dataFileAsEntityDetail.getGUID()); - List dataFilesToDelete = repositoryService - .findEntityByPropertyValue(DATAFILE_TYPE_GUID, dataFile.getQualifiedName()); - assertNull(dataFilesToDelete); - - // delete FileFolder - String fileFolderQualifiedName = engine.getQualifiedName() + "::/to-delete-data-file-pathname"; - List fileFolders = repositoryService.findEntityByPropertyValue(FILE_FOLDER_TYPE_GUID, fileFolderQualifiedName); - assertNotNull(fileFolders); - assertEquals(1, fileFolders.size()); - EntityDetail fileFolderAsEntityDetail = fileFolders.get(0); - - dataStoreAndRelationalTableSetupService.deleteFolder(userId, dataEngineClient, fileFolderQualifiedName, - fileFolderAsEntityDetail.getGUID()); - List fileFoldersToDelete = repositoryService - .findEntityByPropertyValue(FILE_FOLDER_TYPE_GUID, fileFolderQualifiedName); - assertNull(fileFoldersToDelete); - } - - private DataFile getDataFileToDelete(){ - DataFile dataFile = new DataFile(); - dataFile.setQualifiedName("to-delete-data-file-qualified-name"); - dataFile.setDisplayName("to-delete-data-file-display-name"); - dataFile.setDescription("to-delete-data-file-description"); - dataFile.setFileType("to-delete-data-file-type"); - dataFile.setProtocol("to-delete-data-file-protocol"); - dataFile.setNetworkAddress("to-delete-data-file-network-address"); - dataFile.setPathName("/to-delete-data-file-pathname/to-delete-data-file-display-name"); - dataFile.setColumns(buildTabularColumns()); - return dataFile; - } - - private List buildTabularColumns(){ - List columns = new ArrayList<>(); - - Attribute column = new Attribute(); - column.setQualifiedName("to-delete-column-qualified-name"); - column.setDisplayName("to-delete-column-display-name"); - column.setDescription("to-delete-column-description"); - columns.add(column); - - return columns; - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteSchemaType(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - DataFile dataFile = dataStoreAndRelationalTableSetupService - .upsertDataFile(userId, dataEngineClient, getDataFileToDelete()); - - // delete Tabular Schema Type - String tabularSchemaTypeQualifiedName = dataFile.getQualifiedName() + "::schema"; - List tabularSchemaTypes = repositoryService - .findEntityByPropertyValue(TABULAR_SCHEMA_TYPE_TYPE_GUID, tabularSchemaTypeQualifiedName); - assertNotNull(tabularSchemaTypes); - assertEquals(1, tabularSchemaTypes.size()); - EntityDetail tabularSchemaTypeAsEntityDetail = tabularSchemaTypes.get(0); - - dataStoreAndRelationalTableSetupService.deleteSchemaType(userId, dataEngineClient, tabularSchemaTypeQualifiedName, - tabularSchemaTypeAsEntityDetail.getGUID()); - List tabularSchemaTypeToDelete = repositoryService - .findEntityByPropertyValue(TABULAR_SCHEMA_TYPE_TYPE_GUID, tabularSchemaTypeQualifiedName); - assertNull(tabularSchemaTypeToDelete); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/FindFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/FindFVT.java deleted file mode 100644 index 885b12f6006..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/FindFVT.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -/** - * Holds FVTs related to find - */ -public class FindFVT extends DataEngineFVT { - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void find(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, ConnectorCheckedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - DataFile dataFile = dataStoreAndRelationalTableSetupService.upsertDataFile(userId, dataEngineClient, null); - - GUIDListResponse guidListResponse = findSetupService.find(userId, dataEngineClient, dataFile.getQualifiedName(), - null, null); - assertNotNull(guidListResponse); - assertEquals(1, guidListResponse.getGUIDs().size()); - - List dataFiles = repositoryService - .findEntityByPropertyValue(DATAFILE_TYPE_GUID, dataFile.getQualifiedName()); - assertNotNull(dataFiles); - assertEquals(1, dataFiles.size()); - - EntityDetail dataFileAsEntityDetail = dataFiles.get(0); - assertEquals(guidListResponse.getGUIDs().get(0), dataFileAsEntityDetail.getGUID()); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/LineageFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/LineageFVT.java deleted file mode 100644 index 788d04341a8..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/LineageFVT.java +++ /dev/null @@ -1,228 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFile; -import org.odpi.openmetadata.accessservices.dataengine.model.DataFlow; -import org.odpi.openmetadata.accessservices.dataengine.model.Database; -import org.odpi.openmetadata.accessservices.dataengine.model.DatabaseSchema; -import org.odpi.openmetadata.accessservices.dataengine.model.Port; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.RelationalTable; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -/** - * Holds FVTs related to feature lineage - */ -public class LineageFVT extends DataEngineFVT { - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void verifyDataFlowsForAJobProcess(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, ConnectorCheckedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - List processes = lineageSetupService.createJobProcessWithContent(userId, dataEngineClient); - - for (Process process : processes) { - validate(process, repositoryService); - } - - Map> columnLineages = lineageSetupService.getJobProcessDataFlowsProxiesByCsvColumn(); - - for (String columnName : columnLineages.keySet()) { - List attributes = columnLineages.get(columnName); - String previousAttribute = null; - for (int i = 0; i < attributes.size() - 1; i++) { - String currentAttribute = attributes.get(i); - EntityDetail entityDetail = repositoryService.findEntityByQualifiedName(currentAttribute, TABULAR_COLUMN_TYPE_GUID); - validateCurrentAttribute(currentAttribute, entityDetail); - - List relationships = repositoryService.findDataFlowRelationshipsByGUID(entityDetail.getGUID()); - List dataFlowOtherProxyQualifiedName = - repositoryService.getDataFlowsProxiesQualifiedNames(relationships, currentAttribute); - List expectedDataFlows = new ArrayList<>(); - if (previousAttribute != null) { - expectedDataFlows.add(previousAttribute); - } - expectedDataFlows.add(attributes.get(i + 1)); - Collections.sort(expectedDataFlows); - Collections.sort(dataFlowOtherProxyQualifiedName); - assertEquals(expectedDataFlows, dataFlowOtherProxyQualifiedName); - previousAttribute = currentAttribute; - } - } - } - - private void validate(Process process, RepositoryService repositoryService) - throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - List processes = repositoryService.findEntityByPropertyValue(PROCESS_TYPE_GUID, process.getQualifiedName()); - assertNotNull(processes); - assertEquals(1, processes.size()); - - EntityDetail processAsEntityDetail = processes.get(0); - assertEquals(process.getQualifiedName(), processAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(process.getDisplayName(), processAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - - if (process.getPortImplementations() != null && !process.getPortImplementations().isEmpty()) { - for (PortImplementation portImplementation : process.getPortImplementations()) { - validatePortFields(portImplementation, repositoryService); - } - } - - validateProcessStructure(process, processAsEntityDetail, repositoryService); - } - - private void validateProcessStructure(Process process, EntityDetail processAsEntityDetail, RepositoryService repositoryService) - throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - boolean stageProcess = process.getPortImplementations() != null && !process.getPortImplementations().isEmpty(); - - List neighboursViaProcessPortRelationships; - Set portImplementations = new HashSet<>(); - if (stageProcess) { - // case of stage Process, neighbours are already PortImplementations - neighboursViaProcessPortRelationships = - repositoryService.getRelatedEntities(processAsEntityDetail.getGUID(), PROCESS_PORT_RELATIONSHIP_GUID); - portImplementations = new HashSet<>(neighboursViaProcessPortRelationships); - assertNotNull(portImplementations); - assertEquals(2, portImplementations.size()); - } else { - // case of main Process, neighbours are stage processes; we need to traverse one more relationship of type ProcessHierarchy - // to reach PortImplementations - List neighboursViaProcessHierarchiesRelationships = - repositoryService.getRelatedEntities(processAsEntityDetail.getGUID(), PROCESS_HIERARCHY_RELATIONSHIP_GUID); - for (EntityDetail entityDetail : neighboursViaProcessHierarchiesRelationships) { - neighboursViaProcessPortRelationships = - repositoryService.getRelatedEntities(entityDetail.getGUID(), PROCESS_PORT_RELATIONSHIP_GUID); - assertNotNull(neighboursViaProcessPortRelationships); - assertEquals(2, neighboursViaProcessPortRelationships.size()); - - portImplementations.addAll(neighboursViaProcessPortRelationships); - } - assertNotNull(portImplementations); - assertEquals(6, portImplementations.size()); - } - - - for (EntityDetail portImplementation : portImplementations) { - List tabularSchemaTypes = - repositoryService.getRelatedEntities(portImplementation.getGUID(), PORT_SCHEMA_RELATIONSHIP_GUID); - assertNotNull(tabularSchemaTypes); - assertEquals(1, tabularSchemaTypes.size()); - - List columns = - repositoryService.getRelatedEntities(tabularSchemaTypes.get(0).getGUID(), ATTRIBUTE_FOR_SCHEMA_RELATIONSHIP_GUID); - assertNotNull(columns); - assertEquals(4, columns.size()); - } - } - - private void validatePortFields(Port port, RepositoryService repositoryService) - throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, - FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, - RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - List ports = repositoryService.findEntityByPropertyValue(PORT_IMPLEMENTATION_TYPE_GUID, port.getQualifiedName()); - assertNotNull(ports); - assertEquals(1, ports.size()); - - EntityDetail portAsEntityDetail = ports.get(0); - assertEquals(port.getQualifiedName(), portAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(port.getDisplayName(), portAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(port.getPortType().getName(), portAsEntityDetail.getProperties().getPropertyValue(PORT_TYPE).valueAsString()); - - List schemas = repositoryService.getRelatedEntities(portAsEntityDetail.getGUID(), PORT_SCHEMA_RELATIONSHIP_GUID); - assertNotNull(schemas); - assertEquals(1, schemas.size()); - - EntityDetail schemaAsEntityDetail = schemas.get(0); - SchemaType schemaType = ((PortImplementation) port).getSchemaType(); - assertEquals(schemaType.getQualifiedName(), schemaAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(schemaType.getDisplayName(), schemaAsEntityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - - } - - private void validateCurrentAttribute(String currentAttribute, EntityDetail entityDetail) { - assertEquals(currentAttribute, entityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(currentAttribute + "_displayName", entityDetail.getProperties().getPropertyValue(DISPLAY_NAME).valueAsString()); - assertEquals(DATA_ENGINE, entityDetail.getMetadataCollectionName()); - assertEquals(ADMIN, entityDetail.getCreatedBy()); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void verifyHighLevelLineage(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Database database = dataStoreAndRelationalTableSetupService.upsertDatabase(userId, dataEngineClient, null); - List databases = repositoryService.findEntityByPropertyValue(DATABASE_TYPE_GUID, database.getQualifiedName()); - assertDatabase(database, databases); - - Process process = processSetupService.createOrUpdateSimpleProcess(userId, dataEngineClient, null); - DataFile dataFile = dataStoreAndRelationalTableSetupService.upsertDataFile(userId, dataEngineClient, null); - - DatabaseSchema databaseSchema = dataStoreAndRelationalTableSetupService.upsertDatabaseSchema(userId, dataEngineClient, - null, database.getQualifiedName(), false); - RelationalTable relationalTable = dataStoreAndRelationalTableSetupService.upsertRelationalTable(userId, dataEngineClient, - null, databaseSchema.getQualifiedName(), false); - - List dataFlows = new ArrayList<>(); - dataFlows.add(lineageSetupService.createDataFlow(dataFile.getQualifiedName(), process.getQualifiedName())); - dataFlows.add(lineageSetupService.createDataFlow(process.getQualifiedName(), relationalTable.getQualifiedName())); - dataEngineClient.addDataFlows(userId, dataFlows); - - List targetDataFiles = repositoryService.findEntityByPropertyValue(DATAFILE_TYPE_GUID, dataFile.getQualifiedName()); - assertDataFile(dataFile, targetDataFiles); - - List targetProcesses = repositoryService.getRelatedEntities(targetDataFiles.get(0).getGUID(), DATA_FLOW_RELATIONSHIP_GUID); - assertProcess(process, targetProcesses); - - List targetRelationalTable = - repositoryService.findEntityByPropertyValue(RELATIONAL_TABLE_TYPE_GUID, relationalTable.getQualifiedName()); - assertRelationalTable(relationalTable, targetRelationalTable); - - targetProcesses = repositoryService.getRelatedEntities(targetRelationalTable.get(0).getGUID(), DATA_FLOW_RELATIONSHIP_GUID); - assertProcess(process, targetProcesses); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/PortFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/PortFVT.java deleted file mode 100644 index 20ede87eea4..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/PortFVT.java +++ /dev/null @@ -1,101 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.PortImplementation; -import org.odpi.openmetadata.accessservices.dataengine.model.PortType; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.accessservices.dataengine.model.SchemaType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertNull; - -/** - * Holds FVTs related to PortImplementation type - */ -public class PortFVT extends DataEngineFVT{ - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upsertAndDeletePortImplementation(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - Process process = processSetupService.createOrUpdateSimpleProcess(userId, dataEngineClient, null); - PortImplementation portImplementation = portSetupService - .createOrUpdatePortImplementation(userId, dataEngineClient, getPortImplementationToUpsertAndDelete(), process.getQualifiedName()); - - // assert Port Implementation - List portImplementations = repositoryService. - findEntityByPropertyValue(PORT_IMPLEMENTATION_TYPE_GUID, portImplementation.getQualifiedName()); - assertPort(portImplementation, portImplementations); - - //update Port Implementation - String newSuffix = "-new"; - portImplementation.setDisplayName(process.getDisplayName() + newSuffix); - portImplementation.setPortType(PortType.OUTPUT_PORT); - - PortImplementation updatedPortImplementation = portSetupService - .createOrUpdatePortImplementation(userId, dataEngineClient, portImplementation, process.getQualifiedName()); - List updatedPortImplementations = repositoryService. - findEntityByPropertyValue(PORT_IMPLEMENTATION_TYPE_GUID, updatedPortImplementation.getQualifiedName()); - EntityDetail updatedPortImplementationAsEntityDetail = - assertPort(updatedPortImplementation, updatedPortImplementations); - - // delete Port Implementation - portSetupService.deletePortImplementation(userId, dataEngineClient, - updatedPortImplementationAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString(), - updatedPortImplementationAsEntityDetail.getGUID()); - List deletedPortImplementations = repositoryService. - findEntityByPropertyValue(PORT_IMPLEMENTATION_TYPE_GUID, updatedPortImplementation.getQualifiedName()); - assertNull(deletedPortImplementations); - } - - private PortImplementation getPortImplementationToUpsertAndDelete(){ - PortImplementation portImplementation = new PortImplementation(); - portImplementation.setQualifiedName("to-upsert-and-delete-port-implementation-qualified-name"); - portImplementation.setDisplayName("to-upsert-and-delete-port-implementation-display-name"); - portImplementation.setPortType(PortType.INPUT_PORT); - portImplementation.setSchemaType(getSchemaType()); - return portImplementation; - } - - private SchemaType getSchemaType() { - SchemaType schemaType = new SchemaType(); - schemaType.setQualifiedName("schema-type-qualified-name"); - schemaType.setDisplayName("schema-type-display-name"); - schemaType.setAttributeList(getAttributes()); - return schemaType; - } - - private List getAttributes() { - List attributes = new ArrayList<>(); - - Attribute attribute = new Attribute(); - attribute.setQualifiedName("attribute-qualified-name"); - attribute.setDisplayName("attribute-display-name"); - attributes.add(attribute); - - return attributes; - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/ProcessFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/ProcessFVT.java deleted file mode 100644 index f411ebba569..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/ProcessFVT.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Process; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertNull; - -/** - * Holds FVTs related to type Process - */ -public class ProcessFVT extends DataEngineFVT{ - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void verifyProcessAndUpdate(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - Process process = processSetupService.createOrUpdateSimpleProcess(userId, dataEngineClient, null); - - List processes = repositoryService.findEntityByPropertyValue(PROCESS_TYPE_GUID, process.getQualifiedName()); - assertProcess(process, processes); - - //update process - String newSuffix = "-new"; - process.setDisplayName(process.getDisplayName() + newSuffix); - process.setName(process.getName() + newSuffix); - process.setDescription(process.getDescription() + newSuffix); - - Process updatedProcess = processSetupService.createOrUpdateSimpleProcess(userId, dataEngineClient, process); - - List updatedProcesses = - repositoryService.findEntityByPropertyValue(PROCESS_TYPE_GUID, updatedProcess.getQualifiedName()); - assertProcess(updatedProcess, updatedProcesses); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteProcess(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - Process process = processSetupService.createOrUpdateSimpleProcess(userId, dataEngineClient, getProcessToDelete()); - - List processes = repositoryService.findEntityByPropertyValue(PROCESS_TYPE_GUID, process.getQualifiedName()); - EntityDetail processAsEntityDetail = assertProcess(process, processes); - - //delete Process - processSetupService.deleteProcess(userId, dataEngineClient, process.getQualifiedName(), processAsEntityDetail.getGUID()); - List processesToDelete = repositoryService.findEntityByPropertyValue(PROCESS_TYPE_GUID, process.getQualifiedName()); - assertNull(processesToDelete); - } - - private Process getProcessToDelete() { - Process process; - process = new Process(); - process.setQualifiedName("to-delete-simple-process-qualified-name"); - process.setDisplayName("to-delete-simple-process-display-name"); - process.setName("to-delete-simple-process-name"); - process.setDescription("to-delete-simple-process-description"); - process.setOwner("to-delete-simple-process-owner"); - return process; - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/SoftwareCapabilityFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/SoftwareCapabilityFVT.java deleted file mode 100644 index 208b96a22da..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/SoftwareCapabilityFVT.java +++ /dev/null @@ -1,105 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Engine; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.fail; - -/** - * Holds FVTs related to type SoftwareCapability - */ -public class SoftwareCapabilityFVT extends DataEngineFVT { - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void registerExternalTool(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, ConnectorCheckedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - Engine engine = engineSetupService - .createExternalDataEngine(userId, dataEngineClient, null); - - List entityDetails = repositoryService.findEntityByPropertyValue(SOFTWARE_SERVER_CAPABILITY_TYPE_GUID, - engine.getQualifiedName()); - if (entityDetails == null || entityDetails.isEmpty()) { - fail(); - } - - assertEquals(1, entityDetails.size()); - EntityDetail entity = entityDetails.get(0); - - assertEquals(engine.getDescription(), entity.getProperties().getPropertyValue(DESCRIPTION).valueAsString()); - assertEquals(engine.getName(), entity.getProperties().getPropertyValue(NAME).valueAsString()); - assertEquals(engine.getEngineVersion(), entity.getProperties().getPropertyValue(CAPABILITY_VERSION).valueAsString()); - assertEquals(engine.getEngineType(), entity.getProperties().getPropertyValue(CAPABILITY_TYPE).valueAsString()); - assertEquals(engine.getPatchLevel(), entity.getProperties().getPropertyValue(PATCH_LEVEL).valueAsString()); - assertEquals(engine.getQualifiedName(), entity.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString()); - assertEquals(engine.getSource(), entity.getProperties().getPropertyValue(SOURCE).valueAsString()); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteExternalTool(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException { - - Engine toDeleteEngine = engineSetupService - .createExternalDataEngine(userId, dataEngineClient, getToDeleteEngine()); - - List softwareServerCapabilities = repositoryService.findEntityByPropertyValue(SOFTWARE_SERVER_CAPABILITY_TYPE_GUID, - toDeleteEngine.getQualifiedName()); - if (softwareServerCapabilities == null || softwareServerCapabilities.isEmpty()) { - fail(); - } - - assertEquals(1, softwareServerCapabilities.size()); - EntityDetail engineAsEntityDetail = softwareServerCapabilities.get(0); - engineSetupService.deleteExternalDataEngine(userId, dataEngineClient, - engineAsEntityDetail.getProperties().getPropertyValue(QUALIFIED_NAME).valueAsString(), - engineAsEntityDetail.getGUID()); - - List deletedSoftwareServerCapabilities = repositoryService.findEntityByPropertyValue(SOFTWARE_SERVER_CAPABILITY_TYPE_GUID, - toDeleteEngine.getQualifiedName()); - // TODO: add verification for to be deleted engine once the method is implemented - // in this moment, a FunctionNotSupportedException is thrown - // on searching the so called deleted capability, we still receive it as the result - assertNotNull(deletedSoftwareServerCapabilities); - } - - private Engine getToDeleteEngine(){ - Engine engine = new Engine(); - engine.setName("To Delete Data Engine Display Name"); - engine.setQualifiedName("ToDeleteDataEngine"); - engine.setDescription("To Delete Data Engine Description"); - engine.setEngineType("ToDeleteDataEngine"); - engine.setEngineVersion("1"); - engine.setPatchLevel("2"); - engine.setSource("source"); - return engine; - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/TopicAndEventTypeFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/TopicAndEventTypeFVT.java deleted file mode 100644 index 980465885cb..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/java/org/odpi/openmetadata/accessservices/dataengine/fvt/TopicAndEventTypeFVT.java +++ /dev/null @@ -1,139 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.dataengine.fvt; - - -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import org.odpi.openmetadata.accessservices.dataengine.RepositoryService; -import org.odpi.openmetadata.accessservices.dataengine.client.DataEngineClient; -import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; -import org.odpi.openmetadata.accessservices.dataengine.model.EventType; -import org.odpi.openmetadata.accessservices.dataengine.model.Topic; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; - -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertNull; - -/** - * Holds FVTs related to types Database, RelationalTable and DataFile - */ -public class TopicAndEventTypeFVT extends DataEngineFVT { - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upsertTopicWithEventType(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException, InterruptedException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Topic topic = topicAndEventTypeSetupService.upsertTopic(userId, dataEngineClient, topicAndEventTypeSetupService.getTopicWithEventType()); - - // assert Topic - List topics = repositoryService.findEntityByPropertyValue(TOPIC_TYPE_GUID, topic.getQualifiedName()); - EntityDetail topicAsEntityDetail = assertTopic(topic, topics); - - EventType eventType = topic.getEventTypes().get(0); - // assert EventType - EntityDetail eventTypeAsEntityDetail = repositoryService.findEntityByQualifiedName(eventType.getQualifiedName(), EVENT_TYPE_TYPE_GUID); - assertEventType(eventType, eventTypeAsEntityDetail); - - // assert EventSchemaAttributes - Attribute attribute = eventType.getAttributeList().get(0); - EntityDetail attributeAsEntityDetail = repositoryService.findEntityByQualifiedName(attribute.getQualifiedName(), - EVENT_SCHEMA_ATTRIBUTE_TYPE_GUID); - assertEventSchemaAttribute(attribute, attributeAsEntityDetail); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void deleteTopic(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException, InterruptedException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Topic topic = topicAndEventTypeSetupService.upsertTopic(userId, dataEngineClient, topicAndEventTypeSetupService.getDeleteTopic()); - - // assert Topic - List topics = repositoryService.findEntityByPropertyValue(TOPIC_TYPE_GUID, topic.getQualifiedName()); - EntityDetail topicAsEntityDetail = assertTopic(topic, topics); - - // delete Topic - topicAndEventTypeSetupService.deleteTopic(userId, dataEngineClient, topic.getQualifiedName(), topicAsEntityDetail.getGUID()); - EntityDetail topicAfterDelete = repositoryService.findEntityByQualifiedName(topic.getQualifiedName(), TOPIC_TYPE_GUID); - assertNull(topicAfterDelete); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upserEventType(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException, InterruptedException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Topic topic = topicAndEventTypeSetupService.upsertTopic(userId, dataEngineClient, null); - EventType eventType = topicAndEventTypeSetupService.upsertEventType(userId, dataEngineClient, null, topic.getQualifiedName()); - - // assert EventType - EntityDetail eventTypeAsEntityDetail = repositoryService.findEntityByQualifiedName(eventType.getQualifiedName(), EVENT_TYPE_TYPE_GUID); - assertEventType(eventType, eventTypeAsEntityDetail); - - // assert EventSchemaAttributes - Attribute attribute = eventType.getAttributeList().get(0); - EntityDetail attributeAsEntityDetail = repositoryService.findEntityByQualifiedName(attribute.getQualifiedName(), - EVENT_SCHEMA_ATTRIBUTE_TYPE_GUID); - assertEventSchemaAttribute(attribute, attributeAsEntityDetail); - } - - @ParameterizedTest - @MethodSource("org.odpi.openmetadata.accessservices.dataengine.PlatformConnectionProvider#getConnectionDetails") - public void upsertAndDeleteEventType(String userId, DataEngineClient dataEngineClient, RepositoryService repositoryService) - throws UserNotAuthorizedException, ConnectorCheckedException, PropertyServerException, InvalidParameterException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, FunctionNotSupportedException, - org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, PagingErrorException, EntityNotKnownException, InterruptedException { - - engineSetupService.createExternalDataEngine(userId, dataEngineClient, null); - Topic topic = topicAndEventTypeSetupService.upsertTopic(userId, dataEngineClient, null); - EventType eventType = topicAndEventTypeSetupService.upsertEventType(userId, dataEngineClient, - topicAndEventTypeSetupService.getDeleteEventType(), topic.getQualifiedName()); - - // assert EventType - EntityDetail eventTypeAsEntityDetail = repositoryService.findEntityByQualifiedName(eventType.getQualifiedName(), EVENT_TYPE_TYPE_GUID); - assertEventType(eventType, eventTypeAsEntityDetail); - - // assert EventSchemaAttributes - Attribute attribute = eventType.getAttributeList().get(0); - EntityDetail attributeAsEntityDetail = repositoryService.findEntityByQualifiedName(attribute.getQualifiedName(), - EVENT_SCHEMA_ATTRIBUTE_TYPE_GUID); - assertEventSchemaAttribute(attribute, attributeAsEntityDetail); - - // delete EventType - topicAndEventTypeSetupService.deleteEventType(userId, dataEngineClient, eventType.getQualifiedName(), eventTypeAsEntityDetail.getGUID()); - // wait for the linked elements to be deleted - Thread.sleep(3000); - - EntityDetail eventTypeAfterDelete = repositoryService.findEntityByQualifiedName(eventType.getQualifiedName(), EVENT_TYPE_TYPE_GUID); - assertNull(eventTypeAfterDelete); - EntityDetail eventSchemaAttributeAfterDelete = repositoryService.findEntityByQualifiedName(attribute.getQualifiedName(), - EVENT_SCHEMA_ATTRIBUTE_TYPE_GUID); - assertNull(eventSchemaAttributeAfterDelete); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/resources/DataStoreConnectorTypes.json b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/resources/DataStoreConnectorTypes.json deleted file mode 100644 index e2461714e29..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/resources/DataStoreConnectorTypes.json +++ /dev/null @@ -1 +0,0 @@ -{"class":"OpenMetadataArchive","archiveProperties":{"class":"OpenMetadataArchiveProperties","archiveGUID":"acdc5637-92a7-4926-b47b-a3d407546f89","archiveName":"Data Store Open Connector Types","archiveDescription":"Standard connector categories and connector type definitions for data store connectors that follow the Open Connector Framework (OCF).","archiveType":"CONTENT_PACK","originatorName":"Egeria","originatorLicense":"Apache-2.0","creationDate":1570383395115,"dependsOnArchives":["bce3b0a0-662a-4f87-b8dc-844078a11a6e"]},"archiveInstanceStore":{"class":"OpenMetadataArchiveInstanceStore","entities":[{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"347005ba-2b35-4670-b5a7-12c9ebed0cf7","typeDefName":"Collection","typeDefVersion":1,"typeDefDescription":"A group of related items.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["name","description","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"8133361a-7ffe-4055-bcfc-19f9ae0e5520","classifications":[{"class":"Classification","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"CLASSIFICATION_DEF","typeDefGUID":"9678ef11-ed7e-404b-a041-736df7514339","typeDefName":"ConnectorTypeDirectory","typeDefVersion":1,"typeDefDescription":"Identifies a collection of related connector types.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"name":"ConnectorTypeDirectory","status":"ACTIVE"}],"properties":{"class":"InstanceProperties","instanceProperties":{"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Metadata standard connector categories and connector types."},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataConnectorTypeDirectory_acdc5637-92a7-4926-b47b-a3d407546f89"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Metadata Connector Type Directory"}},"propertyCount":3,"propertyNames":["qualifiedName","displayName","description"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","properties":{"class":"InstanceProperties","instanceProperties":{"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Metadata connector category for connectors that work with files."},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Metadata File Connector Category"}},"propertyCount":3,"propertyNames":["qualifiedName","displayName","description"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"0d378597-f9e0-4ad9-a715-51dae5fe48fe","properties":{"class":"InstanceProperties","instanceProperties":{"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Metadata connector category for connectors to Apache Kafka."},"targetTechnologyName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Apache Kafka."},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataKafkaConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Metadata Apache Kafka Connector Category Directory"},"targetTechnologySource":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Apache Software Foundation (ASF)"}},"propertyCount":5,"propertyNames":["targetTechnologyName","qualifiedName","displayName","description","targetTechnologySource"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"c5b5aa72-0728-473e-9490-74997a65b29b","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"AvroFile"},"expectedDataFormat":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"avro"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Avro File Store Connector"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Avro File Store Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.avrofile.AvroFileStoreProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Connector supports reading of Avro Files."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":2,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStore"}},"propertyCount":2,"propertyNames":["0","1"]}}},"propertyCount":9,"propertyNames":["supportedAssetTypeName","expectedDataFormat","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"2a823785-2ef7-41d1-ab75-f7641be56287","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"CSVFile"},"recognizedConfigurationProperties":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":3,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"columnNames"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"delimiterCharacter"},"2":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"quoteCharacter"}},"propertyCount":3,"propertyNames":["0","1","2"]}},"expectedDataFormat":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"csv"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"CSV File Connector"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"CSV File Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.csvfile.CSVFileStoreProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Connector supports reading of structured (CSV) files."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":2,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.csvfile.CSVFileStore"}},"propertyCount":2,"propertyNames":["0","1"]}}},"propertyCount":10,"propertyNames":["supportedAssetTypeName","recognizedConfigurationProperties","expectedDataFormat","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"e4f0281b-d077-4978-92bd-dc1b879b4f4d","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"DataFolder"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Data Folder Connector"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Data Folder Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.datafolder.DataFolderProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Connector supports reading of data files grouped under a single folder."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":2,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStore"}},"propertyCount":2,"propertyNames":["0","1"]}}},"propertyCount":8,"propertyNames":["supportedAssetTypeName","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"b96954e0-a2b8-4522-a14a-496ff577b865","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"DataFile"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store Connector"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStoreProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Connector supports reading of Files."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":2,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStore"}},"propertyCount":2,"propertyNames":["0","1"]}}},"propertyCount":8,"propertyNames":["supportedAssetTypeName","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"33dbe292-beae-499e-b794-7a7217c44c16","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"JSONFile"},"expectedDataFormat":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"json"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store ConnectorJSONFile"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStoreProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Connector supports reading of Files."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":2,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStore"}},"propertyCount":2,"propertyNames":["0","1"]}}},"propertyCount":9,"propertyNames":["supportedAssetTypeName","expectedDataFormat","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"02f173e4-3e69-45ed-b2e5-0c8df84ad586","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"MediaFile"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store ConnectorMediaFile"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStoreProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Connector supports reading of Files."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":2,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStore"}},"propertyCount":2,"propertyNames":["0","1"]}}},"propertyCount":8,"propertyNames":["supportedAssetTypeName","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"e027fc5f-6d86-436c-b93c-414336afad06","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Document"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store ConnectorDocument"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStoreProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Connector supports reading of Files."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":2,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStore"}},"propertyCount":2,"propertyNames":["0","1"]}}},"propertyCount":8,"propertyNames":["supportedAssetTypeName","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"},{"class":"EntityDetail","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"21f3e811-93c2-4a8d-89c2-fe2993229aec","properties":{"class":"InstanceProperties","instanceProperties":{"supportedAssetTypeName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"KafkaTopic"},"recognizedConfigurationProperties":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":4,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"producer"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"consumer"},"2":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"local.server.id"},"3":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"sleepTime"}},"propertyCount":4,"propertyNames":["0","1","2","3"]}},"expectedDataFormat":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"PLAINTEXT"},"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Kafka Open Metadata Topic Connector"},"displayName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Kafka Open Metadata Topic Connector"},"connectorFrameworkNameName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Open Connector Framework (OCF)"},"connectorProviderClassName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"connectorInterfaceLanguage":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Java"},"description":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Kafka Open Metadata Topic Connector supports string based events over an Apache Kafka event bus."},"connectorInterfaces":{"class":"ArrayPropertyValue","instancePropertyCategory":"ARRAY","arrayCount":3,"arrayValues":{"class":"InstanceProperties","instanceProperties":{"0":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.connectors.Connector"},"1":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopic"},"2":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent"}},"propertyCount":3,"propertyNames":["0","1","2"]}}},"propertyCount":10,"propertyNames":["supportedAssetTypeName","recognizedConfigurationProperties","expectedDataFormat","qualifiedName","displayName","connectorFrameworkNameName","connectorProviderClassName","connectorInterfaceLanguage","description","connectorInterfaces"]},"status":"ACTIVE"}],"relationships":[{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"5cabb76a-e25b-4bb5-8b93-768bbac005af","typeDefName":"CollectionMembership","typeDefVersion":1,"typeDefDescription":"Identifies a member of a collection.","validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["membershipRationale"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"9a250b8b-b2b8-4c97-966e-3ca19b803813","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"347005ba-2b35-4670-b5a7-12c9ebed0cf7","typeDefName":"Collection","typeDefVersion":1,"typeDefDescription":"A group of related items.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["name","description","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"8133361a-7ffe-4055-bcfc-19f9ae0e5520","classifications":[{"class":"Classification","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"CLASSIFICATION_DEF","typeDefGUID":"9678ef11-ed7e-404b-a041-736df7514339","typeDefName":"ConnectorTypeDirectory","typeDefVersion":1,"typeDefDescription":"Identifies a collection of related connector types.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"name":"ConnectorTypeDirectory","status":"ACTIVE"}],"uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataConnectorTypeDirectory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"5cabb76a-e25b-4bb5-8b93-768bbac005af","typeDefName":"CollectionMembership","typeDefVersion":1,"typeDefDescription":"Identifies a member of a collection.","validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["membershipRationale"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"65a0f942-6f8c-4e5d-adad-1fd3ed217cb8","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"347005ba-2b35-4670-b5a7-12c9ebed0cf7","typeDefName":"Collection","typeDefVersion":1,"typeDefDescription":"A group of related items.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["name","description","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"8133361a-7ffe-4055-bcfc-19f9ae0e5520","classifications":[{"class":"Classification","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"CLASSIFICATION_DEF","typeDefGUID":"9678ef11-ed7e-404b-a041-736df7514339","typeDefName":"ConnectorTypeDirectory","typeDefVersion":1,"typeDefDescription":"Identifies a collection of related connector types.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"name":"ConnectorTypeDirectory","status":"ACTIVE"}],"uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataConnectorTypeDirectory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"0d378597-f9e0-4ad9-a715-51dae5fe48fe","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataKafkaConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"24faa946-a92f-4ddc-8ab8-120e902931b7","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"c5b5aa72-0728-473e-9490-74997a65b29b","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Avro File Store Connector"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"6be57fdf-f67b-4744-85ac-95c96a389881","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"2a823785-2ef7-41d1-ab75-f7641be56287","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"CSV File Connector"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"0413aa90-eec3-4bd1-82cc-07e3773fb3f8","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"e4f0281b-d077-4978-92bd-dc1b879b4f4d","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Data Folder Connector"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"14453014-dcbb-4d2f-8bc4-9c176658a6f4","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"b96954e0-a2b8-4522-a14a-496ff577b865","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store Connector"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"d517615c-155d-4a38-8575-703587accc04","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"33dbe292-beae-499e-b794-7a7217c44c16","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store ConnectorJSONFile"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f6597b16-cd25-4371-a51e-b1f92b0c80a7","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"02f173e4-3e69-45ed-b2e5-0c8df84ad586","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store ConnectorMediaFile"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"ec66ede4-fbd7-492c-bd06-21833e0baa52","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"f70bcd3d-9bfd-45d8-a2d7-90d092331ddb","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataFileConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"e027fc5f-6d86-436c-b93c-414336afad06","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Basic File Store ConnectorDocument"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"},{"class":"Relationship","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"RELATIONSHIP_DEF","typeDefGUID":"633648f3-c951-4ad7-b975-9fc04e0f3d2e","typeDefName":"ConnectorImplementationChoice","typeDefVersion":1,"typeDefDescription":"Relates a connector category for a specific type of technology with the connector types that support it.","validStatusList":["ACTIVE","DELETED"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"b60d57c0-c999-4ebc-8387-e468b5fb44f8","entityOneProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"fb60761f-7afd-4d3d-9efa-24bc85a7b22e","typeDefName":"ConnectorCategory","typeDefVersion":1,"typeDefDescription":"A detailed description of the effect of some data processing.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["displayName","description","targetTechnologySource","targetTechnologyName","recognizedAdditionalProperties","recognizedSecuredProperties","recognizedConfigurationProperties","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"0d378597-f9e0-4ad9-a715-51dae5fe48fe","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"OpenMetadataKafkaConnectorCategory_acdc5637-92a7-4926-b47b-a3d407546f89"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"entityTwoProxy":{"class":"EntityProxy","headerVersion":1,"type":{"class":"InstanceType","typeDefCategory":"ENTITY_DEF","typeDefGUID":"954421eb-33a6-462d-a8ca-b5709a1bd0d4","typeDefName":"ConnectorType","typeDefVersion":2,"typeDefDescription":"A set of properties describing a type of connector.","typeDefSuperTypes":[{"headerVersion":1,"guid":"a32316b8-dc8c-48c5-b12b-71c1b2a080bf","name":"Referenceable","status":"ACTIVE_TYPEDEF"},{"headerVersion":1,"guid":"4e7761e8-3969-4627-8f40-bfe3cde85a1d","name":"OpenMetadataRoot","status":"ACTIVE_TYPEDEF"}],"validStatusList":["ACTIVE","DELETED"],"validInstanceProperties":["recognizedConfigurationProperties","targetTechnologyVersions","recognizedSecuredProperties","expectedDataFormat","displayName","connectorProviderClassName","description","connectorFrameworkName","connectorInterfaces","supportedAssetTypeName","targetTechnologyName","recognizedAdditionalProperties","connectorInterfaceLanguage","targetTechnologyInterfaces","targetTechnologySource","qualifiedName","additionalProperties"]},"instanceProvenanceType":"CONTENT_PACK","metadataCollectionId":"acdc5637-92a7-4926-b47b-a3d407546f89","createdBy":"Egeria","createTime":1570383395115,"version":1,"guid":"21f3e811-93c2-4a8d-89c2-fe2993229aec","uniqueProperties":{"class":"InstanceProperties","instanceProperties":{"qualifiedName":{"class":"PrimitivePropertyValue","instancePropertyCategory":"PRIMITIVE","typeGUID":"b34a64b9-554a-42b1-8f8a-7d5c2339f9c4","typeName":"string","primitiveDefCategory":"OM_PRIMITIVE_TYPE_STRING","primitiveValue":"Kafka Open Metadata Topic Connector"}},"propertyCount":1,"propertyNames":["qualifiedName"]},"status":"ACTIVE"},"status":"ACTIVE"}]}} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/resources/application.properties b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/resources/application.properties deleted file mode 100644 index 2ea1a70a798..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/resources/application.properties +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the ODPi Egeria project. - -server.in-memory-graph.enabled=true -server.in-memory-graph.name=serverinmem -base.url=https://localhost -server.port=10442 -user=admin -retries=50 -delay=2 diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/script/configureStartServer.groovy b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/script/configureStartServer.groovy deleted file mode 100644 index 0194ae75805..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-engine-fvt/src/test/script/configureStartServer.groovy +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/local/bin/groovy -import javax.net.ssl.HttpsURLConnection -import javax.net.ssl.SSLContext - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Contributors to the ODPi Egeria project. - -// Function to convert array to String - -// Will configure an OMAG Server Platform - which should already be running - for FVT testing - -import javax.net.ssl.TrustManager -import javax.net.ssl.X509TrustManager -import java.security.cert.CertificateException -import java.security.cert.X509Certificate - -// Retrieve configuration - with defaults to aid in local testing (using default ports) -// Maven plugin works best with properties, gradle with system properties, so use either -user=(properties["user"] ?: System.properties["user"]) ?: "admin" -baseURL=(properties["baseURL"] ?: System.properties["baseURL"]) ?: "https://localhost:9999" -serverMem=(properties["serverInMemory"] ?: System.properties["serverInMemory"]) ?: "serverinmem" -maxRetries=Integer.parseInt((properties["retries"] ?: System.properties["retries"]) ?: 50 as String) -delay=Integer.parseInt((properties["delay"] ?: System.properties["delay"]) ?: 10 as String) -File connectorTypeArchive = new File(properties["connectorTypeArchivePath"] ?: System.properties["connectorTypeArchivePath"] ?: "src/test/resources/DataStoreConnectorTypes.json") - -// SSL setup to avoid self-signed errors for testing -def trustAllCerts = [ - new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException { - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException { - } - } -] as TrustManager[] - -try -{ - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, trustAllCerts, new java.security.SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); -} -catch (Exception e) -{ - System.out.println(e); - System.exit(-1); -} - -// Wait until the platform is ready -connected=false -retries=maxRetries -while (!connected && retries>0) { - try { - System.out.println("=== Checking platform at " + baseURL + " is available (" + retries + " attempts remaining) ===") - platformCheckRequest = new URL(baseURL + "/open-metadata/platform-services/users/" + user + "/server-platform/origin").openConnection() - platformCheckResponse = platformCheckRequest.getResponseCode() - println(platformCheckResponse) - if (platformCheckResponse.equals(200)) { - connected = true - println(platformCheckRequest.getInputStream().getText()) - } else { - retries-- - Thread.sleep(1000 * delay) - } - } catch (Throwable t) { - // TODO: look at whether some exceptions should be deemed irrecoverable rather than retry - retries-- - Thread.sleep(1000 * delay) - } -} - -// -- Inmemory - -// --- Configure the platform with in memory server - any errors here and we exit -System.out.println("=== Configuring server: " + serverMem + " ===") -inMemoryRepositoryRequest = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/local-repository/mode/in-memory-repository" ).openConnection() -inMemoryRepositoryRequest.setRequestMethod("POST") -inMemoryRepositoryRequest.setRequestProperty("Content-Type", "application/json") -inMemoryRepositoryResponse = inMemoryRepositoryRequest.getResponseCode() -println(inMemoryRepositoryResponse) -if(inMemoryRepositoryResponse.equals(200)) { - println(inMemoryRepositoryRequest.getInputStream().getText()) -} - -// --- Enable Data Engine OMAS - any errors here and we exit -System.out.println("=== Enabling Data Engine OMAS: " + serverMem + " ===") -addDataEngineToInMemoryServerRequest = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/access-services/data-engine/no-topics" ).openConnection() -addDataEngineToInMemoryServerRequest.setRequestMethod("POST") -addDataEngineToInMemoryServerRequest.setRequestProperty("Content-Type", "application/json") -addDataEngineToInMemoryServerResponse = addDataEngineToInMemoryServerRequest.getResponseCode() -println(addDataEngineToInMemoryServerResponse) -if(addDataEngineToInMemoryServerResponse.equals(200)) { - println(addDataEngineToInMemoryServerRequest.getInputStream().getText()) -} - -// --- Adding connector types archive for OMAS startup - any errors here and we exit -System.out.println("=== Adding the connector types archive for: " + serverMem + " ===") -addConnectorTypeArchiveToInMemoryServerRequest = (HttpURLConnection) new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/open-metadata-archives/file" ).openConnection() -addConnectorTypeArchiveToInMemoryServerRequest.setRequestMethod("POST") -addConnectorTypeArchiveToInMemoryServerRequest.setRequestProperty("Content-Type", "application/json") -addConnectorTypeArchiveToInMemoryServerRequest.setDoOutput(true) -try( OutputStreamWriter writerToInMemoryRequest = new OutputStreamWriter( addConnectorTypeArchiveToInMemoryServerRequest.getOutputStream())) { - writerToInMemoryRequest.write(connectorTypeArchive.getAbsolutePath()) -} -println("Absolute path to ConnectorTypes archive for " + serverMem + ":" + connectorTypeArchive.getAbsolutePath()) -addConnectorTypeArchiveToInMemoryServerResponse = addConnectorTypeArchiveToInMemoryServerRequest.getResponseCode() -println(addConnectorTypeArchiveToInMemoryServerResponse) -if(addConnectorTypeArchiveToInMemoryServerResponse.equals(200)) { - println(addConnectorTypeArchiveToInMemoryServerRequest.getInputStream().getText()) -} - -// --- Launch the server - any errors here and we exit -System.out.println("=== Starting server: " + serverMem + " ===") -launchInMemoryServerRequest = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/instance" ).openConnection() -launchInMemoryServerRequest.setRequestMethod("POST") -launchInMemoryServerRequest.setRequestProperty("Content-Type", "application/json") -launchInMemoryServerResponse = launchInMemoryServerRequest.getResponseCode() -println(launchInMemoryServerResponse) -if(launchInMemoryServerResponse.equals(200)) { - println(launchInMemoryServerRequest.getInputStream().getText()) -} - -// --- We're done -System.out.println("=== Configuration complete ===") diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/README.md b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/README.md deleted file mode 100644 index ed378fc503c..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/README.md +++ /dev/null @@ -1,26 +0,0 @@ - - - -# Subject Area Access Services FVT Resources - -The resources to run Subject Area Access Services (OMAS) FVT. - -There are a number of ways of running the Subject Area OMAS FVTs - -In a development environment: -* Each file ending in FVT has a main that can be run. This runs the FVT against 2 has hard coded server names -* RunAllFVTOn2Servers. This runs all the FVT against 2 has hard coded server names. It prompts for the url and userid. -* RunAllFVT runs all the FVTs against the supplied serverName, url and userId. - -Each FVT file has a static runIt method that runs the the FVT with the supplied server name , url and userid. - -As part of a maven install the FVTs are automatically run. The maven install calls each of the runIt methods in turn and runs them against an OMAG Server. - - - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/build.gradle deleted file mode 100644 index e352b492a3f..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/build.gradle +++ /dev/null @@ -1,115 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -/* NOTE: THIS IS CURRENTlY DISABLED (Block Comments) - See #4903 */ -plugins { - // Include plug-in for starting a new process - id 'com.github.psxpaul.execfork' - id 'java' -} - -apply plugin: "com.github.psxpaul.execfork" -apply plugin: 'groovy' - -dependencies { - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - testImplementation project(':open-metadata-distribution:omag-server-platform') - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testImplementation 'org.junit.jupiter:junit-jupiter-engine' - testImplementation localGroovy() - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'org.slf4j:slf4j-api' - testImplementation("org.junit.jupiter:junit-jupiter-params") - implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') - testImplementation 'org.apache.commons:commons-lang3' - testImplementation project(':open-metadata-test:open-metadata-fvt:fvt-utilities') -} - -description = 'Subject Area OMAS FVT' - -java { - withJavadocJar() -} - -// Local properties to use -ext - { - distdir="../../../../../../open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${project.version}-distribution.tar.gz" - } - - -// Build the groovy test script -sourceSets.test.java.srcDirs = [] -sourceSets.test.groovy.srcDirs = ["src/test/java", "src/test/script"] - -// Initially we launch as an app -- though there may be a better way of running this in the existing jvm -task startPlatform(dependsOn: ['cleanData',':open-metadata-distribution:omag-server-platform:unzip','prepareDirs'], type: com.github.psxpaul.task.ExecFork) { - // Start some external service - executable = System.properties.'java.home' + '/bin/java' - workingDir = layout.buildDirectory.dir('run') - - args = [ "-Dserver.port=10448", - "-Dloader.path=${distdir}/assembly/platform/lib", - "-Dspring.config.location=../../../../../../test.application.properties", - "-jar", - "${distdir}/assembly/platform/omag-server-platform-${project.version}.jar" ] - // Setting the output directories to be the same for ALL FVTs acts as a synchronization mechanism - // - alternatively we need to ensure the server port is unique per test - standardOutput = layout.buildDirectory.file("chassis.log") - errorOutput = layout.buildDirectory.file("chassis-error.log") - stopAfter = test - waitForPort = 10448 - timeout = 180 - //waitForOutput = 'has started' -} - -// Configuration of the platform - -task configServer(dependsOn: ['startPlatform','classes'], type: JavaExec) { - mainClass = 'configureStartServer' - classpath = sourceSets.test.runtimeClasspath - //TODO: These parms aren't currently correctly passed. We rely on defaults in the script - systemProperties = [ - 'name': 'Egeria chassis', - 'baseURL': 'https://localhost:10448', - 'servermem': 'serverinmem', - 'delay': '2', - 'user': 'garygeeke' - ] -} - -task prepareDirs { - mustRunAfter clean - doLast { - mkdir layout.buildDirectory.dir('run') - } -} - -task cleanData(type: Delete) { - delete files("${buildDir}/run/data") -} - -// The actual tests (Integration only) -test { - description 'Run Integration Tests' - group = 'verification' - outputs.upToDateWhen {return false} - systemProperties = [ - 'fvt.url': 'https://localhost:10448' - ] - useJUnitPlatform() - testLogging.showStandardStreams = true - dependsOn configServer - -} - -// Resolves logging conflict with Jena -loggingCapabilities { - enforceLogback()// Configuration goes here -} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryFVT.java deleted file mode 100644 index c418778f9f5..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryFVT.java +++ /dev/null @@ -1,682 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.categories.SubjectAreaCategoryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - - -import java.io.IOException; -import java.util.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -/** - * FVT resource to call subject area category client API - */ -public class CategoryFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for category sample"; - private static final String DEFAULT_TEST_GLOSSARY_NAME2 = "Test Glossary for category sample 2"; - private static final String DEFAULT_TEST_CATEGORY_NAME = "Test category A"; - private static final String DEFAULT_TEST_CATEGORY_NAME_UPDATED = "Test category A updated"; - private static final String DEFAULT_TEST_CATEGORY_NAME2 = "Test category B"; - private static final String DEFAULT_TEST_CATEGORY_NAME3 = "Test category C"; - private static final String DEFAULT_TEST_CATEGORY_A_CHILD = "Test category A child"; - private SubjectAreaNodeClient subjectAreaCategory = null; - private SubjectAreaCategoryClient subjectAreaCategoryClient = null; - private GlossaryFVT glossaryFVT = null; - private String serverName = null; - private String userId = null; - private int existingCategoryCount = 0; - private static Logger log = LoggerFactory.getLogger(CategoryFVT.class); - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingCategories - */ - private Set createdCategoriesSet = new HashSet<>(); - - public static void main(String[] args) { - String url; - try { - url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("The FVT Encountered an Exception", e); - } - - } - - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public CategoryFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - subjectAreaCategory = new SubjectAreaCategoryClient<>(client); - subjectAreaCategoryClient = (SubjectAreaCategoryClient) subjectAreaCategory; - glossaryFVT = new GlossaryFVT(url, serverName, userId); - this.serverName = serverName; - this.userId = userId; - existingCategoryCount = findCategories("", false, false).size(); - if (log.isDebugEnabled()) { - log.debug("existingCategoryCount " + existingCategoryCount); - } - } - - public static void runIt(String url, String serverName, String userId) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try { - System.out.println("CategoryFVT runIt started"); - CategoryFVT fvt = new CategoryFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("CategoryFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - public static int getCategoryCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - CategoryFVT fvt = new CategoryFVT(url, serverName, userId); - return fvt.findCategories("", false, false).size(); - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create a category1"); - } - Category category1 = createCategoryWithGlossaryGuid(serverName + " " + DEFAULT_TEST_CATEGORY_NAME, glossary.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Create a category2"); - } - Category category2 = createCategoryWithGlossaryGuid(serverName + " " + DEFAULT_TEST_CATEGORY_NAME2, glossary.getSystemAttributes().getGUID()); - - FVTUtils.validateNode(category1); - FVTUtils.validateNode(category2); - - FindRequest findRequest = new FindRequest(); - List results = glossaryFVT.getCategories(glossaryGuid, findRequest, true); - if (results.size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 back on getGlossaryCategories onlyTop true" + results.size()); - } - results = glossaryFVT.getCategories(glossaryGuid, findRequest, false); - if (results.size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 back on getGlossaryCategories " + results.size()); - } - findRequest.setPageSize(1); - results = glossaryFVT.getCategories(glossaryGuid, findRequest, false); - if (results.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on getGlossaryCategories with page size 1, got " + results.size()); - } - Category categoryChild = createCategoryWithParentGlossary(DEFAULT_TEST_CATEGORY_A_CHILD, category1, glossaryGuid); - FVTUtils.validateNode(categoryChild); - findRequest.setPageSize(null); - results = glossaryFVT.getCategories(glossaryGuid, findRequest, true); - if (results.size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 top categories back on getGlossaryCategories " + results.size()); - } - results = glossaryFVT.getCategories(glossaryGuid, findRequest, false); - if (results.size() != 3) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected all 3 categories getGlossaryCategories " + results.size()); - } - String category1Guid = category1.getSystemAttributes().getGUID(); - List children = getCategoryChildren(category1Guid); - if (children.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 Category as the child " + children.size()); - } - deleteCategory(categoryChild.getSystemAttributes().getGUID()); - children = getCategoryChildren(category1Guid); - if (children.size() != 0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 Categories as the child has been deleted " + children.size()); - } - - Category categoryForUpdate = new Category(); - categoryForUpdate.setName(serverName + " " + DEFAULT_TEST_CATEGORY_NAME_UPDATED); - if (log.isDebugEnabled()) { - log.debug("Get the category1"); - } - String guid = category1Guid; - Category gotCategory = getCategoryByGUID(guid); - FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Update the category1"); - } - Category updatedCategory = updateCategory(guid, categoryForUpdate); - FVTUtils.validateNode(updatedCategory); - if (log.isDebugEnabled()) { - log.debug("Get the category1 again"); - } - gotCategory = getCategoryByGUID(guid); - FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Delete the category1"); - } - deleteCategory(guid); - //FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Restore the category1"); - } - gotCategory = restoreCategory(guid); - FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Delete the category1"); - } - deleteCategory(guid); - //FVTUtils.validateNode(gotCategory); - // create category DEFAULT_TEST_CATEGORY_NAME3 with parent - if (log.isDebugEnabled()) { - log.debug("Create a category with a parent category"); - } - Category category3 = createCategoryWithParentGlossaryGuid(serverName + " " + DEFAULT_TEST_CATEGORY_NAME3, category2.getSystemAttributes().getGUID(), glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(category3); - - if (log.isDebugEnabled()) { - log.debug("create categories to find"); - } - results = findCategories("zzz"); - if (results.size() != 0) { - for (Category result : results) { - log.error("pre result name " + result.getName()); - log.error("pre result guid " + result.getSystemAttributes().getGUID()); - if ( result.getParentCategory() != null) { - log.error("pre result parent cat name " + result.getParentCategory().getName()); - } - } - } - - - Category categoryForFind1 = getCategoryForInput("abc", glossaryGuid); - categoryForFind1.setQualifiedName("iii"); - categoryForFind1 = issueCreateCategory(categoryForFind1); - FVTUtils.validateNode(categoryForFind1); - Category categoryForFind2 = createCategory("iii", glossaryGuid); - FVTUtils.validateNode(categoryForFind2); -// Category categoryForFind3 = createCategory("jjj", glossaryGuid); - Category categoryForFind3ForInput = getCategoryForInput("jjj", glossaryGuid); - categoryForFind3ForInput.setDescription("This is a description for jjj"); - Category categoryForFind3 = issueCreateCategory(categoryForFind3ForInput); - FVTUtils.validateNode(categoryForFind3); - Category categoryForFind4 = createCategory("This is a Category with spaces in name", glossaryGuid); - FVTUtils.validateNode(categoryForFind4); - - results = findCategories("jjj"); - if (results.size() != 1) { - log.error("categoryForFind3 name " + categoryForFind3.getName()); - for (Category result: results) { - log.error("result name " + result.getName()); - log.error("result desc " + result.getDescription()); - log.error("result guid " + result.getSystemAttributes().getGUID()); - } - - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find for jjj got " + results.size()); - } - results = findCategories("iii"); - if (results.size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 back on the find got " + results.size()); - } - results = findCategories(null); - if (results.size() != 6 +existingCategoryCount) { - throw new SubjectAreaFVTCheckedException("ERROR1: Expected 6 back on the find got " + results.size()); - } - - results = subjectAreaCategory.findAll(userId); - if (results.size() != 6 + existingCategoryCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 6 back on the find got " + results.size()); - } - //soft delete a category and check it is not found - deleteCategory(categoryForFind2.getSystemAttributes().getGUID()); - //FVTUtils.validateNode(deleted4); - results = findCategories("iii"); - if (results.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find for yyy got " + results.size()); - } - - // search for a category with a name with spaces in - results = findCategories("This is a Category with spaces in name"); - if (results.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find for Category with spaces in name got " + results.size()); - } - // make sure there is a category with the name - createCategory(DEFAULT_TEST_CATEGORY_NAME, glossaryGuid); - Category categoryForUniqueQFN2= createCategory(DEFAULT_TEST_CATEGORY_NAME, glossaryGuid); - if (categoryForUniqueQFN2 == null || categoryForUniqueQFN2.getQualifiedName().length() == 0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected qualified name to be set"); - } - deleteCategory(categoryForFind1.getSystemAttributes().getGUID()); - deleteCategory(categoryForFind3.getSystemAttributes().getGUID()); - deleteCategory(categoryForFind4.getSystemAttributes().getGUID()); - deleteCategory(categoryForUniqueQFN2.getSystemAttributes().getGUID()); - - testHierarchyWithSearchCriteria(); - - testUpdateCategoryParent(); - - } - - private void testHierarchyWithSearchCriteria() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME2); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create a ttt"); - } - Category parentCategory = createCategoryWithGlossaryGuid("ttt", glossary.getSystemAttributes().getGUID()); - String parentGuid = parentCategory.getSystemAttributes().getGUID(); - - Set childGuids = new HashSet(); - // create 6 children - for (int i=0;i<3;i++) { - Category cat1 = createCategoryWithParentGlossaryGuid("mm" + i, parentGuid, glossaryGuid); - childGuids.add(cat1.getSystemAttributes().getGUID()); - Category cat2 =createCategoryWithParentGlossaryGuid("nn" + i, parentGuid, glossaryGuid); - childGuids.add(cat2.getSystemAttributes().getGUID()); - // create a grandchild of cat1 with the same name - Category grandchild =createCategoryWithParentGlossaryGuid("mm" + i, cat1.getSystemAttributes().getGUID(), glossaryGuid); - childGuids.add(grandchild.getSystemAttributes().getGUID()); - } - - if (getCategoryChildren(parentGuid).size() != 6) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 6 child categories"); - } - FindRequest findRequest =new FindRequest(); - findRequest.setSearchCriteria("mm1"); - int count = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest).size(); - if (count !=1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 child category, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 glossary categories for mm3 including grandchild, got " + count); - } - findRequest =new FindRequest(); - // we expect 1 back as there is only one top level category ttt - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 glossary categories, got " + count); - } - findRequest.setSearchCriteria("tt"); - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=1) { - // should find ttt - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 glossary categories for tt* not including grandchildren, got " + count); - } - findRequest =new FindRequest(); - findRequest.setSearchCriteria("mm1"); - // we expect 0 back as there is only one top level category ttt - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 glossary categories for mm3 not including grandchild, got " + count); - } - - findRequest.setSearchCriteria("mm"); - count = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest).size(); - if (count !=3) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 3 child category, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=6) { - // 1 ttt and its mm0 mm1 mm2 children and then the first category has another 3 mm0 mm1 mm2 children - throw new SubjectAreaFVTCheckedException("ERROR: Expected 6 glossary categories for mm including grandchildren, got " + count); - } - - // create more categories - for (int i=3;i<10;i++) { - Category cat1 = createCategoryWithParentGlossaryGuid("mm" + i, parentGuid, glossaryGuid); - childGuids.add(cat1.getSystemAttributes().getGUID()); - Category cat2 =createCategoryWithParentGlossaryGuid("nn" + i, parentGuid, glossaryGuid); - childGuids.add(cat2.getSystemAttributes().getGUID()); - // create a grandchild of cat1 with the same name - Category grandchild =createCategoryWithParentGlossaryGuid("mm" + i, cat1.getSystemAttributes().getGUID(), glossaryGuid); - childGuids.add(grandchild.getSystemAttributes().getGUID()); - } - // issue with page size 5 - findRequest.setPageSize(5); - List categories = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest, false, true); - count = categories.size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 child categories with mm, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 glossary categories for mm* including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - // expect to find no mm - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 glossary categories for mm* not including grandchildren, got " + count); - } - // test page size 5, startingFrom 5 - findRequest.setStartingFrom(5); - - categories = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest); - count = categories.size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 child categories with mm (findRequest.setStartingFrom(5)),got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 glossary categories for mm* (findRequest.setStartingFrom(5) including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 glossary categories as startingFrom is higher than the number of elements " + count); - } - - findRequest.setStartingFrom(0); - findRequest.setSearchCriteria("nn"); - findRequest.setPageSize(20); - count = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest,false, true).size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 child categories for nn and got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 glossary categories for nn* including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - // only mmm at the top and we are looking for nn* - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 glossary categories for nn* not including grandchildren, got " + count); - } - // issue with page size 5, startingFrom 5 check the categorychildren - findRequest.setPageSize(5); - count = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest, false, true).size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 child categories for nn, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 glossary categories for nn including grandchildren, got " + count); - } - // issue with page size 5, startingFrom 5 check the categorychildren - findRequest.setStartingFrom(5); - count = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest).size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 child categories for nn, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 glossary categories for nn* including grandchildren, got " + count); - } - - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 glossary categories for nn* not including grandchildren, got " + count); - } - - findRequest.setStartingFrom(0); - findRequest.setPageSize(10); - count = subjectAreaCategoryClient.getCategoryChildren(userId, parentGuid, findRequest).size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 child categories for nn*, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 glossary categories for nn* including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 glossary categories for nn* not including grandchildren, got " + count); - } - //cleanup - for (String childGuid: childGuids) { - deleteCategory(childGuid); - } - deleteCategory(parentGuid); - glossaryFVT.deleteGlossary(glossaryGuid); - } - - private void testUpdateCategoryParent() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME2); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - Category parentCategory = createCategoryWithGlossaryGuid("Parent1", glossary.getSystemAttributes().getGUID()); - Category parentCategory2 = createCategoryWithGlossaryGuid("Parent2", glossary.getSystemAttributes().getGUID()); - String parentGuid = parentCategory.getSystemAttributes().getGUID(); - String parent2Guid = parentCategory2.getSystemAttributes().getGUID(); - - Category child = createCategory("child" , glossaryGuid); - CategorySummary parentCategorySummary1 = new CategorySummary(); - parentCategorySummary1.setGuid(parentGuid); - child.setParentCategory(parentCategorySummary1); - Category cat2Updated = updateCategory(child.getSystemAttributes().getGUID(), child); - if (cat2Updated.getParentCategory() == null) { - throw new SubjectAreaFVTCheckedException("Category parent should have been set"); - } else { - if (!cat2Updated.getSystemAttributes().getGUID().equals(child.getSystemAttributes().getGUID())) { - throw new SubjectAreaFVTCheckedException("Category parent guid not set correctly"); - } - } - CategorySummary parentCategorySummary2 = new CategorySummary(); - parentCategorySummary2.setGuid(parentGuid); - child.setParentCategory(parentCategorySummary2); - Category childUpdated2 = updateCategory(child.getSystemAttributes().getGUID(), child); - if (childUpdated2.getParentCategory() == null) { - throw new SubjectAreaFVTCheckedException("Category parent should have been set"); - } else { - if (!childUpdated2.getSystemAttributes().getGUID().equals(child.getSystemAttributes().getGUID())) { - throw new SubjectAreaFVTCheckedException("Category parent guid not set correctly"); - } - } - - child.setParentCategory(null); - Category childUpdated3 = updateCategory(child.getSystemAttributes().getGUID(), child); - if (childUpdated3.getParentCategory() == null) { - throw new SubjectAreaFVTCheckedException("Category parent still be there for isReplace false"); - } - - CategorySummary parentCategorySummary3 = new CategorySummary(); - parentCategorySummary3.setGuid(parent2Guid); - child.setParentCategory(parentCategorySummary3); - Category childUpdated4 = updateCategory(child.getSystemAttributes().getGUID(), child); - if (childUpdated4.getParentCategory() == null) { - throw new SubjectAreaFVTCheckedException("Category parent still be there for isReplace false"); - } else { - if (!childUpdated4.getParentCategory().getGuid().equals(parent2Guid) ) { - throw new SubjectAreaFVTCheckedException("Expect category parent to be updated to the requested value"); - } - } - - child.setParentCategory(null); - Category childUpdated5 = subjectAreaCategory.update(this.userId, child.getSystemAttributes().getGUID(), child, true); - if (childUpdated5.getParentCategory() != null) { - throw new SubjectAreaFVTCheckedException("Category parent should have been removed for isReplace true"); - } - //cleanup - deleteCategory(child.getSystemAttributes().getGUID()); - deleteCategory(parentGuid); - deleteCategory(parent2Guid); - glossaryFVT.deleteGlossary(glossaryGuid); - - } - - - private Category createCategoryWithParentGlossaryGuid(String subjectAreaName, String parentGuid, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Category category = new Category(); - category.setName(subjectAreaName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - CategorySummary parentCategory = new CategorySummary(); - parentCategory.setGuid(parentGuid); - category.setParentCategory(parentCategory); - Category newCategory =issueCreateCategory(category); - FVTUtils.validateNode(newCategory); - - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with glossaryGuid " + newCategory.getSystemAttributes().getGUID()); - } - return newCategory; - } - - public Category createCategoryWithGlossaryGuid(String categoryName, String glossaryGuid) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = new Category(); - category.setName(categoryName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - Category newCategory = issueCreateCategory(category); - FVTUtils.validateNode(newCategory); - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with userId " + newCategory.getSystemAttributes().getGUID()); - } - return newCategory; - } - /** - * Create a category associated under a parent category and associate with the named glossary - * - * @param categoryName name of the category to create - * @param parent category under which to create this category - * @param glossaryGuid userId of the associated glossary - * @return created category - */ - Category createCategoryWithParentGlossary(String categoryName, Category parent, String glossaryGuid) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = new Category(); - category.setName(categoryName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - CategorySummary parentCategorySummary = new CategorySummary(); - parentCategorySummary.setGuid(parent.getSystemAttributes().getGUID()); - category.setParentCategory(parentCategorySummary); - Category newCategory = issueCreateCategory(category); - FVTUtils.validateNode(newCategory); - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with guid " + newCategory.getSystemAttributes().getGUID()); - } - - return newCategory; - } - - public Category createCategory(String categoryName, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = getCategoryForInput(categoryName, glossaryGuid); - return issueCreateCategory(category); - } - - private Category issueCreateCategory(Category category) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException { - Category newCategory = subjectAreaCategory.create(this.userId, category); - if (newCategory != null) { - createdCategoriesSet.add(newCategory.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with userId " + newCategory.getSystemAttributes().getGUID()); - } - } - return newCategory; - } - - private Category getCategoryForInput(String categoryName, String glossaryGuid) { - Category category = new Category(); - category.setName(categoryName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - return category; - } - - - public Category getCategoryByGUID(String guid) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = subjectAreaCategory.getByGUID(this.userId, guid); - FVTUtils.validateNode(category); - if (log.isDebugEnabled()) { - log.debug("Got Category " + category.getName() + " with userId " + category.getSystemAttributes().getGUID() + " and status " + category.getSystemAttributes().getStatus()); - } - return category; - } - - public List findCategories(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - return subjectAreaCategory.find(this.userId, findRequest,false,true); - } - public List findCategories(String criteria, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - return subjectAreaCategory.find(this.userId, findRequest, exactValue, ignoreCase); - } - - public Category updateCategory(String guid, Category category) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category updatedCategory = subjectAreaCategory.update(this.userId, guid, category); - FVTUtils.validateNode(updatedCategory); - if (log.isDebugEnabled()) { - log.debug("Updated Category name to " + updatedCategory.getName()); - } - return updatedCategory; - } - - public void deleteCategory(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - subjectAreaCategory.delete(this.userId, guid); - createdCategoriesSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Deleted Category succeeded"); - } - } - public Category restoreCategory(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Category restoredCategory = subjectAreaCategory.restore(this.userId, guid); - FVTUtils.validateNode(restoredCategory); - createdCategoriesSet.add(guid); - if (log.isDebugEnabled()) { - log.debug("restored Category name is " + restoredCategory.getName()); - } - return restoredCategory; - } - - public List getCategoryRelationships(Category category) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaCategory.getAllRelationships(this.userId, category.getSystemAttributes().getGUID()); - } - private void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - deleteRemainingCategories(); - glossaryFVT.deleteRemainingGlossaries(); - } - void deleteRemainingCategories() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Iterator iter = createdCategoriesSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteCategory(guid); - } - List categories = findCategories(""); - if (categories.size() != existingCategoryCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + existingCategoryCount +" Categories to be found, got " + categories.size()); - } - } - public List getCategoryChildren(String categoryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - return subjectAreaCategoryClient.getCategoryChildren(userId, categoryGuid, new FindRequest(), false, true); - } - - public List getTerms(String categoryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException - { - return subjectAreaCategoryClient.getTerms(userId, categoryGuid, new FindRequest()); - } - public List getTerms(String categoryGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException - { - return subjectAreaCategoryClient.getTerms(userId, categoryGuid, findRequest); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryHierarchyFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryHierarchyFVT.java deleted file mode 100644 index 5361077654f..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryHierarchyFVT.java +++ /dev/null @@ -1,161 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.SubjectAreaCheckedException; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - - -import java.io.IOException; -import java.util.HashSet; -import java.util.Set; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * FVT to call subject area category client API to create a category hierarchy, - * based on given DEPTH and WIDTH values. - */ -public class CategoryHierarchyFVT -{ - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for category hierarchy FVT"; - private static final String DEFAULT_TEST_CATEGORY_NAME_BASE = "Test hierarchy category "; - - private static final int WIDTH = 3; - private static final int DEPTH = 4; - private static int depth_counter = 0; - - private GlossaryFVT glossaryFVT =null; - private CategoryFVT categoryFVT = null; - private static Logger log = LoggerFactory.getLogger(CategoryHierarchyFVT.class); - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public static void runWith2Servers(String url) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public CategoryHierarchyFVT(String url,String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - categoryFVT = new CategoryFVT(url,serverName,userId); - glossaryFVT = new GlossaryFVT(url,serverName,userId); - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - try { - System.out.println("CategoryHierarchyFVT runIt started"); - CategoryHierarchyFVT fvt = new CategoryHierarchyFVT(url,serverName,userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("CategoryHierarchyFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create category hierarchy"); - } - Set categories = createTopCategories(glossaryGuid); - while (depth_counter < DEPTH) - { - depth_counter++; - Set childrenCategories = new HashSet<>(); - for (Category category : categories) - { - FVTUtils.validateNode(category); - childrenCategories = createChildrenCategories(category,glossaryGuid); - } - categories = childrenCategories; - } - } - - /** - * Create top categories i.e. categories with no parent category - * @param glossaryGuid glossary userId - * @return a set of created categories - * @throws SubjectAreaFVTCheckedException an error occurred. - */ - private Set createTopCategories(String glossaryGuid) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Set categories = new HashSet<>(); - for (int width_counter = 0; width_counter < WIDTH; width_counter++) - { - String categoryName = createName(0, width_counter); - Category category =categoryFVT.createCategoryWithGlossaryGuid(categoryName,glossaryGuid); - FVTUtils.validateNode(category); - if (log.isDebugEnabled()) { - log.debug("Created category with name " + categoryName + " with no parent"); - } - categories.add(category); - } - return categories; - } - - /** - * Derive a category name based on a base string a DEPTH and a WIDTH - * - * @param depth DEPTH of hierarchy - * @param width WIDTH of hierarchy - * @return category name - */ - private static String createName(int depth, int width) - { - return DEFAULT_TEST_CATEGORY_NAME_BASE + "d" + depth + "w" + width; - } - - /** - * Create children categories i.e. categories under the supplied parent category - * - * @param parent parent category - * @param glossaryGuid userId of the associated glossary - * @return a set of created categories - * @throws SubjectAreaCheckedException, SubjectAreaFVTCheckedException an error occurred. - */ - private Set createChildrenCategories(Category parent,String glossaryGuid) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - Set categories = new HashSet<>(); - for (int width_counter = 0; width_counter < WIDTH; width_counter++) - { - String categoryName = createName(depth_counter, width_counter); - Category category = categoryFVT.createCategoryWithParentGlossary(categoryName, parent, glossaryGuid); - FVTUtils.validateNode(category); - if (log.isDebugEnabled()) { - log.debug("Created category with name " + categoryName + " with parent " + parent.getName()); - } - categories.add(category); - } - return categories; - } - - void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - categoryFVT.deleteRemainingCategories(); - glossaryFVT.deleteRemainingGlossaries(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CheckSerializationFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CheckSerializationFVT.java deleted file mode 100644 index 1942f6b7788..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CheckSerializationFVT.java +++ /dev/null @@ -1,212 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.glossaries.SubjectAreaGlossaryClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.terms.SubjectAreaTermClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationship; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationshipClients; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - - -import java.io.IOException; -import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class CheckSerializationFVT { - private final String userId; - private final SubjectAreaRelationshipClients subjectAreaRelationship; - private final SubjectAreaNodeClient subjectAreaTerm; - private final SubjectAreaNodeClient subjectAreaGlossary; - private static Logger log = LoggerFactory.getLogger(CheckSerializationFVT.class); - - public CheckSerializationFVT(String url, String serverName, String userId) throws InvalidParameterException { - this.userId = userId; - - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - this.subjectAreaTerm = new SubjectAreaTermClient<>(client); - this.subjectAreaGlossary = new SubjectAreaGlossaryClient<>(client); - this.subjectAreaRelationship = new SubjectAreaRelationship(client); - } - - public static void main(String[] args) { - try { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage()); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("CheckSerializationFVT runIt started"); - CheckSerializationFVT fvt = new CheckSerializationFVT(url, serverName, userId); - fvt.run(); - System.out.println("CheckSerializationFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - private void run() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Glossary glossary = new Glossary(); - glossary.setName("Test"); - Glossary gotGlossary = subjectAreaGlossary.create(userId, glossary); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(gotGlossary.getSystemAttributes().getGUID()); - - Term termOne = new Term(); - termOne.setName("Test_term_a"); - termOne.setGlossary(glossarySummary); - Term termTwo = new Term(); - termTwo.setName("Test_term_b"); - termTwo.setGlossary(glossarySummary); - - Term gotTermOne = subjectAreaTerm.create(userId, termOne); - Term gotTermTwo = subjectAreaTerm.create(userId, termTwo); - String oneTermGuid = gotTermOne.getSystemAttributes().getGUID(); - String twoTermGuid = gotTermTwo.getSystemAttributes().getGUID(); - checkChildrenSerialization(oneTermGuid, twoTermGuid); - - subjectAreaTerm.delete(userId, oneTermGuid); - subjectAreaTerm.delete(userId, twoTermGuid); - subjectAreaGlossary.delete(userId, gotGlossary.getSystemAttributes().getGUID()); - } - - public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - List termAnchors = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - checkCastChild(termAnchors.get(0), TermAnchor.class); - if (log.isDebugEnabled()) { - log.debug("TermAnchor is ok."); - } - - createHasA(oneTermGuid, twoTermGuid); - List hasAList = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - hasAList.removeIf(line -> line instanceof TermAnchor); - HasA hasA = checkCastChild(hasAList.get(0), HasA.class); - subjectAreaRelationship.hasA().delete(userId, hasA.getGuid()); - if (log.isDebugEnabled()) { - log.debug("HasA is ok."); - } - - createIsA(oneTermGuid, twoTermGuid); - List isAList = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - isAList.removeIf(line -> line instanceof TermAnchor); - IsA isA = checkCastChild(isAList.get(0), IsA.class); - subjectAreaRelationship.isA().delete(userId, isA.getGuid()); - if (log.isDebugEnabled()) { - log.debug("IsA is ok."); - } - - createRelatedTerm(oneTermGuid,twoTermGuid); - List relatedTerms = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - relatedTerms.removeIf(line -> line instanceof TermAnchor); - RelatedTerm relatedTerm = checkCastChild(relatedTerms.get(0), RelatedTerm.class); - subjectAreaRelationship.relatedTerm().delete(userId, relatedTerm.getGuid()); - if (log.isDebugEnabled()) { - log.debug("RelatedTerm is ok."); - } - - createTranslation(oneTermGuid, twoTermGuid); - List translations = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - translations.removeIf(line -> line instanceof TermAnchor); - Translation translation = checkCastChild(translations.get(0), Translation.class); - subjectAreaRelationship.translation().delete(userId, translation.getGuid()); - if (log.isDebugEnabled()) { - log.debug("Translation is ok."); - } - - createPreferredTerm(oneTermGuid, twoTermGuid); - List preferredTerms = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - preferredTerms.removeIf(line -> line instanceof TermAnchor); - PreferredTerm preferredTerm = checkCastChild(preferredTerms.get(0), PreferredTerm.class); - subjectAreaRelationship.preferredTerm().delete(userId, preferredTerm.getGuid()); - if (log.isDebugEnabled()) { - log.debug("PreferredTerm is ok."); - } - - createSynonym(oneTermGuid, twoTermGuid); - List synonyms = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - synonyms.removeIf(line -> line instanceof TermAnchor); - Synonym synonym = checkCastChild(synonyms.get(0), Synonym.class); - subjectAreaRelationship.synonym().delete(userId, synonym.getGuid()); - if (log.isDebugEnabled()) { - log.debug("Synonym is ok."); - } - } - - private ForCast checkCastChild(L line, Class lClass) throws SubjectAreaFVTCheckedException { - try { - return (ForCast) line; - } catch (ClassCastException e) { - throw new SubjectAreaFVTCheckedException("The class " + lClass.getSimpleName() - + "was deserialized incorrectly, so it cannot be cast"); - } - } - - private void createHasA(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - HasA hasA = new HasA(); - hasA.getEnd1().setNodeGuid(oneTermGuid); - hasA.getEnd2().setNodeGuid(twoTermGuid); - subjectAreaRelationship.hasA().create(userId, hasA); - } - - private void createIsA(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - IsA isA = new IsA(); - isA.getEnd1().setNodeGuid(oneTermGuid); - isA.getEnd2().setNodeGuid(twoTermGuid); - subjectAreaRelationship.isA().create(userId, isA); - } - - private void createRelatedTerm(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - RelatedTerm relatedTerm = new RelatedTerm(); - relatedTerm.getEnd1().setNodeGuid(oneTermGuid); - relatedTerm.getEnd2().setNodeGuid(twoTermGuid); - subjectAreaRelationship.relatedTerm().create(userId, relatedTerm); - } - - private void createTranslation(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Translation translation = new Translation(); - translation.getEnd1().setNodeGuid(oneTermGuid); - translation.getEnd2().setNodeGuid(twoTermGuid); - subjectAreaRelationship.translation().create(userId, translation); - } - - private void createPreferredTerm(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - PreferredTerm preferredTerm = new PreferredTerm(); - preferredTerm.getEnd1().setNodeGuid(oneTermGuid); - preferredTerm.getEnd2().setNodeGuid(twoTermGuid); - subjectAreaRelationship.preferredTerm().create(userId, preferredTerm); - } - - private void createSynonym(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Synonym synonym = new Synonym(); - synonym.getEnd1().setNodeGuid(oneTermGuid); - synonym.getEnd2().setNodeGuid(twoTermGuid); - subjectAreaRelationship.synonym().create(userId, synonym); - } -} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ConfigFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ConfigFVT.java deleted file mode 100644 index 29d879fad6b..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ConfigFVT.java +++ /dev/null @@ -1,80 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.glossaries.SubjectAreaGlossaryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - - -import java.io.IOException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * FVT resource to call subject area client APIs to test the config API - */ -public class ConfigFVT -{ - private String serverName = null; - private String userId = null; - private String url = null; - private static Logger log = LoggerFactory.getLogger(ConfigFVT.class); - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public ConfigFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Config FVT"); - } - this.url =url; - this.userId = userId; - this.serverName = serverName; - } - - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - synchronized public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try { - System.out.println("ConfigFVT runIt started"); - ConfigFVT fvt =new ConfigFVT(url, serverName, userId); - fvt.run(); - System.out.println("ConfigFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - SubjectAreaConfigClient configClient = new SubjectAreaConfigClient(client); - Config config = configClient.getConfig(userId); - if (config.getMaxPageSize() != 1000) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + 1000 + " as the max page size got " + config.getMaxPageSize()); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/EffectiveDatesFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/EffectiveDatesFVT.java deleted file mode 100644 index 5ef8794b7e8..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/EffectiveDatesFVT.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.io.IOException; -import java.util.Date; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * FVT resource to call subject area client APIs to test the effectivity dates - */ -public class EffectiveDatesFVT -{ - - private static final String DEFAULT_TEST_PAST_GLOSSARY_NAME = "Test past Glossary for term FVT"; - private static final String DEFAULT_TEST_FUTURE_GLOSSARY_NAME = "Test future Glossary for term FVT"; - private static final String DEFAULT_TEST_TERM_NAME = "Test term A"; - private GlossaryFVT glossaryFVT =null; - private TermFVT termFVT=null; - private static Logger log = LoggerFactory.getLogger(EffectiveDatesFVT.class); - - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public EffectiveDatesFVT(String url, String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - glossaryFVT = new GlossaryFVT(url,serverName,userId); - termFVT= new TermFVT(url,serverName,userId); - } - public void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - termFVT.deleteRemainingTerms(); - glossaryFVT.deleteRemainingGlossaries(); - } - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - synchronized public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("EffectiveDatesFVT runIt started"); - EffectiveDatesFVT fvt = new EffectiveDatesFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("EffectiveDatesFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - long now = new Date().getTime(); - try - { - glossaryFVT.createPastToGlossary(now, DEFAULT_TEST_PAST_GLOSSARY_NAME); - } catch (InvalidParameterException e) { - log.error("Expected creation of a Glossary with to in the past failed"); - } - try - { - glossaryFVT.createPastFromGlossary(now, DEFAULT_TEST_PAST_GLOSSARY_NAME); - } catch (InvalidParameterException e) { - log.error("Expected creation of a Glossary with from in the past failed"); - } - try - { - glossaryFVT.createInvalidEffectiveDateGlossary(DEFAULT_TEST_PAST_GLOSSARY_NAME); - } catch (InvalidParameterException e) { - log.error("Expected creation of a Glossary with invalid Effectivity dates failed"); - } - Glossary futureGloss = glossaryFVT.createFutureGlossary(now, DEFAULT_TEST_FUTURE_GLOSSARY_NAME); - FVTUtils.validateNode(futureGloss); - Term term5 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME, futureGloss.getSystemAttributes().getGUID()); - FVTUtils.validateNode(term5); - checkTermGlossaryEffectivity(futureGloss, term5); - - Term gotTerm5 = termFVT.getTermByGUID(term5.getSystemAttributes().getGUID()); - FVTUtils.validateNode(gotTerm5); - checkTermGlossaryEffectivity(futureGloss, gotTerm5); - - // update the term so that its effective dates not longer are compatible with the glossary - Term futureTerm = termFVT.updateTermToFuture(now, gotTerm5.getSystemAttributes().getGUID(), term5); - FVTUtils.validateNode(futureTerm); - checkTermGlossaryEffectivity(futureGloss, futureTerm); - futureTerm = termFVT.getTermByGUID(term5.getSystemAttributes().getGUID()); - FVTUtils.validateNode(futureTerm); - checkTermGlossaryEffectivity(futureGloss, futureTerm); - } - private void checkTermGlossaryEffectivity(Glossary glossary, Term term) throws SubjectAreaFVTCheckedException { - if (term.getGlossary()==null) { - // error always expect a glossary - throw new SubjectAreaFVTCheckedException("ERROR: Term expected associated future Glossary"); - } - Long glossaryFrom =glossary.getEffectiveFromTime(); - Long termGlossaryFrom =term.getGlossary().getFromEffectivityTime(); - Long glossaryTo =glossary.getEffectiveToTime(); - Long termGlossaryTo =term.getGlossary().getToEffectivityTime(); - - if (glossaryFrom == null && termGlossaryFrom != null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Term's Glossary fromTime not null but glossaries is null"); - } - if (glossaryFrom != null && termGlossaryFrom == null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Term's Glossary fromTime null but glossaries is not null"); - } - if (glossaryTo == null && termGlossaryTo != null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Term's Glossary toTime not null but glossaries is null"); - } - if (glossaryTo != null && termGlossaryTo == null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Term's Glossary toTime null but glossaries is not null"); - } - if (glossaryFrom != null && termGlossaryFrom != null) { - if (glossaryFrom.longValue() != termGlossaryFrom.longValue()) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Term's Glossary fromTime " + termGlossaryFrom.longValue() + " does not match the glossaries " + glossaryFrom.longValue()); - } - - } - - if (glossaryTo != null && termGlossaryTo != null) { - if (glossaryTo.longValue() != termGlossaryTo.longValue()) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Term's Glossary toTime " + termGlossaryTo.longValue() + " does not match the glossaries " + glossaryTo.longValue()); - } - - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/FVTConstants.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/FVTConstants.java deleted file mode 100644 index a556eb65e0d..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/FVTConstants.java +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -/** - * Created by david on 29/11/2018. - */ -public class FVTConstants -{ - public static final String USERID = "erinoverview"; - public static final String DEFAULT_URL = "https://localhost:9443"; - public static final String SERVER_NAME1 = "cocoMDS4"; - public static final String SERVER_NAME2 = "cocoMDS1"; -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/FVTUtils.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/FVTUtils.java deleted file mode 100644 index 4b6604b3359..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/FVTUtils.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; - -/** - * FVT utilities - */ -public class FVTUtils { - public static void validateNode(Node node) throws SubjectAreaFVTCheckedException { - if (node==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected node to exist, "); - } - if (node.getName()==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected node to have a name, "); - } - if (node.getSystemAttributes()==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + node.getName() + "'s system attributes to exist, "); - } - if (node.getSystemAttributes().getGUID()==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + node.getName() + "'s userId to exist, "); - } - } - public static void validateRelationship(Relationship relationship) throws SubjectAreaFVTCheckedException { - if (relationship==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected relationship to exist, "); - } - if (relationship.getName()==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected relationship to have a name, "); - } - // Unknown - if (relationship.getName().equals("Unknown")) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected relationship to have a known name, "); - } - if (relationship.getSystemAttributes()==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + "'s system attributes to exist, "); - } - if (relationship.getSystemAttributes().getGUID()==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + "'s userId to exist, "); - } - if (relationship.isReadOnly()) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + " not to be readonly"); - } - if (relationship.getEnd1() ==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + " end1 to have a value"); - } - if (relationship.getEnd1().getNodeQualifiedName() ==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + " end1 qualified name to have a value"); - } - if (relationship.getEnd1().getNodeGuid() ==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + " end1 guid to have a value"); - } - if (relationship.getEnd2() ==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + " end2 to have a value"); - } - if (relationship.getEnd2().getNodeQualifiedName() ==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + " end2 qualified name to have a value"); - } - if (relationship.getEnd2().getNodeGuid() ==null) { - // error - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + relationship.getName() + " end2 guid to have a value"); - } - } - public static void checkEnds(Relationship relationship1, Relationship relationship2, String relationshipName, String operation) throws SubjectAreaFVTCheckedException { - if (!relationship1.getEnd1().getNodeGuid().equals(relationship2.getEnd1().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: update end 1 not as expected for relationship " + relationshipName + " operation " + operation); - } - if (!relationship1.getEnd2().getNodeGuid().equals(relationship2.getEnd2().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: update end 2 not as expected for relationship " + relationshipName + " operation " + operation); - } - } -} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/GlossaryFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/GlossaryFVT.java deleted file mode 100644 index bc9685c9d9d..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/GlossaryFVT.java +++ /dev/null @@ -1,342 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.glossaries.SubjectAreaGlossaryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Taxonomy; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.*; - -/** - * FVT resource to call subject area glossary client API. - * - */ -public class GlossaryFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Testglossary1"; - private static final String DEFAULT_TEST_GLOSSARY_NAME2 = "Testglossary2"; - private static final String DEFAULT_TEST_GLOSSARY_NAME3 = "Testglossary3"; - private SubjectAreaNodeClient subjectAreaGlossary = null; - private SubjectAreaGlossaryClient subjectAreaGlossaryClient = null; - private String serverName = null; - private String userId = null; - private int existingGlossaryCount = 0; - private static Logger log = LoggerFactory.getLogger(GlossaryFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingSubjectAreas. - */ - private Set createdGlossariesSet; - - public GlossaryFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - subjectAreaGlossary = new SubjectAreaGlossaryClient<>(client); - subjectAreaGlossaryClient = (SubjectAreaGlossaryClient)subjectAreaGlossary; - this.serverName = serverName; - this.userId = userId; - createdGlossariesSet = new HashSet<>(); - existingGlossaryCount = findGlossaries("").size(); - if (log.isDebugEnabled()) { - log.debug("existingGlossaryCount " + existingGlossaryCount); - } - } - - public static void runWith2Servers(String url) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void main(String[] args) { - try { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - try - { - System.out.println("GlossaryFVT runIt started"); - GlossaryFVT fvt = new GlossaryFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemainingGlossaries(); - System.out.println("GlossaryFVT runIt finished"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public static int getGlossaryCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - GlossaryFVT fvt = new GlossaryFVT(url, serverName, userId); - return fvt.findGlossaries("").size(); - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - List initialGlossaryState = findGlossaries(null); - int initialGlossaryCount = 0; - if (initialGlossaryState != null && initialGlossaryState.size() > 0) { - initialGlossaryCount = initialGlossaryState.size(); - } - - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - Glossary glossary2 = createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME2); - FVTUtils.validateNode(glossary2); - - List results = findGlossaries(null); - if (results.size() != initialGlossaryCount + 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + initialGlossaryCount + 2 + " back on the find got " + results.size()); - } - Glossary glossaryForUpdate = new Glossary(); - glossaryForUpdate.setName(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME3); - if (log.isDebugEnabled()) { - log.debug("Get the glossary"); - } - String guid = glossary.getSystemAttributes().getGUID(); - Glossary gotGlossary = getGlossaryByGUID(guid); - if (log.isDebugEnabled()) { - log.debug("Update the glossary"); - } - Glossary updatedGlossary = updateGlossary(guid, glossaryForUpdate); - FVTUtils.validateNode(updatedGlossary); - if (log.isDebugEnabled()) { - log.debug("Get the glossary again"); - } - gotGlossary = getGlossaryByGUID(guid); - FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("Delete the glossary"); - } - deleteGlossary(guid); - //FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("restore the glossary"); - } - gotGlossary = restoreGlossary(guid); - FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("Delete the glossary again"); - } - deleteGlossary(guid); - //FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("Create glossary with the same name as a deleted one"); - } - glossary = createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - - if (log.isDebugEnabled()) { - log.debug("create glossaries to find"); - } - Glossary glossaryForFind1 = getGlossaryForInput("qrs"); - glossaryForFind1.setQualifiedName("yyy"); - glossaryForFind1 = issueCreateGlossary(glossaryForFind1); - FVTUtils.validateNode(glossaryForFind1); - Glossary glossaryForFind2 = createGlossary("yyy"); - FVTUtils.validateNode(glossaryForFind2); - Glossary glossaryForFind3 = createGlossary("zzz"); - FVTUtils.validateNode(glossaryForFind3); - Glossary glossaryForFind4 = createGlossary("This is a Glossary with spaces in name"); - FVTUtils.validateNode(glossaryForFind4); - - results = findGlossaries("zzz"); - if (results.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find got " + results.size()); - } - results = findGlossaries("yyy"); - if (results.size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 back on the find got " + results.size()); - } - //soft delete a glossary and check it is not found - deleteGlossary(glossaryForFind2.getSystemAttributes().getGUID()); - results = findGlossaries("yyy"); - if (results.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find got " + results.size()); - } - - // search for a glossary with a name with spaces in - results = findGlossaries("This is a Glossary with spaces in name"); - if (results.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find got " + results.size()); - } - // make sure there is a glossary with the name - createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - Glossary glossaryForUniqueQFN2= createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - if (glossaryForUniqueQFN2 == null || glossaryForUniqueQFN2.getQualifiedName().length() == 0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected qualified name to be set"); - } - } - - void deleteRemainingGlossaries() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Iterator iter = createdGlossariesSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteGlossary(guid); - } - List glossaries = findGlossaries(""); - if (glossaries.size() != existingGlossaryCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " +existingGlossaryCount + " glossaries, got " + glossaries.size()); - } - } - - public Glossary createGlossary(String glossaryName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = getGlossaryForInput(glossaryName); - return issueCreateGlossary(glossary); - } - - public Glossary issueCreateGlossary(Glossary glossary) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - Glossary newGlossary = subjectAreaGlossary.create(this.userId, glossary); - - if (newGlossary != null) { - String guid = newGlossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Created Glossary " + newGlossary.getName() + " with userId " + guid); - } - createdGlossariesSet.add(guid); - } - return newGlossary; - } - - public Glossary getGlossaryForInput(String glossaryName) { - Glossary glossary = new Glossary(); - glossary.setName(glossaryName); - return glossary; - } - - public Taxonomy getTaxonomyForInput(String glossaryName) { - Taxonomy taxonomy = new Taxonomy(); - taxonomy.setName(glossaryName); - return taxonomy; - } - - public Glossary createPastToGlossary(long now, String name) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - - // expire the glossary 10 milliseconds ago - glossary.setEffectiveToTime(new Date(now - 10).getTime()); - Glossary newGlossary = issueCreateGlossary(glossary); - FVTUtils.validateNode(newGlossary); - if (log.isDebugEnabled()) { - log.debug("Created Glossary " + newGlossary.getName() + " with GUID " + newGlossary.getSystemAttributes().getGUID()); - } - - return newGlossary; - } - - public Glossary createPastFromGlossary(long now, String name) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - // expire the glossary 10 milliseconds ago - glossary.setEffectiveFromTime(new Date(now - 10).getTime()); - return issueCreateGlossary(glossary); - } - - public Glossary createInvalidEffectiveDateGlossary(String name) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - long now = new Date().getTime(); - // expire the glossary 10 milliseconds ago - glossary.setEffectiveFromTime(new Date(now - 10).getTime()); - glossary.setEffectiveToTime(new Date(now - 11).getTime()); - return issueCreateGlossary(glossary); - } - - public Glossary createFutureGlossary(long now, String name) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - - // make the glossary effective in a days time for day - glossary.setEffectiveFromTime(new Date(now + 1000 * 60 * 60 * 24).getTime()); - glossary.setEffectiveToTime(new Date(now + 2000 * 60 * 60 * 24).getTime()); - Glossary newGlossary = issueCreateGlossary(glossary); - FVTUtils.validateNode(newGlossary); - if (log.isDebugEnabled()) { - log.debug("Created Glossary " + newGlossary.getName() + " with userId " + newGlossary.getSystemAttributes().getGUID()); - } - return newGlossary; - } - - public List findGlossaries(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - List glossaries = subjectAreaGlossary.find(this.userId, findRequest); - return glossaries; - } - - public Glossary getGlossaryByGUID(String guid) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = subjectAreaGlossary.getByGUID(this.userId, guid); - FVTUtils.validateNode(glossary); - if (log.isDebugEnabled()) { - log.debug("Got Glossary " + glossary.getName() + " with userId " + glossary.getSystemAttributes().getGUID() + " and status " + glossary.getSystemAttributes().getStatus()); - } - return glossary; - } - - public Glossary updateGlossary(String guid, Glossary glossary) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary updatedGlossary = subjectAreaGlossary.update(this.userId, guid, glossary); - FVTUtils.validateNode(updatedGlossary); - if (log.isDebugEnabled()) { - log.debug("Updated Glossary name to " + updatedGlossary.getName()); - } - return updatedGlossary; - } - - public void deleteGlossary(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - subjectAreaGlossary.delete(this.userId, guid); - createdGlossariesSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Delete succeeded"); - } - } - - public Glossary restoreGlossary(String guid) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary restoredGlossary = subjectAreaGlossary.restore(this.userId, guid); - FVTUtils.validateNode(restoredGlossary); - createdGlossariesSet.add(restoredGlossary.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Restored Glossary name is " + restoredGlossary.getName()); - } - return restoredGlossary; - } - - public List getGlossaryRelationships(Glossary glossary) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaGlossary.getAllRelationships(this.userId, glossary.getSystemAttributes().getGUID()); - } - - public List getCategories(String glossaryGuid, FindRequest findRequest, boolean onlyTop) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - return subjectAreaGlossaryClient.getCategories(userId, glossaryGuid, findRequest, onlyTop); - } - - public List getTerms(String glossaryGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaGlossaryClient.getTerms(userId, glossaryGuid, findRequest); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/GraphFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/GraphFVT.java deleted file mode 100644 index 7c6077f5803..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/GraphFVT.java +++ /dev/null @@ -1,302 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraph; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Taxonomy; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.*; - -/** - * FVT resource to call subject area term client API - */ -public class GraphFVT -{ - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for Graph FVT"; - private static final String DEFAULT_TEST_TERM_NAME1 = "Test term 1"; - private static final String DEFAULT_TEST_TERM_NAME2 = "Test term 2"; - private static final String DEFAULT_TEST_TERM_NAME3 = "Test term 3"; - private static final String DEFAULT_TEST_CATEGORY_NAME = "Test category 1"; - private SubjectAreaGraph subjectAreaGraph = null; - private GlossaryFVT glossaryFVT =null; - private TermFVT termFVT = null; - private RelationshipsFVT relationshipFVT = null; - private CategoryFVT categoryFVT = null; - private SubjectAreaDefinitionCategoryFVT subjectAreaFVT = null; - private static Logger log = LoggerFactory.getLogger(GraphFVT.class); - - private String serverName = null; - private String userId = null; - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - - } - - } - public GraphFVT(String url, String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - subjectAreaGraph = new SubjectAreaGraphClient(client); - log.debug("Create a glossary"); - glossaryFVT = new GlossaryFVT(url,serverName,userId); - termFVT = new TermFVT(url,serverName,userId); - categoryFVT = new CategoryFVT(url,serverName,userId); - relationshipFVT = new RelationshipsFVT(url,serverName,userId); - subjectAreaFVT = new SubjectAreaDefinitionCategoryFVT(url,serverName,userId); - this.serverName=serverName; - this.userId=userId; - } - public void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - termFVT.deleteRemainingTerms(); - // delete the subject area first so the delete of the categories do not pick them up - subjectAreaFVT.deleteRemainingSubjectAreas(); - categoryFVT.deleteRemainingCategories(); - relationshipFVT.deleteRemaining(); - glossaryFVT.deleteRemainingGlossaries(); - } - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("GraphFVT runIt started"); - GraphFVT fvt = new GraphFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("GraphFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary= glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - - Graph graph = getGraph(glossaryGuid, - null, - null, - null, - null, - 3); - checkGraphContent(graph,1,0); - Term term1 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME1,glossaryGuid); - graph = getGraph(glossaryGuid, - null, - null, - null, - null, - 3); - checkGraphContent(graph,2,1); - Term term2 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME2,glossaryGuid); - graph = getGraph(glossaryGuid, - null, - null, - null, - null, - 3); - checkGraphContent(graph,3,2); - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - null, - null, - 1); - checkGraphContent(graph,2,1); - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - null, - null, - 2); - checkGraphContent(graph,3,2); - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - null, - null, - 3); - checkGraphContent(graph,3,2); - relationshipFVT.createSynonym(term1,term2); - - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - null, - null, - 3); - checkGraphContent(graph,3,3); - - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - new HashSet<>(Arrays.asList(RelationshipType.Synonym)), - null, - 3); - checkGraphContent(graph,2,1); - - Term term3 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME3,glossaryGuid); - relationshipFVT.createSynonym(term1,term3); - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - new HashSet<>(Arrays.asList(RelationshipType.Synonym)), - null, - 3); - // expect 3 terms with the 2 Synonym relationships from term1. - checkGraphContent(graph,3,2); - - // at this stage we should have a glossary, 3 terms, 3 term to glossary relationships and 2 synonym relationships - // confirm that we have this number - graph = getGraph(glossaryGuid, - null, - null, - null, - null, - 3); - checkGraphContent(graph,4,5); - - graph = getGraph(term3.getSystemAttributes().getGUID(), - null, - null, - new HashSet<>(Arrays.asList(RelationshipType.Synonym)), - null, - 1); - checkGraphContent(graph,2,1); - graph = getGraph(glossaryGuid, - null, - new HashSet<>(Arrays.asList(NodeType.Glossary,NodeType.Term)), - null, - - null, - 1); - // expect to only pick up the TermAnchor relationships not the synonyms because we have depth 1. - checkGraphContent(graph,4,3); - - // createCategory - Category category =categoryFVT.createCategory(DEFAULT_TEST_CATEGORY_NAME,glossaryGuid); - // check it is ignored - graph = getGraph(glossaryGuid, - null, - new HashSet<>(Arrays.asList(NodeType.Glossary,NodeType.Term)), - null, - null, - 1); - checkGraphContent(graph,4,3); - // check we now pickup the category as well - graph = getGraph(glossaryGuid, - null, - new HashSet<>(Arrays.asList(NodeType.Glossary,NodeType.Term,NodeType.Category)), - null, - null, - 1); - checkGraphContent(graph,5,4); - - Taxonomy taxonomy= glossaryFVT.getTaxonomyForInput(DEFAULT_TEST_GLOSSARY_NAME); - Glossary createdTaxonomy= glossaryFVT.issueCreateGlossary(taxonomy); - String taxonomyGuid = createdTaxonomy.getSystemAttributes().getGUID(); - SubjectAreaDefinition subjectAreaDefinition = subjectAreaFVT.createSubjectAreaDefinitionWithGlossaryGuid("Subject area 1",taxonomyGuid); - graph = getGraph(taxonomyGuid, - null, - null, - null, - null, - 3); - checkGraphContent(graph,2,1); - - checkNodesContainNodeType(graph,NodeType.Taxonomy); - checkNodesContainNodeType(graph,NodeType.SubjectAreaDefinition); - // delete the term, category and subject area we created. - subjectAreaFVT.deleteSubjectAreaDefinition(subjectAreaDefinition.getSystemAttributes().getGUID()); - categoryFVT.deleteCategory(category.getSystemAttributes().getGUID()); - termFVT.deleteTerm(term1.getSystemAttributes().getGUID()); - termFVT.deleteTerm(term2.getSystemAttributes().getGUID()); - termFVT.deleteTerm(term3.getSystemAttributes().getGUID()); - glossaryFVT.deleteGlossary(taxonomyGuid); - glossaryFVT.deleteGlossary(glossaryGuid); - } - - private void checkNodesContainNodeType(Graph graph, NodeType nodeTypeToCheck) throws SubjectAreaFVTCheckedException { - boolean found = false; - if (graph == null || graph.getNodes() == null || graph.getNodes().size() == 0 ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected to find "+nodeTypeToCheck.name() + "but there were no nodes in the graph"); - } - Map nodes =graph.getNodes(); - Set guids = nodes.keySet(); - for (String guid:guids) { - Node node = nodes.get(guid); - if (node.getNodeType() == nodeTypeToCheck) { - found = true; - } - } - if (!found) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected to find "+nodeTypeToCheck.name() + "but it did not exist"); - } - } - - private void checkGraphContent(Graph graph,int expectedNodesSize,int expectedRelationshipsSize) throws SubjectAreaFVTCheckedException { - log.debug("CheckGraphContent expected " +expectedNodesSize + " Nodes and "+expectedRelationshipsSize + " Relationships" ); - if (graph.getNodes().size() !=expectedNodesSize ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + expectedNodesSize + " nodes, got " +graph.getNodes().size()); - } - if (expectedRelationshipsSize ==0 && (graph.getRelationships() != null) ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 0 and graph.getRelationships() to be null "); - } else if (expectedRelationshipsSize !=0 && (graph.getRelationships() == null) ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + expectedRelationshipsSize + " and graph.getRelationships() is null "); - } else if (graph.getRelationships()!=null && graph.getRelationships().size() !=expectedRelationshipsSize ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + expectedRelationshipsSize + " relationships, got " +graph.getRelationships().size()); - } - } - - private Graph getGraph(String guid, - Date asOfTime, - Set nodeFilter, - Set relationshipFilter, - StatusFilter statusFilter, // may need to extend this for controlled terms - int level) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - return subjectAreaGraph.getGraph( - userId, - guid, - asOfTime, - nodeFilter, - relationshipFilter, - statusFilter, - level); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ProjectFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ProjectFVT.java deleted file mode 100644 index 3e4f6510b8c..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ProjectFVT.java +++ /dev/null @@ -1,305 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.projects.SubjectAreaProjectClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.GlossaryProject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.io.IOException; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * FVT resource to call subject area project client API - */ -public class ProjectFVT -{ - private static final String DEFAULT_TEST_PROJECT_NAME = "Testproject1"; - private static final String DEFAULT_TEST_PROJECT_NAME2 = "Testproject2"; - private static final String DEFAULT_TEST_PROJECT_NAME3 = "Testproject3"; - private static final String DEFAULT_TEST_PROJECT_NAME4 = "Testproject4"; - private static final String DEFAULT_TEST_PROJECT_NAME5 = "Testproject5"; - private static final String DEFAULT_TEST_PROJECT_NAME6 = "Testproject6"; - private static final String DEFAULT_TEST_PROJECT_NAME7 = "Testproject7"; - private SubjectAreaProjectClient subjectAreaProject = null; - private SubjectAreaProjectClient subjectAreaProjectClient= null; - - private GlossaryFVT glossaryFVT =null; - private TermFVT termFVT =null; - private RelationshipsFVT relationshipsFVT =null; - - private String serverName = null; - private String userId = null; - private int existingProjectCount = 0; - private static Logger log = LoggerFactory.getLogger(ProjectFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingProjects. - */ - private Set createdProjectsSet = new HashSet<>(); - - public ProjectFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - subjectAreaProject = new SubjectAreaProjectClient<>(client); - this.serverName=serverName; - this.userId=userId; - existingProjectCount = findProjects("").size(); - if (log.isDebugEnabled()) { - log.debug("existingProjectCount " + existingProjectCount); - } - } - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - - public static void runIt(String url, String serverName, String userId) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try { - System.out.println("ProjectFVT runIt started"); - ProjectFVT fvt = new ProjectFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemainingProjects(); - System.out.println("ProjectFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - public static int getProjectCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - ProjectFVT fvt = new ProjectFVT(url, serverName, userId); - return fvt.findProjects(".*").size(); - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a project"); - } - Project project = createProject(serverName+" "+DEFAULT_TEST_PROJECT_NAME); - FVTUtils.validateNode(project); - Project project2 = createProject(serverName+" "+DEFAULT_TEST_PROJECT_NAME2); - FVTUtils.validateNode(project2); -// if (getProjectTerms(project.getSystemAttributes().getGUID()).size() != 0) { -// throw new SubjectAreaFVTCheckedException("ERROR: Expected no terms to be in the project. Got " +getProjectTerms(project.getSystemAttributes().getGUID()).size()); -// } - List results = findProjects(null); - if (results.size() !=2 ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 back on the find got " + results.size()); - } - - Project projectForUpdate = new Project(); - projectForUpdate.setName(serverName+" "+DEFAULT_TEST_PROJECT_NAME3); - if (log.isDebugEnabled()) { - log.debug("Get the project"); - } - String guid = project.getSystemAttributes().getGUID(); - Project gotProject = getProjectByGUID(guid); - FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Update the project"); - } - Project updatedProject = updateProject(guid, projectForUpdate); - FVTUtils.validateNode(updatedProject); - if (log.isDebugEnabled()) { - log.debug("Get the project again"); - } - gotProject = getProjectByGUID(guid); - FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Delete the project"); - } - deleteProject(guid); - //FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("restore the project"); - } - gotProject = restoreProject(guid); - FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Delete the project again"); - } - deleteProject(guid); - //FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Create project with the same name as a deleted one"); - } - project = createProject(serverName + " " + DEFAULT_TEST_PROJECT_NAME); - FVTUtils.validateNode(project); - - if (log.isDebugEnabled()) { - log.debug("create projects to find"); - } - Project projectForFind1 = getProjectForInput(DEFAULT_TEST_PROJECT_NAME7); - projectForFind1.setQualifiedName(DEFAULT_TEST_PROJECT_NAME6); - projectForFind1 = issueCreateProject(projectForFind1); - FVTUtils.validateNode(projectForFind1); - Project projectForFind2 = createProject(DEFAULT_TEST_PROJECT_NAME6); - FVTUtils.validateNode(projectForFind2); - Project projectForFind3 = createProject(DEFAULT_TEST_PROJECT_NAME5); - FVTUtils.validateNode(projectForFind3); - Project projectForFind4 = createProject("This is a Project with spaces in name"); - FVTUtils.validateNode(projectForFind4); - - results = findProjects(DEFAULT_TEST_PROJECT_NAME5); - if (results.size() !=1 ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find got " +results.size()); - } - results = findProjects(DEFAULT_TEST_PROJECT_NAME6); - if (results.size() !=2 ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 back on the find got " +results.size()); - } - //soft delete a project and check it is not found - deleteProject(projectForFind2.getSystemAttributes().getGUID()); - //FVTUtils.validateNode(deleted4); - results = findProjects(DEFAULT_TEST_PROJECT_NAME6); - if (results.size() !=1 ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find got " +results.size()); - } - - // search for a project with a name with spaces in - results = findProjects("This is a Project with spaces in name"); - if (results.size() !=1 ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on the find got " +results.size()); - } - Project projectForGraph = createProject(DEFAULT_TEST_PROJECT_NAME4); - FindRequest findRequest = new FindRequest(); -// List terms = getProjectTerms(projectForGraph.getSystemAttributes().getGUID(), findRequest, true, false); -// if (terms != null && terms.size() > 0) { -// throw new SubjectAreaFVTCheckedException("ERROR: Expected null or empty got " +terms.size()); -// } - // make sure there is a project with the name - createProject( DEFAULT_TEST_PROJECT_NAME); - Project projectForUniqueQFN2= createProject(DEFAULT_TEST_PROJECT_NAME); - if (projectForUniqueQFN2 == null || projectForUniqueQFN2.getQualifiedName().length() == 0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected qualified name to be set"); - } - } - - public Project createProject(String projectName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Project project = getProjectForInput(projectName); - return issueCreateProject(project); - } - - public Project issueCreateProject(Project project) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Project newProject = subjectAreaProject.create(this.userId, project); - if (newProject != null) - { - createdProjectsSet.add(newProject.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created Project " + newProject.getName() + " with userId " + newProject.getSystemAttributes().getGUID()); - } - } - return newProject; - } - - public Project getProjectForInput(String projectName) { - Project project = new Project(); - project.setName(projectName); - return project; - } - public GlossaryProject getGlossaryProjectForInput(String projectName) { - GlossaryProject glossaryProject= new GlossaryProject(); - glossaryProject.setName(projectName); - return glossaryProject; - } - - public List findProjects(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - List projects = subjectAreaProject.find(this.userId, findRequest); - return projects; - } - - public Project getProjectByGUID(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Project project = subjectAreaProject.getByGUID(this.userId, guid); - FVTUtils.validateNode(project); - if (log.isDebugEnabled()) { - log.debug("Got Project " + project.getName() + " with userId " + project.getSystemAttributes().getGUID() + " and status " + project.getSystemAttributes().getStatus()); - } - - return project; - } -// public List getProjectTerms(String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { -// List terms = subjectAreaProject.getProjectTerms(this.userId, guid, findRequest, exactValue, ignoreCase, null); -// System.out.println("Got terms from project with userId " + guid); -// return terms; -// } - public Project updateProject(String guid, Project project) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Project updatedProject = subjectAreaProject.update(this.userId, guid, project); - FVTUtils.validateNode(updatedProject); - if (log.isDebugEnabled()) { - log.debug("Updated Project name to " + updatedProject.getName()); - } - return updatedProject; - } - - public void deleteProject(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - subjectAreaProject.delete(this.userId, guid); - createdProjectsSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Deleted Project succeeded"); - } - } - public Project restoreProject(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Project restoredProject = subjectAreaProject.restore(this.userId, guid); - FVTUtils.validateNode(restoredProject); - createdProjectsSet.add(restoredProject.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Restored Project name is " + restoredProject.getName()); - } - return restoredProject; - } - - public List getProjectRelationships(Project project) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaProject.getAllRelationships(this.userId, project.getSystemAttributes().getGUID()); - } - - void deleteRemainingProjects() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Iterator iter = createdProjectsSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteProject(guid); - } - List projects = findProjects(""); - if (projects.size() !=existingProjectCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + existingProjectCount + " Projects to be found, got " + projects.size()); - } - } - -// public List getProjectTerms(String projectGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException -// { -// return subjectAreaProject.getProjectTerms(userId, projectGuid, new FindRequest(), false, true, null ); -// } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RelationshipsFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RelationshipsFVT.java deleted file mode 100644 index def048fecb8..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RelationshipsFVT.java +++ /dev/null @@ -1,1621 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.categories.SubjectAreaCategoryClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.terms.SubjectAreaTermClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationshipClients; -import org.odpi.openmetadata.accessservices.subjectarea.client.relationships.SubjectAreaRelationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.io.IOException; -import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * FVT resource to call subject area relationships client API - */ -public class RelationshipsFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for relationships FVT"; - private static final String DEFAULT_TEST_TERM_NAME = "Test term A1"; - private static final String DEFAULT_TEST_TERM_NAME2 = "Test term B1"; - private static final String DEFAULT_TEST_TERM_NAME3 = "Test term C1"; - private static final String DEFAULT_TEST_CAT_NAME1 = "Test cat A1"; - private static final String DEFAULT_TEST_CAT_NAME2 = "Test cat B1"; - private static final String DEFAULT_TEST_CAT_NAME3 = "Test cat C1"; - private static final String DEFAULT_TEST_CAT_NAME4 = "Test cat D1"; - private static final String DEFAULT_TEST_PROJECT_NAME = "Test Project for relationships FVT"; - private SubjectAreaRelationshipClients subjectAreaRelationship = null; - private SubjectAreaNodeClient subjectAreaCategory = null; - private SubjectAreaNodeClient subjectAreaTerm = null; - private GlossaryFVT glossaryFVT = null; - private TermFVT termFVT = null; - private CategoryFVT catFVT = null; - private ProjectFVT projectFVT = null; - private String url = null; - private String serverName = null; - private String userId = null; - private static Logger log = LoggerFactory.getLogger(RelationshipsFVT.class); - - - public RelationshipsFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - this.url = url; - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - subjectAreaRelationship = new SubjectAreaRelationship(client); - subjectAreaCategory = new SubjectAreaCategoryClient(client); - subjectAreaTerm = new SubjectAreaTermClient<>(client); - termFVT = new TermFVT(url, serverName, userId); - catFVT = new CategoryFVT(url, serverName, userId); - glossaryFVT = new GlossaryFVT(url, serverName, userId); - projectFVT = new ProjectFVT(url, serverName, userId); - this.serverName = serverName; - this.userId = userId; - } - - /** - * Delete the nodes that have been created to test relationships. This method deletes all those nodes - so the - * associated relationships will be deleted as the associated node is deleted. - * @throws UserNotAuthorizedException - * @throws PropertyServerException - * @throws InvalidParameterException - * @throws SubjectAreaFVTCheckedException - */ - void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - catFVT.deleteRemainingCategories(); - termFVT.deleteRemainingTerms(); - glossaryFVT.deleteRemainingGlossaries(); - projectFVT.deleteRemainingProjects(); - } - - public static void main(String args[]) { - try { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage()); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("relationshipFVT runIt started"); - RelationshipsFVT fvt = new RelationshipsFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("relationshipFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - - int term1relationshipcount = 0; - int term2relationshipcount = 0; - int term3relationshipcount = 0; - int glossaryRelationshipCount = 0; - int cat1RelationshipCount = 0; - int cat2RelationshipCount = 0; - - Glossary glossary = glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - if (log.isDebugEnabled()) { - log.debug("Create a term called " + DEFAULT_TEST_TERM_NAME + " using glossary GUID"); - } - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - Term term1 = termFVT.createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - - term1relationshipcount++; - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - checkRelationshipNumberforTerm(term1relationshipcount, term1); - FVTUtils.validateNode(term1); - if (log.isDebugEnabled()) { - log.debug("Create a term called " + DEFAULT_TEST_TERM_NAME2 + " using glossary GUID"); - } - Term term2 = termFVT.createTerm(DEFAULT_TEST_TERM_NAME2, glossaryGuid); - term2relationshipcount++; - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - checkRelationshipNumberforTerm(term2relationshipcount, term2); - FVTUtils.validateNode(term2); - if (log.isDebugEnabled()) { - log.debug("Create a term called " + DEFAULT_TEST_TERM_NAME3 + " using glossary GUID"); - } - Term term3 = termFVT.createTerm(DEFAULT_TEST_TERM_NAME3, glossaryGuid); - FVTUtils.validateNode(term3); - term3relationshipcount++; - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - checkRelationshipNumberforTerm(term3relationshipcount, term3); - Category cat1 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME1, glossaryGuid); - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - Category cat2 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME2, glossaryGuid); - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - cat2RelationshipCount++; - checkRelationshipNumberforCategory(cat2RelationshipCount, cat1); - synonymFVT(term1, term2); - antonymFVT(term1, term3); - relatedtermFVT(term1, term3); - hasaFVT(term1, term3); - translationFVT(term1, term2); - usedincontextFVT(term1, term2); - preferredtermFVT(term1, term2); - validvalueFVT(term1, term2); - replacementTermFVT(term1, term2); - typedByFVT(term1, term2); - isaFVT(term1, term2); - isatypeofFVT(term1, term2); - isATypeOfFVT(term1, term2); - termCategorizationFVT(term1, cat1); - // No TermAnchor or CategoryAnchor tests as these are anchor relationships that cannot be modified directly in the subject Area API. - createSomeTermRelationships(term1, term2, term3); - term1relationshipcount = term1relationshipcount + 13; - term2relationshipcount = term2relationshipcount + 12; - term3relationshipcount = term3relationshipcount + 1; - checkRelationshipNumberforTerm(term1relationshipcount, term1); - checkRelationshipNumberforTerm(term2relationshipcount, term2); - checkRelationshipNumberforTerm(term3relationshipcount, term3); - FVTUtils.validateRelationship(createTermCategorization(term1, cat1)); - term1relationshipcount++; - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - FVTUtils.validateRelationship(createTermCategorization(term1, cat2)); - term1relationshipcount++; - cat2RelationshipCount++; - checkRelationshipNumberforCategory(cat2RelationshipCount, cat1); - FVTUtils.validateRelationship(createTermCategorization(term2, cat1)); - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - term2relationshipcount++; - FVTUtils.validateRelationship(createTermCategorization(term3, cat1)); - term3relationshipcount++; - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - checkRelationshipNumberforTerm(term1relationshipcount, term1); - checkRelationshipNumberforTerm(term2relationshipcount, term2); - checkRelationshipNumberforTerm(term3relationshipcount, term3); - if (log.isDebugEnabled()) { - log.debug("get term relationships"); - } - List term1Relationships = termFVT.getTermRelationships(term1); - - if (log.isDebugEnabled()) { - log.debug("Get paged term relationships"); - } - int offset = 0; - - int numberofrelationships = 0; - while (offset < term1relationshipcount) { - if (log.isDebugEnabled()) { - log.debug("Get paged term relationships offset = " + offset + ",pageSize=3"); - } - List term1PagedRelationships = termFVT.getTermRelationships(term1, null, offset, 3, SequencingOrder.GUID, null); - numberofrelationships = numberofrelationships + term1PagedRelationships.size(); - offset += 3; - } - - if (term1relationshipcount != numberofrelationships) { - throw new SubjectAreaFVTCheckedException("Expected " + term1Relationships.size() + " got " + numberofrelationships ); - } - Project project= projectFVT.createProject(DEFAULT_TEST_PROJECT_NAME ); - projectScopeFVT(project, term1); - projectFVT.deleteProject(project.getSystemAttributes().getGUID()); - - Category cat3 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME3, glossaryGuid); - Category cat4 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME4, glossaryGuid); - categoryHierarchyLinkFVT(cat3, cat4); - } - - private void checkRelationshipNumberforTerm(int expectedrelationshipcount, Term term) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - int actualCount = termFVT.getTermRelationships(term).size(); - if (expectedrelationshipcount != actualCount) { - throw new SubjectAreaFVTCheckedException("ERROR: expected " + expectedrelationshipcount + " for " + term.getName() + " got " + actualCount); - } - } - - private void checkRelationshipNumberforGlossary(int expectedrelationshipcount, Glossary glossary) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - int actualCount = glossaryFVT.getGlossaryRelationships(glossary).size(); - if (expectedrelationshipcount != actualCount) { - throw new SubjectAreaFVTCheckedException("ERROR: expected " + expectedrelationshipcount + " for " + glossary.getName() + " got " + actualCount); - } - } - - private void checkRelationshipNumberforCategory(int expectedrelationshipcount, Category category) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - int actualCount = catFVT.getCategoryRelationships(category).size(); - if (expectedrelationshipcount != actualCount) { - throw new SubjectAreaFVTCheckedException("ERROR: expected " + expectedrelationshipcount + " for " + category.getName() + " got " + actualCount); - } - } - - private void createSomeTermRelationships(Term term1, Term term2, Term term3) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - FVTUtils.validateRelationship(createValidValue(term1, term2)); - FVTUtils.validateRelationship(createAntonym(term1, term2)); - FVTUtils.validateRelationship(createIsaRelationship(term1, term2)); - FVTUtils.validateRelationship(createPreferredTerm(term1, term2)); - FVTUtils.validateRelationship(createRelatedTerm(term1, term2)); - FVTUtils.validateRelationship(createHasA(term1, term2)); - FVTUtils.validateRelationship(createSynonym(term1, term3)); - FVTUtils.validateRelationship(createReplacementTerm(term1, term2)); - FVTUtils.validateRelationship(createTermTYPEDBYRelationship(term1, term2)); - FVTUtils.validateRelationship(createTranslation(term1, term2)); - FVTUtils.validateRelationship(createUsedInContext(term1, term2)); - FVTUtils.validateRelationship(createIsATypeOfDeprecated(term1, term2)); - FVTUtils.validateRelationship(createIsATypeOf(term1, term2)); - } - - private void isatypeofFVT(Term term1, Term term2) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - IsATypeOfDeprecated createdisATypeOfDeprecated = createIsATypeOfDeprecated(term1, term2); - String guid = createdisATypeOfDeprecated.getGuid(); - - IsATypeOfDeprecated gotisATypeOfDeprecated = subjectAreaRelationship.isaTypeOfDeprecated().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotisATypeOfDeprecated); - if (log.isDebugEnabled()) { - log.debug("Got IsaTypeOf " + createdisATypeOfDeprecated); - } - - IsATypeOfDeprecated updateisATypeOfDeprecated = new IsATypeOfDeprecated(); - updateisATypeOfDeprecated.setDescription("ddd2"); - IsATypeOfDeprecated updatedisATypeOfDeprecated = subjectAreaRelationship.isaTypeOfDeprecated().update(this.userId, guid, updateisATypeOfDeprecated); - FVTUtils.validateRelationship(updatedisATypeOfDeprecated); - if (!updatedisATypeOfDeprecated.getDescription().equals(updateisATypeOfDeprecated.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf update description not as expected"); - } - if (!updatedisATypeOfDeprecated.getSource().equals(createdisATypeOfDeprecated.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf update source not as expected"); - } - if (!updatedisATypeOfDeprecated.getSteward().equals(createdisATypeOfDeprecated.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf update steward not as expected"); - } - FVTUtils.checkEnds(updatedisATypeOfDeprecated,createdisATypeOfDeprecated,"IsATypeOf","update"); - if (log.isDebugEnabled()) { - log.debug("Updated IsaTypeOf " + createdisATypeOfDeprecated); - } - IsATypeOfDeprecated replaceisATypeOfDeprecated = new IsATypeOfDeprecated(); - replaceisATypeOfDeprecated.setDescription("ddd3"); - IsATypeOfDeprecated replacedisATypeOfDeprecated = subjectAreaRelationship.isaTypeOfDeprecated().replace(this.userId, guid, replaceisATypeOfDeprecated); - FVTUtils.validateRelationship(replacedisATypeOfDeprecated); - if (!replacedisATypeOfDeprecated.getDescription().equals(replaceisATypeOfDeprecated.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf replace description not as expected"); - } - if (replacedisATypeOfDeprecated.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf replace source not as expected"); - } - if (replacedisATypeOfDeprecated.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf replace steward not as expected"); - } - if (!replacedisATypeOfDeprecated.getEnd1().getNodeGuid().equals(createdisATypeOfDeprecated.getEnd1().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf replace end 1 not as expected"); - } - if (!replacedisATypeOfDeprecated.getEnd2().getNodeGuid().equals(createdisATypeOfDeprecated.getEnd2().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: IsaTypeOf replace end 2 not as expected"); - } - if (log.isDebugEnabled()) { - log.debug("Replaced IsaTypeOf " + createdisATypeOfDeprecated); - } - subjectAreaRelationship.isaTypeOfDeprecated().delete(this.userId, guid); - //FVTUtils.validateLine(gotisATypeOfDeprecated); - if (log.isDebugEnabled()) { - log.debug("Deleted IsaTypeOf with userId=" + guid); - } - gotisATypeOfDeprecated = subjectAreaRelationship.isaTypeOfDeprecated().restore(this.userId, guid); - FVTUtils.validateRelationship(gotisATypeOfDeprecated); - if (log.isDebugEnabled()) { - log.debug("Restored IsaTypeOf with userId=" + guid); - } - subjectAreaRelationship.isaTypeOfDeprecated().delete(this.userId, guid); - //FVTUtils.validateLine(gotisATypeOfDeprecated); - if (log.isDebugEnabled()) { - log.debug("Deleted IsaTypeOf with userId=" + guid); - } - - } - private void isATypeOfFVT(Term term1, Term term2) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - IsATypeOf createdisATypeOf = createIsATypeOf(term1, term2); - String guid = createdisATypeOf.getGuid(); - - IsATypeOf gotisATypeOf = subjectAreaRelationship.isATypeOf().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotisATypeOf); - if (log.isDebugEnabled()) { - log.debug("Got isATypeOf " + createdisATypeOf); - } - - IsATypeOf updateisATypeOf = new IsATypeOf(); - updateisATypeOf.setDescription("ddd2"); - IsATypeOf updatedisATypeOf = subjectAreaRelationship.isATypeOf().update(this.userId, guid, updateisATypeOf); - FVTUtils.validateRelationship(updatedisATypeOf); - if (!updatedisATypeOf.getDescription().equals(updateisATypeOf.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf update description not as expected"); - } - if (!updatedisATypeOf.getSource().equals(createdisATypeOf.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf update source not as expected"); - } - if (!updatedisATypeOf.getSteward().equals(createdisATypeOf.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf update steward not as expected"); - } - FVTUtils.checkEnds(updatedisATypeOf,createdisATypeOf,"isATypeOf","update"); - if (log.isDebugEnabled()) { - log.debug("Updated isATypeOf " + createdisATypeOf); - } - IsATypeOf replaceisATypeOf = new IsATypeOf(); - replaceisATypeOf.setDescription("ddd3"); - IsATypeOf replacedisATypeOf = subjectAreaRelationship.isATypeOf().replace(this.userId, guid, replaceisATypeOf); - FVTUtils.validateRelationship(replacedisATypeOf); - if (!replacedisATypeOf.getDescription().equals(replaceisATypeOf.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf replace description not as expected"); - } - if (replacedisATypeOf.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf replace source not as expected"); - } - if (replacedisATypeOf.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf replace steward not as expected"); - } - if (!replacedisATypeOf.getEnd1().getNodeGuid().equals(createdisATypeOf.getEnd1().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf replace end 1 not as expected"); - } - if (!replacedisATypeOf.getEnd2().getNodeGuid().equals(createdisATypeOf.getEnd2().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: isATypeOf replace end 2 not as expected"); - } - if (log.isDebugEnabled()) { - log.debug("Replaced isATypeOf " + createdisATypeOf); - } - subjectAreaRelationship.isATypeOf().delete(this.userId, guid); - //FVTUtils.validateLine(gotisATypeOf); - if (log.isDebugEnabled()) { - log.debug("Deleted isATypeOf with userId=" + guid); - } - gotisATypeOf = subjectAreaRelationship.isATypeOf().restore(this.userId, guid); - FVTUtils.validateRelationship(gotisATypeOf); - if (log.isDebugEnabled()) { - log.debug("Restored isATypeOf with userId=" + guid); - } - subjectAreaRelationship.isATypeOf().delete(this.userId, guid); - //FVTUtils.validateLine(gotisATypeOf); - if (log.isDebugEnabled()) { - log.debug("Deleted isATypeOf with userId=" + guid); - } - } - - - - private void isaFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - IsA createdIsA = createIsaRelationship(term1, term2); - FVTUtils.validateRelationship(createdIsA); - if (log.isDebugEnabled()) { - log.debug("Created Isa " + createdIsA); - } - String guid = createdIsA.getGuid(); - - IsA gotIsA = subjectAreaRelationship.isA().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotIsA); - if (log.isDebugEnabled()) { - log.debug("Got Isa " + createdIsA); - } - - IsA updateIsA = new IsA(); - updateIsA.setDescription("ddd2"); - IsA updatedIsA = subjectAreaRelationship.isA().update(this.userId, guid, updateIsA); - if (!updatedIsA.getDescription().equals(updateIsA.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa update description not as expected"); - } - if (!updatedIsA.getSource().equals(createdIsA.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa update source not as expected"); - } - if (!updatedIsA.getExpression().equals(createdIsA.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa update expression not as expected"); - } - if (!updatedIsA.getSteward().equals(createdIsA.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa update steward not as expected"); - } - if (!updatedIsA.getEnd1().getNodeGuid().equals(createdIsA.getEnd1().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa update end 1 not as expected"); - } - if (!updatedIsA.getEnd2().getNodeGuid().equals(createdIsA.getEnd2().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa update end 2 not as expected"); - } - if (log.isDebugEnabled()) { - log.debug("Updated Isa " + createdIsA); - } - IsA replaceIsA = new IsA(); - replaceIsA.setDescription("ddd3"); - IsA replacedIsA = subjectAreaRelationship.isA().replace(this.userId, guid, replaceIsA); - FVTUtils.validateRelationship(replacedIsA); - if (!replacedIsA.getDescription().equals(replaceIsA.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa replace description not as expected"); - } - if (replacedIsA.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: isa replace source not as expected"); - } - if (replacedIsA.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: isa replace expression not as expected"); - } - if (replacedIsA.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: isa replace steward not as expected"); - } - if (!replacedIsA.getEnd1().getNodeGuid().equals(createdIsA.getEnd1().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa replace end 1 not as expected"); - } - if (!replacedIsA.getEnd2().getNodeGuid().equals(createdIsA.getEnd2().getNodeGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: isa replace end 2 not as expected"); - } - if (log.isDebugEnabled()) { - log.debug("Replaced Isa " + createdIsA); - } - subjectAreaRelationship.isA().delete(this.userId, guid); - //FVTUtils.validateLine(gotIsa); - if (log.isDebugEnabled()) { - log.debug("Deleted Isa with userId=" + guid); - } - gotIsA = subjectAreaRelationship.isA().restore(this.userId, guid); - FVTUtils.validateRelationship(gotIsA); - if (log.isDebugEnabled()) { - log.debug("Restored Isa with userId=" + guid); - } - subjectAreaRelationship.isA().delete(this.userId, guid); - //FVTUtils.validateLine(gotIsa); - if (log.isDebugEnabled()) { - log.debug("Deleted Isa with userId=" + guid); - } - } - - private IsA createIsaRelationship(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - IsA isa = new IsA(); - isa.setDescription("ddd"); - isa.setExpression("Ex"); - isa.setSource("source"); - isa.setSteward("Stew"); - isa.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - isa.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - IsA createdIsA = subjectAreaRelationship.isA().create(this.userId, isa); - FVTUtils.validateRelationship(createdIsA); - FVTUtils.checkEnds(isa, createdIsA, "isa", "create"); - - return createdIsA; - } - - private void typedByFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - TypedBy createdTermTYPEDBYRelationship = createTermTYPEDBYRelationship(term1, term2); - FVTUtils.validateRelationship(createdTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Created TypedBy " + createdTermTYPEDBYRelationship); - } - String guid = createdTermTYPEDBYRelationship.getGuid(); - - TypedBy gotTermTYPEDBYRelationship = subjectAreaRelationship.typedBy().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Got TypedBy " + createdTermTYPEDBYRelationship); - } - - TypedBy updateTermTYPEDBYRelationship = new TypedBy(); - updateTermTYPEDBYRelationship.setDescription("ddd2"); - TypedBy updatedTermTYPEDBYRelationship = subjectAreaRelationship.typedBy().update(this.userId, guid, updateTermTYPEDBYRelationship); - FVTUtils.validateRelationship(updatedTermTYPEDBYRelationship); - if (!updatedTermTYPEDBYRelationship.getDescription().equals(updateTermTYPEDBYRelationship.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: termTYPEDBYRelationship update description not as expected"); - } - if (!updatedTermTYPEDBYRelationship.getSource().equals(createdTermTYPEDBYRelationship.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: termTYPEDBYRelationship update source not as expected"); - } - if (!updatedTermTYPEDBYRelationship.getSteward().equals(createdTermTYPEDBYRelationship.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: termTYPEDBYRelationship update steward not as expected"); - } - FVTUtils.checkEnds(updatedTermTYPEDBYRelationship,createdTermTYPEDBYRelationship,"TYPEDBY","update"); - if (log.isDebugEnabled()) { - log.debug("Updated TypedBy " + createdTermTYPEDBYRelationship); - } - TypedBy replaceTermTYPEDBYRelationship = new TypedBy(); - replaceTermTYPEDBYRelationship.setDescription("ddd3"); - TypedBy replacedTermTYPEDBYRelationship = subjectAreaRelationship.typedBy().replace(this.userId, guid, replaceTermTYPEDBYRelationship); - FVTUtils.validateRelationship(replacedTermTYPEDBYRelationship); - if (!replacedTermTYPEDBYRelationship.getDescription().equals(replaceTermTYPEDBYRelationship.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: termTYPEDBYRelationship replace description not as expected"); - } - if (replacedTermTYPEDBYRelationship.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: termTYPEDBYRelationship replace source not as expected"); - } - if (replacedTermTYPEDBYRelationship.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: termTYPEDBYRelationship replace steward not as expected"); - } - - FVTUtils.checkEnds(replacedTermTYPEDBYRelationship,createdTermTYPEDBYRelationship,"TYPEDBY","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced TypedBy " + createdTermTYPEDBYRelationship); - } - subjectAreaRelationship.typedBy().delete(this.userId, guid); - //FVTUtils.validateLine(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted TypedBy with userId=" + guid); - } - gotTermTYPEDBYRelationship = subjectAreaRelationship.typedBy().restore(this.userId, guid); - FVTUtils.validateRelationship(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Restored TypedBy with userId=" + guid); - } - subjectAreaRelationship.typedBy().delete(this.userId, guid); - //FVTUtils.validateLine(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted TypedBy with userId=" + guid); - } - } - - private TypedBy createTermTYPEDBYRelationship(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - TypedBy termTYPEDBYRelationship = new TypedBy(); - termTYPEDBYRelationship.setDescription("ddd"); - termTYPEDBYRelationship.setSource("source"); - termTYPEDBYRelationship.setSteward("Stew"); - termTYPEDBYRelationship.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - termTYPEDBYRelationship.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - TypedBy createdTermTYPEDBYRelationship = subjectAreaRelationship.typedBy().create(this.userId, termTYPEDBYRelationship); - FVTUtils.validateRelationship(createdTermTYPEDBYRelationship); - FVTUtils.checkEnds(termTYPEDBYRelationship, createdTermTYPEDBYRelationship, "TypedBy", "create"); - - return createdTermTYPEDBYRelationship; - } - - private void replacementTermFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - ReplacementTerm createdReplacementTerm = createReplacementTerm(term1, term2); - FVTUtils.validateRelationship(createdReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Created ReplacementTerm " + createdReplacementTerm); - } - String guid = createdReplacementTerm.getGuid(); - - ReplacementTerm gotReplacementTerm = subjectAreaRelationship.replacementTerm().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Got ReplacementTerm " + createdReplacementTerm); - } - - ReplacementTerm updateReplacementTerm = new ReplacementTerm(); - updateReplacementTerm.setDescription("ddd2"); - ReplacementTerm updatedReplacementTerm = subjectAreaRelationship.replacementTerm().update(this.userId, guid, updateReplacementTerm); - FVTUtils.validateRelationship(updatedReplacementTerm); - if (!updatedReplacementTerm.getDescription().equals(updateReplacementTerm.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm update description not as expected"); - } - if (!updatedReplacementTerm.getSource().equals(createdReplacementTerm.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm update source not as expected"); - } - if (!updatedReplacementTerm.getExpression().equals(createdReplacementTerm.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm update expression not as expected"); - } - if (!updatedReplacementTerm.getSteward().equals(createdReplacementTerm.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm update steward not as expected"); - } - FVTUtils.checkEnds(updatedReplacementTerm,createdReplacementTerm,"replacementTerm","update"); - if (log.isDebugEnabled()) { - log.debug("Updated ReplacementTerm " + createdReplacementTerm); - } - ReplacementTerm replaceReplacementTerm = new ReplacementTerm(); - replaceReplacementTerm.setDescription("ddd3"); - ReplacementTerm replacedReplacementTerm = subjectAreaRelationship.replacementTerm().replace(this.userId, guid, replaceReplacementTerm); - FVTUtils.validateRelationship(replacedReplacementTerm); - if (!replacedReplacementTerm.getDescription().equals(replaceReplacementTerm.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm replace description not as expected"); - } - if (replacedReplacementTerm.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm replace source not as expected"); - } - if (replacedReplacementTerm.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm replace expression not as expected"); - } - if (replacedReplacementTerm.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: replacementTerm replace steward not as expected"); - } - - FVTUtils.checkEnds(replacedReplacementTerm,createdReplacementTerm,"replacementTerm","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced ReplacementTerm " + createdReplacementTerm); - } - subjectAreaRelationship.replacementTerm().delete(this.userId, guid); - //FVTUtils.validateLine(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted ReplacementTerm with userId=" + guid); - } - gotReplacementTerm = subjectAreaRelationship.replacementTerm().restore(this.userId, guid); - FVTUtils.validateRelationship(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Restored ReplacementTerm with userId=" + guid); - } - subjectAreaRelationship.replacementTerm().delete(this.userId, guid); - //FVTUtils.validateLine(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted ReplacementTerm with userId=" + guid); - } - } - - private ReplacementTerm createReplacementTerm(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ReplacementTerm replacementTerm = new ReplacementTerm(); - replacementTerm.setDescription("ddd"); - replacementTerm.setExpression("Ex"); - replacementTerm.setSource("source"); - replacementTerm.setSteward("Stew"); - replacementTerm.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - replacementTerm.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - ReplacementTerm createdReplacementTerm = subjectAreaRelationship.replacementTerm().create(this.userId, replacementTerm); - FVTUtils.validateRelationship(createdReplacementTerm); - FVTUtils.checkEnds(replacementTerm, createdReplacementTerm, "ReplacementTerm", "create"); - - return createdReplacementTerm; - } - - private void validvalueFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - ValidValue createdValidValue = createValidValue(term1, term2); - FVTUtils.validateRelationship(createdValidValue); - if (log.isDebugEnabled()) { - log.debug("Created ValidValue " + createdValidValue); - } - String guid = createdValidValue.getGuid(); - - ValidValue gotValidValue = subjectAreaRelationship.validValue().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Got ValidValue " + createdValidValue); - } - - ValidValue updateValidValue = new ValidValue(); - updateValidValue.setDescription("ddd2"); - ValidValue updatedValidValue = subjectAreaRelationship.validValue().update(this.userId, guid, updateValidValue); - if (!updatedValidValue.getDescription().equals(updateValidValue.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue update description not as expected"); - } - if (!updatedValidValue.getSource().equals(createdValidValue.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue update source not as expected"); - } - if (!updatedValidValue.getExpression().equals(createdValidValue.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue update expression not as expected"); - } - if (!updatedValidValue.getSteward().equals(createdValidValue.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue update steward not as expected"); - } - - FVTUtils.checkEnds(updatedValidValue, createdValidValue, "ValidValue", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated ValidValue " + createdValidValue); - } - ValidValue replaceValidValue = new ValidValue(); - replaceValidValue.setDescription("ddd3"); - replaceValidValue.setGuid(createdValidValue.getGuid()); - ValidValue replacedValidValue = subjectAreaRelationship.validValue().replace(this.userId, guid, replaceValidValue); - if (!replacedValidValue.getDescription().equals(replaceValidValue.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue replace description not as expected"); - } - if (replacedValidValue.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue replace source not as expected"); - } - if (replacedValidValue.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue replace expression not as expected"); - } - if (replacedValidValue.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: validValue replace steward not as expected"); - } - FVTUtils.checkEnds(replacedValidValue, createdValidValue, "ValidValue", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced ValidValue " + createdValidValue); - } - subjectAreaRelationship.validValue().delete(this.userId, guid); - //FVTUtils.validateLine(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Deleted ValidValue with userId=" + guid); - } - gotValidValue = subjectAreaRelationship.validValue().restore(this.userId, guid); - FVTUtils.validateRelationship(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Restored ValidValue with userId=" + guid); - } - subjectAreaRelationship.validValue().delete(this.userId, guid); - //FVTUtils.validateLine(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Deleted ValidValue with userId=" + guid); - } - } - - private ValidValue createValidValue(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ValidValue validValue = new ValidValue(); - validValue.setDescription("ddd"); - validValue.setExpression("Ex"); - validValue.setSource("source"); - validValue.setSteward("Stew"); - validValue.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - validValue.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - ValidValue createdValidValue = subjectAreaRelationship.validValue().create(this.userId, validValue); - FVTUtils.validateRelationship(createdValidValue); - FVTUtils.checkEnds(validValue, createdValidValue, "ValidValue", "create"); - - return createdValidValue; - } - - private void preferredtermFVT(Term term1, Term term2) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - PreferredTerm createdPreferredTerm = createPreferredTerm(term1, term2); - FVTUtils.validateRelationship(createdPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("Created PreferredTerm " + createdPreferredTerm); - } - String guid = createdPreferredTerm.getGuid(); - - PreferredTerm gotPreferredTerm = subjectAreaRelationship.preferredTerm().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("Got PreferredTerm " + createdPreferredTerm); - } - - PreferredTerm updatePreferredTerm = new PreferredTerm(); - updatePreferredTerm.setDescription("ddd2"); - PreferredTerm updatedPreferredTerm = subjectAreaRelationship.preferredTerm().update(this.userId, guid, updatePreferredTerm); - FVTUtils.validateRelationship(updatedPreferredTerm); - if (!updatedPreferredTerm.getDescription().equals(updatePreferredTerm.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm update description not as expected"); - } - if (!updatedPreferredTerm.getSource().equals(createdPreferredTerm.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm update source not as expected"); - } - if (!updatedPreferredTerm.getExpression().equals(createdPreferredTerm.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm update expression not as expected"); - } - if (!updatedPreferredTerm.getSteward().equals(createdPreferredTerm.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm update steward not as expected"); - } - FVTUtils.checkEnds(updatedPreferredTerm,createdPreferredTerm,"PreferredTerm","update"); - if (log.isDebugEnabled()) { - log.debug("Updated PreferredTerm " + createdPreferredTerm); - } - PreferredTerm replacePreferredTerm = new PreferredTerm(); - replacePreferredTerm.setDescription("ddd3"); - PreferredTerm replacedPreferredTerm = subjectAreaRelationship.preferredTerm().replace(this.userId, guid, replacePreferredTerm); - FVTUtils.validateRelationship(replacedPreferredTerm); - if (!replacedPreferredTerm.getDescription().equals(replacePreferredTerm.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm replace description not as expected"); - } - if (replacedPreferredTerm.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm replace source not as expected"); - } - if (replacedPreferredTerm.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm replace expression not as expected"); - } - if (replacedPreferredTerm.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: preferredTerm replace steward not as expected"); - } - FVTUtils.checkEnds(replacedPreferredTerm,createdPreferredTerm,"PreferredTerm","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced PreferredTerm " + createdPreferredTerm); - } - subjectAreaRelationship.preferredTerm().delete(this.userId, guid); - //FVTUtils.validateLine(gotPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted PreferredTerm with userId=" + guid); - } - gotPreferredTerm = subjectAreaRelationship.preferredTerm().restore(this.userId, guid); - FVTUtils.validateRelationship(gotPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("restored PreferredTerm with userId=" + guid); - } - subjectAreaRelationship.preferredTerm().delete(this.userId, guid); - //FVTUtils.validateLine(gotPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted PreferredTerm with userId=" + guid); - } - } - - private PreferredTerm createPreferredTerm(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - PreferredTerm preferredTerm = new PreferredTerm(); - preferredTerm.setDescription("ddd"); - preferredTerm.setExpression("Ex"); - preferredTerm.setSource("source"); - preferredTerm.setSteward("Stew"); - preferredTerm.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - preferredTerm.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - PreferredTerm createdPreferredTerm = subjectAreaRelationship.preferredTerm().create(this.userId, preferredTerm); - FVTUtils.validateRelationship(createdPreferredTerm); - FVTUtils.checkEnds(preferredTerm, createdPreferredTerm, "PreferredTerm", "create"); - - return createdPreferredTerm; - } - - private void usedincontextFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - UsedInContext createdUsedInContext = createUsedInContext(term1, term2); - FVTUtils.validateRelationship(createdUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Created UsedInContext " + createdUsedInContext); - } - String guid = createdUsedInContext.getGuid(); - - UsedInContext gotUsedInContext = subjectAreaRelationship.usedInContext().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Got UsedInContext " + createdUsedInContext); - } - - UsedInContext updateUsedInContext = new UsedInContext(); - updateUsedInContext.setDescription("ddd2"); - UsedInContext updatedUsedInContext = subjectAreaRelationship.usedInContext().update(this.userId, guid, updateUsedInContext); - FVTUtils.validateRelationship(updatedUsedInContext); - if (!updatedUsedInContext.getDescription().equals(updateUsedInContext.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext update description not as expected"); - } - if (!updatedUsedInContext.getSource().equals(createdUsedInContext.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext update source not as expected"); - } - if (!updatedUsedInContext.getExpression().equals(createdUsedInContext.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext update expression not as expected"); - } - if (!updatedUsedInContext.getSteward().equals(createdUsedInContext.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext update steward not as expected"); - } - - FVTUtils.checkEnds(updatedUsedInContext,createdUsedInContext,"UsedInContext","update"); - if (log.isDebugEnabled()) { - log.debug("Updated UsedInContext " + createdUsedInContext); - } - UsedInContext replaceUsedInContext = new UsedInContext(); - replaceUsedInContext.setDescription("ddd3"); - UsedInContext replacedUsedInContext = subjectAreaRelationship.usedInContext().replace(this.userId, guid, replaceUsedInContext); - FVTUtils.validateRelationship(replacedUsedInContext); - if (!replacedUsedInContext.getDescription().equals(replaceUsedInContext.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext replace description not as expected"); - } - if (replacedUsedInContext.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext replace source not as expected"); - } - if (replacedUsedInContext.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext replace expression not as expected"); - } - if (replacedUsedInContext.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: usedInContext replace steward not as expected"); - } - FVTUtils.checkEnds(replacedUsedInContext,createdUsedInContext,"UsedInContext","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced UsedInContext " + createdUsedInContext); - } - subjectAreaRelationship.usedInContext().delete(this.userId, guid); - //FVTUtils.validateLine(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Deleted UsedInContext with userId=" + guid); - } - gotUsedInContext = subjectAreaRelationship.usedInContext().restore(this.userId, guid); - FVTUtils.validateRelationship(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Restored UsedInContext with userId=" + guid); - } - subjectAreaRelationship.usedInContext().delete(this.userId, guid); - //FVTUtils.validateLine(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Deleted UsedInContext with userId=" + guid); - } - } - - private UsedInContext createUsedInContext(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - UsedInContext usedInContext = new UsedInContext(); - usedInContext.setDescription("ddd"); - usedInContext.setExpression("Ex"); - usedInContext.setSource("source"); - usedInContext.setSteward("Stew"); - usedInContext.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - usedInContext.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - UsedInContext createdUsedInContext = subjectAreaRelationship.usedInContext().create(this.userId, usedInContext); - FVTUtils.validateRelationship(createdUsedInContext); - FVTUtils.checkEnds(usedInContext, createdUsedInContext, "UsedInContext", "create"); - return createdUsedInContext; - } - - private void translationFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - Translation createdTranslation = createTranslation(term1, term2); - FVTUtils.validateRelationship(createdTranslation); - if (log.isDebugEnabled()) { - log.debug("Created Translation " + createdTranslation); - } - String guid = createdTranslation.getGuid(); - - Translation gotTranslation = subjectAreaRelationship.translation().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Got Translation " + createdTranslation); - } - - Translation updateTranslation = new Translation(); - updateTranslation.setDescription("ddd2"); - Translation updatedTranslation = subjectAreaRelationship.translation().update(this.userId, guid, updateTranslation); - FVTUtils.validateRelationship(updatedTranslation); - if (!updatedTranslation.getDescription().equals(updateTranslation.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: translation update description not as expected"); - } - if (!updatedTranslation.getSource().equals(createdTranslation.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: translation update source not as expected"); - } - if (!updatedTranslation.getExpression().equals(createdTranslation.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: translation update expression not as expected"); - } - if (!updatedTranslation.getSteward().equals(createdTranslation.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: translation update steward not as expected"); - } - FVTUtils.checkEnds(updatedTranslation, createdTranslation, "translation", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated Translation " + createdTranslation); - } - Translation replaceTranslation = new Translation(); - replaceTranslation.setDescription("ddd3"); - Translation replacedTranslation = subjectAreaRelationship.translation().replace(this.userId, guid, replaceTranslation); - FVTUtils.validateRelationship(replacedTranslation); - if (!replacedTranslation.getDescription().equals(replaceTranslation.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: translation replace description not as expected"); - } - if (replacedTranslation.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: translation replace source not as expected"); - } - if (replacedTranslation.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: translation replace expression not as expected"); - } - if (replacedTranslation.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: translation replace steward not as expected"); - } - FVTUtils.checkEnds(replacedTranslation, updatedTranslation, "translation", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced Translation " + createdTranslation); - } - subjectAreaRelationship.translation().delete(this.userId, guid); - //FVTUtils.validateLine(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Deleted Translation with userId=" + guid); - } - gotTranslation = subjectAreaRelationship.translation().restore(this.userId, guid); - FVTUtils.validateRelationship(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Restored Translation with userId=" + guid); - } - subjectAreaRelationship.translation().delete(this.userId, guid); - //FVTUtils.validateLine(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Deleted Translation with userId=" + guid); - } - } - - private Translation createTranslation(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Translation translation = new Translation(); - translation.setDescription("ddd"); - translation.setExpression("Ex"); - translation.setSource("source"); - translation.setSteward("Stew"); - translation.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - translation.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - Translation createdTranslation = subjectAreaRelationship.translation().create(this.userId, translation); - FVTUtils.validateRelationship(createdTranslation); - FVTUtils.checkEnds(translation, createdTranslation, "translations", "create"); - - return createdTranslation; - } - - private void hasaFVT(Term term1, Term term3) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - HasA createdHasA = createHasA(term1, term3); - - FVTUtils.validateRelationship(createdHasA); - if (log.isDebugEnabled()) { - log.debug("Created Hasa " + createdHasA); - } - String guid = createdHasA.getGuid(); - - HasA gotHasATerm = subjectAreaRelationship.hasA().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotHasATerm); - if (log.isDebugEnabled()) { - log.debug("Got Hasa " + createdHasA); - } - HasA updateHasATerm = new HasA(); - updateHasATerm.setDescription("ddd2"); - HasA updatedHasATerm = subjectAreaRelationship.hasA().update(this.userId, guid, updateHasATerm); - FVTUtils.validateRelationship(updatedHasATerm); - if (!updatedHasATerm.getDescription().equals(updateHasATerm.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: HASARelationship update description not as expected"); - } - if (!updatedHasATerm.getSource().equals(createdHasA.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: HASARelationship update source not as expected"); - } - if (!updatedHasATerm.getSteward().equals(createdHasA.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: HASARelationship update steward not as expected"); - } - FVTUtils.checkEnds(updatedHasATerm, createdHasA, "has-a", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated HASARelationship " + createdHasA); - } - HasA replaceHasA = new HasA(); - replaceHasA.setDescription("ddd3"); - HasA replacedHasA = subjectAreaRelationship.hasA().replace(this.userId, guid, replaceHasA); - FVTUtils.validateRelationship(replacedHasA); - if (!replacedHasA.getDescription().equals(replaceHasA.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: HASARelationship replace description not as expected"); - } - if (replacedHasA.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: HASARelationship replace source not as expected"); - } - if (replacedHasA.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: HASARelationship replace steward not as expected"); - } - FVTUtils.checkEnds(updatedHasATerm, replacedHasA, "has-a", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced HASARelationship " + createdHasA); - } - - // check that term1 and term3 have the spine object and attribute flags sets - - Term term1PostCreate = termFVT.getTermByGUID(term1.getSystemAttributes().getGUID()); - if (!term1PostCreate.isSpineObject()) { - throw new SubjectAreaFVTCheckedException("ERROR: expect term 1 to be a Spine Object"); - } - Term term3PostCreate = termFVT.getTermByGUID(term3.getSystemAttributes().getGUID()); - if (!term3PostCreate.isSpineAttribute()) { - throw new SubjectAreaFVTCheckedException("ERROR: expect term 3 to be a Spine Attribute"); - } - - subjectAreaRelationship.hasA().delete(this.userId, guid); - //FVTUtils.validateLine(gotHASATerm); - if (log.isDebugEnabled()) { - log.debug("Deleted Hasa with userId=" + guid); - } - gotHasATerm = subjectAreaRelationship.hasA().restore(this.userId, guid); - FVTUtils.validateRelationship(gotHasATerm); - if (log.isDebugEnabled()) { - log.debug("Restored Hasa with userId=" + guid); - } - subjectAreaRelationship.hasA().delete(this.userId, guid); - //FVTUtils.validateLine(gotHASATerm); - if (log.isDebugEnabled()) { - log.debug("Deleted Hasa with userId=" + guid); - } - } - - private HasA createHasA(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - HasA hasA = new HasA(); - hasA.setDescription("ddd"); - hasA.setSource("source"); - hasA.setSteward("Stew"); - hasA.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - hasA.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - - HasA createdTermHasARelationship = subjectAreaRelationship.hasA().create(this.userId, hasA); - FVTUtils.validateRelationship(createdTermHasARelationship); - FVTUtils.checkEnds(hasA, createdTermHasARelationship, "Has-a", "create"); - - return createdTermHasARelationship; - } - - private void relatedtermFVT(Term term1, Term term3) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - RelatedTerm createdRelatedTerm = createRelatedTerm(term1, term3); - FVTUtils.validateRelationship(createdRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Created RelatedTerm " + createdRelatedTerm); - } - String guid = createdRelatedTerm.getGuid(); - - RelatedTerm gotRelatedTerm = subjectAreaRelationship.relatedTerm().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Got RelatedTerm " + createdRelatedTerm); - } - RelatedTerm updateRelatedTerm = new RelatedTerm(); - updateRelatedTerm.setDescription("ddd2"); - updateRelatedTerm.setGuid(createdRelatedTerm.getGuid()); - RelatedTerm updatedRelatedTerm = subjectAreaRelationship.relatedTerm().update(this.userId, guid, updateRelatedTerm); - FVTUtils.validateRelationship(updatedRelatedTerm); - if (!updatedRelatedTerm.getDescription().equals(updateRelatedTerm.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm update description not as expected"); - } - if (!updatedRelatedTerm.getSource().equals(createdRelatedTerm.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm update source not as expected"); - } - if (!updatedRelatedTerm.getExpression().equals(createdRelatedTerm.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm update expression not as expected"); - } - if (!updatedRelatedTerm.getSteward().equals(createdRelatedTerm.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm update steward not as expected"); - } - FVTUtils.checkEnds(updatedRelatedTerm,createdRelatedTerm,"RelatedTerm","update"); - if (log.isDebugEnabled()) { - log.debug("Updated RelatedTerm " + createdRelatedTerm); - } - RelatedTerm replaceRelatedTerm = new RelatedTerm(); - replaceRelatedTerm.setDescription("ddd3"); - replaceRelatedTerm.setGuid(createdRelatedTerm.getGuid()); - RelatedTerm replacedRelatedTerm = subjectAreaRelationship.relatedTerm().replace(this.userId, guid, replaceRelatedTerm); - FVTUtils.validateRelationship(replacedRelatedTerm); - if (!replacedRelatedTerm.getDescription().equals(replaceRelatedTerm.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm replace description not as expected"); - } - if (replacedRelatedTerm.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm replace source not as expected"); - } - if (replacedRelatedTerm.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm replace expression not as expected"); - } - if (replacedRelatedTerm.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: RelatedTerm replace steward not as expected"); - } - FVTUtils.checkEnds(replacedRelatedTerm,createdRelatedTerm,"RelatedTerm","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced RelatedTerm " + createdRelatedTerm); - } - - subjectAreaRelationship.relatedTerm().delete(this.userId, guid); - //FVTUtils.validateLine(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted RelatedTerm with userId=" + guid); - } - gotRelatedTerm = subjectAreaRelationship.relatedTerm().restore(this.userId, guid); - FVTUtils.validateRelationship(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Restored RelatedTerm with userId=" + guid); - } - subjectAreaRelationship.relatedTerm().delete(this.userId, guid); - //FVTUtils.validateLine(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted RelatedTerm with userId=" + guid); - } - } - - private RelatedTerm createRelatedTerm(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - RelatedTerm relatedterm = new RelatedTerm(); - relatedterm.setDescription("ddd"); - relatedterm.setExpression("Ex"); - relatedterm.setSource("source"); - relatedterm.setSteward("Stew"); - relatedterm.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - relatedterm.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - RelatedTerm createdRelatedTerm = subjectAreaRelationship.relatedTerm().create(this.userId, relatedterm); - FVTUtils.validateRelationship(createdRelatedTerm); - FVTUtils.checkEnds(relatedterm, createdRelatedTerm, "RelatedTerm", "create"); - - return createdRelatedTerm; - - } - - private void antonymFVT(Term term1, Term term3) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - Antonym createdAntonym = createAntonym(term1, term3); - FVTUtils.validateRelationship(createdAntonym); - if (log.isDebugEnabled()) { - log.debug("Created Antonym " + createdAntonym); - } - String guid = createdAntonym.getGuid(); - - Antonym gotAntonym = subjectAreaRelationship.antonym().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Got Antonym " + createdAntonym); - } - Antonym updateAntonym = new Antonym(); - updateAntonym.setDescription("ddd2"); - Antonym updatedAntonym = subjectAreaRelationship.antonym().update(this.userId, guid, updateAntonym); - FVTUtils.validateRelationship(updatedAntonym); - if (!updatedAntonym.getDescription().equals(updateAntonym.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym update description not as expected"); - } - if (!updatedAntonym.getSource().equals(createdAntonym.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym update source not as expected"); - } - if (!updatedAntonym.getExpression().equals(createdAntonym.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym update expression not as expected"); - } - if (!updatedAntonym.getSteward().equals(createdAntonym.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym update steward not as expected"); - } - FVTUtils.checkEnds(updatedAntonym,createdAntonym,"Antonym","update"); - if (log.isDebugEnabled()) { - log.debug("Updated Antonym " + createdAntonym); - } - Antonym replaceAntonym = new Antonym(); - replaceAntonym.setDescription("ddd3"); - replaceAntonym.setGuid(createdAntonym.getGuid()); - Antonym replacedAntonym = subjectAreaRelationship.antonym().replace(this.userId, guid, replaceAntonym); - FVTUtils.validateRelationship(replacedAntonym); - if (!replacedAntonym.getDescription().equals(replaceAntonym.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym replace description not as expected"); - } - if (replacedAntonym.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym replace source not as expected"); - } - if (replacedAntonym.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym replace expression not as expected"); - } - if (replacedAntonym.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: Antonym replace steward not as expected"); - } - FVTUtils.checkEnds(updatedAntonym,createdAntonym,"Antonym","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced Antonym " + createdAntonym); - } - - subjectAreaRelationship.antonym().delete(this.userId, guid); - //FVTUtils.validateLine(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Deleted Antonym with userId=" + guid); - } - gotAntonym = subjectAreaRelationship.antonym().restore(this.userId, guid); - FVTUtils.validateRelationship(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Restored Antonym with userId=" + guid); - } - subjectAreaRelationship.antonym().delete(this.userId, guid); - //FVTUtils.validateLine(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Deleted Antonym with userId=" + guid); - } - } - - private Antonym createAntonym(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Antonym antonym = new Antonym(); - antonym.setDescription("ddd"); - antonym.setExpression("Ex"); - antonym.setSource("source"); - antonym.setSteward("Stew"); - antonym.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - antonym.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - Antonym createdAntonym = subjectAreaRelationship.antonym().create(this.userId, antonym); - FVTUtils.validateRelationship(createdAntonym); - FVTUtils.checkEnds(antonym, createdAntonym, "Antonym", "create"); - return createdAntonym; - } - - private void synonymFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, SubjectAreaFVTCheckedException, UserNotAuthorizedException { - Synonym createdSynonym = createSynonym(term1, term2); - FVTUtils.validateRelationship(createdSynonym); - if (log.isDebugEnabled()) { - log.debug("Created Synonym " + createdSynonym); - } - String guid = createdSynonym.getGuid(); - - Synonym gotSynonym = subjectAreaRelationship.synonym().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotSynonym); - if (log.isDebugEnabled()) { - log.debug("Got Synonym " + createdSynonym); - } - - Synonym updateSynonym = new Synonym(); - updateSynonym.setDescription("ddd2"); - Synonym updatedSynonym = subjectAreaRelationship.synonym().update(this.userId, guid, updateSynonym); - FVTUtils.validateRelationship(updatedSynonym); - if (!updatedSynonym.getDescription().equals(updateSynonym.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym update description not as expected"); - } - if (!updatedSynonym.getSource().equals(createdSynonym.getSource())) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym update source not as expected"); - } - if (!updatedSynonym.getExpression().equals(createdSynonym.getExpression())) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym update expression not as expected"); - } - if (!updatedSynonym.getSteward().equals(createdSynonym.getSteward())) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym update steward not as expected"); - } - - FVTUtils.checkEnds(updatedSynonym, createdSynonym, "synonym", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated Synonym " + createdSynonym); - } - Synonym replaceSynonym = new Synonym(); - replaceSynonym.setDescription("ddd3"); - Synonym replacedSynonym = subjectAreaRelationship.synonym().replace(this.userId, guid, replaceSynonym); - FVTUtils.validateRelationship(replacedSynonym); - if (!replacedSynonym.getDescription().equals(replaceSynonym.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym replace description not as expected"); - } - if (replacedSynonym.getSource() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym replace source not as expected"); - } - if (replacedSynonym.getExpression() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym replace expression not as expected"); - } - if (replacedSynonym.getSteward() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: synonym replace steward not as expected"); - } - FVTUtils.checkEnds(updatedSynonym, replacedSynonym, "synonym", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced Synonym " + createdSynonym); - } - subjectAreaRelationship.synonym().delete(this.userId, guid); - //FVTUtils.validateLine(gotSynonym); - if (log.isDebugEnabled()) { - log.debug("Deleted Synonym with userId=" + guid); - } - gotSynonym = subjectAreaRelationship.synonym().restore(this.userId, guid); - FVTUtils.validateRelationship(gotSynonym); - if (log.isDebugEnabled()) { - log.debug("Restored Synonym with userId=" + guid); - } - subjectAreaRelationship.synonym().delete(this.userId, guid); - //FVTUtils.validateLine(gotSynonym); - - if (log.isDebugEnabled()) { - log.debug("Hard deleted Synonym with userId=" + guid); - } - } - - public Synonym createSynonym(Term term1, Term term2) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Synonym synonym = new Synonym(); - synonym.setDescription("ddd"); - synonym.setExpression("Ex"); - synonym.setSource("source"); - synonym.setSteward("Stew"); - synonym.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - synonym.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - Synonym createdSynonym = subjectAreaRelationship.synonym().create(this.userId, synonym); - FVTUtils.validateRelationship(createdSynonym); - FVTUtils.checkEnds(synonym, createdSynonym, "synonym", "create"); - return createdSynonym; - } - - - public IsATypeOfDeprecated createIsATypeOfDeprecated(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - IsATypeOfDeprecated isATypeOfDeprecated = new IsATypeOfDeprecated(); - isATypeOfDeprecated.setDescription("ddd"); - isATypeOfDeprecated.setSource("source"); - isATypeOfDeprecated.setSteward("Stew"); - isATypeOfDeprecated.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - isATypeOfDeprecated.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - IsATypeOfDeprecated createdisATypeOfDeprecated = subjectAreaRelationship.isaTypeOfDeprecated().create(this.userId, isATypeOfDeprecated); - FVTUtils.validateRelationship(createdisATypeOfDeprecated); - FVTUtils.checkEnds(isATypeOfDeprecated, createdisATypeOfDeprecated, "IsaTypeOfDeprecated", "create"); - - if (log.isDebugEnabled()) { - log.debug("Created isATypeOfDeprecated " + createdisATypeOfDeprecated); - } - return createdisATypeOfDeprecated; - } - - public IsATypeOf createIsATypeOf(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - IsATypeOf isATypeOf = new IsATypeOf(); - isATypeOf.setDescription("ddd"); - isATypeOf.setSource("source"); - isATypeOf.setSteward("Stew"); - isATypeOf.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - isATypeOf.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - IsATypeOf createdisATypeOf = subjectAreaRelationship.isATypeOf().create(this.userId, isATypeOf); - FVTUtils.validateRelationship(createdisATypeOf); - FVTUtils.checkEnds(isATypeOf, createdisATypeOf, "isATypeOf", "create"); - - if (log.isDebugEnabled()) { - log.debug("Created isATypeOf Relationship " + createdisATypeOf); - } - return createdisATypeOf; - } - - private void termCategorizationFVT(Term term, Category category) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - Categorization createdTermCategorizationRelationship = createTermCategorization(term, category); - FVTUtils.validateRelationship(createdTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Created TermCategorizationRelationship " + createdTermCategorizationRelationship); - } - String guid = createdTermCategorizationRelationship.getGuid(); - - Categorization gotTermCategorizationRelationship = subjectAreaRelationship.termCategorization().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Got TermCategorizationRelationship " + createdTermCategorizationRelationship); - } - - Categorization updateTermCategorizationRelationship = new Categorization(); - updateTermCategorizationRelationship.setDescription("ddd2"); - Categorization updatedTermCategorizationRelationship = subjectAreaRelationship.termCategorization().update(this.userId, guid, updateTermCategorizationRelationship); - FVTUtils.validateRelationship(updatedTermCategorizationRelationship); - FVTUtils.checkEnds(updatedTermCategorizationRelationship,createdTermCategorizationRelationship,"TermCategorization","update"); - - if (!updatedTermCategorizationRelationship.getDescription().equals(updateTermCategorizationRelationship.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: TermCategorization update description not as expected"); - } - if (updatedTermCategorizationRelationship.getStatus() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: TermCategorization update status not as expected"); - } - - if (log.isDebugEnabled()) { - log.debug("Updated TermCategorizationRelationship " + createdTermCategorizationRelationship); - } - Categorization replaceTermCategorizationRelationship = new Categorization(); - replaceTermCategorizationRelationship.setDescription("ddd3"); - Categorization replacedTermCategorizationRelationship = subjectAreaRelationship.termCategorization().replace(this.userId, guid, replaceTermCategorizationRelationship); - FVTUtils.validateRelationship(replacedTermCategorizationRelationship); - if (!replacedTermCategorizationRelationship.getDescription().equals(replaceTermCategorizationRelationship.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: TermCategorization replace description not as expected"); - } - if (replacedTermCategorizationRelationship.getStatus() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: TermCategorization replace source not as expected"); - } - - FVTUtils.checkEnds(replacedTermCategorizationRelationship,createdTermCategorizationRelationship,"TermCategorization","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced TermCategorizationRelationship " + createdTermCategorizationRelationship); - } - subjectAreaRelationship.termCategorization().delete(this.userId, guid); - //FVTUtils.validateLine(gotTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted TermCategorizationRelationship with userId=" + guid); - } - gotTermCategorizationRelationship = subjectAreaRelationship.termCategorization().restore(this.userId, guid); - FVTUtils.validateRelationship(gotTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Restored TermCategorizationRelationship with userId=" + guid); - } - subjectAreaRelationship.termCategorization().delete(this.userId, guid); - //FVTUtils.validateLine(gotTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted TermCategorization with userId=" + guid); - } - } - - - public Categorization createTermCategorization(Term term, Category category) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Categorization termCategorization = new Categorization(); - termCategorization.getEnd1().setNodeGuid(category.getSystemAttributes().getGUID()); - termCategorization.getEnd2().setNodeGuid(term.getSystemAttributes().getGUID()); - Categorization createdTermCategorization = subjectAreaRelationship.termCategorization().create(this.userId, termCategorization); - FVTUtils.validateRelationship(createdTermCategorization); - FVTUtils.checkEnds(termCategorization, createdTermCategorization, "TermCategorizationRelationship", "create"); - if (log.isDebugEnabled()) { - log.debug("Created TermCategorizationRelationship " + createdTermCategorization); - } - - return createdTermCategorization; - } - - private void projectScopeFVT(Project project, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - ProjectScope createdProjectScope = createProjectScope(project, term); - FVTUtils.validateRelationship(createdProjectScope); -// if (projectFVT.getProjectTerms(project.getSystemAttributes().getGUID()).size() !=1){ -// throw new SubjectAreaFVTCheckedException("ERROR: Project terms were not as expected"); -// } - - if (log.isDebugEnabled()) { - log.debug("Created ProjectScopeRelationship " + createdProjectScope); - } - String guid = createdProjectScope.getGuid(); - - ProjectScope gotProjectScopeRelationship = subjectAreaRelationship.projectScope().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotProjectScopeRelationship); - if (log.isDebugEnabled()) { - log.debug("Got ProjectScopeRelationship " + gotProjectScopeRelationship); - } - - ProjectScope updateProjectScope = new ProjectScope(); - updateProjectScope.setDescription("ddd2"); - updateProjectScope.setGuid(createdProjectScope.getGuid()); - ProjectScope updatedProjectScope = subjectAreaRelationship.projectScope().update(this.userId, guid, updateProjectScope); - FVTUtils.validateRelationship(updatedProjectScope); - if (!updatedProjectScope.getDescription().equals(updateProjectScope.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: Project scope update scopeDescription not as expected"); - } - - FVTUtils.checkEnds(updatedProjectScope,createdProjectScope,"ProjectScope","update"); - - if (log.isDebugEnabled()) { - log.debug("Updated ProjectScopeRelationship " + createdProjectScope); - } - ProjectScope replaceProjectScope = new ProjectScope(); - replaceProjectScope.setDescription("ddd3"); - ProjectScope replacedProjectScope = subjectAreaRelationship.projectScope().replace(this.userId, guid, replaceProjectScope); - FVTUtils.validateRelationship(replacedProjectScope); - if (!replacedProjectScope.getDescription().equals(replaceProjectScope.getDescription())) { - throw new SubjectAreaFVTCheckedException("ERROR: project scope replace scope description not as expected"); - } - FVTUtils.checkEnds(replacedProjectScope,createdProjectScope,"ProjectScope","replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced ProjectScopeRelationship " + createdProjectScope); - } - subjectAreaRelationship.projectScope().delete(this.userId, guid); - //FVTUtils.validateLine(gotProjectScopeRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted ProjectScopeRelationship with userId=" + guid); - } - gotProjectScopeRelationship = subjectAreaRelationship.projectScope().restore(this.userId, guid); - FVTUtils.validateRelationship(gotProjectScopeRelationship); - if (log.isDebugEnabled()) { - log.debug("Restored ProjectScopeRelationship with userId=" + guid); - } - subjectAreaRelationship.projectScope().delete(this.userId, guid); - //FVTUtils.validateLine(gotProjectScopeRelationship); - - if (log.isDebugEnabled()) { - log.debug("Hard deleted ProjectScopeRelationship with userId=" + guid); - } - } - - protected ProjectScope createProjectScope(Project project, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - ProjectScope projectScope = new ProjectScope(); - projectScope.getEnd1().setNodeGuid(project.getSystemAttributes().getGUID()); - projectScope.getEnd2().setNodeGuid(term.getSystemAttributes().getGUID()); - ProjectScope createdProjectScope = subjectAreaRelationship.projectScope().create(this.userId, projectScope); - FVTUtils.validateRelationship(createdProjectScope); - if (log.isDebugEnabled()) { - log.debug("CreatedProjectScopeRelationship " + createdProjectScope); - } - return createdProjectScope; - } - - private void categoryHierarchyLinkFVT(Category parent, Category child) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - CategoryHierarchyLink categoryHierarchyLink = createCategoryHierarchyLink(parent, child); - String guid = categoryHierarchyLink.getGuid(); - CategoryHierarchyLink gotCategoryHierarchyLink = subjectAreaRelationship.categoryHierarchyLink().getByGUID(this.userId, guid); - FVTUtils.validateRelationship(gotCategoryHierarchyLink); - if (log.isDebugEnabled()) { - log.debug("Got CategoryHierarchyLink " + categoryHierarchyLink); - } - Category gotChild = subjectAreaCategory.getByGUID(userId, child.getSystemAttributes().getGUID()); - checkParent(parent, gotChild); - subjectAreaRelationship.categoryHierarchyLink().delete(this.userId, guid); - if (log.isDebugEnabled()) { - log.debug("Deleted CategoryHierarchyLink with userId=" + guid); - } - gotCategoryHierarchyLink = subjectAreaRelationship.categoryHierarchyLink().restore(this.userId, guid); - FVTUtils.validateRelationship(gotCategoryHierarchyLink); - if (log.isDebugEnabled()) { - log.debug("Restored CategoryHierarchyLink with userId=" + guid); - } - subjectAreaRelationship.categoryHierarchyLink().delete(this.userId, guid); - if (log.isDebugEnabled()) { - log.debug("Deleted CategoryHierarchyLink with userId=" + guid); - } - } - - public CategoryHierarchyLink createCategoryHierarchyLink(Category parent, Category child) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - CategoryHierarchyLink categoryHierarchyLink = new CategoryHierarchyLink(); - categoryHierarchyLink.getEnd1().setNodeGuid(parent.getSystemAttributes().getGUID()); - categoryHierarchyLink.getEnd2().setNodeGuid(child.getSystemAttributes().getGUID()); - CategoryHierarchyLink createdCategoryHierarchyLink = subjectAreaRelationship.categoryHierarchyLink().create(this.userId, categoryHierarchyLink); - FVTUtils.validateRelationship(createdCategoryHierarchyLink); - FVTUtils.checkEnds(categoryHierarchyLink, createdCategoryHierarchyLink, "CategoryHierarchyLink", "create"); - - if (log.isDebugEnabled()) { - log.debug("Created CategoryHierarchyLink " + createdCategoryHierarchyLink); - } - - return createdCategoryHierarchyLink; - } - - public void checkParent(Category parent, Category gotChildCategory) throws SubjectAreaFVTCheckedException { - if (gotChildCategory.getParentCategory() != null) { - CategorySummary categorySummary = gotChildCategory.getParentCategory(); - String parentGuid = parent.getSystemAttributes().getGUID(); - String parentGuidFromChild = categorySummary.getGuid(); - if(!parentGuid.equals(parentGuidFromChild)) { - throw new SubjectAreaFVTCheckedException("ERROR parent category guid - " + parentGuid - + " no equal parent guid " + parentGuidFromChild + " from child."); - } - } else { - throw new SubjectAreaFVTCheckedException("ERROR parent category is null"); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RunAllFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RunAllFVT.java deleted file mode 100644 index 05357999bec..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RunAllFVT.java +++ /dev/null @@ -1,161 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.http.HttpHelper; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * FVT resource to call subject area term client API FVT resources - */ -public class RunAllFVT -{ - public static void main(String[] args) - { - HttpHelper.noStrictSSL(); - - try - { - String url = RunAllFVT.getUrl(args); - String serverName = getServerName(args); - String userId = getUserId(args); - performFVT(url, serverName, userId); - System.out.println("FVT ran successfully"); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - System.out.println("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - System.out.println("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - - public static void performFVT(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - int initialGlossaryCount = GlossaryFVT.getGlossaryCount(url, serverName, userId); - int initialTermCount = TermFVT.getTermCount(url, serverName, userId); - int initialCategoryCount = CategoryFVT.getCategoryCount(url, serverName, userId); - int initialSubjectAreaCount = SubjectAreaDefinitionCategoryFVT.getSubjectAreaCount(url, serverName, userId); - int initialProjectCount = ProjectFVT.getProjectCount(url,serverName,userId); - - GlossaryFVT.runIt(url,serverName,userId); - TermFVT.runIt(url,serverName,userId); - CategoryFVT.runIt(url,serverName,userId); - CategoryHierarchyFVT.runIt(url,serverName,userId); - RelationshipsFVT.runIt(url,serverName,userId); - ProjectFVT.runIt(url, serverName, userId); - SubjectAreaDefinitionCategoryFVT.runIt(url,serverName,userId); - GraphFVT.runIt(url,serverName,userId); - EffectiveDatesFVT.runIt(url,serverName,userId); - CheckSerializationFVT.runIt(url, serverName, userId); - ConfigFVT.runIt(url, serverName, userId); - - int finalGlossaryCount = GlossaryFVT.getGlossaryCount(url,serverName,userId); - int finalTermCount = TermFVT.getTermCount(url,serverName,userId); - int finalCategoryCount = CategoryFVT.getCategoryCount(url,serverName,userId); - int finalSubjectAreaCount = SubjectAreaDefinitionCategoryFVT.getSubjectAreaCount(url,serverName,userId); - int finalProjectCount = ProjectFVT.getProjectCount(url,serverName,userId); - - if (initialCategoryCount != finalCategoryCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Categories count incorrect; expected " +initialCategoryCount + " , got " + finalCategoryCount); - } - if (initialTermCount != finalTermCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Terms count incorrect; expected " +initialTermCount + " , got " + finalTermCount); - } - if (initialGlossaryCount != finalGlossaryCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Glossaries count incorrect; expected " +initialGlossaryCount + " , got " + finalGlossaryCount); - } - if (initialSubjectAreaCount != finalSubjectAreaCount) { - throw new SubjectAreaFVTCheckedException("ERROR: SubjectArea count incorrect; expected " +initialSubjectAreaCount + " , got " + finalSubjectAreaCount); - } - if (initialProjectCount != finalProjectCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Projects count incorrect; expected " +initialProjectCount + " , got " + finalProjectCount); - } - } - - public static String getServerName(String[] args) throws IOException - { - String name = null; - if (args.length > 1) - { - name = args[1]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a OMAG Server Name. Press enter to get the default (" + FVTConstants.SERVER_NAME1 + ")) :"); - name = br.readLine(); - if (name.equals("")) - { - name = FVTConstants.SERVER_NAME1; - } - - } - return name; - } - /** - * This method gets the userId that the sample will use to issue calls to the server. - *

- * If arguments are supplied then the third parameter is used as a userId. - *

- * If no userId is supplied then prompt the user to enter a valid userId, enter means to use the default userId. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occurred while getting input from the user. - */ - public static String getUserId(String[] args) throws IOException - { - String userId = null; - if (args.length > 2) - { - userId = args[2]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a userId. Press enter to get the default (" + FVTConstants.USERID + ")) :"); - userId = br.readLine(); - if (userId.equals("")) - { - userId = FVTConstants.USERID; - } - - } - return userId; - } - - /** - * This method gets the url that the tests will use to issue calls to the server. - *

- * If arguments are supplied then the first parameter is used as a url. - *

- * If no url is supplied then prompt the user to enter a valid url, enter means to use the default url. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occured while getting input from the user. - */ - public static String getUrl(String[] args) throws IOException - { - String url = null; - if (args.length > 0) - { - url = args[0]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a URL. Press enter to get the default (" + FVTConstants.DEFAULT_URL + ".)) :"); - url = br.readLine(); - if (url.equals("")) - { - url = FVTConstants.DEFAULT_URL; - } - } - return url; - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RunAllFVTOn2Servers.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RunAllFVTOn2Servers.java deleted file mode 100644 index fe92afd19ae..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/RunAllFVTOn2Servers.java +++ /dev/null @@ -1,71 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.http.HttpHelper; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * FVT resource to call subject area term client API FVT resources on 2 in memory servers names Server1 and - * Server2. - */ -public class RunAllFVTOn2Servers -{ - - public static void main(String args[]) - { - HttpHelper.noStrictSSL(); - - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - - RunAllFVT.performFVT(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - RunAllFVT.performFVT(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - System.out.println("FVT ran successfully"); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - System.out.println("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - System.out.println("ERROR: " + e.getMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - - /** - * This method gets the url that the tests will use to issue calls to the server. - *

- * If arguments are supplied then the first parameter is used as a url. - *

- * If no url is supplied then prompt the user to enter a valid url, enter means to use the default url. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occurred while getting input from the user. - */ - public static String getUrl(String args[]) throws IOException - { - String url = null; - if (args.length > 0) - { - url = args[0]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a URL. Press enter to get the default (" + FVTConstants.DEFAULT_URL + ".)):"); - url = br.readLine(); - if (url.equals("")) - { - url = FVTConstants.DEFAULT_URL; - } - } - return url; - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/SubjectAreaDefinitionCategoryFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/SubjectAreaDefinitionCategoryFVT.java deleted file mode 100644 index 86376bf8d24..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/SubjectAreaDefinitionCategoryFVT.java +++ /dev/null @@ -1,268 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.categories.SubjectAreaCategoryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.io.IOException; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * FVT resource to call subject area subjectArea client API - */ -public class SubjectAreaDefinitionCategoryFVT -{ - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for subject area definition sample"; - private static final String DEFAULT_TEST_CATEGORY_NAME = "Test subject area definition A"; - private static final String DEFAULT_TEST_CATEGORY_NAME_UPDATED = "Test subject area definition A updated"; - private static final String DEFAULT_TEST_CATEGORY_NAME2 = "Test subject area definition B"; - private static final String DEFAULT_TEST_CATEGORY_NAME3 = "Test subject area definition C"; - private static SubjectAreaNodeClient subjectAreaCategory = null; - private GlossaryFVT glossaryFVT =null; - private String userId = null; - private int existingSubjectAreaCount = 0; - private static Logger log = LoggerFactory.getLogger(SubjectAreaDefinitionCategoryFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingSubjectAreas - */ - private Set createdSubjectAreasSet = new HashSet<>(); - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - public SubjectAreaDefinitionCategoryFVT(String url,String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - subjectAreaCategory = new SubjectAreaCategoryClient<>(client); - glossaryFVT = new GlossaryFVT(url,serverName,userId); - this.userId=userId; - existingSubjectAreaCount = findSubjectAreaDefinitions("").size(); - if (log.isDebugEnabled()) { - log.debug("existingSubjectAreaCount " + existingSubjectAreaCount); - } - } - - public static void runIt(String url, String serverName, String userId) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("SubjectAreaDefinitionCategoryFVT runIt started"); - SubjectAreaDefinitionCategoryFVT fvt = new SubjectAreaDefinitionCategoryFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("SubjectAreaDefinitionCategoryFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - public static int getSubjectAreaCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - SubjectAreaDefinitionCategoryFVT fvt = new SubjectAreaDefinitionCategoryFVT(url, serverName, userId); - return fvt.findSubjectAreaDefinitions("").size(); - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - if (log.isDebugEnabled()) { - log.debug("Create a subjectArea1"); - } - SubjectAreaDefinition subjectArea1 = createSubjectAreaDefinitionWithGlossaryGuid(DEFAULT_TEST_CATEGORY_NAME, glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(subjectArea1); - if (log.isDebugEnabled()) { - log.debug("Create a subjectArea2"); - } - SubjectAreaDefinition subjectArea2 = createSubjectAreaDefinitionWithGlossaryGuid(DEFAULT_TEST_CATEGORY_NAME2, glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(subjectArea2); - SubjectAreaDefinition subjectAreaForUpdate = new SubjectAreaDefinition(); - subjectAreaForUpdate.setName(DEFAULT_TEST_CATEGORY_NAME_UPDATED); - - if (subjectArea1 != null) - { - if (log.isDebugEnabled()) { - log.debug("Get the subjectArea1 "); - } - String guid = subjectArea1 .getSystemAttributes().getGUID(); - SubjectAreaDefinition gotSubjectAreaDefinition = getSubjectAreaDefinitionByGUID(guid); - if (log.isDebugEnabled()) { - log.debug("Update the subjectArea1 "); - } - SubjectAreaDefinition updatedSubjectAreaDefinition = updateSubjectAreaDefinition(guid, subjectAreaForUpdate); - FVTUtils.validateNode(updatedSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Get the subjectArea1 again"); - } - gotSubjectAreaDefinition = getSubjectAreaDefinitionByGUID(guid); - FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Delete the subjectArea1 "); - } - deleteSubjectAreaDefinition(guid); - //FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("restore the subjectArea1 "); - } - gotSubjectAreaDefinition = restoreSubjectAreaDefinition(guid); - FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Delete the subjectArea1 "); - } - deleteSubjectAreaDefinition(guid); - //FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Purge a subjectArea1 "); - } - - // create subjectArea DEFAULT_TEST_CATEGORY_NAME3 with parent - if (log.isDebugEnabled()) { - log.debug("Create a subjectArea with a parent subjectArea"); - } - if (log.isDebugEnabled()) { - log.debug("Create a category with a parent category"); - } - - SubjectAreaDefinition subjectAreaDefinition3 = createSubjectAreaDefinitionWithParentGlossaryGuid( DEFAULT_TEST_CATEGORY_NAME3, subjectArea2.getSystemAttributes().getGUID(), glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(subjectAreaDefinition3); - - } - } - private SubjectAreaDefinition createSubjectAreaDefinitionWithParentGlossaryGuid(String subjectAreaName, String parentGuid, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition subjectArea = new SubjectAreaDefinition(); - subjectArea.setName(subjectAreaName); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - subjectArea.setGlossary(glossarySummary); - CategorySummary parentCategory = new CategorySummary(); - parentCategory.setGuid(parentGuid); - subjectArea.setParentCategory(parentCategory); - SubjectAreaDefinition newSubjectAreaDefinition = subjectAreaCategory.create(this.userId, subjectArea); - - if (newSubjectAreaDefinition != null) - { - createdSubjectAreasSet.add(newSubjectAreaDefinition.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created SubjectAreaDefinition " + newSubjectAreaDefinition.getName() + " with glossaryGuid " + newSubjectAreaDefinition.getSystemAttributes().getGUID()); - } - } - return newSubjectAreaDefinition; - } - - public SubjectAreaDefinition createSubjectAreaDefinitionWithGlossaryGuid(String subjectAreaName, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition subjectArea = new SubjectAreaDefinition(); - subjectArea.setName(subjectAreaName); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - subjectArea.setGlossary(glossarySummary); - SubjectAreaDefinition newSubjectAreaDefinition = subjectAreaCategory.create(this.userId, subjectArea); - if (newSubjectAreaDefinition != null) - { - createdSubjectAreasSet.add(newSubjectAreaDefinition.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created SubjectAreaDefinition " + newSubjectAreaDefinition.getName() + " with guid " + newSubjectAreaDefinition.getSystemAttributes().getGUID()); - } - } - return newSubjectAreaDefinition; - } - - - public SubjectAreaDefinition getSubjectAreaDefinitionByGUID(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition subjectArea = subjectAreaCategory.getByGUID(this.userId, guid); - if (subjectArea != null) - { - if (log.isDebugEnabled()) { - log.debug("Got SubjectAreaDefinition " + subjectArea.getName() + " with userId " + subjectArea.getSystemAttributes().getGUID() + " and status " + subjectArea.getSystemAttributes().getStatus()); - } - } - return subjectArea; - } - - public SubjectAreaDefinition updateSubjectAreaDefinition(String guid, SubjectAreaDefinition subjectArea) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition updatedSubjectAreaDefinition = subjectAreaCategory.update(this.userId, guid, subjectArea); - if (updatedSubjectAreaDefinition != null) - { - if (log.isDebugEnabled()) { - log.debug("Updated SubjectAreaDefinition name to " + updatedSubjectAreaDefinition.getName()); - } - } - return updatedSubjectAreaDefinition; - } - - public void deleteSubjectAreaDefinition(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - subjectAreaCategory.delete(this.userId, guid); - createdSubjectAreasSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Deleted SubjectAreaDefinition guid is " + guid); - } - } - - - public SubjectAreaDefinition restoreSubjectAreaDefinition(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition restoredSubjectAreaDefinition = subjectAreaCategory.restore(this.userId, guid); - if (restoredSubjectAreaDefinition != null) - { - createdSubjectAreasSet.add(restoredSubjectAreaDefinition.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("restored SubjectAreaDefinition name is " + restoredSubjectAreaDefinition.getName()); - } - } - return restoredSubjectAreaDefinition; - } - public List findSubjectAreaDefinitions(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - return subjectAreaCategory.find(this.userId, findRequest); - } - private void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - deleteRemainingSubjectAreas(); - glossaryFVT.deleteRemainingGlossaries(); - } - void deleteRemainingSubjectAreas() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Iterator iter = createdSubjectAreasSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteSubjectAreaDefinition(guid); - } - List subjectAreas = findSubjectAreaDefinitions(""); - if (subjectAreas.size() != existingSubjectAreaCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " + existingSubjectAreaCount + " Subject Area Definitions to be found, got " + subjectAreas.size()); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/SubjectAreaFVTCheckedException.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/SubjectAreaFVTCheckedException.java deleted file mode 100644 index a7da632d8ab..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/SubjectAreaFVTCheckedException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -/** - * Test exception for FVT - */ -public class SubjectAreaFVTCheckedException extends Exception -{ - /** - * This is the typical constructor used for creating a SubjectAreaFVTCheckedException. - * - * @param message Error message - */ - public SubjectAreaFVTCheckedException(String message) - { - super(message); - } - - - /** - * This is the constructor used for creating a SubjectAreaFVTCheckedException that resulted from a previous error. - * - * @param message Error message - * @param e the error that resulted in this exception. - * */ - public SubjectAreaFVTCheckedException(String message, Exception e) - { - super(message,e); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/TermFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/TermFVT.java deleted file mode 100644 index eabf3c2cac1..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/TermFVT.java +++ /dev/null @@ -1,789 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.terms.SubjectAreaTermClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidence; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidentiality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Criticality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Retention; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.ConfidenceLevel; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.CriticalityLevel; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.RetentionBasis; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.GovernanceClassifications; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; - -import java.io.IOException; -import java.util.*; -import java.util.stream.Collectors; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * FVT resource to call subject area term client API - */ -public class TermFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for term FVT"; - private static final String DEFAULT_TEST_TERM_NAME = "Test term A"; - private static final String DEFAULT_TEST_TERM_NAME_UPDATED = "Test term A updated"; - private SubjectAreaNodeClient subjectAreaTerm = null; - private SubjectAreaTermClient subjectAreaTermClient = null; - private GlossaryFVT glossaryFVT =null; - private CategoryFVT categoryFVT =null; - private SubjectAreaDefinitionCategoryFVT subjectAreaFVT =null; - private String userId =null; - private int existingTermCount = 0; - private static Logger log = LoggerFactory.getLogger(TermFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingTerms. - */ - private Set createdTermsSet = new HashSet<>(); - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public TermFVT(String url,String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaRestClient client = new SubjectAreaRestClient(serverName, url); - subjectAreaTerm = new SubjectAreaTermClient<>(client); - subjectAreaTermClient = (SubjectAreaTermClient)subjectAreaTerm; - - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - glossaryFVT = new GlossaryFVT(url,serverName,userId); - categoryFVT = new CategoryFVT(url, serverName,userId); - subjectAreaFVT = new SubjectAreaDefinitionCategoryFVT(url, serverName,userId); - - this.userId=userId; - existingTermCount = findTerms("").size(); - if (log.isDebugEnabled()) { - log.debug("existingTermCount " + existingTermCount); - } - } - public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try { - System.out.println("TermFVT runIt started"); - TermFVT fvt =new TermFVT(url,serverName,userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("TermFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - public static int getTermCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, SubjectAreaFVTCheckedException { - TermFVT fvt = new TermFVT(url, serverName, userId); - return fvt.findTerms("").size(); - } - - public void run() throws SubjectAreaFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary= glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - if (log.isDebugEnabled()) { - log.debug("Create a term1"); - } - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - Term term1 = createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - FVTUtils.validateNode(term1); - if (log.isDebugEnabled()) { - log.debug("Create a term1 using glossary userId"); - } - Term term2 = createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - FVTUtils.validateNode(term2); - if (log.isDebugEnabled()) { - log.debug("Create a term2 using glossary userId"); - } - - FindRequest findRequest = new FindRequest(); - List results = glossaryFVT.getTerms(glossaryGuid, findRequest); - if (results.size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 back on getGlossaryTerms " + results.size()); - } - findRequest.setPageSize(1); - results = glossaryFVT.getTerms(glossaryGuid, findRequest); - if (results.size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 back on getGlossaryTerms with page size 1, got " + results.size()); - } - - Term termForUpdate = new Term(); - termForUpdate.setName(DEFAULT_TEST_TERM_NAME_UPDATED); - if (log.isDebugEnabled()) { - log.debug("Get term1"); - } - String guid = term1.getSystemAttributes().getGUID(); - Term gotTerm = getTermByGUID(guid); - FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Update term1"); - } - Term updatedTerm = updateTerm(guid, termForUpdate); - FVTUtils.validateNode(updatedTerm); - if (log.isDebugEnabled()) { - log.debug("Get term1 again"); - } - gotTerm = getTermByGUID(guid); - FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Delete term1"); - } - deleteTerm(guid); - if (log.isDebugEnabled()) { - log.debug("Restore term1"); - } - //FVTUtils.validateNode(gotTerm); - gotTerm = restoreTerm(guid); - FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Delete term1 again"); - } - deleteTerm(guid); - //FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Create term3 with governance actions"); - } - GovernanceClassifications governanceClassifications = createGovernanceClassifications(); - Term term3 = createTermWithGovernanceClassifications(DEFAULT_TEST_TERM_NAME, glossaryGuid, governanceClassifications); - FVTUtils.validateNode(term3); - if (!governanceClassifications.getConfidence().getLevel().equals(term3.getGovernanceClassifications().getConfidence().getLevel())){ - throw new SubjectAreaFVTCheckedException("ERROR: Governance actions confidence not returned as expected"); - } - if (!governanceClassifications.getConfidentiality().getLevel().equals(term3.getGovernanceClassifications().getConfidentiality().getLevel())) { - throw new SubjectAreaFVTCheckedException("ERROR: Governance actions confidentiality not returned as expected"); - } - if (!governanceClassifications.getRetention().getBasis().equals(term3.getGovernanceClassifications().getRetention().getBasis())) { - throw new SubjectAreaFVTCheckedException("ERROR: Governance actions retention not returned as expected"); - } - if (!governanceClassifications.getCriticality().getLevel().equals(term3.getGovernanceClassifications().getCriticality().getLevel())) { - throw new SubjectAreaFVTCheckedException("ERROR: Governance actions criticality not returned as expected. "); - } - GovernanceClassifications governanceClassifications2 = create2ndGovernanceClassifications(); - if (log.isDebugEnabled()) { - log.debug("Update term3 with and change governance actions"); - } - Term term3ForUpdate = new Term(); - term3ForUpdate.setName(DEFAULT_TEST_TERM_NAME_UPDATED); - term3ForUpdate.setGovernanceClassifications(governanceClassifications2); - - Term updatedTerm3 = updateTerm(term3.getSystemAttributes().getGUID(), term3ForUpdate); - FVTUtils.validateNode(updatedTerm3); - if (!governanceClassifications2.getConfidence().getLevel().equals(updatedTerm3.getGovernanceClassifications().getConfidence().getLevel())){ - throw new SubjectAreaFVTCheckedException("ERROR: Governance actions confidence not returned as expected"); - } - if (!governanceClassifications2.getConfidentiality().getLevel().equals(updatedTerm3.getGovernanceClassifications().getConfidentiality().getLevel())) { - throw new SubjectAreaFVTCheckedException("ERROR: Governance actions confidentiality not returned as expected"); - } - if (updatedTerm3.getGovernanceClassifications().getRetention() !=null) { - throw new SubjectAreaFVTCheckedException("ERROR: Governance actions retention not null as expected: " + updatedTerm3); - } - // https://github.com/odpi/egeria/issues/3457 the below line when uncommented causes an error with the graph repo. -// if (updatedTerm3.getGovernanceActions().getCriticality().getLevel() !=null) { -// throw new SubjectAreaFVTCheckedException("ERROR: Governance actions criticality not returned as expected. It is " + updatedTerm3.getGovernanceActions().getCriticality().getLevel().getName()); -// } - String spacedTermName = "This is a Term with spaces in name"; - int allcount = subjectAreaTerm.findAll(userId).size(); - int yyycount = findTerms("yyy").size(); - int zzzcount = findTerms("zzz").size(); - int spacedTermcount = findTerms( spacedTermName).size(); - - if (log.isDebugEnabled()) { - log.debug("create terms to find"); - } - Term termForFind1 = getTermForInput("abc",glossaryGuid); - termForFind1.setDescription("yyy"); - termForFind1 = issueCreateTerm(termForFind1); - FVTUtils.validateNode(termForFind1); - Term termForFind2 = createTerm("yyy",glossaryGuid); - FVTUtils.validateNode(termForFind2); - Term termForFind3 = createTerm("zzz",glossaryGuid); - FVTUtils.validateNode(termForFind3); - Term termForFind4 = createTerm("This is a Term with spaces in name",glossaryGuid); - FVTUtils.validateNode(termForFind4); - - results = findTerms("zzz"); - if (results.size() !=zzzcount+1 ) { - throw new SubjectAreaFVTCheckedException("ERROR: zzz Expected " + zzzcount+1+ " back on the find got " +results.size()); - } - results = findTerms("yyy"); - if (results.size() !=yyycount + 2) { - throw new SubjectAreaFVTCheckedException("ERROR: yyy Expected " + yyycount+1 + " back on the find got " +results.size()); - } - results = findTerms(null); //it's find all terms - if (results.size() !=allcount + 4 ) { - throw new SubjectAreaFVTCheckedException("ERROR: allcount Expected " + allcount + 4 + " back on the find got " +results.size()); - } - - results = subjectAreaTerm.findAll(userId); //it's find all terms - if (results.size() !=allcount + 4 ) { - throw new SubjectAreaFVTCheckedException("ERROR: allcount2 Expected " + allcount + 4 + " back on the find got " +results.size()); - } - //soft delete a term and check it is not found - deleteTerm(termForFind2.getSystemAttributes().getGUID()); - //FVTUtils.validateNode(deleted4); - results = findTerms("yyy"); - if (results.size() !=yyycount +1 ) { - throw new SubjectAreaFVTCheckedException("ERROR: yyy2 Expected " +yyycount +1 + " back on the find got " +results.size()); - } - - // search for a term with a name with spaces in - results = findTerms(spacedTermName); - if (results.size() != spacedTermcount +1 ) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected spaced " + spacedTermcount+1 + " back on the find got " +results.size()); - } - - Term term = termForFind4; - // we need to find a term that has our glossary so we can see how the summary changes when we change the - // glossary effectivity - long now = new Date().getTime(); - Long fromTermTime = new Date(now+6*1000*60*60*24).getTime(); - Long toTermTime = new Date(now+7*1000*60*60*24).getTime(); - - term.setEffectiveFromTime(fromTermTime); - term.setEffectiveToTime(toTermTime); - Term updatedFutureTerm = updateTerm(term.getSystemAttributes().getGUID(), term); - if (updatedFutureTerm.getEffectiveFromTime().longValue()!=fromTermTime.longValue()) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected term from time to update"); - } - if (updatedFutureTerm.getEffectiveToTime().longValue() !=toTermTime.longValue()) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected term to time to update"); - } - Long fromGlossaryTime = new Date(now+8*1000*60*60*24).getTime(); - Long toGlossaryTime = new Date(now+9*1000*60*60*24).getTime(); - glossary.setEffectiveFromTime(fromGlossaryTime); - glossary.setEffectiveToTime(toGlossaryTime); - Glossary updatedFutureGlossary= glossaryFVT.updateGlossary(glossaryGuid, glossary); - - if (updatedFutureGlossary.getEffectiveFromTime().longValue()!= fromGlossaryTime.longValue()) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected glossary from time to update"); - } - if (updatedFutureGlossary.getEffectiveToTime().longValue()!= toGlossaryTime.longValue()) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected glossary to time to update"); - } - - Term newTerm = getTermByGUID(term.getSystemAttributes().getGUID()); - - GlossarySummary glossarySummary = newTerm.getGlossary(); - - if (glossarySummary.getFromEffectivityTime().longValue()!= fromGlossaryTime.longValue()) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected from glossary summary time "+glossarySummary.getFromEffectivityTime() + " to equal " +fromGlossaryTime); - } - if (glossarySummary.getToEffectivityTime().longValue() != toGlossaryTime.longValue()) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected to glossary summary time "+glossarySummary.getToEffectivityTime() + " to equal " + toGlossaryTime); - } - - if (glossarySummary.getRelationshipguid() == null) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected glossary summary non null relationship"); - } - if (glossarySummary.getFromRelationshipEffectivityTime() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected glossary summary null relationship from time"); - } - if (glossarySummary.getToRelationshipEffectivityTime() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected glossary summary null relationship to time"); - } - Term term5 = new Term(); - term5.setSpineObject(true); - term5.setName("Term5"); - glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term5.setGlossary(glossarySummary); - Term createdTerm5 = issueCreateTerm(term5); - if (createdTerm5.isSpineObject() == false) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected isSpineObject to be true "); - } - Term term6 = new Term(); - term6.setSpineAttribute(true); - term6.setName("Term6"); - glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term6.setGlossary(glossarySummary); - Term createdTerm6 = issueCreateTerm(term6); - if (createdTerm6.isSpineAttribute() == false) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected isSpineAttribute to be true "); - } - Term term7 = new Term(); - term7.setObjectIdentifier(true); - term7.setName("Term7"); - glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term7.setGlossary(glossarySummary); - Term createdTerm7 = issueCreateTerm(term7); - if (createdTerm7.isObjectIdentifier() == false) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected isObjectIdentifier to be true "); - } - // make sure there is a term with the name - createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - - Term termForUniqueQFN2= createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - if (termForUniqueQFN2 == null || termForUniqueQFN2.getQualifiedName().length() == 0) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected qualified name to be set"); - } - - // test categories - - Category cat1 = categoryFVT.createCategoryWithGlossaryGuid("cat1", glossaryGuid); - Category cat2 = subjectAreaFVT.createSubjectAreaDefinitionWithGlossaryGuid("cat2", glossaryGuid); - Category cat3 = categoryFVT.createCategoryWithGlossaryGuid("cat3",glossaryGuid); - CategorySummary cat1Summary = new CategorySummary(); - cat1Summary.setGuid(cat1.getSystemAttributes().getGUID()); - CategorySummary cat2Summary = new CategorySummary(); - cat2Summary.setGuid(cat2.getSystemAttributes().getGUID()); - CategorySummary cat3Summary = new CategorySummary(); - cat3Summary.setGuid(cat3.getSystemAttributes().getGUID()); - - List suppliedCategories = new ArrayList<>(); - suppliedCategories.add(cat1Summary); - - Term term4cats = getTermForInput(DEFAULT_TEST_TERM_NAME,glossaryGuid); - Term createdTerm4cats =issueCreateTerm(term4cats); - if (createdTerm4cats.getCategories() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected null categories created when none were requested"); - } - - term4cats = getTermForInput(DEFAULT_TEST_TERM_NAME,glossaryGuid); - term4cats.setCategories(suppliedCategories); - createdTerm4cats =issueCreateTerm(term4cats); - if (createdTerm4cats.getCategories().size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 categories returned"); - } - if (!createdTerm4cats.getCategories().get(0).getGuid().equals(cat1Summary.getGuid())) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected response category guid to match the requested category guid."); - } - if (categoryFVT.getTerms(cat1.getSystemAttributes().getGUID()).size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected the category to have 1 term."); - } - - suppliedCategories.add(cat2Summary); - term4cats.setCategories(suppliedCategories); - Term createdTerm4cats2 =issueCreateTerm(term4cats); - if (createdTerm4cats2.getCategories().size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 categories returned"); - } - List categories = getCategoriesAPI(createdTerm4cats2.getSystemAttributes().getGUID(),0,5); - if (categories.size() !=2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 categories returned on get Categories API call"); - } - - // update with null categories should change nothing - createdTerm4cats2.setCategories(null); - Term updatedTerm4cats2 = updateTerm(createdTerm4cats2.getSystemAttributes().getGUID(),createdTerm4cats2); - if (updatedTerm4cats2.getCategories().size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 categories returned"); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),0,5).size() !=2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 categories returned on get Categories API call after update"); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),1,5).size() !=1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 categories returned on get Categories API call after update startingFrom 1"); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),0,1).size() !=1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 categories returned on get Categories API call after update pageSize 1"); - } - - // replace categories with null - createdTerm4cats.setCategories(null); - Term replacedTerm4cats = replaceTerm(createdTerm4cats.getSystemAttributes().getGUID(), createdTerm4cats); - if (replacedTerm4cats.getCategories() != null) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected replace with null to get rid of the categorizations."); - } - List cats = getCategoriesAPI(replacedTerm4cats.getSystemAttributes().getGUID(),0,5); - if (cats ==null || cats.size() != 0) { - throw new SubjectAreaFVTCheckedException("ERROR: Use API call to check replace with null to get rid of the categorizations."); - } - // update term to gain 2 categories - createdTerm4cats.setCategories(suppliedCategories); - updatedTerm4cats2 = updateTerm(createdTerm4cats.getSystemAttributes().getGUID(),createdTerm4cats); - if (updatedTerm4cats2.getCategories().size() != 2) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected update to gain 2 categorizations."); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),0,5).size() !=2) { - throw new SubjectAreaFVTCheckedException("ERROR: Use API call to check update to gain 2 categorizations"); - } - testCategorizedTermsWithSearchCriteria(); - testAdditionalParameters(); - - List supplied3Categories = new ArrayList<>(); - supplied3Categories.add(cat1Summary); - supplied3Categories.add(cat2Summary); - supplied3Categories.add(cat3Summary); - updatedTerm4cats2.setCategories(supplied3Categories); - updatedTerm4cats2 = updateTerm(createdTerm4cats.getSystemAttributes().getGUID(), updatedTerm4cats2); - if (updatedTerm4cats2.getCategories().size() != 3) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected update to have 3 categorizations."); - } - - // clean up - categoryFVT.deleteCategory(cat1Summary.getGuid()); - categoryFVT.deleteCategory(cat2Summary.getGuid()); - categoryFVT.deleteCategory(cat3Summary.getGuid()); - deleteTerm(createdTerm4cats.getSystemAttributes().getGUID()); - deleteTerm(createdTerm4cats2.getSystemAttributes().getGUID()); - } - - public Term createTerm(String termName, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Term term = getTermForInput(termName, glossaryGuid); - return issueCreateTerm(term); - } - - public Term issueCreateTerm(Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Term newTerm = subjectAreaTerm.create(this.userId, term); - if (newTerm != null) - { - String guid = newTerm.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Created Term " + newTerm.getName() + " with guid " + guid); - } - createdTermsSet.add(guid); - } - return newTerm; - } - - public Term getTermForInput(String termName, String glossaryGuid) { - Term term = new Term(); - term.setName(termName); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term.setGlossary(glossarySummary); - return term; - } - - public Term createTermWithGovernanceClassifications(String termName, String glossaryGuid, GovernanceClassifications governanceClassifications) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Term term = getTermForInput(termName, glossaryGuid); - term.setGovernanceClassifications(governanceClassifications); - Term newTerm = issueCreateTerm(term); - return newTerm; - } - - private GovernanceClassifications createGovernanceClassifications() { - GovernanceClassifications governanceClassifications = new GovernanceClassifications(); - Confidentiality confidentiality = new Confidentiality(); - confidentiality.setLevel(6); - governanceClassifications.setConfidentiality(confidentiality); - - Confidence confidence = new Confidence(); - confidence.setLevel(ConfidenceLevel.Authoritative); - governanceClassifications.setConfidence(confidence); - - Criticality criticality = new Criticality(); - criticality.setLevel(CriticalityLevel.Catastrophic); - governanceClassifications.setCriticality(criticality); - - Retention retention = new Retention(); - retention.setBasis(RetentionBasis.ProjectLifetime); - governanceClassifications.setRetention(retention); - return governanceClassifications; - } - private GovernanceClassifications create2ndGovernanceClassifications() { - GovernanceClassifications governanceClassifications = new GovernanceClassifications(); - Confidentiality confidentiality = new Confidentiality(); - confidentiality.setLevel(5); - governanceClassifications.setConfidentiality(confidentiality); - - Confidence confidence = new Confidence(); - confidence.setLevel(ConfidenceLevel.AdHoc); - governanceClassifications.setConfidence(confidence); - // remove this classification level - Criticality criticality = new Criticality(); - criticality.setLevel(null); - governanceClassifications.setCriticality(criticality); - // remove retention by nulling it - governanceClassifications.setRetention(null); - return governanceClassifications; - } - - - public Term getTermByGUID(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Term term = subjectAreaTerm.getByGUID(this.userId, guid); - if (term != null) - { - if (log.isDebugEnabled()) { - log.debug("Got Term " + term.getName() + " with userId " + term.getSystemAttributes().getGUID() + " and status " + term.getSystemAttributes().getStatus()); - } - } - return term; - } - public List findTerms(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - List terms = subjectAreaTerm.find(this.userId, findRequest); - return terms; - } - - public Term updateTerm(String guid, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Term updatedTerm = subjectAreaTerm.update(this.userId, guid, term); - if (updatedTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Updated Term name to " + updatedTerm.getName()); - } - } - return updatedTerm; - } - public Term replaceTerm(String guid, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Term updatedTerm = subjectAreaTerm.replace(this.userId, guid, term); - if (updatedTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Replaced Term name to " + updatedTerm.getName()); - } - } - return updatedTerm; - } - public Term restoreTerm(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Term restoredTerm = subjectAreaTerm.restore(this.userId, guid); - if (restoredTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Restored Term " + restoredTerm.getName()); - } - createdTermsSet.add(guid); - } - return restoredTerm; - } - public Term updateTermToFuture(long now, String guid, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - term.setEffectiveFromTime(new Date(now+1001*60*60*24).getTime()); - term.setEffectiveToTime(new Date(now+1999*60*60*24).getTime()); - - Term updatedTerm = subjectAreaTerm.update(this.userId, guid, term); - if (updatedTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Updated Term name to " + updatedTerm.getName()); - } - } - return updatedTerm; - } - - public void deleteTerm(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - subjectAreaTerm.delete(this.userId, guid); - createdTermsSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Delete succeeded"); - } - } - - public List getTermRelationships(Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return subjectAreaTerm.getAllRelationships(this.userId, term.getSystemAttributes().getGUID()); - } - - public List getTermRelationships(Term term, Date asOfTime, int offset, int pageSize, SequencingOrder sequenceOrder, String sequenceProperty) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(offset); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequenceOrder); - findRequest.setSequencingProperty(sequenceProperty); - return subjectAreaTerm.getRelationships(this.userId, term.getSystemAttributes().getGUID(),findRequest); - } - void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaFVTCheckedException { - deleteRemainingTerms(); - glossaryFVT.deleteRemainingGlossaries(); - } - void deleteRemainingTerms() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - Iterator iter = createdTermsSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteTerm(guid); - } - List terms = findTerms(""); - if (terms.size() != existingTermCount) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected " +existingTermCount + " Terms to be found, got " + terms.size()); - } - } - public List getCategoriesAPI(String termGuid,int startingFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - return subjectAreaTermClient.getCategories(userId, termGuid, findRequest); - } - - private void testCategorizedTermsWithSearchCriteria() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary("Glossary name for CategorizedTermsWithSearchCriteria"); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create a ttt"); - } - Category category = categoryFVT.createCategoryWithGlossaryGuid("ttt", glossary.getSystemAttributes().getGUID()); - String parentGuid = category.getSystemAttributes().getGUID(); - // create 20 children - List categories = new ArrayList<>(); - CategorySummary catSummary = new CategorySummary(); - catSummary.setGuid(parentGuid); - categories.add(catSummary); - Set termGuids = new HashSet(); - - for (int i=0;i<10;i++) { - - Term term1 = getTermForInput("tt" + i, glossaryGuid); - term1.setCategories(categories); - Term createdTerm1 = issueCreateTerm(term1); - termGuids.add(createdTerm1.getSystemAttributes().getGUID()); - if (createdTerm1.getCategories().size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 category created"); - } - Term term2 = getTermForInput("ss" + i, glossaryGuid); - term2.setCategories(categories); - Term createdTerm2 = issueCreateTerm(term2); - termGuids.add(createdTerm2.getSystemAttributes().getGUID()); - if (createdTerm2.getCategories().size() != 1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 2 category created"); - } - } - FindRequest findRequest = new FindRequest(); - if ( categoryFVT.getTerms(parentGuid, findRequest).size() != 20) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 20 terms associated with the category "); - } - if ( glossaryFVT.getTerms(glossaryGuid, findRequest).size() != 20) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 20 terms associated with the category "); - } - findRequest.setSearchCriteria("tt3"); - int count = categoryFVT.getTerms(parentGuid, findRequest).size(); - if (count !=1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 categorized term, got " + count); - } - count = glossaryFVT.getTerms(glossaryGuid, findRequest).size(); - if (count !=1) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 1 glossary term, got " + count); - } - - findRequest.setSearchCriteria("tt"); - count = categoryFVT.getTerms(parentGuid, findRequest).size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 category terms, got " + count); - } - count = glossaryFVT.getTerms(glossaryGuid, findRequest).size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 glossary terms, got " + count); - } - - findRequest.setPageSize(5); - List terms = categoryFVT.getTerms(parentGuid, findRequest); - count = terms.size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 terms with tt,got " + count); - } - count = glossaryFVT.getTerms(glossaryGuid, findRequest).size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 glossary terms with tt, got " + count); - } - findRequest.setSearchCriteria("ss"); - findRequest.setPageSize(20); - if ( categoryFVT.getTerms(parentGuid, findRequest).size() !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 terms for ss"); - } - List tenTerms = glossaryFVT.getTerms(glossaryGuid, findRequest); - count = tenTerms.size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 glossary terms for ss, got " + count); - } - Set tenTermNames = tenTerms.stream() - .map(term ->term.getName()).collect(Collectors.toSet()); - count = tenTermNames.size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 glossary terms distinct names ss, got " + count); - } - findRequest.setPageSize(5); - - List firstFiveCategoryTerms =categoryFVT.getTerms(parentGuid, findRequest); - count = firstFiveCategoryTerms.size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 terms for ss, got " + count); - } - Set firstFiveCategoryTermsNames = firstFiveCategoryTerms.stream() - .map(term ->term.getName()).collect(Collectors.toSet()); - count = firstFiveCategoryTermsNames.size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 distinct term names for ss, got " + count); - } - findRequest.setStartingFrom(5); - List secondFiveCategoryTerms =categoryFVT.getTerms(parentGuid, findRequest); - count = secondFiveCategoryTerms.size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 category terms for ss for 2nd page, got " + count); - } - Set secondFiveCategoryTermsNames = secondFiveCategoryTerms.stream() - .map(term ->term.getName()).collect(Collectors.toSet()); - count = secondFiveCategoryTermsNames.size(); - if (count !=5) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 5 category term names for ss for 2nd page " + count); - } - Set totalFiveCategoryTermsNames = firstFiveCategoryTermsNames; - totalFiveCategoryTermsNames.addAll(secondFiveCategoryTermsNames); - count = totalFiveCategoryTermsNames.size(); - if (count !=10) { - throw new SubjectAreaFVTCheckedException("ERROR: Expected 10 different category term names for ss from first 2 pages " + count); - } - - //cleanup - for (String termGuid: termGuids) { - deleteTerm(termGuid); - } - categoryFVT.deleteCategory(parentGuid); - glossaryFVT.deleteGlossary(glossaryGuid); - - } - private void testAdditionalParameters() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, SubjectAreaFVTCheckedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary("Glossary name for CategorizedTermsWithSearchCriteria"); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - Term term = getTermForInput("test",glossaryGuid); - Map inputMap = new HashMap<>(); - inputMap.put("aaa","bbb"); - term.setAdditionalProperties(inputMap); - Term createdTerm = issueCreateTerm(term); - if (!createdTerm.getAdditionalProperties().get("aaa").equals("bbb") ) { - throw new SubjectAreaFVTCheckedException("Create additional properties did not persist"); - } - - Map inputMap2 = new HashMap<>(); - inputMap2.put("ccc","ddd"); - term.setAdditionalProperties(inputMap2); - Term updatedTerm = updateTerm(createdTerm.getSystemAttributes().getGUID(), term); - if (!updatedTerm.getAdditionalProperties().get("ccc").equals("ddd") ) { - throw new SubjectAreaFVTCheckedException("Update additional properties did not persist"); - } - - deleteTerm(createdTerm.getSystemAttributes().getGUID()); - glossaryFVT.deleteGlossary(glossaryGuid); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/resources/logback.xml b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/resources/logback.xml deleted file mode 100644 index 6beef905f56..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/resources/logback.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - -` - diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CategoryHierarchyIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CategoryHierarchyIT.java deleted file mode 100644 index e346ef93582..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CategoryHierarchyIT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.CategoryHierarchyFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class CategoryHierarchyIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testCategoryHierarchy(String server) { - assertDoesNotThrow(() -> CategoryHierarchyFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CategoryIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CategoryIT.java deleted file mode 100644 index e11dd8d8b5d..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CategoryIT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.CategoryFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class CategoryIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testCategory(String server) { - assertDoesNotThrow(() -> CategoryFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CheckSerializationT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CheckSerializationT.java deleted file mode 100644 index ab1cbd99d5a..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/CheckSerializationT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.CheckSerializationFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class CheckSerializationT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testRelationships(String server) { - assertDoesNotThrow(() -> CheckSerializationFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/EffectiveDatesIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/EffectiveDatesIT.java deleted file mode 100644 index 5e07f2a8ea0..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/EffectiveDatesIT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.EffectiveDatesFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class EffectiveDatesIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testEffectiveDates(String server) { - assertDoesNotThrow(() -> EffectiveDatesFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/GlossaryIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/GlossaryIT.java deleted file mode 100644 index 2e720fa08db..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/GlossaryIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.GlossaryFVT; -import org.junit.jupiter.api.Test; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class GlossaryIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testGlossary(String server) { - assertDoesNotThrow(() -> GlossaryFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/GraphIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/GraphIT.java deleted file mode 100644 index fabfb80338d..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/GraphIT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.GraphFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class GraphIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testGraph(String server) { - assertDoesNotThrow(() -> GraphFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/ProjectIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/ProjectIT.java deleted file mode 100644 index 0fbc7780a0b..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/ProjectIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.ProjectFVT; -import org.odpi.openmetadata.http.HttpHelper; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class ProjectIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testProject(String server) { - assertDoesNotThrow(() -> ProjectFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/RelationshipsIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/RelationshipsIT.java deleted file mode 100644 index b8a882ba90f..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/RelationshipsIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.RelationshipsFVT; -import org.odpi.openmetadata.http.HttpHelper; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class RelationshipsIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testRelationships(String server) { - assertDoesNotThrow(() -> RelationshipsFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/SubjectAreaDefinitionCategoryIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/SubjectAreaDefinitionCategoryIT.java deleted file mode 100644 index 3609bc35487..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/SubjectAreaDefinitionCategoryIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.SubjectAreaDefinitionCategoryFVT; -import org.odpi.openmetadata.http.HttpHelper; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class SubjectAreaDefinitionCategoryIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testSubjectAreaDefinitionCategory(String server) { - assertDoesNotThrow(() -> SubjectAreaDefinitionCategoryFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/TermIT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/TermIT.java deleted file mode 100644 index 433b8e1fe95..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/junit/TermIT.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.subjectarea.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.accessservices.subjectarea.fvt.TermFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class TermIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverinmem"}) - public void testTerm(String server) { - assertDoesNotThrow(() -> TermFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/script/configureStartServer.groovy b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/script/configureStartServer.groovy deleted file mode 100755 index 4d211d3f255..00000000000 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/test/script/configureStartServer.groovy +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/local/bin/groovy -import javax.net.ssl.HttpsURLConnection - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Contributors to the ODPi Egeria project. - -// Function to convert array to String - -// Will configure an OMAG Server Platform - which should already be running - for FVT testing - -import javax.net.ssl.SSLContext -import javax.net.ssl.TrustManager -import javax.net.ssl.X509TrustManager -import java.security.cert.CertificateException -import java.security.cert.X509Certificate - -// Retrieve configuration - with defaults to aid in local testing (using default ports) -// Maven plugin works best with properties, gradle with system properties, so use either -user=(properties["user"] ?: System.properties["user"]) ?: "garygeeke"; -baseURL=(properties["baseURL"] ?: System.properties["baseURL"]) ?: "https://localhost:9443"; -serverMem=(properties["servermem"] ?: System.properties["servermem"]) ?: "serverinmem"; -retries=(properties["retries"] ?: System.properties["retries"]) ?: 50; -delay=(properties["delay"] ?: System.properties["delay"]) ?: 2; - -// SSL setup to avoid self-signed errors for testing -def trustAllCerts = [ - new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException { - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException { - } - } -] as TrustManager[] - -try -{ - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, trustAllCerts, new java.security.SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); -} -catch (Exception e) -{ - System.out.println(e); - System.exit(-1); -} - -// Wait until the platform is ready -connected=false; -i=retries; -while (!connected && i>0) -{ - try { - - System.out.println("=== Checking platform at " + baseURL + " is available (" + i + " attempts remaining) ==="); - post0 = new java.net.URL(baseURL + "/open-metadata/platform-services/users/" + user + "/server-platform/origin").openConnection(); - post0.setRequestMethod("GET") - post0RC = post0.getResponseCode(); - println(post0RC); - if (post0RC.equals(200)) { - connected = true; - println(post0.getInputStream().getText()); - } else { - i--; - Thread.sleep(1000 * delay); - } - } catch (Throwable t) - { - // TODO: look at whether some exceptions should be deemed irrecoverable rather than retry - i--; - Thread.sleep(1000 * delay); - } -} - -// -- Graph repository - -// --- Configure the platform - any errors here and we exit -System.out.println("=== Configuring server: " + serverMem + " ==="); -post1 = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/local-repository/mode/in-memory-repository" ).openConnection() -post1.setRequestMethod("POST") -post1.setRequestProperty("Content-Type", "application/json") -postRC1 = post1.getResponseCode(); -println(postRC1); -if(postRC1.equals(200)) { - println(post1.getInputStream().getText()); -} - -// --- Enable Subject Area OMAS - any errors here and we exit -System.out.println("=== Enabling Subject Area OMAS: " + serverMem + " ==="); -post2 = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/access-services/subject-area/no-topics" ).openConnection() -post2.setRequestMethod("POST") -post2.setRequestProperty("Content-Type", "application/json") -postRC2 = post2.getResponseCode(); -println(postRC2); -if(postRC2.equals(200)) { - println(post2.getInputStream().getText()); -} - -// --- Launch the server - any errors here and we exit -System.out.println("=== Starting server: " + serverMem + " ==="); -post3 = new URL(baseURL + "/open-metadata/platform-services/users/" + user + "/server-platform/servers/" + serverMem + "/instance" ).openConnection() -post3.setRequestMethod("POST") -post3.setRequestProperty("Content-Type", "application/json") -postRC3 = post3.getResponseCode(); -println(postRC3); -if(postRC3.equals(200)) { - println(post3.getInputStream().getText()); -} - -// --- We're done -System.out.println("=== Configuration complete ===") diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/build.gradle b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/build.gradle deleted file mode 100644 index a15c5fc0a22..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/build.gradle +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - id 'application' - id "com.github.johnrengelman.shadow" -} - -dependencies { - implementation 'org.slf4j:slf4j-api' - implementation 'com.fasterxml.jackson.core:jackson-databind' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-resources:open-metadata-archives:open-metadata-types') - compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') - compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') - runtimeOnly 'ch.qos.logback:logback-classic' - -} - -description = 'Open Types Test generator' - -java { - withJavadocJar() -} - - -shadowJar { - mainClassName = 'org.odpi.openmetadata.fvt.opentypes.generators.OmrsBeanGenerator' - archiveClassifier = 'jar-with-dependencies' -} - - diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/ClassificationBean.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/ClassificationBean.java deleted file mode 100644 index ef3e3742329..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/ClassificationBean.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - -import java.io.Serializable; -import java.util.Date; - -/** - * A Classification - */ -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationBean implements Serializable { - protected static final long serialVersionUID = 1L; - - public static long getSerialVersionUID() { - return serialVersionUID; - } - //system attributes - private SystemAttributes systemAttributes = null; - private Date effectiveFromTime = null; - private Date effectiveToTime = null; - - protected String classificationName = null; - /** - * Get the core attributes - * @return core attributes - */ - public SystemAttributes getSystemAttributes() { - return systemAttributes; - } - - public void setSystemAttributes(SystemAttributes systemAttributes) { - this.systemAttributes = systemAttributes; - } - /** - * Return the date/time that this node should start to be used (null means it can be used from creationTime). - * @return Date the node becomes effective. - */ - public Date getEffectiveFromTime() - { - return effectiveFromTime; - } - - public void setEffectiveFromTime(Date effectiveFromTime) - { - this.effectiveFromTime = effectiveFromTime; - } - /** - * Return the date/time that this node should no longer be used. - * - * @return Date the node stops being effective. - */ - public Date getEffectiveToTime() - { - return effectiveToTime; - } - - public void setEffectiveToTime(Date effectiveToTime) - { - this.effectiveToTime = effectiveToTime; - } - - public String getClassificationName() { - return this.classificationName; - } - - public InstanceProperties obtainInstanceProperties() { return null;} -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Line.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Line.java deleted file mode 100644 index 261a10aa99a..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Line.java +++ /dev/null @@ -1,180 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; - -import java.io.Serializable; -import java.util.Date; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * A relationship between 2 subject area OMAS entities. It is called types as it has named fields for the attributes and references. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class Line implements Serializable { - protected static final long serialVersionUID = 1L; - private SystemAttributes systemAttributes = null; - private Date effectiveFromTime = null; - private Date effectiveToTime = null; - private Map extraAttributes; - protected String typeDefGuid; - protected String entity1Name; - protected String entity1Type; - protected String entity2Name; - protected String entity2Type; - protected String name; - - /** - * Default constructor - */ - public Line() {} - public Line(Line template) { - this.setExtraAttributes(template.getExtraAttributes()); - this.setSystemAttributes(template.getSystemAttributes()); - this.setGuid(template.getGuid()); - this.setExtraAttributes(template.getExtraAttributes()); - } - - /** - * Create a typedRelationship from an omrs relationship - * @param omrsRelationship omrs relationship - */ - public Line(Relationship omrsRelationship) { - if (this.systemAttributes ==null) { - this.systemAttributes = new SystemAttributes(); - } - this.systemAttributes.setUpdateTime(omrsRelationship.getUpdateTime()); - this.systemAttributes.setCreateTime(omrsRelationship.getCreateTime()); - this.systemAttributes.setCreatedBy(omrsRelationship.getCreatedBy()); - this.systemAttributes.setUpdatedBy(omrsRelationship.getUpdatedBy()); - this.systemAttributes.setVersion(omrsRelationship.getVersion()); - - } - - public String getTypeDefGuid() { - return typeDefGuid; - } - - public void setTypeDefGuid(String typeDefGuid) { - this.typeDefGuid = typeDefGuid; - } - - public SystemAttributes getSystemAttributes() { - return systemAttributes; - } - - public void setSystemAttributes(SystemAttributes systemAttributes) { - this.systemAttributes = systemAttributes; - } - /** - * Return the date/time that this line should start to be used (null means it can be used from creationTime). - * @return Date the line becomes effective. - */ - public Date getEffectiveFromTime() - { - return effectiveFromTime; - } - - public void setEffectiveFromTime(Date effectiveFromTime) - { - this.effectiveFromTime = effectiveFromTime; - } - /** - * Return the date/time that this line should no longer be used. - * - * @return Date the line stops being effective. - */ - public Date getEffectiveToTime() - { - return effectiveToTime; - } - public String getGuid() { - if (this.systemAttributes==null) { - return null; - } else { - return systemAttributes.getGUID(); - } - } - - public void setGuid(String guid) { - if (this.systemAttributes==null) { - this.systemAttributes = new SystemAttributes(); - } - this.systemAttributes.setGUID(guid); - } - - public String getName() { - return name; - } - - public static long getSerialVersionUID() { - return serialVersionUID; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * @return extra attributes - */ - public Map getExtraAttributes() { - return extraAttributes; - } - public void setExtraAttributes(Map extraAttributes) { - this.extraAttributes = extraAttributes; - } - - /** - * Create an omrs relationship with the basic fields filled in. - * @param line this is a line to create the relationship from - * @return Relationship the created omrs relationship - */ - public static Relationship createOmrsRelationship(Line line) { - Relationship omrsRelationship = new Relationship(); - InstanceType typeOfRelationship = new InstanceType(); - typeOfRelationship.setTypeDefName(line.getName()); - typeOfRelationship.setTypeDefGUID(line.getTypeDefGuid()); - omrsRelationship.setType(typeOfRelationship); - SystemAttributes systemAttributes = line.getSystemAttributes(); - if (systemAttributes ==null) { - systemAttributes = new SystemAttributes(); - } - omrsRelationship.setCreatedBy(systemAttributes.getCreatedBy()); - omrsRelationship.setUpdatedBy(systemAttributes.getUpdatedBy()); - omrsRelationship.setCreateTime(systemAttributes.getCreateTime()); - omrsRelationship.setUpdateTime(systemAttributes.getUpdateTime()); - if (systemAttributes.getVersion()==null) { - omrsRelationship.setVersion(0L); - } else { - omrsRelationship.setVersion(systemAttributes.getVersion()); - } - line.setSystemAttributes(systemAttributes); - return omrsRelationship; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Line{"); - sb.append("typeDefGuid="+typeDefGuid+","); - sb.append("name=" + name); - if (this.systemAttributes!=null) - { - sb.append("systemAttributes { "); - sb = this.systemAttributes.toString(sb); - sb.append("}"); - } - sb.append('}'); - return sb; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/OMRSAPIHelper.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/OMRSAPIHelper.java deleted file mode 100644 index 09fb73547f0..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/OMRSAPIHelper.java +++ /dev/null @@ -1,549 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefGallery; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** - * This is a facade around the OMRS API. It transforms the OMRS Exceptions into OMAS exceptions - */ -public class OMRSAPIHelper { - - // logging - private static final Logger log = LoggerFactory.getLogger(OMRSAPIHelper.class); - private static final String className = OMRSAPIHelper.class.getName(); - - private OMRSMetadataCollection oMRSMetadataCollection=null; -// private ErrorHandler errorHandler=null; - private String serviceName="Subject Area OMAS"; - private String serverName = null; - private OMRSRepositoryHelper omrsRepositoryHelper = null; - - public OMRSMetadataCollection getOMRSMetadataCollection() { - //validateInitialization(); - return oMRSMetadataCollection; - } - public OMRSRepositoryHelper getOMRSRepositoryHelper() { - return omrsRepositoryHelper; - } - - /** - * Set the OMRS repository connector - * @param connector connector cannot be null - * @throws RepositoryErrorException repository error - */ - public void setOMRSRepositoryConnector(OMRSRepositoryConnector connector) throws RepositoryErrorException { - //TODO pass the API name down the call stack - String restAPIName =""; - String methodName = "setOMRSRepositoryConnector"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + "connector="+connector); - } - - this.oMRSMetadataCollection = connector.getMetadataCollection(); - this.omrsRepositoryHelper = connector.getRepositoryHelper(); - - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - } - - /** - * Validate that this access service has been initialized before attempting to process a request. - * - */ -// private void validateInitialization() { -// String restAPIName= ""; -// if (oMRSMetadataCollection == null) { -// if (this.omrsRepositoryHelper == null) { -// SubjectAreaErrorCode errorCode = SubjectAreaErrorCode.SERVICE_NOT_INITIALIZED; -// String errorMessage = errorCode.getErrorMessageId() -// + errorCode.getFormattedErrorMessage(restAPIName); -// -// throw new MetadataServerUncontactableException(errorCode.getHTTPErrorCode(), -// this.getClass().getName(), -// restAPIName, -// errorMessage, -// errorCode.getSystemAction(), -// errorCode.getUserAction()); -// } -// } -// } - - public OMRSAPIHelper() { - } - // types - public TypeDefGallery callGetAllTypes(String userId) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException - - - { - String methodName = "callGetAllTypes"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - TypeDefGallery typeDefGallery = getOMRSMetadataCollection().getAllTypes(userId); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return typeDefGallery; - } - - public TypeDef callGetTypeDefByName(String userId, String typeName) throws UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException, TypeDefNotKnownException { - String methodName = "callGetTypeDefByName"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - - TypeDef typeDef= getOMRSMetadataCollection().getTypeDefByName(userId,typeName); - - return typeDef; - } - - // entity CRUD - public EntityDetail callOMRSAddEntity(String userId, EntityDetail entityDetail) throws ClassificationErrorException, StatusNotSupportedException, UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException { - String methodName = "callOMRSAddEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - EntityDetail addedEntityDetail=null; - - - InstanceProperties instanceProperties = entityDetail.getProperties(); - - addedEntityDetail=getOMRSMetadataCollection().addEntity(userId, entityDetail.getType().getTypeDefGUID(), instanceProperties, entityDetail.getClassifications(), InstanceStatus.ACTIVE); - - return addedEntityDetail; - } - public EntityDetail callOMRSGetEntityByGuid(String userId, String entityGUID) throws UserNotAuthorizedException, RepositoryErrorException, EntityProxyOnlyException, InvalidParameterException, EntityNotKnownException { - - String methodName = "callOMRSGetEntityByGuid"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - EntityDetail gotEntityDetail = getOMRSMetadataCollection().getEntityDetail(userId, entityGUID); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return gotEntityDetail; - - - } - - - - - public List callFindEntitiesByPropertyValue(String userId, - String entityTypeGUID, - String searchCriteria , - int fromEntityElement, - List limitResultsByStatus, - List limitResultsByClassification, - Date asOfTime, - String sequencingProperty, - SequencingOrder sequencingOrder, - int pageSize) throws UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException { - - String methodName = "callFindEntitiesByPropertyValue"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - - //TODO cascade - String restAPIName= ""; - - List foundEntities = null; - - - - foundEntities = getOMRSMetadataCollection().findEntitiesByPropertyValue(userId, - entityTypeGUID, - searchCriteria, - fromEntityElement, - limitResultsByStatus, - limitResultsByClassification, - asOfTime, - sequencingProperty, - sequencingOrder,pageSize); - - return foundEntities; - } - public EntityDetail callOMRSUpdateEntity(String userId, EntityDetail entityDetail) throws UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException { - String methodName = "callOMRSUpdateEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - EntityDetail updatedEntity = null; - - InstanceProperties instanceProperties = entityDetail.getProperties(); - - updatedEntity = getOMRSMetadataCollection().updateEntityProperties(userId, entityDetail.getGUID(), instanceProperties); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return updatedEntity ; - } - public EntityDetail callOMRSDeleteEntity(String userId, String typeDefName, String typeDefGuid, String obsoleteGuid) throws UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException, FunctionNotSupportedException, EntityNotKnownException { - String methodName = "callOMRSDeleteEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - EntityDetail deletedEntity = getOMRSMetadataCollection().deleteEntity(userId,typeDefGuid, typeDefName, obsoleteGuid); - - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return deletedEntity; - } - public void callOMRSPurgeEntity(String userId, String typeDefName, String typeDefGuid, String obsoleteGuid) throws UserNotAuthorizedException, EntityNotKnownException, EntityNotDeletedException, InvalidParameterException, RepositoryErrorException, FunctionNotSupportedException { - String methodName = "callOMRSPurgeEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - getOMRSMetadataCollection().purgeEntity(userId, typeDefGuid, typeDefName, obsoleteGuid); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - } - public EntityDetail callOMRSRestoreEntity(String userId,String guid) throws UserNotAuthorizedException, EntityNotKnownException, EntityNotDeletedException, InvalidParameterException, RepositoryErrorException, FunctionNotSupportedException { - // restore the Entity - String methodName = "callOMRSRestoreEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade from omas - String restAPIName = methodName; - EntityDetail restoredEntity = getOMRSMetadataCollection().restoreEntity(userId, guid); - - return restoredEntity; - } - - // entity classification - public EntityDetail callOMRSClassifyEntity(String userId, - String entityGUID, - String classificationName, - InstanceProperties instanceProperties - ) throws ClassificationErrorException, UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException { - String methodName = "callOMRSClassifyEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - EntityDetail entity = getOMRSMetadataCollection().classifyEntity(userId, entityGUID, classificationName, instanceProperties); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return entity; - } - - public EntityDetail callOMRSDeClassifyEntity(String userId, - String entityGUID, - String classificationName - ) throws ClassificationErrorException, UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException { - - String methodName = "callOMRSDeClassifyEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - - EntityDetail entity = null; - - entity = getOMRSMetadataCollection().declassifyEntity(userId, entityGUID, classificationName); - - return entity; - } - - - // relationship CRUD - public Relationship callOMRSAddRelationship(String userId, Relationship relationship) throws StatusNotSupportedException, UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException { - String methodName = "callOMRSDeClassifyEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade - String restAPIName= ""; - Relationship addedRelationship = getOMRSMetadataCollection().addRelationship(userId, - relationship.getType().getTypeDefGUID(), - relationship.getProperties(), - relationship.getEntityOneProxy().getGUID(), - relationship.getEntityTwoProxy().getGUID(), - InstanceStatus.ACTIVE); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return addedRelationship; - } - - public Relationship callOMRSGetRelationshipByGuid(String userId, String relationshipGUID) throws UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException, RelationshipNotKnownException { - String methodName = "callOMRSGetRelationshipByGuid"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName ); - } - //TODO cascade from OMAS - String restAPIName= methodName; - Relationship relationship = getOMRSMetadataCollection().getRelationship(userId,relationshipGUID); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return relationship; - } - public Relationship callOMRSUpdateRelationship(String userId, Relationship relationship) throws StatusNotSupportedException, UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, PropertyErrorException { - String methodName = "callOMRSUpdateRelationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade from OMAS - String restAPIName = methodName; - Relationship updatedRelationship = getOMRSMetadataCollection().updateRelationshipProperties(userId, - relationship.getGUID(), - relationship.getProperties()); - if ( relationship.getStatus() !=null && updatedRelationship !=null && - !relationship.getStatus().equals(updatedRelationship.getStatus())) { - updatedRelationship = getOMRSMetadataCollection().updateRelationshipStatus(userId, - relationship.getGUID(), - relationship.getStatus()); - } - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - return updatedRelationship; - - } - public Relationship callOMRSDeleteRelationship(String userId, String typeGuid, String typeName,String guid) throws UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException, FunctionNotSupportedException, RelationshipNotKnownException { - // delete the relationship - String methodName = "callOMRSDeleteRelationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade from omas - String restAPIName = methodName; - Relationship deletedRelationship = getOMRSMetadataCollection().deleteRelationship(userId, typeGuid, typeName, guid); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return deletedRelationship; - } - public Relationship callOMRSRestoreRelationship(String userId,String guid) throws RelationshipNotDeletedException, UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException { - // restore the relationship - String methodName = "callOMRSRestoreRelationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade from omas - String restAPIName = methodName; - Relationship restoredRelationship = getOMRSMetadataCollection().restoreRelationship(userId, guid); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return restoredRelationship; - } - public void callOMRSPurgeRelationship(String userId, String typeGuid, String typeName,String guid) throws RelationshipNotDeletedException, UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException { - - // delete the relationship - String methodName = "callOMRSPurgeRelationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade from OMAS - String restAPIName = methodName; - getOMRSMetadataCollection().purgeRelationship(userId, typeGuid, typeName, guid); - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - } - public List callGetRelationshipsForEntity(String userId, - String entityGUID, - String relationshipTypeGuid, - int fromRelationshipElement, - Date asOfTime, - String sequencingProperty, - SequencingOrder sequencingOrder, - int pageSize - ) throws UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException { - - String methodName = "callGetRelationshipsForEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade - String restAPIName = methodName; - List statusList = new ArrayList<>(); - statusList.add(InstanceStatus.ACTIVE); - List relationships = getOMRSMetadataCollection().getRelationshipsForEntity(userId, - entityGUID, - relationshipTypeGuid, - fromRelationshipElement, - statusList, - asOfTime, - sequencingProperty, - sequencingOrder, - pageSize - ); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - return relationships; - } - - public List callGetRelationshipsForEntity(String userId, - String entityGUID, - String relationshipTypeGUID, - int fromRelationshipElement, - List limitResultsByStatus, - Date asOfTime, - String sequencingProperty, - SequencingOrder sequencingOrder, - int pageSize) throws UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException { - String methodName = "callGetRelationshipsForEntity"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade - String restAPIName = methodName; - List relationships= getOMRSMetadataCollection().getRelationshipsForEntity(userId, - entityGUID,relationshipTypeGUID,fromRelationshipElement,limitResultsByStatus,asOfTime, - sequencingProperty,sequencingOrder,pageSize); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName ); - } - return relationships; - } - - - - // type - public String callGetTypeGuid(String userId, String typeName) throws UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException, TypeDefNotKnownException { - String methodName = "callgetTypeGuid"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade - String restAPIName = methodName; - String typeDefGuid = null; - - TypeDef typeDef = getOMRSMetadataCollection().getTypeDefByName(userId, typeName); - typeDefGuid = typeDef.getGUID().toString(); - - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - return typeDefGuid; - } - public InstanceGraph callGetEntityNeighbourhood(String userId, String entityGUID, - List entityTypeGUIDs, - List relationshipTypeGUIDs, - List limitResultsByStatus, - List limitResultsByClassification, - Date asOfTime, - int level) throws UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException { - String methodName = "callgetEntityNeighborhood"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - //TODO cascade - String restAPIName = methodName; - InstanceGraph instanceGraph = getOMRSMetadataCollection().getEntityNeighborhood(userId, - entityGUID, - entityTypeGUIDs, - relationshipTypeGUIDs, - limitResultsByStatus, - limitResultsByClassification, - asOfTime, - level) ; - - return instanceGraph; - } - - - public static List findEntitiesByType(OMRSAPIHelper oMRSAPIHelper, String serverName, String userId, String type, String searchCriteria, Date asOfTime, Integer offset, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty, String methodName) throws UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException { - // if offset or pagesize were not supplied then default them, so they can be converted to primitives. - if (offset == null) { - offset = new Integer(0); - } - if (pageSize == null) { - pageSize = new Integer(0); - } - if (sequencingProperty !=null) { - try { - sequencingProperty = URLDecoder.decode(sequencingProperty,"UTF-8"); - } catch (UnsupportedEncodingException e) { - // TODO error - } - } - if (searchCriteria !=null) { - try { - searchCriteria = URLDecoder.decode(searchCriteria,"UTF-8"); - } catch (UnsupportedEncodingException e) { - // TODO error - } - } - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - TypeDef typeDef =archiveAccessor.getEntityDefByName(type); - String entityTypeGUID = typeDef.getGUID(); - return oMRSAPIHelper.callFindEntitiesByPropertyValue( - userId, - entityTypeGUID, - searchCriteria, - offset.intValue(), - null, // TODO limit by status ? - null, // TODO limit by classification ? - asOfTime, - sequencingProperty, - sequencingOrder, - pageSize); - } -} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/OMRSLine.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/OMRSLine.java deleted file mode 100644 index 2d656f5d9e1..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/OMRSLine.java +++ /dev/null @@ -1,225 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; - -import java.io.Serializable; - - -/** - * A relationship between 2 subject area OMRS entities. It is called types as it has named fields for the attributes and references. - */ - - -public class OMRSLine extends Line implements Serializable { - protected static final long serialVersionUID = 1L; - protected String entity1Guid; - protected String entity1PropertyName; - protected String entity1Label; - protected String entity2Guid; - protected String entity2PropertyName; - protected String entity2Label; - - /** - * Default constructor - */ - public OMRSLine() {} - public OMRSLine(Line template) { - super(); - } - public OMRSLine(OMRSLine template) { - super(); - this.setEntity1Guid(template.getEntity1Guid()); - this.setEntity1Label(template.getEntity1Label()); - this.setEntity1Name(template.getEntity1Name()); - this.setEntity1PropertyName(template.getEntity1PropertyName()); - this.setEntity2Guid(template.getEntity2Guid()); - this.setEntity2Label(template.getEntity2Label()); - this.setEntity2Name(template.getEntity2Name()); - this.setEntity2PropertyName(template.getEntity2PropertyName()); - } - - /** - * Create a typedRelationship from an omrs relationship - * @param omrsRelationship omrs relationship - */ - public OMRSLine(Relationship omrsRelationship) { - super(omrsRelationship); - if (omrsRelationship.getEntityOneProxy() != null) - { - if (omrsRelationship.getEntityOneProxy().getType() != null) - { - this.entity1Type = omrsRelationship.getEntityOneProxy().getType().getTypeDefName(); - } - - this.entity1Guid = omrsRelationship.getEntityOneProxy().getGUID(); - } - if (omrsRelationship.getEntityTwoProxy() != null) - { - if (omrsRelationship.getEntityTwoProxy().getType() != null) - { - this.entity2Type = omrsRelationship.getEntityTwoProxy().getType().getTypeDefName(); - } - this.entity2Guid = omrsRelationship.getEntityTwoProxy().getGUID(); - } - } - - public String getTypeDefGuid() { - return typeDefGuid; - } - - public void setTypeDefGuid(String typeDefGuid) { - this.typeDefGuid = typeDefGuid; - } - - public void setEntity1Name(String entity1Name) { - this.entity1Name = entity1Name; - } - public void setEntity1Type(String entity1Type) { - this.entity1Type = entity1Type; - } - - public String getEntity1PropertyName() { - return entity1PropertyName; - } - - public void setEntity1PropertyName(String entity1PropertyName) { - this.entity1PropertyName = entity1PropertyName; - } - - public String getEntity1Label() { - return entity1Label; - } - - public void setEntity1Label(String entity1Label) { - this.entity1Label = entity1Label; - } - - public void setEntity2Name(String entity2Name) { - this.entity2Name = entity2Name; - } - - public void setEntity2Type(String entity2Type) { - this.entity2Type = entity2Type; - } - - public String getEntity2PropertyName() { - return entity2PropertyName; - } - - public void setEntity2PropertyName(String entity2PropertyName) { - this.entity2PropertyName = entity2PropertyName; - } - - public String getEntity2Label() { - return entity2Label; - } - - public void setEntity2Label(String entity2Label) { - this.entity2Label = entity2Label; - } - - public void setEntity1Guid(String entity1Guid) { - this.entity1Guid = entity1Guid; - } - - public String getEntity2Guid() { - return entity2Guid; - } - - public void setEntity2Guid(String entity2Guid) { - this.entity2Guid = entity2Guid; - } - - public String getName() { - return name; - } - - public static long getSerialVersionUID() { - return serialVersionUID; - } - public String getEntity1Name() { - return entity1Name; - } - public String getEntity2Name() { - return entity2Name; - } - public String getEntity1Type() { return entity1Type; } - public String getEntity2Type() { return entity2Type; } - - public String getEntity1Guid() - { - return entity1Guid; - } - - /** - * Create an omrs relationship with the basic fields filled in. - * @param line this is a line to create the relationship from - * @return Relationship the created omrs relationship - */ - public static Relationship createOmrsRelationship(OMRSLine line) { - Relationship omrsRelationship = new Relationship(); - InstanceType typeOfRelationship = new InstanceType(); - typeOfRelationship.setTypeDefName(line.getName()); - typeOfRelationship.setTypeDefGUID(line.getTypeDefGuid()); - omrsRelationship.setType(typeOfRelationship); - SystemAttributes systemAttributes = line.getSystemAttributes(); - if (systemAttributes ==null) { - systemAttributes = new SystemAttributes(); - } - omrsRelationship.setCreatedBy(systemAttributes.getCreatedBy()); - omrsRelationship.setUpdatedBy(systemAttributes.getUpdatedBy()); - omrsRelationship.setCreateTime(systemAttributes.getCreateTime()); - omrsRelationship.setUpdateTime(systemAttributes.getUpdateTime()); - if (systemAttributes.getVersion()==null) { - omrsRelationship.setVersion(0L); - } else { - omrsRelationship.setVersion(systemAttributes.getVersion()); - } - line.setSystemAttributes(systemAttributes); - //set proxy 1 - EntityProxy entityOne = new EntityProxy(); - entityOne.setGUID(line.getEntity1Guid()); - String type1 = line.getEntity1Type(); - InstanceType instancetype1 = new InstanceType(); - instancetype1.setTypeDefName(type1); - entityOne.setType(instancetype1); - //set proxy 2 - EntityProxy entityTwo = new EntityProxy(); - entityTwo.setGUID(line.getEntity2Guid()); - String type2 = line.getEntity2Type(); - InstanceType instancetype2 = new InstanceType(); - instancetype2.setTypeDefName(type2); - entityTwo.setType(instancetype2); - - omrsRelationship.setEntityOneProxy(entityOne); - omrsRelationship.setEntityTwoProxy(entityTwo); - return omrsRelationship; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("OMRSLine{"); - sb.append("line="+"super.toString(sb),"); - sb.append("entity1Name="+entity1Name+","); - sb.append("entity1Type="+entity1Type+","); - sb.append("relatedTerm1Guid="+entity1Guid+","); - sb.append("entity1PropertyName="+ entity1PropertyName+","); - sb.append("entity1Label="+ entity1Label+","); - - sb.append("entity2Name="+entity2Name+","); - sb.append("entity2Type="+entity2Type+","); - sb.append("relatedTerm2Guid="+entity2Guid+","); - sb.append("entity2PropertyName="+ entity2PropertyName+","); - sb.append("entity2Label="+ entity2Label+","); - sb.append("name=" + name); - sb.append('}'); - return sb; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Permission.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Permission.java deleted file mode 100644 index b59b54825d2..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Permission.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - - -/** - * OMAS permissions - * WRITE - can create children - * UPDATE - can update - * DELETE -can delete - */ - -// For the future we could include ATTRIBUTE, ARRAY, MAP, ENUM here so that the tree could naturally show these things -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum Permission { - WRITE, UPDATE, DELETE -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Reference.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Reference.java deleted file mode 100644 index a8e586be5c4..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/Reference.java +++ /dev/null @@ -1,239 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; -import java.util.Map; -import java.util.Objects; - - -/** - * This is a view of a relationship from the perspective of one of the ends. - */ -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Reference implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String KEY_RELATED_END_GUID = "relatedEndGuid"; - public static final String KEY_RELATIONSHIP_GUID = "RelationshipGuid"; - public static final String KEY_TYPENAME = "relatedEndType"; - public static final String KEY_UNIQUE_ATTRIBUTES = "uniqueAttributes"; - - /* - In cases where the relationship ends have different names, there will be 2 references - one from each of the relationship ends perspective. - - There are some attributes that will be the same in each of these references and some - some attributes that are end specific. - */ - - // relationship information - static protected String relationship_Type = null; - protected String relationshipGuid; - protected Map uniqueAttributes; - - // end / reference specific fields - protected String relatedEndGuid; - protected String relatedEndType = null; - protected String referenceName = null; - - /** - * the type of relationship - * @return relationship type - */ - public String getRelationship_Type() { - return relationship_Type; - } - - public void setRelationship_Type(String relationship_Type) { - this.relationship_Type = relationship_Type; - } - - - /** - * Attributes associated with the relationship itself - * @return relationship attributes - */ - public Map getRelationshipAttributes() { - return relationshipAttributes; - } - - public void setRelationshipAttributes(Map relationshipAttributes) { - this.relationshipAttributes = relationshipAttributes; - } - - private Map relationshipAttributes; - - /** - * This guid of the related end of this reference - * @return related end guid - */ - public String getRelatedEndGuid() { - return relatedEndGuid; - } - - public void setRelatedEndGuid(String relatedEndGuid) { - this.relatedEndGuid = relatedEndGuid; - } - - /** - * This is the relationship guid associated with this reference - * @return relationship guid - */ - public String getRelationshipGuid() { - return relationshipGuid; - } - - public void setRelationshipGuid(String relationshipGuid) { - this.relationshipGuid = relationshipGuid; - } - - /** - * This is the related ends type name - * @return related ends type name - */ - public String getRelatedEndType() { - return relatedEndType; - } - - public void setRelatedEndType(String relatedEndType) { - this.relatedEndType = relatedEndType; - } - - public Reference() { - this(null, null, (Map) null); - } - - public Reference(String guid) { - this(guid, null, (Map) null); - } - - public Reference(String guid, String relatedEndType) { - this(guid, relatedEndType, (Map) null); - } - - public Reference(String relatedEndType, Map uniqueAttributes) { - this(null, relatedEndType, uniqueAttributes); - } - - public Reference(String guid, String relatedEndType, Map uniqueAttributes) { - setRelationshipGuid(guid); - setRelatedEndType(relatedEndType); - setUniqueAttributes(uniqueAttributes); - } - - public Reference(Reference other) { - if (other != null) { - setRelationshipGuid(other.getRelationshipGuid()); - setRelatedEndGuid(other.getRelatedEndGuid()); - setRelatedEndType(other.getRelatedEndType()); - setUniqueAttributes(other.getUniqueAttributes()); - } - } - - public Reference(Map objIdMap) { - if (objIdMap != null) { - Object reg = objIdMap.get(KEY_RELATED_END_GUID); - Object rg = objIdMap.get(KEY_RELATIONSHIP_GUID); - Object t = objIdMap.get(KEY_TYPENAME); - Object u = objIdMap.get(KEY_UNIQUE_ATTRIBUTES); - - if (reg != null) { - setRelatedEndGuid(reg.toString()); - } - if (rg != null) { - setRelationshipGuid(rg.toString()); - } - - - if (t != null) { - setRelatedEndType(t.toString()); - } - - if (u != null && u instanceof Map) { - setUniqueAttributes((Map) u); - } - } - } - - /** - * Get a map of the unique attributes. i.e. the attributes whose values must are all different. - * @return {@code Map } - */ - public Map getUniqueAttributes() { - return uniqueAttributes; - } - - public void setUniqueAttributes(Map uniqueAttributes) { - this.uniqueAttributes = uniqueAttributes; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Reference{"); - sb.append("relatedEndGuid='").append(relatedEndGuid).append('\''); - sb.append("relationshipGuid='").append(relationshipGuid).append('\''); - sb.append("relatedEndType='").append(relatedEndType).append('\''); - sb.append(", uniqueAttributes={"); - //AtlasBaseTypeDef.dumpObjects(uniqueAttributes, sb); - sb.append('}'); - sb.append('}'); - - return sb; - } - - /** - * get the name of the reference - * @return reference name - */ - public String getReferenceName() { - return referenceName; - } - - public void setReferenceName(String referenceName) { - this.referenceName = referenceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Reference that = (Reference) o; - - if (relatedEndGuid != null && !Objects.equals(relatedEndGuid, that.relatedEndGuid)) { - return false; - } - if (relationshipGuid != null && !Objects.equals(relationshipGuid, that.relationshipGuid)) { - return false; - } - - return Objects.equals(relatedEndType, that.relatedEndType) && - Objects.equals(uniqueAttributes, that.uniqueAttributes); - } - - @Override - public int hashCode() { - return relatedEndGuid != null ? Objects.hash(relatedEndGuid) : Objects.hash(relatedEndType, uniqueAttributes); - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/RelationshipEnd.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/RelationshipEnd.java deleted file mode 100644 index a8f4b59e927..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/RelationshipEnd.java +++ /dev/null @@ -1,184 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; -import java.util.Map; -import java.util.Objects; - - -/** - * this is represents a relationship and the related end. - */ -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipEnd implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String KEY_END_GUID = "EndGuid"; - public static final String KEY_RELATIONSHIP_GUID = "RelationshipGuid"; - public static final String KEY_TYPENAME = "relatedEndType"; - public static final String KEY_UNIQUE_ATTRIBUTES = "uniqueAttributes"; - - private String EndGuid; - private String relationshipGuid; - private Map uniqueAttributes; - protected String typeName = null; - - /** - * This guid of the is the related end of this reference - * @return guid of the end - */ - public String getEndGuid() { - return EndGuid; - } - - public void setEndGuid(String EndGuid) { - this.EndGuid = EndGuid; - } - - /** - * This is the relationship guid associated with this reference - * @return relationship guid - */ - public String getRelationshipGuid() { - return relationshipGuid; - } - - public void setRelationshipGuid(String relationshipGuid) { - this.relationshipGuid = relationshipGuid; - } - - /** - * This is the related ends type name - * @return the related ends name - */ - public String getTypeName() { - return typeName; - } - - public void setTypeName(String typeName) { - this.typeName = typeName; - } - - public RelationshipEnd() { - this(null, null, (Map) null); - } - - public RelationshipEnd(String guid) { - this(guid, null, (Map) null); - } - - public RelationshipEnd(String guid, String typeName) { - this(guid, typeName, (Map) null); - } - - public RelationshipEnd(String typeName, Map uniqueAttributes) { - this(null, typeName, uniqueAttributes); - } - - public RelationshipEnd(String guid, String typeName, Map uniqueAttributes) { - setRelationshipGuid(guid); - setTypeName(typeName); - setUniqueAttributes(uniqueAttributes); - } - - public RelationshipEnd(RelationshipEnd other) { - if (other != null) { - setRelationshipGuid(other.getRelationshipGuid()); - setEndGuid(other.getEndGuid()); - setTypeName(other.getTypeName()); - setUniqueAttributes(other.getUniqueAttributes()); - } - } - - public RelationshipEnd(Map objIdMap) { - if (objIdMap != null) { - Object reg = objIdMap.get(KEY_END_GUID); - Object rg = objIdMap.get(KEY_RELATIONSHIP_GUID); - Object t = objIdMap.get(KEY_TYPENAME); - Object u = objIdMap.get(KEY_UNIQUE_ATTRIBUTES); - - if (reg != null) { - setEndGuid(reg.toString()); - } - if (rg != null) { - setRelationshipGuid(rg.toString()); - } - - - if (t != null) { - setTypeName(t.toString()); - } - - if (u != null && u instanceof Map) { - setUniqueAttributes((Map) u); - } - } - } - - - public Map getUniqueAttributes() { - return uniqueAttributes; - } - - public void setUniqueAttributes(Map uniqueAttributes) { - this.uniqueAttributes = uniqueAttributes; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Reference{"); - sb.append("EndGuid='").append(EndGuid).append('\''); - sb.append("relationshipGuid='").append(relationshipGuid).append('\''); - sb.append("relatedEndType='").append(typeName).append('\''); - sb.append(", uniqueAttributes={"); - //AtlasBaseTypeDef.dumpObjects(uniqueAttributes, sb); - sb.append('}'); - sb.append('}'); - - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - RelationshipEnd that = (RelationshipEnd) o; - - if (EndGuid != null && !Objects.equals(EndGuid, that.EndGuid)) { - return false; - } - if (relationshipGuid != null && !Objects.equals(relationshipGuid, that.relationshipGuid)) { - return false; - } - - return Objects.equals(typeName, that.typeName) && - Objects.equals(uniqueAttributes, that.uniqueAttributes); - } - - @Override - public int hashCode() { - return EndGuid != null ? Objects.hash(EndGuid) : Objects.hash(typeName, uniqueAttributes); - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/SystemAttributes.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/SystemAttributes.java deleted file mode 100644 index 271a46a4903..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/common/SystemAttributes.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.common; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; - -import java.io.Serializable; -import java.util.Date; - - -/** - * These are the core ' system' attributes - */ -@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SystemAttributes implements Serializable { - protected static final long serialVersionUID = 1L; - /* - * system attributes - */ - private String GUID = null; - private InstanceStatus status = null; - private String createdBy = null; - private String updatedBy = null; - private Date createTime = null; - private Date updateTime = null; - private Long version = null; - - public String getGUID() { - return GUID; - } - - public void setGUID(String GUID) { - this.GUID = GUID; - } - - /** - * Status indicates the status of the object - the values are specified in the Status enumeration - * @return status of the object - */ - public InstanceStatus getStatus() { - return status; - } - - public void setStatus(InstanceStatus status) { - this.status = status; - } - - /** - * User who created this object - * @return user who created this. - */ - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - /** - * User who last updated this object - * @return use who last updated this - */ - public String getUpdatedBy() { - return updatedBy; - } - - public void setUpdatedBy(String updatedBy) { - this.updatedBy = updatedBy; - } - - /** - * The time at which this object was created. - * @return date - */ - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - /** - * The time at which this object was last updated. - * @return date - */ - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - /** - * version of the object. - * @return version - */ - public Long getVersion() { - return version; - } - - public void setVersion(Long version) { - this.version = version; - } - - public StringBuilder toString(StringBuilder sb) - { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("GUID="+GUID+","); - sb.append("status="+this.status+","); - sb.append("createdBy="+createdBy+","); - sb.append("updatedBy="+updatedBy+","); - sb.append("createTime="+createTime+","); - sb.append("updateTime="+ updateTime +","); - sb.append("version="+version +","); - return sb; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/generators/OmrsBeanGenerator.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/generators/OmrsBeanGenerator.java deleted file mode 100644 index 27fc0ac10af..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/generators/OmrsBeanGenerator.java +++ /dev/null @@ -1,1461 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.generators; - -import org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanAttribute; -import org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanReference; -import org.odpi.openmetadata.fvt.opentypes.utils.GeneratorUtilities; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.*; -import java.util.*; - -/** - * This class tests the OMRS by generating OMRS java beans and driving that code. It generates a java class for each entity, relationship, reference, classification. - * It also generates mapper classes to map between the omrs api objects to the omrs bean objects. There is a omrs bean accessor and test classes that exposes operations - * like create ,get, read and delete. - * - * The OMAS API can then call the OMRS bean accessor and the OMRS bean accessor deals with mapping to the omrs interface. - * - * In addition to the bean classes this generator creates junits that are then run as part of the build. These tests should fail if the the OMRS archive types are changed in - * an unexpected way. - */ -public class OmrsBeanGenerator { - - // This generator can be run in the top level Egeria folder - i.e. the folder you run git commands in. It is run automatically as part of the Maven build. - - private static final Logger log = LoggerFactory.getLogger(OmrsBeanGenerator.class); - - //public static final String OPEN_METADATA_IMPLEMENTATION = "open-metadata-implementation"; - public static final String OPEN_METADATA_TEST = "open-metadata-test"; - public static final String OPEN_METADATA_FVT = "open-metadata-fvt"; - - public static final String OPEN_TYPES_TEST = "open-types-test"; - public static final String OPEN_TYPES_FVT = "open-types-fvt"; - - public static final String OPEN_TYPES_TEST_GENERATOR = "open-types-test-generator"; - - public static final String GENERATOR_PROJECT = OPEN_METADATA_TEST + "/" +OPEN_METADATA_FVT + "/" +OPEN_TYPES_FVT +"/" + OPEN_TYPES_TEST_GENERATOR; - public static final String TARGET_PROJECT = OPEN_METADATA_TEST + "/" +OPEN_METADATA_FVT + "/" +OPEN_TYPES_FVT +"/" +OPEN_TYPES_TEST; - - public static final String CLASSIFICATIONS = "classifications"; - public static final String RELATIONSHIPS = "relationships"; - public static final String REFERENCES = "references"; - public static final String ENTITIES = "entities"; - public static final String ENUMS = "enums"; - - public static final String GENERATION_OMRS_RELATIONSHIP_TO_LINES_CLASS_NAME="OMRSRelationshipToLines.java"; - - public static final String TEMPLATES_FOLDER = GENERATOR_PROJECT + "/src/main/resources/templates/"; - - //public static final String SRC_SUBJECT_AREA = "/src/main/java/org/odpi/openmetadata/fvt/opentypes/"; - public static final String GEN_PKG_BASE = "org.odpi.openmetadata.fvt.opentypes."; - public static final String FVT_PACKAGE = "/java/org/odpi/openmetadata/fvt/opentypes/"; - - public static final String GENERATION_FOLDER = TARGET_PROJECT + "/src/main"+FVT_PACKAGE; - public static final String GENERATION_TEST_FOLDER = TARGET_PROJECT + "/src/test"+FVT_PACKAGE; - public static final String SERVER_FOLDER = "server/"; - - public static final String GENERATION_REST_FOLDER = GENERATION_FOLDER + SERVER_FOLDER; - public static final String GENERATION_REST_TEST_FOLDER = GENERATION_TEST_FOLDER + SERVER_FOLDER; - public static final String GENERATION_REST_CLASS_NAME = "BeansToAccessOMRS.java"; - public static final String GENERATION_REST_TEST_CLASS_NAME = "TestBeansToAccessOMRS.java"; - - public static final String GENERATION_REST_FILE = GENERATION_REST_FOLDER + GENERATION_REST_CLASS_NAME; - public static final String GENERATION_REST_TEST_FILE = GENERATION_REST_TEST_FOLDER + GENERATION_REST_TEST_CLASS_NAME; - - public static final String GENERATION_REFERENCES_FOLDER = GENERATION_FOLDER + REFERENCES + "/"; - public static final String GENERATION_ENTITIES_FOLDER = GENERATION_FOLDER + ENTITIES + "/"; - public static final String GENERATION_ENUMS_FOLDER = GENERATION_FOLDER + ENUMS + "/"; - public static final String GENERATION_CLASSIFICATIONS_FOLDER = GENERATION_FOLDER + CLASSIFICATIONS + "/"; - - public static final String GEN_PKG_ENUMS = GEN_PKG_BASE+ENUMS; - public static final String GEN_PKG_CLASSIFICATIONS = GEN_PKG_BASE+CLASSIFICATIONS; - public static final String GEN_PKG_RELATIONSHIPS = GEN_PKG_BASE+RELATIONSHIPS; - - public static final String GENERATION_RELATIONSHIPS_FOLDER = GENERATION_FOLDER + RELATIONSHIPS + "/"; - - private static final String GENERATION_CLASSIFICATION_FACTORY_CLASS_NAME = "ClassificationBeanFactory"; - public static final String GENERATION_CLASSIFICATION_FACTORY_FILE_NAME = GENERATION_CLASSIFICATIONS_FOLDER + GENERATION_CLASSIFICATION_FACTORY_CLASS_NAME +".java"; - public static final String GENERATION_OMRS_RELATIONSHIP_TO_LINES_FILE_NAME = GENERATION_RELATIONSHIPS_FOLDER + GENERATION_OMRS_RELATIONSHIP_TO_LINES_CLASS_NAME; - //template names - // this is the template for a Reference - i.e. something that contains the relationship attributes and is our view of the relationship - public static final String REFERENCE_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanReferenceTemplate"; - // this is the template to be able to create an - public static final String ENTITY_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanEntityTemplate"; - // this is the template to be able to create classifications - public static final String CLASSIFICATION_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanClassificationTemplate"; - // this is the template to be able to create relationship mappings - public static final String RELATIONSHIP_MAPPER_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanRelationshipMapperTemplate"; - // this is the template to be able to create relationships - public static final String RELATIONSHIP_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanRelationshipTemplate"; - // ths is the template to be able to create an omrsBean enum - public static final String ENUM_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanEnumTemplate"; - public static final String RELATIONSHIP_TO_LINES_TEMPLATE = TEMPLATES_FOLDER + "OMRSRelationshipToLinesTemplate"; - // Entity mapper - public static final String ENTITY_MAPPER_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanEntityMapperTemplate"; - // Entity mapper - public static final String CLASSIFICATION_MAPPER_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanClassificationMapperTemplate"; - - // this is the top level references e.g. TermReferences - public static final String TOP_REFERENCE_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanTopReferenceTemplate"; - // this is the beans access file template - public static final String OMRS_BEANS_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanAccessorTemplate"; - - public static final String OMRS_BEANS_TEST_TEMPLATE = TEMPLATES_FOLDER + "TestOmrsBeanAccessorTemplate"; - - public static final String CLASSIFICATION_FACTORY_TEMPLATE = TEMPLATES_FOLDER + "OmrsBeanClassificationFactoryTemplate"; - - - // the omrsBean model is a typed version of omrs - prepared for use by this omrsBean - private org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanModel omrsBeanModel; - - public OmrsBeanGenerator(org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanModel omrsBeanModel) { - this.omrsBeanModel = omrsBeanModel; - } - - public static void main(String[] args) throws IOException { - - log.debug("Starting test code generation"); - if (checkCurrentFolder()) { - // make sure we have the generation folders - initializeFoldersandFiles(); - // run the generation - generate(args); - } - else { - log.error("Failed generation due to incorrect working directory. This must contain {}",OPEN_METADATA_TEST); - // We need to fail to ensure build tools correctly see this as a failure - System.exit(1); - } - log.debug("Ending test code generation"); - } - - /** - * check that the current folder is as expected - * @return where we have a valid folder to be able to generateClientSideRelationshipImpl in - */ - private static boolean checkCurrentFolder() { - // only run the generator if the current directory looks as expected. - File curDir = new File("."); - File[] filesList = curDir.listFiles(); - boolean validCurrentFolder =false; - for(File f : filesList){ - String folderName = f.getName(); - log.debug("Found folder {}",folderName); - if (folderName.equals(OPEN_METADATA_TEST)) { - log.debug("Good folder found"); - validCurrentFolder = true; - } - } - return validCurrentFolder; - } - - private static void initializeFoldersandFiles() throws FileNotFoundException { - - log.debug("Creating folders"); - GeneratorUtilities.createEmptyFolder(GENERATION_FOLDER); - GeneratorUtilities.writeFolder(GENERATION_REFERENCES_FOLDER); - GeneratorUtilities.writeFolder(GENERATION_ENTITIES_FOLDER); - GeneratorUtilities.writeFolder(GENERATION_ENUMS_FOLDER); - GeneratorUtilities.writeFolder(GENERATION_CLASSIFICATIONS_FOLDER); - GeneratorUtilities.writeFolder(GENERATION_RELATIONSHIPS_FOLDER); - GeneratorUtilities.writeFolder(GENERATION_REST_FOLDER); - GeneratorUtilities.writeFolder(GENERATION_REST_TEST_FOLDER); - - File classificationFactoryFile = new File(GENERATION_CLASSIFICATION_FACTORY_FILE_NAME); - if (classificationFactoryFile.exists()) { - classificationFactoryFile.delete(); - } - - File relationshipToLinesFile = new File(GENERATION_OMRS_RELATIONSHIP_TO_LINES_FILE_NAME); - if (relationshipToLinesFile.exists()) { - relationshipToLinesFile.delete(); - } - log.debug("Folder creation complete"); - } - - /** - * This generation creates 8 types of files: - *

- * All the files are generated in the - *

- * - a reference java file - lives in a references sub folder named sourceTotarget type. - * for example generation.references.TermToGlossary.AnchorReference. - * - an attribute java file - lives in an entities subfolder named with the entity Name. The file is called entityName Attributes. - * for example generation.entities.Asset.AssetAttribute - * - an entity java file - lives lives in an entities subfolder named with the entity Name. The file is called entityName. - * for example generation.entities.Asset.Asset - * The entity file contains the core and identifiable attributes, a member of type attribute java class and - * a member of type top reference class - * - a topreference java file contains members for each of the java reference type. - * for example generation.entities.Asset.AssetReferences - * - a enum java file to hold enums - * - classifications files - * - relationships files - * - beans access file - * - * @param args arguments supplied to the java program - * @throws IOException IO Exception - */ - public static void generate(String[] args) throws IOException { - org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanModel omrsBeanModel = new org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanModel(); - - OmrsBeanGenerator generator = new OmrsBeanGenerator(omrsBeanModel); - - log.debug("starting actual generation"); - // generate the enum files - log.debug("Generating Enum files"); - generator.generateEnumFiles(); - // generate the classification files and their attributes - log.debug("Generating Classification files"); - generator.generateClassificationFiles(); - // generate the classification bean factory - log.debug("Generating Classification bean factory"); - generator.generateClassificationBeanFactory(); - // generate OMRSRelationshipToLines. - log.debug("Generating OMRS Relationship to Lines"); - generator.generateOMRSRelationshipToLines(); - // generate the entity and attribute files - log.debug("Generating Entity related files"); - generator.generateEntityRelatedFiles(omrsBeanModel.getOmrsBeanEntityAttributeMap()); - // generate relationships and their attributes - log.debug("Generating Relationship files"); - generator.generateRelationshipFiles(); - // generate the reference files - log.debug("Generating Reference files"); - generator.generateReferenceFiles(); - // generate the omrs beans accessor file - log.debug("Generating OMRS Beans Accessor file"); - generator.generateOMRSBeansAccessorFile(GENERATION_REST_FILE, OMRS_BEANS_TEMPLATE); - // generate the omrs beans test file - log.debug("Generating OMRS Beans Accessor file"); - generator.generateOMRSBeansAccessorFile(GENERATION_REST_TEST_FILE, OMRS_BEANS_TEST_TEMPLATE); - } - - private void generateEnumFiles() throws IOException { - - Map> enumsMap = omrsBeanModel.getEnumsMap(); - for (String enumName : enumsMap.keySet()) { - final String enumFileName = GENERATION_ENUMS_FOLDER + enumName + ".java"; - log.debug("Generating enum file {}",enumFileName); - generateEnumFile(enumName, enumsMap.get(enumName), enumFileName,GEN_PKG_ENUMS); - } - } - - private void generateClassificationFiles() throws IOException { - Map> omrsBeanAttributeMap = omrsBeanModel.getOmrsBeanClassificationAttributeMap(); - for (String classificationName : omrsBeanAttributeMap.keySet()) { - - String outputFolder = this.createClassificationJavaFolderIfRequired(classificationName); - final String classificationFileName = outputFolder + "/" + classificationName + ".java"; - final String classificationMapperFileName = outputFolder + "/" + classificationName + "Mapper.java"; - log.debug("Generating classification file {}",classificationFileName); - generateClassificationFile(classificationName, classificationFileName,GEN_PKG_CLASSIFICATIONS+"."+classificationName); - log.debug("Generating classification mapper file {}",classificationMapperFileName); - generateClassificationMapperFile(classificationName, classificationMapperFileName); - } - } - private void generateClassificationMapperFile(String classificationName, String fileName) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader = null; - try { - outputFileWriter = new FileWriter(fileName); - List loopEntityLines = new ArrayList<>(); - reader = new BufferedReader(new FileReader(CLASSIFICATION_MAPPER_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - loopEntityLines.add(line); - line = reader.readLine(); - } - reader.close(); - - Map replacementMap = new HashMap<>(); - replacementMap.put("package", CLASSIFICATIONS + "." + classificationName); - mapOMRSToOMAS("Classification", replacementMap, outputFileWriter, loopEntityLines, classificationName); - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - private void generateClassificationBeanFactory() throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader = null; - try { - outputFileWriter = new FileWriter(GENERATION_CLASSIFICATION_FACTORY_FILE_NAME); - reader = new BufferedReader(new FileReader(CLASSIFICATION_FACTORY_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - List loopLines = new ArrayList<>(); - - if (line.contains("<$$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - while (loopline != null) { - //stash the lines for the loop and spit them out for each entity - if (loopline.contains("$$$>")) { - break; - } - loopLines.add(loopline); - loopline = reader.readLine(); - } - // for each classification write out the loop line - for (String classificationName : omrsBeanModel.getOmrsBeanClassificationAttributeMap().keySet()) { - for (int loopCounter = 0; loopCounter < loopLines.size(); loopCounter++) { - String newLine = loopLines.get(loopCounter); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uClassification"), GeneratorUtilities.uppercase1stLetter(classificationName)); - outputFileWriter.write(newLine + "\n"); - } - } - } else { - outputFileWriter.write(line + "\n"); - } - line = reader.readLine(); - } - - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - - } - - private void generateOMRSRelationshipToLines() throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader = null; - try { - outputFileWriter = new FileWriter(GENERATION_OMRS_RELATIONSHIP_TO_LINES_FILE_NAME); - reader = new BufferedReader(new FileReader(RELATIONSHIP_TO_LINES_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - List loopLines = new ArrayList<>(); - - if (line.contains(" <$$RELATIONSHIP$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - while (loopline != null) { - //stash the lines for the loop and spit them out for each relationship - if (loopline.contains(" $$RELATIONSHIP$>")) { - break; - } - loopLines.add(loopline); - loopline = reader.readLine(); - } - // for each relationship write out the loop line - for (String relationshipName : omrsBeanModel.getOmrsBeanRelationshipMap().keySet()) { - for (int loopCounter = 0; loopCounter < loopLines.size(); loopCounter++) { - String newLine = loopLines.get(loopCounter); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipName"), GeneratorUtilities.uppercase1stLetter(relationshipName)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("RelationshipName"), GeneratorUtilities.lowercase1stLetter(relationshipName)); - outputFileWriter.write(newLine + "\n"); - } - } - } else { - outputFileWriter.write(line + "\n"); - } - line = reader.readLine(); - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - private void generateRelationshipFiles() throws IOException { - Map> omrsBeanAttributeMap = omrsBeanModel.getOmrsBeanRelationshipAttributeMap(); - for (String relationshipName : omrsBeanAttributeMap.keySet()) { - // upper case the first letter. - relationshipName = GeneratorUtilities.uppercase1stLetter(relationshipName); - String outputFolder = this.createRelationshipJavaFolderIfRequired(relationshipName); - final String relationshipFileName = outputFolder + "/" + relationshipName + ".java"; - org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanRelationship omrsBeanRelationship = omrsBeanModel.getOmrsBeanRelationshipByName(relationshipName); - log.debug("Generating relationship file {}",relationshipFileName); - - generateRelationshipFile(omrsBeanRelationship, relationshipFileName,GEN_PKG_RELATIONSHIPS +"."+relationshipName); - final String relationshipMapperFileName = outputFolder + "/" + relationshipName + "Mapper.java"; - log.debug("Generating relationship mapper file {}",relationshipMapperFileName); - generateRelationshipMapperFile(omrsBeanRelationship, relationshipMapperFileName); - } - - - } - private void generateEntityRelatedFiles(Map> omrsBeanAttributeMap) throws IOException { - for (String entityName : omrsBeanAttributeMap.keySet()) { - String outputFolder = this.createEntityJavaFolderIfRequired(entityName); - final String entityFileName = outputFolder + "/" + entityName + ".java"; - log.debug("Generating Entity file {}",entityFileName); - generateEntityFile(entityName, entityFileName); - final String mapperFileName = outputFolder + "/" + entityName + "Mapper.java"; - log.debug("Generating Entity mapper file {}",mapperFileName); - generateEntityMapperFile(entityName, mapperFileName); - } - } - - /** - * Generate the top reference file - * @param entityName - * @param omrsBeanAttributes - * @param topReferenceFileName - * @throws IOException - */ - private void generateTopReferenceFile(String entityName, List omrsBeanAttributes, String topReferenceFileName) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader = null; - try { - outputFileWriter = new FileWriter(topReferenceFileName); - reader = new BufferedReader(new FileReader(TOP_REFERENCE_TEMPLATE)); - String line = reader.readLine(); - if (omrsBeanAttributes !=null && omrsBeanAttributes.size() > 0) { - while (line != null) { - Map replacementMap = new HashMap<>(); - replacementMap.put("package", ENTITIES + "." + entityName); - replacementMap.put("name", org.odpi.openmetadata.fvt.opentypes.utils.GeneratorUtilities.lowercase1stLetter(entityName)); - replacementMap.put("uname", GeneratorUtilities.uppercase1stLetter(entityName)); - writeTopReferenceAttributesToFile(omrsBeanAttributes, replacementMap, outputFileWriter, reader, line); - line = reader.readLine(); - } - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - /** - * Generate EnumMapper file. One for each enum - * @param enumName - * @param enumValues - * @param enumFileName - * @throws IOException - */ - private void generateEnumFile(String enumName, List enumValues, String enumFileName, String pkg) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader = null; - try { - outputFileWriter = new FileWriter(enumFileName); - - reader = new BufferedReader(new FileReader(ENUM_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - Map replacementMap = new HashMap<>(); - replacementMap.put("description", this.omrsBeanModel.getTypeDefDescription(GeneratorUtilities.uppercase1stLetter(enumName))); - replacementMap.put("package", pkg); - replacementMap.put("name", org.odpi.openmetadata.fvt.opentypes.utils.GeneratorUtilities.lowercase1stLetter(enumName)); - replacementMap.put("uname", GeneratorUtilities.uppercase1stLetter(enumName)); - //String enumName, List enumValues, Map replacementMap, - writeEnumToFile(enumName, enumValues, replacementMap, outputFileWriter, reader, line); - line = reader.readLine(); - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - /** - * Generate the EntityMapper file. There is one for each entity - * @param entityName name of the entity - * @param fileName name of the file - * @throws IOException - */ - private void generateEntityMapperFile(String entityName, String fileName) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader = null; - - try { - outputFileWriter = new FileWriter(fileName); - List loopEntityLines = new ArrayList<>(); - reader = new BufferedReader(new FileReader(ENTITY_MAPPER_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - loopEntityLines.add(line); - line = reader.readLine(); - } - reader.close(); - Map replacementMap = new HashMap<>(); - replacementMap.put("package", ENTITIES + "." + entityName); - mapOMRSToOMAS("Entity", replacementMap, outputFileWriter, loopEntityLines, entityName); - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - - } - - /** - * write out the omrs beans accessor file - * @throws IOException - */ - private void generateOMRSBeansAccessorFile(String fileName, String templateName) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader = null; - - try { - outputFileWriter = new FileWriter(fileName); - reader = new BufferedReader(new FileReader(templateName)); - String line = reader.readLine(); - while (line != null) { - Map replacementMap = new HashMap<>(); - writeOMRSBeansAccessorFile(replacementMap, outputFileWriter, reader, line); - line = reader.readLine(); - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - - - /** - * Write out the line from the template. - * - * This method also has logic to loop through lines associated with attributes - * - * @param replacementMap - * @param outputFileWriter - * @param reader - * @param line - * @throws IOException - */ - private void writeOMRSBeansAccessorFile(Map replacementMap, FileWriter outputFileWriter, BufferedReader reader, String line) throws IOException { - Set allEntities = omrsBeanModel.getOmrsBeanEntityAttributeMap().keySet(); - List loopEntityLines = new ArrayList<>(); - List loopRelationshipLines = new ArrayList<>(); - if (line.contains("<$$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - while (loopline != null) { - //stash the lines for the loop and spit them out for each entity - if (loopline.contains("$$$>")) { - break; - } - loopEntityLines.add(loopline); - loopline = reader.readLine(); - } - } - if (line.contains("<$$RELATIONSHIP$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each entity - if (loopline.contains("$$RELATIONSHIP$>")) { - break; - } - loopRelationshipLines.add(loopline); - loopline = reader.readLine(); - } - } - if (!loopEntityLines.isEmpty()) { - - // loop through the entities and write out - for (String entityName : allEntities) { - mapOMRSToOMAS("Entity", replacementMap, outputFileWriter, loopEntityLines, entityName); - } - } else if (!loopRelationshipLines.isEmpty()) { - // loop through the relationships and write out - Map> omrsBeanAttributeMap = omrsBeanModel.getOmrsBeanRelationshipAttributeMap(); - for (String relationshipName : omrsBeanAttributeMap.keySet()) { - mapOMRSToOMAS("Relationship", replacementMap, outputFileWriter, loopRelationshipLines, relationshipName); - } - } else { - // just write out the line - String newLine = line; - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - outputFileWriter.write(newLine + "\n"); - } - } - - /** - * @param omrsType - Entity or Relationship - * @param replacementMap - * @param outputFileWriter - * @param loopArtifactLines - * @param omrsArtifactName - * @throws IOException - */ - private void mapOMRSToOMAS(String omrsType, Map replacementMap, FileWriter outputFileWriter, List loopArtifactLines, String omrsArtifactName) throws IOException { - - String lowercaseArtifact = GeneratorUtilities.lowercase1stLetter(omrsArtifactName); - String uppercaseArtifact = GeneratorUtilities.uppercase1stLetter(omrsArtifactName); - String lowerCasePluralArtifactName = ""; - - if (lowercaseArtifact.endsWith("y")) { - lowerCasePluralArtifactName = lowercaseArtifact.substring(0, lowercaseArtifact.length() - 1) + "ies"; - } else if (lowercaseArtifact.endsWith("s")) { - lowerCasePluralArtifactName = lowercaseArtifact + "es"; - } else { - lowerCasePluralArtifactName = lowercaseArtifact + "s"; - } - List allOmrsBeanAttributes = null; - if (omrsType.equals("Entity")) { - allOmrsBeanAttributes = omrsBeanModel.getOmrsBeanEntityAttributeMap().get(uppercaseArtifact); - } else if (omrsType.equals("Classification")) { - allOmrsBeanAttributes = omrsBeanModel.getOmrsBeanClassificationAttributeMap().get(uppercaseArtifact); - } else { - allOmrsBeanAttributes = omrsBeanModel.getOmrsBeanRelationshipAttributeMap().get(uppercaseArtifact); - } - List omrsBeanAttributes = new ArrayList(); - List omrsBeanEnumAttributes = new ArrayList(); - List omrsBeanMapAttributes = new ArrayList(); - if (allOmrsBeanAttributes != null) { - for (OmrsBeanAttribute omrsBeanAttribute : allOmrsBeanAttributes) { - if (omrsBeanAttribute.isEnum) { - omrsBeanEnumAttributes.add(omrsBeanAttribute); - } else if (omrsBeanAttribute.isMap) { - omrsBeanMapAttributes.add(omrsBeanAttribute); - } else { - omrsBeanAttributes.add(omrsBeanAttribute); - } - } - } - - for (int loopArtifactCounter = 0; loopArtifactCounter < loopArtifactLines.size(); loopArtifactCounter++) { - String newLine = loopArtifactLines.get(loopArtifactCounter); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken(omrsType + "Name"), lowercaseArtifact); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("u" + omrsType + "Name"), uppercaseArtifact); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("lowerCasePlural" + omrsType + "Name"), lowerCasePluralArtifactName); - if (omrsType.equals("Relationship")) { - // add the relationship specific replacements - org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanRelationship omrsBeanRelationship = omrsBeanModel.getOmrsBeanRelationshipByName(uppercaseArtifact); - - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipEntity1"), GeneratorUtilities.uppercase1stLetter(omrsBeanRelationship.entityProxy1Name)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipEntity2"), GeneratorUtilities.uppercase1stLetter(omrsBeanRelationship.entityProxy2Name)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipEntityType1"), GeneratorUtilities.uppercase1stLetter(omrsBeanRelationship.entityProxy1Type)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipEntityType2"), GeneratorUtilities.uppercase1stLetter(omrsBeanRelationship.entityProxy2Type)); - } - if (newLine.contains("<$$Attr$$")) { - loopArtifactCounter++; - // we have attribute code that we need to repeat - List loopAttrLines = new ArrayList<>(); - newLine = loopArtifactLines.get(loopArtifactCounter); - while (newLine != null) { - //stash the lines for the loop and spit them out for each entity - if (newLine.contains("$$Attr$$>")) { - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - break; - } - loopAttrLines.add(newLine); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - } - // we have the inner loop lines we need to text replace - if (!omrsBeanAttributes.isEmpty()) { - //uAttrType - for (int attributeNumber = 0; attributeNumber < omrsBeanAttributes.size(); attributeNumber++) { - OmrsBeanAttribute attribute = omrsBeanAttributes.get(attributeNumber); - - if (!attribute.isList) { - - // write out inner loop contents for each attribute - for (String attrLine : loopAttrLines) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken(omrsType + "Name"), lowercaseArtifact); - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("u" + omrsType + "Name"), uppercaseArtifact); - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrName"), GeneratorUtilities.lowercase1stLetter(attribute.name)); - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("uAttrName"), GeneratorUtilities.uppercase1stLetter(attribute.name)); - - if (!attribute.isList) { - String uppercaseattributeType = attribute.type.toUpperCase(); - - //some primitives need amending - if (uppercaseattributeType.equals("INTEGER")) { - uppercaseattributeType = "INT"; - } - - if (uppercaseattributeType.startsWith("LIST<")) { - // List will be of the form LIST . It needs to be STRING or an INT - uppercaseattributeType = uppercaseattributeType.substring(5, uppercaseattributeType.length() - 1); - } - - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("uAttrType"), uppercaseattributeType); - - //TODO do other types as required - // AttrValue is used as the default value for the unit tests - String attrValue = ""; - if (uppercaseattributeType.equals("STRING")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "String"); - - attrValue = "\"string" + attributeNumber + "\""; -// } else if (uppercaseattributeType.equals("DATE")) { -// attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "java.util.Date"); -// attrValue = "new java.util.Date()"; - } else if (uppercaseattributeType.equals("INT")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "Integer"); - attrValue = String.valueOf(attributeNumber); - } else if (uppercaseattributeType.equals("LONG") || uppercaseattributeType.equals("DATE")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "Long"); - attrValue = String.valueOf(attributeNumber) +"L"; - } else if (uppercaseattributeType.equals("FLOAT")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "Float"); - attrValue = String.valueOf(attributeNumber) + "f"; - } else if (uppercaseattributeType.equals("BOOLEAN")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "Boolean"); - attrValue = String.valueOf(true); - } else { - attrValue = ""; - } - - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrValue"), attrValue); - outputFileWriter.write(attrLine + "\n"); - } - } - } - } - } - } else if (newLine.contains("<$$AttrList$$")) { - loopArtifactCounter++; - // we have attribute code that we need to repeat - List loopAttrLines = new ArrayList<>(); - newLine = loopArtifactLines.get(loopArtifactCounter); - while (newLine != null) { - //stash the lines for the loop and spit them out for each entity - if (newLine.contains("$$AttrList$$>")) { - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - break; - } - loopAttrLines.add(newLine); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - } // we have the inner loop lines we need to text replace - if (!omrsBeanAttributes.isEmpty()) { - //uAttrType - for (int attributeNumber = 0; attributeNumber < omrsBeanAttributes.size(); attributeNumber++) { - OmrsBeanAttribute attribute = omrsBeanAttributes.get(attributeNumber); - if (attribute.isList) { - // write out inner loop contents for each attribute - for (String attrLine : loopAttrLines) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken(omrsType + "Name"), lowercaseArtifact); - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("u" + omrsType + "Name"), uppercaseArtifact); - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrName"), GeneratorUtilities.lowercase1stLetter(attribute.name)); - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("uAttrName"), GeneratorUtilities.uppercase1stLetter(attribute.name)); - String uppercaseattributeType = attribute.type.toUpperCase(); - - //some primitives need amending - - - if (uppercaseattributeType.startsWith("LIST<")) { - // List will be of the form LIST . It needs to be STRING - uppercaseattributeType = uppercaseattributeType.substring(5, uppercaseattributeType.length() - 1); - } - if (uppercaseattributeType.equals("INTEGER")) { - uppercaseattributeType = "INT"; - } - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("uAttrType"), uppercaseattributeType); - - //TODO do other types date and int and array are used in the json models - String attrValue = ""; - if (uppercaseattributeType.equals("STRING")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "String"); - - attrValue = "\"string" + attributeNumber + "\""; -// } else if (uppercaseattributeType.equals("DATE")) { -// attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "java.util.Date"); -// attrValue = "new java.util.Date()"; - } else if (uppercaseattributeType.equals("INT")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "Integer"); - attrValue = String.valueOf(attributeNumber); - } else if (uppercaseattributeType.equals("LONG") || uppercaseattributeType.equals("DATE")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "Long"); - attrValue = String.valueOf(attributeNumber) +"L"; - } else if (uppercaseattributeType.equals("FLOAT")) { - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrType"), "Float"); - attrValue = String.valueOf(attributeNumber) + "f"; - } else { - attrValue = ""; - } - attrLine = attrLine.replaceAll(GeneratorUtilities.getRegexToken("AttrValue"), attrValue); - outputFileWriter.write(attrLine + "\n"); - } - } - } - } - } else if (newLine.contains("<$$Enum$$")) { - // TODO Lists of enums - List loopEnumLines = new ArrayList<>(); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - while (newLine != null) { - //stash the lines for the loop and spit them out for each entity - if (newLine.contains("$$Enum$$>")) { - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - break; - } - loopEnumLines.add(newLine); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - } - // we have the inner loop lines we need to text replace - - if (!omrsBeanEnumAttributes.isEmpty()) { - for (OmrsBeanAttribute enumAttribute : omrsBeanEnumAttributes) { - // write out inner loop contents for each enum attribute - for (String enumLine : loopEnumLines) { - enumLine = enumLine.replaceAll(GeneratorUtilities.getRegexToken(omrsType + "Name"), lowercaseArtifact); - enumLine = enumLine.replaceAll(GeneratorUtilities.getRegexToken("u" + omrsType + "Name"), uppercaseArtifact); - - enumLine = enumLine.replaceAll(GeneratorUtilities.getRegexToken("EnumType"), lowercaseArtifact); - enumLine = enumLine.replaceAll(GeneratorUtilities.getRegexToken("uEnumType"), GeneratorUtilities.uppercase1stLetter(enumAttribute.type)); - enumLine = enumLine.replaceAll(GeneratorUtilities.getRegexToken("EnumName"), GeneratorUtilities.lowercase1stLetter(enumAttribute.name)); - enumLine = enumLine.replaceAll(GeneratorUtilities.getRegexToken("uEnumName"), GeneratorUtilities.uppercase1stLetter(enumAttribute.name)); - outputFileWriter.write(enumLine + "\n"); - } - } - } - } else if (newLine.contains("<$$Map$$")) { - List loopMapLines = new ArrayList<>(); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - while (newLine != null) { - //stash the lines for the loop and spit them out for each entity - if (newLine.contains("$$Map$$>")) { - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - break; - } - loopMapLines.add(newLine); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - } - // we have the inner loop lines we need to text replace - - if (!omrsBeanMapAttributes.isEmpty()) { - for (OmrsBeanAttribute mapAttribute : omrsBeanMapAttributes) { - // write out inner loop contents for each map attribute - for (String mapLine : loopMapLines) { - mapLine = mapLine.replaceAll(GeneratorUtilities.getRegexToken("u" + omrsType + "Name"), uppercaseArtifact); - mapLine = mapLine.replaceAll(GeneratorUtilities.getRegexToken(omrsType + "Name"), lowercaseArtifact); - mapLine = mapLine.replaceAll(GeneratorUtilities.getRegexToken("MapName"), GeneratorUtilities.lowercase1stLetter(mapAttribute.name)); - mapLine = mapLine.replaceAll(GeneratorUtilities.getRegexToken("uMapName"), GeneratorUtilities.uppercase1stLetter(mapAttribute.name)); - outputFileWriter.write(mapLine + "\n"); - } - } - } - - // TODO Lists of enums? - // TODO Lists - // TODO Maps - } else if (newLine.contains("<$$ref$$")) { - List loopRefLines = new ArrayList<>(); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - while (newLine != null) { - //stash the lines for the loop and spit them out for each entity - if (newLine.contains("$$ref$$>")) { - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - break; - } - loopRefLines.add(newLine); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - } - // we have the inner loop lines we need to text replace - - List omrsBeanReferences = omrsBeanModel.getOmrsBeanReferencesAsAttributesByEntity().get(omrsArtifactName); - if (omrsBeanReferences != null) { - for (OmrsBeanAttribute reference : omrsBeanReferences) { - if (!reference.isList) { - // write out inner loop contents for each attribute - for (String refLine : loopRefLines) { - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken(omrsType + "Name"), lowercaseArtifact); - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken("referencePackage"), reference.referencePackage); - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken("refName"), GeneratorUtilities.lowercase1stLetter(reference.name)); - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken("urefName"), GeneratorUtilities.uppercase1stLetter(reference.name)); - outputFileWriter.write(refLine + "\n"); - } - } - } - } - } else if (newLine.contains("<$$refList$$")) { - List loopRefLines = new ArrayList<>(); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - while (newLine != null) { - //stash the lines for the loop and spit them out for each entity - if (newLine.contains("$$refList$$>")) { - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - break; - } - loopRefLines.add(newLine); - loopArtifactCounter++; - newLine = loopArtifactLines.get(loopArtifactCounter); - } - // we have the inner loop lines we need to text replace - - List omrsBeanReferences = omrsBeanModel.getOmrsBeanReferencesAsAttributesByEntity().get(omrsArtifactName); - if (omrsBeanReferences != null) { - for (OmrsBeanAttribute reference : omrsBeanReferences) { - if (reference.isList) { - // write out inner loop contents for each enum attribute - for (String refLine : loopRefLines) { - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken(omrsType + "Name"), lowercaseArtifact); - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken("referencePackage"), reference.referencePackage); - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken("refListName"), GeneratorUtilities.lowercase1stLetter(reference.name)); - refLine = refLine.replaceAll(GeneratorUtilities.getRegexToken("urefListName"), GeneratorUtilities.uppercase1stLetter(reference.name)); - outputFileWriter.write(refLine + "\n"); - } - } - } - } - } else { - // write out the non loop entity line - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - outputFileWriter.write(newLine + "\n"); - } - } // end for loop - } - - private void generateEntityFile(String entityName, String fileName) throws IOException { - - FileWriter outputFileWriter = null; - BufferedReader reader=null; - try { - outputFileWriter = new FileWriter(fileName); - String uEntityName = GeneratorUtilities.uppercase1stLetter(entityName); - //ensure entityName is lower case - entityName = GeneratorUtilities.lowercase1stLetter(entityName); - List attributeMap = omrsBeanModel.getOmrsBeanEntityAttributeMap().get(uEntityName); - reader= new BufferedReader(new FileReader(ENTITY_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - Map replacementMap = new HashMap<>(); - replacementMap.put("uname", uEntityName); - replacementMap.put("name", entityName); - replacementMap.put("description", omrsBeanModel.getTypeDefDescription(uEntityName)); - replacementMap.put("package", "entities." + uEntityName); - writeAttributesToFile(attributeMap, replacementMap, outputFileWriter, reader, line); - line = reader.readLine(); - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - private void generateClassificationFile(String classificationName, String fileName,String pkg) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader=null; - try { - outputFileWriter = new FileWriter(fileName); - - classificationName = GeneratorUtilities.lowercase1stLetter(classificationName); - String uClassificationName = GeneratorUtilities.uppercase1stLetter(classificationName); - List attrList = omrsBeanModel.getOmrsBeanClassificationAttributeMap().get(uClassificationName); - - reader = new BufferedReader(new FileReader(CLASSIFICATION_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - Map replacementMap = new HashMap<>(); - - replacementMap.put("uname", uClassificationName); - replacementMap.put("name",classificationName); - replacementMap.put("description", omrsBeanModel.getTypeDefDescription(uClassificationName)); - replacementMap.put("package",pkg); - writeAttributesToFile(attrList, replacementMap, outputFileWriter, reader, line); - line = reader.readLine(); - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - private void generateRelationshipFile(org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanRelationship omrsBeanRelationship, String fileName, String pkg) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader=null; - try { - outputFileWriter = new FileWriter(fileName); - String relationshipName = omrsBeanRelationship.label; - relationshipName = GeneratorUtilities.lowercase1stLetter(relationshipName); - String uRelationshipName = GeneratorUtilities.uppercase1stLetter(relationshipName); - reader = new BufferedReader(new FileReader(RELATIONSHIP_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - Map replacementMap = new HashMap<>(); - List attrList = omrsBeanModel.getOmrsBeanRelationshipAttributeMap().get(uRelationshipName); - replacementMap.put("uname", uRelationshipName); - replacementMap.put("description", this.omrsBeanModel.getTypeDefDescription(GeneratorUtilities.uppercase1stLetter(GeneratorUtilities.uppercase1stLetter(relationshipName)))); - - replacementMap.put("name", relationshipName); - replacementMap.put("package",pkg); - replacementMap.put("entityProxy1Name", omrsBeanRelationship.entityProxy1Name); - replacementMap.put("entityProxy1Type", omrsBeanRelationship.entityProxy1Type); - replacementMap.put("entityProxy2Name", omrsBeanRelationship.entityProxy2Name); - replacementMap.put("entityProxy2Type", omrsBeanRelationship.entityProxy2Type); - replacementMap.put("typeDefGuid", omrsBeanRelationship.typeDefGuid); - - writeAttributesToFile(attrList, replacementMap, outputFileWriter, reader, line); - line = reader.readLine(); - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - private void generateRelationshipMapperFile(org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanRelationship omrsBeanRelationship, String fileName) throws IOException { - FileWriter outputFileWriter = null; - BufferedReader reader=null; - try { - outputFileWriter = new FileWriter(fileName); - - String label = omrsBeanRelationship.label; - Map replacementMap = new HashMap<>(); - List loopRelationshipLines = new ArrayList<>(); - reader = new BufferedReader(new FileReader(RELATIONSHIP_MAPPER_TEMPLATE)); - - String line = reader.readLine(); - while (line != null) { - replacementMap.put("uname", GeneratorUtilities.uppercase1stLetter(label)); - replacementMap.put("name", GeneratorUtilities.lowercase1stLetter(label)); - loopRelationshipLines.add(line); - line = reader.readLine(); - } - mapOMRSToOMAS("Relationship", replacementMap, outputFileWriter, loopRelationshipLines, label); - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - } - - private void generateReferenceFiles() throws IOException { - // optimization to only process each entity once - HashSet processedEntities = new HashSet(); - - List omrsBeanReferences = omrsBeanModel.getOmrsBeanReferences(); - for (org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanReference omrsBeanReference : omrsBeanReferences) { - - // for each omrsBeanReference we need to create a java file in the right folder. - String outputFolder = this.createReferenceJavaFolderIfRequired(omrsBeanReference); - final String fileName = outputFolder + "/" + omrsBeanReference.uReferenceName + "Reference.java"; - FileWriter outputFileWriter = null; - BufferedReader reader =null; - try { - log.debug("generating reference file {}",fileName); - outputFileWriter = new FileWriter(fileName); - reader = new BufferedReader(new FileReader(REFERENCE_TEMPLATE)); - String line = reader.readLine(); - while (line != null) { - List attrList = omrsBeanReference.attrList; - Map replacementMap = new HashMap<>(); - replacementMap.put("uname", omrsBeanReference.uReferenceName); - replacementMap.put("mytype", omrsBeanReference.myType); - replacementMap.put("othertype", omrsBeanReference.relatedEndType); - replacementMap.put("name", omrsBeanReference.referenceName); - replacementMap.put("relationshiptype", omrsBeanReference.relationshipType); - replacementMap.put("relatedendtype", GeneratorUtilities.lowercase1stLetter(omrsBeanReference.relatedEndType)); - replacementMap.put("urelatedendtype", GeneratorUtilities.uppercase1stLetter(omrsBeanReference.relatedEndType)); - replacementMap.put("AttrDescription", omrsBeanReference.description); - writeAttributesToFile(attrList, replacementMap, outputFileWriter, reader, line); - line = reader.readLine(); - } - } finally { - closeReaderAndFileWriter(outputFileWriter, reader); - } - - //generateClientSideRelationshipImpl the top references file - Map> omrsBeanReferencesAsAttributesByEntity = omrsBeanModel.getOmrsBeanReferencesAsAttributesByEntity(); - - final Set entitiesWithRelationships = omrsBeanReferencesAsAttributesByEntity.keySet(); - for (String entityName : entitiesWithRelationships) { - if (!processedEntities.contains(entityName)) { - outputFolder = this.createEntityJavaFolderIfRequired(entityName); - final String topReferenceFileName = outputFolder + "/" + entityName + "References.java"; - final List omrsBeanAttributes = omrsBeanReferencesAsAttributesByEntity.get(entityName); - log.debug("generating top reference file {}", topReferenceFileName); - generateTopReferenceFile(entityName, omrsBeanAttributes, topReferenceFileName); - processedEntities.add(entityName); - } - } - } - } - - private void writeEnumToFile(String enumName, List enumValues, Map replacementMap, FileWriter outputFileWriter, BufferedReader reader, String line) throws IOException { - if (line.contains("<$$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - List loopLines = new ArrayList<>(); - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$$$>")) { - break; - } - loopLines.add(loopline); - loopline = reader.readLine(); - } - - // loop through the attributes and write out - for (int i = 0; i < enumValues.size(); i++) { - org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanEnumValue omrsBeanEnumValue = enumValues.get(i); - String enumValue = omrsBeanEnumValue.name; - String enumDescription = omrsBeanEnumValue.description; - for (int loopCounter = 0; loopCounter < loopLines.size(); loopCounter++) { - String newLine = loopLines.get(loopCounter); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("enum"), enumValue); - if (enumDescription == null) { - // enum values may not have descriptions - we need to tolerate this - enumDescription = "Enumeration value for " + enumValue; - } - int enumOrdinal = omrsBeanEnumValue.ordinal; - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("enumdescription"), enumDescription); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("enumordinal"), ""+ enumOrdinal); - - outputFileWriter.write(newLine + "\n"); - } - // enum values in Java need a commaed list - the lat entry should not have a comma after it. - if (i < enumValues.size() - 1) { - outputFileWriter.write(",\n"); - } - } - } else { - // not in a loop - String newLine = line; - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - outputFileWriter.write(newLine + "\n"); - - } - } - - private void writeAttributesToFile(List attrList, Map replacementMap, FileWriter outputFileWriter, BufferedReader reader, String line) throws IOException { - List loopPropertyLines = new ArrayList<>(); - List loopAttrLines = new ArrayList<>(); - List loopEnumLines = new ArrayList<>(); - List loopMapLines = new ArrayList<>(); - List loopRelationshipLines = new ArrayList<>(); - - if (line.contains("<$$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$$$>")) { - break; - } - loopPropertyLines.add(loopline); - loopline = reader.readLine(); - } - } else if (line.contains("<$Enum$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$Enum$$>")) { - break; - } - loopEnumLines.add(loopline); - loopline = reader.readLine(); - } - } else if (line.contains("<$Map$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$Map$$>")) { - break; - } - loopMapLines.add(loopline); - loopline = reader.readLine(); - } - } else if (line.contains("<$Attr$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$Attr$$>")) { - break; - } - loopAttrLines.add(loopline); - loopline = reader.readLine(); - } - } else if (line.contains("<$Relationship$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$Relationship$$>")) { - break; - } - loopRelationshipLines.add(loopline); - loopline = reader.readLine(); - } - } else { - // no loop - String newLine = line; - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - outputFileWriter.write(newLine + "\n"); - } - - if (attrList != null && !attrList.isEmpty()) { - // loop through the attributes and write out - for (OmrsBeanAttribute attr : attrList) { - if (!loopPropertyLines.isEmpty()) { - - for (int loopCounter = 0; loopCounter < loopPropertyLines.size(); loopCounter++) { - - String newLine = loopPropertyLines.get(loopCounter); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("PropertyName"), GeneratorUtilities.lowercase1stLetter(attr.name)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uPropertyName"), GeneratorUtilities.uppercase1stLetter(attr.name)); - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("PropertyType"), GeneratorUtilities.uppercase1stLetter(attr.type)); - /* Use the attribute type with the first letter capitalized as the javadoc - * We surround this with the {@code annotation for < and > characters - otherwise the javadoc would be invalid. - */ - String javadoc = GeneratorUtilities.uppercase1stLetter(attr.type); - if (javadoc.contains("<") || javadoc.contains(">")) { - javadoc ="{@code " + javadoc + " }"; - } - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("PropertyTypeJavadoc"),javadoc ); - - // TODO handle non String types - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("AttrDescription"), attr.description); - outputFileWriter.write(newLine + "\n"); - } - } - if (!loopEnumLines.isEmpty()) { - for (int loopCounter = 0; loopCounter < loopEnumLines.size(); loopCounter++) { - String newLine = loopEnumLines.get(loopCounter); - if (attr.isEnum) { - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("EnumName"), GeneratorUtilities.lowercase1stLetter(attr.name)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("description"), GeneratorUtilities.lowercase1stLetter(attr.description)); - outputFileWriter.write(newLine + "\n"); - } - } - } - if (!loopMapLines.isEmpty()) { - for (int loopCounter = 0; loopCounter < loopMapLines.size(); loopCounter++) { - String newLine = loopMapLines.get(loopCounter); - if (attr.isMap) { - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("MapName"), GeneratorUtilities.lowercase1stLetter(attr.name)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("description"), attr.description); - outputFileWriter.write(newLine + "\n"); - } - } - } - if (!loopAttrLines.isEmpty()) { - for (int loopCounter = 0; loopCounter < loopAttrLines.size(); loopCounter++) { - String newLine = loopAttrLines.get(loopCounter); - if ((!attr.isEnum) && !attr.isMap) { - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("AttrName"), GeneratorUtilities.lowercase1stLetter(attr.name)); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("description"), attr.description); - outputFileWriter.write(newLine + "\n"); - } - } - } - if (!loopRelationshipLines.isEmpty()) { - for (int loopCounter = 0; loopCounter < loopRelationshipLines.size(); loopCounter++) { - String newLine = loopRelationshipLines.get(loopCounter); - if (attr.isReference) { - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("description"), attr.description); - outputFileWriter.write(newLine + "\n"); - } - } - } - } - } - } - private void writeTopReferenceAttributesToFile(List allProperties, Map replacementMap, FileWriter outputFileWriter, BufferedReader reader, String line) throws IOException { - List loopPropertyLines = new ArrayList<>(); - List loopSetAttrLines = new ArrayList<>(); - List loopListAttrLines = new ArrayList<>(); - List loopSingleAttrLines = new ArrayList<>(); - - List setProperties = new ArrayList<>(); - List listProperties = new ArrayList<>(); - List singleProperties = new ArrayList<>(); - - // split out the properties - for (OmrsBeanAttribute property : allProperties) { - - final String lowerCaseAttrName = GeneratorUtilities.lowercase1stLetter(property.name); - final String upperCaseAttrName = GeneratorUtilities.uppercase1stLetter(property.name); - if (property.isSet ) { - setProperties.add(property); - } else if (property.isList ) { - listProperties.add(property); - } else { - singleProperties.add(property); - } - } - - if (line.contains("<$$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$$$>")) { - break; - } - loopPropertyLines.add(loopline); - loopline = reader.readLine(); - } - } else if (line.contains("<$SetAttr$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$SetAttr$$>")) { - break; - } - loopSetAttrLines.add(loopline); - loopline = reader.readLine(); - } - - } else if (line.contains("<$ListAttr$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$ListAttr$$>")) { - break; - } - loopListAttrLines.add(loopline); - loopline = reader.readLine(); - } - } else if (line.contains("<$SingleAttr$$")) { - // read all the lines in the loop - String loopline = reader.readLine(); - - while (loopline != null) { - //stash the lines for the loop and spit them out for each attribute - if (loopline.contains("$SingleAttr$$>")) { - break; - } - loopSingleAttrLines.add(loopline); - loopline = reader.readLine(); - } - } else { - // no loop - String newLine = line; - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - outputFileWriter.write(newLine + "\n"); - } - - // process the $$$ loop for all properties - if (!loopPropertyLines.isEmpty()) { - for (OmrsBeanAttribute property : allProperties) { - final String lowerCaseAttrName = GeneratorUtilities.lowercase1stLetter(property.name); - final String upperCaseAttrName = GeneratorUtilities.uppercase1stLetter(property.name); - final String upperCaserelationshipName = GeneratorUtilities.uppercase1stLetter(property.referenceRelationshipName); - final String lowerCaserelationshipName = GeneratorUtilities.lowercase1stLetter(property.referenceRelationshipName); - for (int loopCounter = 0; loopCounter < loopPropertyLines.size(); loopCounter++) { - String newLine = loopPropertyLines.get(loopCounter); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("referencePackage"),property.referencePackage); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("PropertyName"), lowerCaseAttrName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uPropertyName"), upperCaseAttrName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipName"), upperCaserelationshipName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("RelationshipName"), lowerCaserelationshipName); - outputFileWriter.write(newLine + "\n"); - } - } - } else if (!loopSetAttrLines.isEmpty()) { - for (OmrsBeanAttribute property : setProperties) { - final String lowerCaseAttrName = GeneratorUtilities.lowercase1stLetter(property.name); - final String upperCaseAttrName = GeneratorUtilities.uppercase1stLetter(property.name); - final String upperCaserelationshipName = GeneratorUtilities.uppercase1stLetter(property.referenceRelationshipName); - final String lowerCaserelationshipName = GeneratorUtilities.lowercase1stLetter(property.referenceRelationshipName); - - for (int loopCounter = 0; loopCounter < loopSetAttrLines.size(); loopCounter++) { - String newLine = loopSetAttrLines.get(loopCounter); - - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("setReferenceName"), lowerCaseAttrName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uSetReferenceName"), upperCaseAttrName); - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("PropertyType"), GeneratorUtilities.uppercase1stLetter(property.type)); - // TODO handle non String types - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("AttrDescription"), property.description); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipName"), upperCaserelationshipName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("RelationshipName"), lowerCaserelationshipName); - outputFileWriter.write(newLine + "\n"); - //outputFileWriter.flush(); - } - - } - } else if (!loopListAttrLines.isEmpty()) { - for (OmrsBeanAttribute property : listProperties) { - final String lowerCaseAttrName = GeneratorUtilities.lowercase1stLetter(property.name); - final String upperCaseAttrName = GeneratorUtilities.uppercase1stLetter(property.name); - final String upperCaserelationshipName = GeneratorUtilities.uppercase1stLetter(property.referenceRelationshipName); - final String lowerCaserelationshipName = GeneratorUtilities.lowercase1stLetter(property.referenceRelationshipName); - - for (int loopCounter = 0; loopCounter < loopListAttrLines.size(); loopCounter++) { - String newLine = loopListAttrLines.get(loopCounter); - - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("listReferenceName"), lowerCaseAttrName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uListReferenceName"), upperCaseAttrName); - - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("PropertyType"), GeneratorUtilities.uppercase1stLetter(property.type)); - // TODO handle non String types - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("AttrDescription"), property.description); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipName"), upperCaserelationshipName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("RelationshipName"), lowerCaserelationshipName); - outputFileWriter.write(newLine + "\n"); - } - - } - } else if (!loopSingleAttrLines.isEmpty()) { - for (OmrsBeanAttribute property : singleProperties) { - final String lowerCaseAttrName = GeneratorUtilities.lowercase1stLetter(property.name); - final String upperCaseAttrName = GeneratorUtilities.uppercase1stLetter(property.name); - final String upperCaserelationshipName = GeneratorUtilities.uppercase1stLetter(property.referenceRelationshipName); - final String lowerCaserelationshipName = GeneratorUtilities.lowercase1stLetter(property.referenceRelationshipName); - for (int loopCounter = 0; loopCounter < loopSingleAttrLines.size(); loopCounter++) { - String newLine = loopSingleAttrLines.get(loopCounter); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("singleReferenceName"), lowerCaseAttrName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uSingleReferenceName"), upperCaseAttrName); - newLine = replaceTokensInLineFromMap(replacementMap, newLine); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("PropertyType"), GeneratorUtilities.uppercase1stLetter(property.type)); - // TODO handle non String types - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("AttrDescription"), property.description); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("uRelationshipName"), upperCaserelationshipName); - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken("RelationshipName"), lowerCaserelationshipName); - outputFileWriter.write(newLine + "\n"); - } - } - } - } - - public static String replaceTokensInLineFromMap(Map referenceMap, String newLine) { - if (referenceMap != null) { - for (String key : referenceMap.keySet()) { - if (referenceMap.get(key) != null) { - newLine = newLine.replaceAll(GeneratorUtilities.getRegexToken(key), referenceMap.get(key)); - } - } - } - return newLine; - } - private static void closeReaderAndFileWriter(FileWriter outputFileWriter, BufferedReader reader) throws IOException { - if (reader != null) { - reader.close(); - } - if (outputFileWriter != null) { - outputFileWriter.close(); - } - } - - private static String createReferenceJavaFolderIfRequired(org.odpi.openmetadata.fvt.opentypes.model.OmrsBeanReference rgi) { - String outputpackage = rgi.myType + "To" + rgi.relatedEndType; - File newFolder = GeneratorUtilities.writeFolder(GENERATION_REFERENCES_FOLDER + outputpackage + "/"); - return newFolder.getPath(); - } - - private static String createEntityJavaFolderIfRequired(String outputpackage) { - File newFolder = GeneratorUtilities.writeFolder(GENERATION_ENTITIES_FOLDER + outputpackage + "/"); - return newFolder.getPath(); - } - - private static String createClassificationJavaFolderIfRequired(String outputpackage) { - File newFolder = GeneratorUtilities.writeFolder(GENERATION_CLASSIFICATIONS_FOLDER + outputpackage + "/"); - return newFolder.getPath(); - } - - private static String createRelationshipJavaFolderIfRequired(String outputpackage) { - File newFolder = GeneratorUtilities.writeFolder(GENERATION_RELATIONSHIPS_FOLDER + outputpackage + "/"); - return newFolder.getPath(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmTypeFilter.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmTypeFilter.java deleted file mode 100644 index c9378c8deec..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmTypeFilter.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.model; - - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.*; - -import java.util.ArrayList; -import java.util.*; -import java.util.HashMap; - -/** - * This stores the types in maps - so they can be accessed easily. This class can be used as a filter to restrict the types - * that are used for generation. - */ -public class OmTypeFilter { - - private List allTypeDefs; - private List allAttributeTypeDefs; - - private Map allEnumTypedefs = new HashMap<>(); - private Map allEntityTypedefs = new HashMap<>(); - private Map allRelationshipTypedefs = new HashMap<>(); - private Map allClassificationTypedefs = new HashMap<>(); - - /** - * Constructor - * spin through all the types and store the types in maps - *

- * - * @param newTypeDefs all the Type defs - * @param attributeTypeDefs all the attribute defs - */ - public OmTypeFilter(List newTypeDefs, List attributeTypeDefs) { - allTypeDefs = newTypeDefs; - allAttributeTypeDefs = attributeTypeDefs; - // break down these types so we can consume them. - for (TypeDef omTypeDef : this.allTypeDefs) { - String typeName = omTypeDef.getName(); - switch (omTypeDef.getCategory()) { - case ENTITY_DEF: - this.allEntityTypedefs.put(typeName, ((EntityDef) omTypeDef)); - break; - case CLASSIFICATION_DEF: - this.allClassificationTypedefs.put(omTypeDef.getName(), ((ClassificationDef) omTypeDef)); - break; - case RELATIONSHIP_DEF: - this.allRelationshipTypedefs.put(omTypeDef.getName(), (RelationshipDef) omTypeDef); - break; - } - } - for (AttributeTypeDef omAttrTypeDef : this.allAttributeTypeDefs) { - switch (omAttrTypeDef.getCategory()) { - case ENUM_DEF: - allEnumTypedefs.put(omAttrTypeDef.getName(), ((EnumDef) omAttrTypeDef)); - break; -// We are not interested in primitives or collections do we need to capture the primitives or the collections (maps and arrays) here ? - case PRIMITIVE: -// do nothing - break; - case COLLECTION: -// do nothing - break; - } - - } - - } - - // helper methods - public EntityDef getEntityDef(String typeName) { - return this.allEntityTypedefs.get(typeName); - } - private ClassificationDef getClassificationDef(String typeName) { - return this.allClassificationTypedefs.get(typeName); - } - private EnumDef getEnumDef(String typeName) { - return this.allEnumTypedefs.get(typeName); - } - private RelationshipDef getRelationshipDef(String typeName) { - return this.allRelationshipTypedefs.get(typeName); - } - - - public Map getEntityDefsMap() { - return allEntityTypedefs; - } - - public Map getClassificationDefsMap() { - return allClassificationTypedefs; - } - - public Map getEnumDefsMap() { - return allEnumTypedefs; - } - - public Map getRelationshipTypeDefsMap() { - return allRelationshipTypedefs; - } - - public String getTypeDescription (String typeName) { - String description = null; - if (this.allEntityTypedefs.get(typeName) !=null) { - description = this.allEntityTypedefs.get(typeName).getDescription(); - } else if (this.allClassificationTypedefs.get(typeName) !=null) { - description = this.allClassificationTypedefs.get(typeName).getDescription(); - } else if (this.allRelationshipTypedefs.get(typeName) !=null) { - description = this.allRelationshipTypedefs.get(typeName).getDescription(); - } else if (this.allEnumTypedefs.get(typeName) !=null) { - description = this.allEnumTypedefs.get(typeName).getDescription(); - } - if (description==null) { - description=""; - } - return description; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanAttribute.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanAttribute.java deleted file mode 100644 index 8376820de1b..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanAttribute.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.model; - -public class OmrsBeanAttribute { - public String name = null; - public String description = null; - public String type = null; - public boolean isEnum = false; - public boolean isMap = false; - public boolean isList = false; - public boolean isSet = false; - // it is useful to process references as attributes- in that case stash the package for reference here. - public boolean isReference = false; - public String referencePackage; - - // reference relationship - public String referenceRelationshipName; - // TODO unique attribute ? -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanEnumValue.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanEnumValue.java deleted file mode 100644 index ae8d7022dfc..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanEnumValue.java +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.model; - -public class OmrsBeanEnumValue { - public String name = null; - public String description = null; - public int ordinal = 0; -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanModel.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanModel.java deleted file mode 100644 index 19c6cfc86bd..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanModel.java +++ /dev/null @@ -1,492 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.model; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.fvt.opentypes.utils.GeneratorUtilities; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchive; -import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeCardinality; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumElementDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * The Omrs bean model is a representation of entities attributes and references in a form that can be easily used by the generator - */ -public class OmrsBeanModel { - private OmTypeFilter typeFilter=null; - // folder with other model files - String[] jsonFolders; - - private static final ObjectMapper mapper = new ObjectMapper(); - - //references - private List omrsBeanReferences = new ArrayList<>(); - - private Map> omrsBeanReferencesAsAttributesByEntity = new HashMap>(); - private Set typesWithRelationships = new HashSet<>(); - // map entity name to its attributes - private Map> omrsBeanEntityAttributesMap = new HashMap>(); - // map entity name to its description - private Map omrsBeanTypeDefDescriptionMap = new HashMap(); - // map enum to enumvalues - private Map> omrsBeanEnumToValuesMap = new HashMap>(); - - // map classification name to its attributes - private Map> omrsBeanClassificationAttributesMap = new HashMap>(); - // map classification name to its description - private Map omrsBeanClassificationDescriptionMap = new HashMap(); - - // map relationship name to its attributes - private Map> omrsBeanRelationshipAttributesMap = new HashMap>(); - // map relationship name to its omrsBean object - private Map nametoRelationshipMap = new HashMap(); - // archive - OpenMetadataArchive omArchive = null; - // store all types - List allOmTypedefs = null; - List allOmAttributeTypeDefs = null; - // types subject area omrsBean is interested in. - List omTypedefs = null; - List omAttributeTypeDefs = null; - - Map omEntityTypedefs = new HashMap(); - Map omRelationshipTypedefs = new HashMap(); - Map omClassificationTypedefs = new HashMap(); - Map omEnumTypedefs =new HashMap(); - - public OmrsBeanModel() throws IOException { - OpenMetadataTypesArchive typesArchive = new OpenMetadataTypesArchive(); - this.omArchive = typesArchive.getOpenMetadataArchive(); - this.typeFilter = new OmTypeFilter(omArchive.getArchiveTypeStore().getNewTypeDefs(), - omArchive.getArchiveTypeStore().getAttributeTypeDefs()); - - this.omEntityTypedefs = typeFilter.getEntityDefsMap(); - this.omClassificationTypedefs = typeFilter.getClassificationDefsMap(); - this.omEnumTypedefs = typeFilter.getEnumDefsMap(); - this.omRelationshipTypedefs = typeFilter.getRelationshipTypeDefsMap(); - //TODO account for patches when we have some - - createOmrsBeanEnums(); - createOmrsBeanReferences(); - createOmrsBeanEntityAttributes(); - createOmrsBeanClassifications(); - createOmrsBeanRelationships(); - } - - public String getTypeDefDescription(String typeName) { - return this.typeFilter.getTypeDescription(typeName); - } - - private void createOmrsBeanEnums() { - - for (String enumName : this.omEnumTypedefs.keySet()) { - EnumDef enumDef = this.omEnumTypedefs.get(enumName); - - List enumElements = enumDef.getElementDefs(); - - List enumValues = new ArrayList(); - for (EnumElementDef enumElement : enumElements) { - OmrsBeanEnumValue omrsBeanEnumValue = new OmrsBeanEnumValue(); - omrsBeanEnumValue.name = this.normalizeTypeName(enumElement.getValue()); - omrsBeanEnumValue.description = enumElement.getDescription(); - omrsBeanEnumValue.ordinal = enumElement.getOrdinal(); - enumValues.add(omrsBeanEnumValue); - } - omrsBeanEnumToValuesMap.put(enumName, enumValues); - } - } - - private void createOmrsBeanEntityAttributes() { - - for (String entityName : this.omEntityTypedefs.keySet()) { - EntityDef entityDef = this.omEntityTypedefs.get(entityName); - List attributeDefs = entityDef.getPropertiesDefinition(); - if (attributeDefs==null) { - attributeDefs=new ArrayList(); - } - Set attrNamesSet = new HashSet<>(); - for (TypeDefAttribute attr:attributeDefs) { - attrNamesSet.add((attr.getAttributeName())); - } - - if (entityName.equals("GlossaryTerm") || entityName.equals("GlossaryCategory")) { - // add a glossaryName typeDefAttribute - TypeDefAttribute typeDefAttribute = new TypeDefAttribute(); - typeDefAttribute.setAttributeName("glossaryName"); - typeDefAttribute.setAttributeDescription("The name of the glossary associated with this term. This must be present."); - PrimitiveDef primitiveDef = new PrimitiveDef(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitiveDef.setGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getGUID()); - primitiveDef.setName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getName()); - primitiveDef.setVersion(0); - primitiveDef.setVersionName("0"); - typeDefAttribute.setAttributeType(primitiveDef); - typeDefAttribute.setAttributeCardinality(AttributeCardinality.AT_MOST_ONE); - typeDefAttribute.setValuesMinCount(0); - typeDefAttribute.setValuesMaxCount(1); - typeDefAttribute.setIndexable(true); - typeDefAttribute.setUnique(false); - typeDefAttribute.setDefaultValue(null); - typeDefAttribute.setExternalStandardMappings(null); - - attrNamesSet.add(("glossaryName")); - attributeDefs.add(typeDefAttribute); - } - - // add in any new parent entity attributes - while (entityDef.getSuperType()!=null) { - TypeDefLink superType = entityDef.getSuperType(); - entityDef = this.typeFilter.getEntityDef(superType.getName()); - if (entityDef.getPropertiesDefinition()!= null){ - for (TypeDefAttribute attr : entityDef.getPropertiesDefinition()) { - final String attributeName = attr.getAttributeName(); - if (!attrNamesSet.contains(attributeName)) { - attributeDefs.add(attr); - attrNamesSet.add(attributeName); - } - } - } - } - List omrsBeanattributeList = createOmrsBeanAttributeList(attributeDefs); - omrsBeanEntityAttributesMap.put(entityName, omrsBeanattributeList); - } - } - - private void createOmrsBeanClassifications() { - - for (String classificationDefName : this.omClassificationTypedefs.keySet()) { - classificationDefName = this.normalizeTypeName(classificationDefName); - ClassificationDef classificationDef =this.omClassificationTypedefs.get(classificationDefName); - List attributeDefs = classificationDef.getPropertiesDefinition(); - List omrsBeanattributeList = createOmrsBeanAttributeList(attributeDefs); - omrsBeanClassificationAttributesMap.put(classificationDefName, omrsBeanattributeList); - omrsBeanClassificationDescriptionMap.put(classificationDefName, classificationDef.getDescription()); - } - } - - private void createOmrsBeanRelationships() { - for (String relationshipDefName : this.omRelationshipTypedefs.keySet()) { - RelationshipDef relationshipDef = this.omRelationshipTypedefs.get(relationshipDefName); - List attributeDefs = relationshipDef.getPropertiesDefinition(); - List omrsBeanattributeList = createOmrsBeanAttributeList(attributeDefs); - omrsBeanRelationshipAttributesMap.put(relationshipDefName, omrsBeanattributeList); - OmrsBeanRelationship omrsBeanRelationship = new OmrsBeanRelationship(); - omrsBeanRelationship.description = relationshipDef.getDescription(); - omrsBeanRelationship.entityProxy1Name = relationshipDef.getEndDef1().getAttributeName(); - omrsBeanRelationship.entityProxy1Type = relationshipDef.getEndDef1().getEntityType().getName(); - omrsBeanRelationship.entityProxy2Name = relationshipDef.getEndDef2().getAttributeName(); - omrsBeanRelationship.entityProxy2Type = relationshipDef.getEndDef2().getEntityType().getName(); - omrsBeanRelationship.typeDefGuid = relationshipDef.getGUID(); - omrsBeanRelationship.label = relationshipDefName; - nametoRelationshipMap.put(relationshipDefName, omrsBeanRelationship); - } - } - - public Map> getEnumsMap() { - return this.omrsBeanEnumToValuesMap; - } - - private List createOmrsBeanAttributeList(List attributeDefs) { - List omrsBeanattributeList = new ArrayList<>(); - if (attributeDefs !=null ) { - for (TypeDefAttribute attributeDef : attributeDefs) { - // deal with primitives , collections and enum attributes - - String normalizedTypeName = normalizeTypeName(attributeDef.getAttributeType().getName()); - OmrsBeanAttribute omrsBeanAttribute = new OmrsBeanAttribute(); - // assume the archive does not have any unknown cardinalities - if (attributeDef.getAttributeCardinality() == AttributeCardinality.AT_MOST_ONE || attributeDef.getAttributeCardinality() == AttributeCardinality.ONE_ONLY) { - omrsBeanAttribute.isList = false; - } else { - omrsBeanAttribute.isList = true; - } - // count arrays as lists. Do not need to support AttributeCardinality more than 1 and an array with current model - if (attributeDef.getAttributeType().getCategory().equals(AttributeTypeDefCategory.COLLECTION) && - attributeDef.getAttributeType().getName().startsWith("array<")) { - omrsBeanAttribute.isList = true; - } - - - omrsBeanAttribute.name = attributeDef.getAttributeName(); - omrsBeanAttribute.description =attributeDef.getAttributeDescription(); - omrsBeanAttribute.type = normalizedTypeName; - omrsBeanAttribute.isMap = false; - omrsBeanAttribute.isEnum = false; - omrsBeanattributeList.add(omrsBeanAttribute); - - // need to store whether this is an enumeration or not. - if (attributeDef.getAttributeType().getCategory() == AttributeTypeDefCategory.ENUM_DEF) { - // need to store whether this is an enumeration - omrsBeanAttribute.isEnum = true; - } - - - if (attributeDef.getAttributeType().getCategory() == AttributeTypeDefCategory.COLLECTION && attributeDef.getAttributeType().getName().startsWith("map<")) { - omrsBeanAttribute.isMap = true; - } - } - } - return omrsBeanattributeList; - } - - private void createOmrsBeanReferences() { - int i=0; - for (String relationshipDefName : this.omRelationshipTypedefs.keySet()) { - i++; - RelationshipDef relationshipDef = this.omRelationshipTypedefs.get(relationshipDefName); - String description = relationshipDef.getDescription(); - String relationshipGuid = relationshipDef.getGUID(); - RelationshipEndDef end1 = relationshipDef.getEndDef1(); - RelationshipEndDef end2 = relationshipDef.getEndDef2(); - - String end1Name = end1.getAttributeName(); - String end1Type = this.normalizeTypeName(end1.getEntityType().getName()); - - String end2Name = end2.getAttributeName(); - String end2Type = this.normalizeTypeName(end2.getEntityType().getName()); - - boolean end1IsSet = false; - boolean end2IsSet = false; - - if (end1.getAttributeCardinality() == RelationshipEndCardinality.ANY_NUMBER) { - end1IsSet = true; - - } - if (end2.getAttributeCardinality() == RelationshipEndCardinality.ANY_NUMBER) { - end2IsSet = true; - - } - - /* - from all of the above information we need to create 1 or 2 references. - We create one reference if both ends have the same name and type - Otherwise we create 2 references. - We create packages - TermToTerm etc - */ - List attributeDefs = relationshipDef.getPropertiesDefinition(); - List omrsBeanattributeList = createOmrsBeanAttributeList(attributeDefs); - - if (end1Name.equals(end2Name) && end1Type.equals(end2Type)) { - OmrsBeanReference omrsBeanReference = new OmrsBeanReference(); - omrsBeanReference.attrList = omrsBeanattributeList; - omrsBeanReference.uReferenceName = GeneratorUtilities.uppercase1stLetter(end1Name); - omrsBeanReference.referenceName = GeneratorUtilities.lowercase1stLetter(end1Name); - - omrsBeanReference.relatedEndType = end1Type; - omrsBeanReference.relationshipType = relationshipDefName; - omrsBeanReference.relationshipGuid = relationshipGuid; - omrsBeanReference.myType = end1Type; - omrsBeanReference.description = description; - omrsBeanReference.isSet = end1IsSet; - omrsBeanReferences.add(omrsBeanReference); - - typesWithRelationships.add(omrsBeanReference.myType); - - List entityOmrsBeanReferencesAsAttributes = omrsBeanReferencesAsAttributesByEntity.get(omrsBeanReference.myType); - if (entityOmrsBeanReferencesAsAttributes == null) { - entityOmrsBeanReferencesAsAttributes = new ArrayList<>(); - } - OmrsBeanAttribute omrsBeanAttribute = new OmrsBeanAttribute(); - omrsBeanAttribute.name = omrsBeanReference.referenceName; - omrsBeanAttribute.type = omrsBeanReference.relatedEndType; - omrsBeanAttribute.isSet = end1IsSet; - omrsBeanAttribute.isReference = true; - omrsBeanAttribute.referencePackage = GeneratorUtilities.getReferencePackage(omrsBeanReference.myType, omrsBeanReference.relatedEndType); - omrsBeanAttribute.referenceRelationshipName = omrsBeanReference.relationshipType; - entityOmrsBeanReferencesAsAttributes.add(omrsBeanAttribute); - omrsBeanReferencesAsAttributesByEntity.put(omrsBeanReference.myType, entityOmrsBeanReferencesAsAttributes); - } else { - // generateClientSideRelationshipImpl 2 References - OmrsBeanReference omrsBeanReference1 = new OmrsBeanReference(); - omrsBeanReference1.attrList = omrsBeanattributeList; - omrsBeanReference1.uReferenceName = GeneratorUtilities.uppercase1stLetter(end2Name); - omrsBeanReference1.referenceName = GeneratorUtilities.lowercase1stLetter(end2Name); - omrsBeanReference1.relatedEndType = end2Type; - omrsBeanReference1.relationshipType = relationshipDefName; - omrsBeanReference1.relationshipGuid = relationshipGuid; - omrsBeanReference1.myType = end1Type; - omrsBeanReference1.isSet = end2IsSet; - // and the other way round - OmrsBeanReference omrsBeanReference2 = new OmrsBeanReference(); - omrsBeanReference2.attrList = omrsBeanattributeList; - omrsBeanReference2.uReferenceName = GeneratorUtilities.uppercase1stLetter(end1Name); - omrsBeanReference2.referenceName = GeneratorUtilities.lowercase1stLetter(end1Name); - omrsBeanReference2.relationshipType = relationshipDefName; - omrsBeanReference2.relationshipGuid = relationshipGuid; - omrsBeanReference2.relatedEndType = end1Type; - omrsBeanReference2.myType = end2Type; - omrsBeanReference2.isSet = end1IsSet; - omrsBeanReferences.add(omrsBeanReference1); - omrsBeanReferences.add(omrsBeanReference2); - typesWithRelationships.add(omrsBeanReference1.myType); - typesWithRelationships.add(omrsBeanReference2.myType); - - List entityOmrsBeanReferences1 = omrsBeanReferencesAsAttributesByEntity.get(omrsBeanReference1.myType); - if (entityOmrsBeanReferences1 == null) { - entityOmrsBeanReferences1 = new ArrayList<>(); - } - OmrsBeanAttribute omrsBeanAttribute1 = new OmrsBeanAttribute(); - omrsBeanAttribute1.name = omrsBeanReference1.referenceName; - omrsBeanAttribute1.type = omrsBeanReference1.relatedEndType; - omrsBeanAttribute1.isSet = omrsBeanReference1.isSet; - omrsBeanAttribute1.isReference = true; - omrsBeanAttribute1.referencePackage = GeneratorUtilities.getReferencePackage(omrsBeanReference1.myType, omrsBeanReference1.relatedEndType); - omrsBeanAttribute1.referenceRelationshipName = omrsBeanReference1.relationshipType; - entityOmrsBeanReferences1.add(omrsBeanAttribute1); - omrsBeanReferencesAsAttributesByEntity.put(omrsBeanReference1.myType, entityOmrsBeanReferences1); - List entityOmrsBeanReferences2 = omrsBeanReferencesAsAttributesByEntity.get(omrsBeanReference2.myType); - if (entityOmrsBeanReferences2 == null) { - entityOmrsBeanReferences2 = new ArrayList<>(); - } - OmrsBeanAttribute omrsBeanAttribute2 = new OmrsBeanAttribute(); - omrsBeanAttribute2.name = omrsBeanReference2.referenceName; - omrsBeanAttribute2.type = omrsBeanReference2.relatedEndType; - omrsBeanAttribute2.isSet= omrsBeanReference2.isSet; - omrsBeanAttribute2.isReference = true; - omrsBeanAttribute2.referencePackage = GeneratorUtilities.getReferencePackage(omrsBeanReference2.myType, omrsBeanReference2.relatedEndType); - omrsBeanAttribute2.referenceRelationshipName = omrsBeanReference1.relationshipType; - entityOmrsBeanReferences2.add(omrsBeanAttribute2); - omrsBeanReferencesAsAttributesByEntity.put(omrsBeanReference2.myType, entityOmrsBeanReferences2); - } - } - // now go through all the entityDefs and spin up their supertypes. Add the parent supertypes references to it. - - for (String entityDefName : this.omEntityTypedefs.keySet()) { - EntityDef entityDef = this.omEntityTypedefs.get(entityDefName); - List deduplicatedOmrsBeanAttributes = this.omrsBeanReferencesAsAttributesByEntity.get(entityDefName); - // get all the attribute names - Set attributeNames = new HashSet<>(); - if (deduplicatedOmrsBeanAttributes !=null) { - for (OmrsBeanAttribute omrsBeanAttribute : deduplicatedOmrsBeanAttributes) { - attributeNames.add(omrsBeanAttribute.name); - } - if (attributeNames.size() != deduplicatedOmrsBeanAttributes.size()) { - // we we end up here then deduplicatedOmrsBeanAttributes is not dedupliucated - throw new RuntimeException("Unexpected mismatch of attributes during reference processing"); - } - } - - // we could have null in deduplicatedAttributes if we do not have any attributes. - while (entityDef.getSuperType()!= null) { - TypeDefLink superType = entityDef.getSuperType(); - entityDef = this.typeFilter.getEntityDef(superType.getName()); - List parentOmrsBeanAttributes = this.omrsBeanReferencesAsAttributesByEntity.get(entityDef.getName()); - if (parentOmrsBeanAttributes !=null && parentOmrsBeanAttributes.size() >0) { - // parent has attributes - Set newAttributes = new HashSet<>(); - // may not have found any attributes yet. - if (deduplicatedOmrsBeanAttributes == null ) { - deduplicatedOmrsBeanAttributes = new ArrayList<>(); - } - // we have deduplicated attributes - for (OmrsBeanAttribute omrsBeanAttribute : parentOmrsBeanAttributes) { - // only add the parent attributes if we do not already have it. - if (!attributeNames.contains(omrsBeanAttribute.name)) { - attributeNames.add(omrsBeanAttribute.name); - newAttributes.add(omrsBeanAttribute); - } - } - // store the new attributes we find in a separate variable to avoid a Concurrent access exception - if (!newAttributes.isEmpty() ) { - for (OmrsBeanAttribute newOmrsBeanAttribute :newAttributes) { - deduplicatedOmrsBeanAttributes.add(newOmrsBeanAttribute); - } - } - if (attributeNames.size() != deduplicatedOmrsBeanAttributes.size()) { - // we we end up here then deduplicatedOmrsBeanAttributes is not dedupliucated - throw new RuntimeException("Unexpected mismatch2 of attributes during reference processing"); - } - } - } - this.omrsBeanReferencesAsAttributesByEntity.put(entityDefName, deduplicatedOmrsBeanAttributes); - } - } - - public List getOmrsBeanReferences() { - return this.omrsBeanReferences; - } - - public OmrsBeanRelationship getOmrsBeanRelationshipByName(String name) { - return this.nametoRelationshipMap.get(name); - } - - public Map getOmrsBeanRelationshipMap() { - return this.nametoRelationshipMap; - } - - public Map> getOmrsBeanRelationshipAttributeMap() { - return this.omrsBeanRelationshipAttributesMap; - } - - public Map> getOmrsBeanEntityAttributeMap() { - return this.omrsBeanEntityAttributesMap; - } - - public Map> getOmrsBeanClassificationAttributeMap() { - return this.omrsBeanClassificationAttributesMap; - } - - public Map getOmrsBeanClassificationDescriptionMap() { - return this.omrsBeanClassificationDescriptionMap; - } - - public Map> getOmrsBeanReferencesAsAttributesByEntity() { - return this.omrsBeanReferencesAsAttributesByEntity; - } - - /** - * Open metadata types maps in the same way as java - but with lower case. - * At this time there are only maps with string string. This method coverts the typeName to be - * valid java. - * It also converts arrays into lists. - * - * @param typeName - * @return String - */ - private String normalizeTypeName(String typeName) { - String normalizedTypeName = typeName; - // assume that all the maps are string string - if (typeName.startsWith("map"; - } - if (typeName.equals("int")) { - normalizedTypeName = "Integer"; - } - //TODO do we need to get the primitive class name from the PrimitiveDefCategory javaClassName - if (typeName.equals("date")) { - normalizedTypeName = "Long"; - } - return normalizedTypeName; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanReference.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanReference.java deleted file mode 100644 index 62a06badec2..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanReference.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.model; -import java.util.List; - -public class OmrsBeanReference { - // relationship information - public String relationshipType = null; - public String relationshipGuid; - // end / reference specific fields - public String relatedEndGuid; - public String relatedEndType = null; - // first character uppercase - public String uReferenceName = null; - // first character lower case - public String referenceName = null; - public List attrList = null; - public String myType = null; - public String description; -// public String modelName = null; -// public boolean isList = false; - public boolean isSet = false; -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanRelationship.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanRelationship.java deleted file mode 100644 index 7b959ab5995..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/model/OmrsBeanRelationship.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.model; -import java.util.List; - -public class OmrsBeanRelationship { - public String label = null; - public String relationshipGuid; - public String entityProxy1Guid; - public String entityProxy1Type = null; - public String entityProxy1Name = null; - public String entityProxy2Guid; - public String entityProxy2Type = null; - public String entityProxy2Name = null; - public String typeDefGuid =null; - public List attrList = null; - public String description; - public String modelName = null; -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/utils/GeneratorUtilities.java b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/utils/GeneratorUtilities.java deleted file mode 100644 index 794832e59e9..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/java/org/odpi/openmetadata/fvt/opentypes/utils/GeneratorUtilities.java +++ /dev/null @@ -1,121 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.fvt.opentypes.utils; - -import java.io.File; -import java.io.FileNotFoundException; -import java.lang.reflect.Array; - - -/** - * Generator utility methods. - */ -public class GeneratorUtilities { - static public T[] concatenate(T[] a, T[] b) { - int aLen = a.length; - int bLen = b.length; - - @SuppressWarnings("unchecked") - T[] c = (T[]) Array.newInstance(a.getClass().getComponentType(), aLen + bLen); - System.arraycopy(a, 0, c, 0, aLen); - System.arraycopy(b, 0, c, aLen, bLen); - - return c; - } - - public static String lowercase1stLetter(String end2Name) { - return end2Name.substring(0, 1).toLowerCase() + end2Name.substring(1); - } - - public static String uppercase1stLetter(String end1Name) { - return end1Name.substring(0, 1).toUpperCase() + end1Name.substring(1); - } - - public static String getRegexToken(String token) { - return "[<]['$']['$']" + token + "['$']['$'][>]"; - } - public static String getRegexStartAttrToken() { - return "[<]['$']['A']['t']['t']['r']['$']['$']"; - } - public static String getRegexEndAttrToken() { - return "['$']['A']['t']['t']['r']['$']['$'][>]"; - } - - - public static boolean recursivelyDelete(File path) throws FileNotFoundException { - if (!path.exists()) throw new FileNotFoundException(path.getAbsolutePath()); - boolean ret = true; - if (path.isDirectory()) { - for (File f : path.listFiles()) { - ret = ret && GeneratorUtilities.recursivelyDelete(f); - } - } - return ret && path.delete(); - } - - public static File writeFolder(String outputFolder) { - - // create folder - File newFolder = new File(outputFolder); - - if (!newFolder.exists()) { - //System.out.println("creating new folder: " + newFolder.getName()); - newFolder.mkdirs(); - } - return newFolder; - } - - public static void createEmptyFolder(String generationFolder) throws FileNotFoundException { - File folder = GeneratorUtilities.writeFolder(generationFolder); - if (folder.exists()) { - // clear out any existing generated files - GeneratorUtilities.recursivelyDelete(folder); - // make sure we create the required folder - GeneratorUtilities.writeFolder(generationFolder); - } - } - - public static String getReferencePackage(String myType, String otherType) { - return myType + "To" + otherType; - } - public static boolean isTopLevelGlossaryObject(String entityName) { - boolean isTopLevelGlossaryObject = false; - if (entityName.equals("Glossary") || - entityName.equals("GlossaryTerm") || - entityName.equals("GlossaryCategory" ) - ) { - isTopLevelGlossaryObject = true; - } - return isTopLevelGlossaryObject; - } - - /** - * delete files in the folder apart from the exclude file name. - * @param folder- folder under which to delete files - * @param excludeFile this file name should not be deleted - */ - public static void deleteFilesInFolder(String folder, String excludeFile) { - System.err.println("folder="+folder); - File[] files = new File(folder).listFiles(); - for (File file : files) { - if (file.isFile()) { - if (!file.getName().equals(excludeFile)) { - file.delete(); - } - } - } - } - /** - * delete files in the folder - * @param folder- folder under which to delete files - */ - public static void deleteFilesInFolder(String folder) { - System.err.println("folder="+folder); - File[] files = new File(folder).listFiles(); - for (File file : files) { - if (file.isFile()) { - file.delete(); - } - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OMRSRelationshipToLinesTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OMRSRelationshipToLinesTemplate deleted file mode 100644 index a20cbaa611f..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OMRSRelationshipToLinesTemplate +++ /dev/null @@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.relationships; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.fvt.opentypes.common.Line; - - <$$RELATIONSHIP$ -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>; -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>Mapper; - $$RELATIONSHIP$> -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * OMRS Relationship to Lines converter - */ -public class OMRSRelationshipToLines { - /** - * convert omrs Relationships into Lines - * @param omrsRelationships relationships to convert. - * @return a set of Lines which can be used by the Subject Area OMAS API - */ - public static Set convert(List omrsRelationships) { - Set lines = new HashSet<>(); - for (Relationship omrsRelationship:omrsRelationships){ - String name = omrsRelationship.getType().getTypeDefName(); - <$$RELATIONSHIP$ - if (name.equals("<$$uRelationshipName$$>")) { - <$$uRelationshipName$$> <$$RelationshipName$$>= <$$uRelationshipName$$>Mapper.mapOmrsRelationshipTo<$$uRelationshipName$$>(omrsRelationship); - lines.add(<$$RelationshipName$$>); - } - $$RELATIONSHIP$> - } - return lines; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanAccessorTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanAccessorTemplate deleted file mode 100644 index 008817a165e..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanAccessorTemplate +++ /dev/null @@ -1,542 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.server; - -import java.util.*; -import java.util.stream.Collectors; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -//omrs -import org.odpi.openmetadata.fvt.opentypes.common.*; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.*; -import org.odpi.openmetadata.repositoryservices.rest.properties.*; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchive; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -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.properties.SequencingOrder; - -// omrs bean entity specific imports -<$$$ -import org.odpi.openmetadata.fvt.opentypes.entities.<$$uEntityName$$>.<$$uEntityName$$>; -import org.odpi.openmetadata.fvt.opentypes.entities.<$$uEntityName$$>.<$$uEntityName$$>Mapper; -$$$> -// omrs bean relationships specific imports -import org.odpi.openmetadata.fvt.opentypes.relationships.OMRSRelationshipToLines; -<$$RELATIONSHIP$ -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>; -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>Mapper; -$$RELATIONSHIP$> - -/** - * The OMRS API exposes concepts like Entities Relationships and ClassificationBeans, all of which have properties. - * So the Subject Area OMAS can more easily consume this content, a subset of the OMRS content is exposed as java beans. - * These java beans are accessed using this class. - */ - -public class BeansToAccessOMRS { - - private static final Logger log = LoggerFactory.getLogger(BeansToAccessOMRS.class); - private static final String className = BeansToAccessOMRS.class.getName(); - - // The OMRSAPIHelper allows the junits to mock out the omrs layer. - private OMRSAPIHelper oMRSAPIHelper =new OMRSAPIHelper(); - - public BeansToAccessOMRS() { - } - public void setOMRSAPIHelper(OMRSAPIHelper oMRSAPIHelper) { - this.oMRSAPIHelper=oMRSAPIHelper; - } - -<$$$ - /** - * Fetch complete definition of an <$$EntityName$$> given its GUID. - * The limit and startingFrom paging parameters limit the number elements returned in each of the <$$lowerCasePluralEntityName$$> relationships. - * @param userId user identity - * @param entityGuid GUID for the entity - * @return <$$uEntityName$$> the <$$uEntityName$$> entity with the requested GUID - */ - public <$$uEntityName$$> get<$$uEntityName$$>(String userId,String entityGuid) - throws UserNotAuthorizedException, RepositoryErrorException, EntityProxyOnlyException, InvalidParameterException, EntityNotKnownException - { - final String methodName = "get<$$uEntityName$$>"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,entityGuid,"entityGuid"); - - EntityDetail omrsEntityDetail = oMRSAPIHelper.callOMRSGetEntityByGuid(userId,entityGuid); - - <$$uEntityName$$> got<$$EntityName$$> = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(omrsEntityDetail); - if (log.isDebugEnabled()) { - - log.debug("<== successful method : " + methodName + ",userId="+userId+",guid="+entityGuid+",entity="+ got<$$EntityName$$> ); - } - return got<$$EntityName$$>; - - } - /** - * Create new <$$EntityName$$>. - * @param userId user identity - * @param <$$EntityName$$> the input entity with values. - * @return <$$uEntityName$$> the created entity. - */ - - public <$$uEntityName$$> create<$$uEntityName$$>(String userId,<$$uEntityName$$> <$$EntityName$$>) - throws ClassificationErrorException, StatusNotSupportedException, UserNotAuthorizedException, - FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException - - { - final String methodName = "create<$$uEntityName$$>"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - EntityDetail entityDetails = <$$uEntityName$$>Mapper.map<$$uEntityName$$>ToOmrsEntityDetail(<$$EntityName$$>); - EntityDetail addedOMRSEntityDetail = oMRSAPIHelper.callOMRSAddEntity(userId,entityDetails); - - <$$uEntityName$$> created<$$uEntityName$$> = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(addedOMRSEntityDetail); - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId="+userId+", created <$$uEntityName$$>="+ created<$$uEntityName$$> ); - } - return created<$$uEntityName$$>; - } - /** - * Update <$$EntityName$$> - * @param userId user identity - * @param <$$EntityName$$> <$$EntityName$$> to update - * @return <$$uEntityName$$> the updated <$$EntityName$$> entity - */ - public <$$uEntityName$$> update<$$uEntityName$$>(String userId, <$$uEntityName$$> <$$EntityName$$>) - throws UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException - { - - final String methodName = "update<$$uEntityName$$>"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - EntityDetail entityDetails = <$$uEntityName$$>Mapper.map<$$uEntityName$$>ToOmrsEntityDetail(<$$EntityName$$>); - //InputValidator.validateGUIDNotNull(className,methodName,entityDetails.getGUID(),"guid"); - EntityDetail updatedOMRSEntityDetail = oMRSAPIHelper.callOMRSUpdateEntity(userId,entityDetails); - - <$$uEntityName$$> updated<$$uEntityName$$> = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(updatedOMRSEntityDetail); - if (log.isDebugEnabled()) { - log.debug("<== successful method: " + methodName + ",userId=" + userId + ",updated <$$uEntityName$$>="+ updated<$$uEntityName$$> ); - } - return updated<$$uEntityName$$>; - } - - /** - * Delete an <$$EntityName$$> identified by its GUID. Delete is a soft delete, this means that the <$$EntityName$$> has its status changed to - * deleted. Soft deletion support os optional, so this call may fail. Soft deletes can be undone using the restore call. - * If it is required that an entity is really deleted (a hard delete) then the purge call should be used. - * - * @param userId user identity - * @param entityGuid GUID for the <$$EntityName$$> - * @return <$$uEntityName$$> the deleted <$$uEntityName$$> entity - */ - - public <$$uEntityName$$> delete<$$uEntityName$$>(String userId,final String entityGuid) - throws UserNotAuthorizedException, RepositoryErrorException, EntityNotKnownException, InvalidParameterException, FunctionNotSupportedException - { - final String methodName = "delete<$$uEntityName$$>"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,entityGuid,"entityGuid"); - - // get the <$$uEntityName$$> type guid - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - EntityDef entityDef = archiveAccessor.getEntityDefByName("<$$uEntityName$$>"); - EntityDetail deletedOmrsEntityDetail = oMRSAPIHelper.callOMRSDeleteEntity(userId,"<$$uEntityName$$>",entityDef.getGUID(),entityGuid); - <$$uEntityName$$> deleted<$$uEntityName$$> = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(deletedOmrsEntityDetail); - - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - return deleted<$$uEntityName$$>; - - } - /** - * Purge an <$$EntityName$$> identified by its GUID. Delete is a hard delete, this means that the <$$EntityName$$> is really - * deleted . - * @param userId user identity - * @param entityGuid GUID for the <$$EntityName$$> - */ - public void purge<$$uEntityName$$>(String userId,final String entityGuid) - throws UserNotAuthorizedException, RepositoryErrorException, EntityNotKnownException, - InvalidParameterException, FunctionNotSupportedException, EntityNotDeletedException - { - final String methodName = "purge<$$uEntityName$$>"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,entityGuid,"entityGuid"); - - // get the <$$uEntityName$$> type guid - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - EntityDef entityDef = archiveAccessor.getEntityDefByName("<$$uEntityName$$>"); - oMRSAPIHelper.callOMRSPurgeEntity(userId,"<$$uEntityName$$>",entityDef.getGUID(),entityGuid); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - } - /** - * Restore an <$$uEntityName$$> identified by its GUID. Restore resurrects a soft deleted <$$uEntityName$$>. When a <$$uEntityName$$> was incorrectly deleted, the delete can be undone using the restore.. - * @param userId user identity - * @param entityGuid GUID for the <$$uEntityName$$> - * @return <$$uEntityName$$> the restored <$$uEntityName$$> - */ - public <$$uEntityName$$> restore<$$uEntityName$$>(String userId,final String entityGuid) - throws UserNotAuthorizedException, EntityNotKnownException, EntityNotDeletedException, InvalidParameterException, RepositoryErrorException, FunctionNotSupportedException - { - final String methodName = "restore<$$uEntityName$$>"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,entityGuid,"entityGuid"); - EntityDetail omrsEntity = oMRSAPIHelper.callOMRSRestoreEntity(userId,entityGuid); - <$$uEntityName$$> restored<$$uEntityName$$> = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(omrsEntity); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - return restored<$$uEntityName$$>; - } - - /** - * Add classifications to the supplied <$$EntityName$$> - * @param userId user identity - * @param entityGuid the GUID value for <$$EntityName$$> - * @param classifications the classifications to apply. - * @return the <$$EntityName$$> entity that has been classified - */ - public <$$uEntityName$$> add<$$uEntityName$$>ClassificationBeans(String userId,final String entityGuid, List classifications) - throws ClassificationErrorException, UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, - InvalidParameterException, RepositoryErrorException, PropertyErrorException, EntityProxyOnlyException - { - final String methodName = "add<$$uEntityName$$>ClassificationBeans"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - - - for (ClassificationBean classification:classifications) { - InstanceProperties instanceProperties = classification.obtainInstanceProperties(); - String name =classification.getClassificationName(); - //InputValidator.validateNameNotNull(className,methodName,name,"classifications"); - oMRSAPIHelper.callOMRSClassifyEntity(userId, - entityGuid, - name, - instanceProperties); - } - - EntityDetail omrsEntityDetail = oMRSAPIHelper.callOMRSGetEntityByGuid(userId,entityGuid); - - <$$uEntityName$$> <$$EntityName$$>ClassificationBeans = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(omrsEntityDetail); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+entityGuid+",classified <$$uEntityName$$>=" + <$$EntityName$$>ClassificationBeans); - } - return <$$EntityName$$>ClassificationBeans; - } - - /** - * Updates classifications to an existing <$$EntityName$$> represented by a guid. - * @param userId user identity - * @param entityGuid globally unique identifier for the <$$EntityName$$> - * @param classificationsToUpdate List of classifications to update entity with - * @return classification for the given <$$EntityName$$> guid - */ - public <$$uEntityName$$> update<$$uEntityName$$>ClassificationBean(String userId, final String entityGuid, List classificationsToUpdate) - throws UserNotAuthorizedException, RepositoryErrorException, EntityProxyOnlyException, InvalidParameterException, EntityNotKnownException, - ClassificationErrorException, FunctionNotSupportedException, PropertyErrorException - { - final String methodName = "update<$$uEntityName$$>ClassificationBeans"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,entityGuid,"entityGuid"); - - EntityDetail omrsEntityDetail = oMRSAPIHelper.callOMRSGetEntityByGuid(userId,entityGuid); - - List existingClassificationBeanNames = omrsEntityDetail.getClassifications().stream().map(x -> x.getName()).collect(Collectors.toList()); - for (ClassificationBean classification:classificationsToUpdate) { - String name = classification.getClassificationName(); - // Only allow updates of classifications that already exist. - if (!existingClassificationBeanNames.contains(name)) { - // @TODO ? - } - } - for (ClassificationBean classification:classificationsToUpdate) { - InstanceProperties instanceProperties = classification.obtainInstanceProperties(); - String name =classification.getClassificationName(); - //remove existing classification - oMRSAPIHelper.callOMRSDeClassifyEntity(userId, - entityGuid, - name); - // re-add with the new properties. - oMRSAPIHelper.callOMRSClassifyEntity(userId, - entityGuid, - name, - instanceProperties); - } - - EntityDetail updatedOMRSEntityDetail = oMRSAPIHelper.callOMRSGetEntityByGuid(userId,entityGuid); - <$$uEntityName$$> <$$EntityName$$>ClassificationBeans = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(updatedOMRSEntityDetail); - - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName + ",userId="+userId+",guid="+entityGuid); - } - return <$$EntityName$$>ClassificationBeans; - } - - /** - * Deletes a given classification from an existing <$$EntityName$$> represented by a guid. - * @param userId user identity - * @param entityGuid globally unique identifier for the <$$EntityName$$> - * @param name name of the classification - * @return deleted <$$uEntityName$$> classification - */ - public <$$uEntityName$$> delete<$$uEntityName$$>ClassificationBean(String userId,String entityGuid, final String name) - throws ClassificationErrorException, UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, - InvalidParameterException, RepositoryErrorException, EntityProxyOnlyException - { - final String methodName = "delete<$$uEntityName$$>ClassificationBean"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+entityGuid+",name="+name); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,entityGuid,"entityGuid"); - - - oMRSAPIHelper.callOMRSDeClassifyEntity(userId, entityGuid,name); - EntityDetail omrsEntityDetail = oMRSAPIHelper.callOMRSGetEntityByGuid(userId,entityGuid); - <$$uEntityName$$> declassified<$$uEntityName$$> = <$$uEntityName$$>Mapper.mapOmrsEntityDetailTo<$$uEntityName$$>(omrsEntityDetail); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+entityGuid+",name="+name); - } - return declassified<$$uEntityName$$>; - } - - /** - * Get the relationships associated with entity <$$EntityName$$> represented by a guid. - * @param userId user identity - * @param entityGuid globally unique identifier for the <$$EntityName$$> - * @param relationshipTypeGuid the guid of the relationships type to restrict the relationships returned to this type. null means return all relationships types. - * @param fromRelationshipElement the starting element number of the relationships to return. - * This is used when retrieving elements - * beyond the first page of results. Zero means start from the first element. - * @param asOfTime Date return relationships as they were at some time in the past. null indicates to return relationships as they are now. - * @param sequencingProperty String name of the property that is to be used to sequence the results. - * Null means do not sequence on a property name (see SequencingOrder). - * @param sequencingOrder Enum defining how the results should be ordered. - * @param pageSize the maximum number of result classifications that can be returned on this request. Zero means - * unrestricted return results size. - * @return {@code List } - */ - public Set get<$$uEntityName$$>Relationships( - String userId, - String entityGuid, - String relationshipTypeGuid, - int fromRelationshipElement, - Date asOfTime, - String sequencingProperty, - SequencingOrder sequencingOrder, - int pageSize) - throws UserNotAuthorizedException, EntityNotKnownException, FunctionNotSupportedException, InvalidParameterException, - RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException - { - final String methodName = "get<$$uEntityName$$>Relationships"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",entity guid="+entityGuid + ",relationships Type Guid="+relationshipTypeGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,entityGuid,"entityGuid"); - - Set lines = null; - - List omrsRelationships = oMRSAPIHelper.callGetRelationshipsForEntity( userId, - entityGuid, - relationshipTypeGuid, - fromRelationshipElement, - asOfTime, - sequencingProperty, - sequencingOrder, - pageSize); - if (omrsRelationships !=null) { - lines = OMRSRelationshipToLines.convert(omrsRelationships); - } - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId="+userId+",guid="+entityGuid); - } - return lines; - } - $$$> - // Relationships - - <$$RELATIONSHIP$ - /** - * Create <$$uRelationshipName$$> relationships - * @param userId user identity - * @param relationships <$$uRelationshipName$$> relationships to create - * @return created <$$uRelationshipName$$> relationships - */ - public <$$uRelationshipName$$> create<$$uRelationshipName$$>Relationship(String userId,<$$uRelationshipName$$> relationships) - throws StatusNotSupportedException, UserNotAuthorizedException, EntityNotKnownException, - FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException - { - final String methodName = "create<$$uRelationshipName$$>Relationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",relationships="+relationships); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - - Relationship omrsRelationship = <$$uRelationshipName$$>Mapper.map<$$uRelationshipName$$>ToOmrsRelationship(relationships); - Relationship returnedRelationship = oMRSAPIHelper.callOMRSAddRelationship(userId,omrsRelationship); - <$$uRelationshipName$$> returned<$$uRelationshipName$$> = <$$uRelationshipName$$>Mapper.mapOmrsRelationshipTo<$$uRelationshipName$$>(returnedRelationship); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",relationships="+relationships); - } - return returned<$$uRelationshipName$$>; - } - /** - * Get <$$uRelationshipName$$> relationships - * @param userId user identity - * @param relationshipGuid relationships guid - * @return <$$uRelationshipName$$> relationships - */ - public <$$uRelationshipName$$> get<$$uRelationshipName$$>Relationship( String userId, String relationshipGuid) - throws UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException, RelationshipNotKnownException - { - final String methodName = "get<$$uRelationshipName$$>Relationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",relationshipGuid="+relationshipGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,relationshipGuid,"relationshipGuid"); - - Relationship returnedRelationship = oMRSAPIHelper.callOMRSGetRelationshipByGuid(userId,relationshipGuid); - <$$uRelationshipName$$> got<$$uRelationshipName$$> = <$$uRelationshipName$$>Mapper.mapOmrsRelationshipTo<$$uRelationshipName$$>(returnedRelationship); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",relationshipGuid="+relationshipGuid); - } - return got<$$uRelationshipName$$>; - } - /** - * Update <$$uRelationshipName$$> relationships - * @param userId user identity - * @param <$$RelationshipName$$> relationships - * @return <$$uRelationshipName$$> relationships - */ - public <$$uRelationshipName$$> update<$$uRelationshipName$$>Relationship(String userId,<$$uRelationshipName$$> <$$RelationshipName$$>) - throws StatusNotSupportedException, UserNotAuthorizedException, FunctionNotSupportedException, - InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, PropertyErrorException - { - final String methodName = "update<$$uRelationshipName$$>Relationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - - - Relationship omrsRelationship = <$$uRelationshipName$$>Mapper.map<$$uRelationshipName$$>ToOmrsRelationship(<$$RelationshipName$$>); - Relationship returnedRelationship = oMRSAPIHelper.callOMRSUpdateRelationship(userId,omrsRelationship); - <$$uRelationshipName$$> updated<$$uRelationshipName$$> = <$$uRelationshipName$$>Mapper.mapOmrsRelationshipTo<$$uRelationshipName$$>(returnedRelationship); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId); - } - return updated<$$uRelationshipName$$>; - } - $$RELATIONSHIP$> - - /** - * Delete relationships. Any checking that the relationships is of a particular type should be done by the caller. - * @param userId user identity - * @param relationshipGuid relationshipGuid - * @param typeName name of the type. This needs match the type associated with the relationships identified with the supplied GUID - * @return deleted relationships - */ - public Relationship deleteRelationship(String userId,String relationshipGuid, String typeName ) - throws UserNotAuthorizedException, RepositoryErrorException, InvalidParameterException, FunctionNotSupportedException, RelationshipNotKnownException - { - final String methodName = "deleteRelationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+relationshipGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,relationshipGuid,"relationshipGuid"); - // get the appropriate type name and guid - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - RelationshipDef relationshipDef = archiveAccessor.getRelationshipDefByName(typeName); - String typeGuid = relationshipDef.getGUID(); - Relationship deletedRelationship =oMRSAPIHelper.callOMRSDeleteRelationship(userId, typeGuid, typeName, relationshipGuid); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+relationshipGuid); - } - - return deletedRelationship; - } - /** - * Purge relationships - * @param userId user identity - * @param relationshipGuid relationshipGuid - * @param typeName name of the type. This needs match the type associated with the relationships identified with the supplied GUID - */ - public void purgeRelationship(String userId,String relationshipGuid,String typeName) - throws RelationshipNotDeletedException, UserNotAuthorizedException, FunctionNotSupportedException, - InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException - { final String methodName = "purgeRelationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+relationshipGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,relationshipGuid,"relationshipGuid"); - - // get the appropriate type name and guid - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - RelationshipDef relationshipDef = archiveAccessor.getRelationshipDefByName(typeName); - String typeGuid = relationshipDef.getGUID(); - - oMRSAPIHelper.callOMRSPurgeRelationship(userId, typeGuid, typeName, relationshipGuid); - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+relationshipGuid); - } - } - /** - * Restore an relationships identified by its GUID. Restore resurrects a soft deleted relationships. When a relationships is incorrectly deleted, the delete can be undone by using this restore. - * @param userId user identity - * @param relationshipGuid GUID for the relationships - * @return Relationship the restored relationships - */ - public Relationship restoreRelationship(String userId,final String relationshipGuid) - throws RelationshipNotDeletedException, UserNotAuthorizedException, FunctionNotSupportedException, - InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException - { - final String methodName = "restoreRelationship"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId="+userId+",guid="+relationshipGuid); - } - //InputValidator.validateUserIdNotNull(className,methodName,userId); - //InputValidator.validateGUIDNotNull(className,methodName,relationshipGuid,"entityGuid"); - Relationship restoredRelationship = oMRSAPIHelper.callOMRSRestoreRelationship(userId,relationshipGuid); - - if (log.isDebugEnabled()) { - log.debug("<== successful Method: " + methodName + ",userId="+userId+",guid="+relationshipGuid); - } - return restoredRelationship; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationFactoryTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationFactoryTemplate deleted file mode 100644 index a83223c7276..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationFactoryTemplate +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - - // This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.classifications; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.odpi.openmetadata.fvt.opentypes.common.ClassificationBean; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; - -<$$$ -import org.odpi.openmetadata.fvt.opentypes.classifications.<$$uClassification$$>.<$$uClassification$$>Mapper; -$$$> - - -/** - * A factory to create new instances of classes of open metadata classifications by name. Return null if the classification is not known. - */ -public class ClassificationBeanFactory { - private static final Logger log = LoggerFactory.getLogger( ClassificationBeanFactory.class); - private static final String className = ClassificationBeanFactory.class.getName(); - public static ClassificationBean getClassificationBean(String name, Classification omrsClassification) throws InvalidParameterException { - <$$$ - if (name.equals("<$$uClassification$$>")) { - return <$$uClassification$$>Mapper.mapOmrsToBean(omrsClassification); - } - $$$> - return null; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationMapperTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationMapperTemplate deleted file mode 100644 index a5b437f4c41..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationMapperTemplate +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.classifications.<$$uClassificationName$$>; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.util.*; - -// omrs -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.*; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.fvt.opentypes.common.*; -import org.odpi.openmetadata.fvt.opentypes.enums.*; - -/** - * Static mapping methods to map between <$$uClassificationName$$> and the omrs equivalents. - */ -public class <$$uClassificationName$$>Mapper { - private static final Logger log = LoggerFactory.getLogger( <$$uClassificationName$$>Mapper.class); - private static final String className = <$$uClassificationName$$>Mapper.class.getName(); - /** - * @param omrsClassification - the supplied omrs classification - * @return equivalent <$$uClassificationName$$> - */ - static public <$$uClassificationName$$> mapOmrsToBean(Classification omrsClassification){ - String classificationTypeName = omrsClassification.getName(); - if ("<$$uClassificationName$$>".equals(classificationTypeName)) { - <$$uClassificationName$$> <$$ClassificationName$$> = new <$$uClassificationName$$>(); - //set core attributes - SystemAttributes systemAttributes = new SystemAttributes(); - - systemAttributes.setStatus(omrsClassification.getStatus()); - systemAttributes.setCreatedBy(omrsClassification.getCreatedBy()); - systemAttributes.setUpdatedBy(omrsClassification.getUpdatedBy()); - systemAttributes.setCreateTime(omrsClassification.getCreateTime()); - systemAttributes.setUpdateTime(omrsClassification.getUpdateTime()); - systemAttributes.setVersion(omrsClassification.getVersion()); - <$$ClassificationName$$>.setSystemAttributes(systemAttributes); - - - // Set properties - InstanceProperties omrsClassificationProperties = omrsClassification.getProperties(); - if (omrsClassificationProperties !=null) { - omrsClassificationProperties.setEffectiveFromTime(<$$ClassificationName$$>.getEffectiveFromTime()); - omrsClassificationProperties.setEffectiveToTime(<$$ClassificationName$$>.getEffectiveToTime()); - Iterator omrsPropertyIterator = omrsClassificationProperties.getPropertyNames(); - while (omrsPropertyIterator.hasNext()) { - String name = (String) omrsPropertyIterator.next(); - //TODO check if this is a property we expect or whether the type has been added to. - // this is a property we expect - InstancePropertyValue value = omrsClassificationProperties.getPropertyValue(name); - - // supplied guid matches the expected type - - Object actualValue; - switch (value.getInstancePropertyCategory()) { - case PRIMITIVE: - PrimitivePropertyValue primitiveTypePropertyValue = (PrimitivePropertyValue) value; - actualValue = primitiveTypePropertyValue.getPrimitiveValue(); - if (<$$uClassificationName$$>.getAttributePropertyNames().contains(name)) { - <$$Attr$$ - if (name.equals("<$$AttrName$$>")) { - <$$ClassificationName$$>.set<$$uAttrName$$>((<$$AttrType$$>)actualValue); - } - $$Attr$$> - - } else { - // put out the omrs value object - if (null==<$$ClassificationName$$>.getExtraAttributes()) { - <$$ClassificationName$$>.setExtraAttributes(new HashMap()); - } - <$$ClassificationName$$>.getExtraAttributes().put(name, primitiveTypePropertyValue); - } - break; - case ENUM: - EnumPropertyValue enumTypePropertyValue = (EnumPropertyValue) value; - String symbolicName = enumTypePropertyValue.getSymbolicName(); - if (<$$uClassificationName$$>.getEnumPropertyNames().contains(name)) { - <$$Enum$$ - if (name.equals("<$$EnumName$$>")) { - <$$uEnumType$$> <$$EnumName$$> = <$$uEnumType$$>.valueOf(symbolicName); - <$$ClassificationName$$>.set<$$uEnumName$$>(<$$EnumName$$>); - } - $$Enum$$> - - } else { - // put out the omrs value object - if (null==<$$ClassificationName$$>.getExtraAttributes()) { - <$$ClassificationName$$>.setExtraAttributes(new HashMap()); - } - <$$ClassificationName$$>.getExtraAttributes().put(name, enumTypePropertyValue); - } - - break; - case MAP: - if (<$$uClassificationName$$>.getMapPropertyNames().contains(name)) { - MapPropertyValue mapTypePropertyValue = (MapPropertyValue) value; - InstanceProperties instancePropertyForMap = (InstanceProperties) mapTypePropertyValue.getMapValues(); - - <$$Map$$ - if (name.equals("<$$MapName$$>")) { - - // Only support Map as that is what is in the archive types at this time. - Map actualMap = new HashMap<>(); - Iterator iter = instancePropertyForMap.getPropertyNames(); - while (iter.hasNext()) { - String mapkey = (String) iter.next(); - PrimitivePropertyValue primitivePropertyMapValue = (PrimitivePropertyValue) instancePropertyForMap.getPropertyValue(mapkey); - String mapvalue = (String) primitivePropertyMapValue.getPrimitiveValue(); - actualMap.put(mapkey, mapvalue); - } - <$$ClassificationName$$>.set<$$uMapName$$>(actualMap); - } - $$Map$$> - - } - break; - case ARRAY: - case STRUCT: - case UNKNOWN: - // error - break; - } - - } // end while - } - return <$$ClassificationName$$>; - } else { - // TODO wrong type - } - return null; - } - /** - * Map (convert) the supplied <$$uClassificationName$$> to an omrs Classification. - * @param <$$ClassificationName$$> supplied <$$uClassificationName$$> - * @return classificationDetail equivalent to <$$ClassificationName$$> - */ - static public Classification mapBeanToOmrs(<$$uClassificationName$$> <$$ClassificationName$$>) { - Classification omrsClassification = new Classification(); - SystemAttributes systemAttributes = <$$ClassificationName$$>.getSystemAttributes(); - if (systemAttributes!=null) { - if (systemAttributes.getCreatedBy()!=null) - omrsClassification.setCreatedBy(systemAttributes.getCreatedBy()); - if (systemAttributes.getUpdatedBy()!=null) - omrsClassification.setUpdatedBy(systemAttributes.getUpdatedBy()); - if (systemAttributes.getCreateTime()!=null) - omrsClassification.setCreateTime(systemAttributes.getCreateTime()); - if (systemAttributes.getUpdateTime()!=null) - omrsClassification.setUpdateTime(systemAttributes.getUpdateTime()); - if (systemAttributes.getVersion()!=null) - omrsClassification.setVersion(systemAttributes.getVersion()); - if (systemAttributes.getStatus()!=null) { - omrsClassification.setStatus(systemAttributes.getStatus()); - } - } - - InstanceProperties instanceProperties = new InstanceProperties(); - // primitives - - <$$Attr$$ - if (<$$ClassificationName$$>.get<$$uAttrName$$>()!=null) { - PrimitivePropertyValue primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - primitiveTypePropertyValue.setPrimitiveValue(<$$ClassificationName$$>.get<$$uAttrName$$>()); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - } - $$Attr$$> - - <$$Enum$$ - if (<$$ClassificationName$$>.get<$$uEnumName$$>()!=null) { - <$$uEnumType$$> enumType = <$$ClassificationName$$>.get<$$uEnumName$$>(); - EnumPropertyValue enumTypePropertyValue = new EnumPropertyValue(); - enumTypePropertyValue.setOrdinal(enumType.ordinal()); - enumTypePropertyValue.setSymbolicName(enumType.name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - } - $$Enum$$> - - <$$Map$$ - if (<$$ClassificationName$$>.get<$$uMapName$$>()!=null) { - - Map map =<$$ClassificationName$$>.get<$$uMapName$$>(); - MapPropertyValue mapTypePropertyValue = new MapPropertyValue(); - - for (String key:map.keySet()) { - PrimitivePropertyValue primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitiveTypePropertyValue.setPrimitiveValue(map.get(key)); - mapTypePropertyValue.setMapValue(key,primitiveTypePropertyValue); - } - - instanceProperties.setProperty("<$$MapName$$>", mapTypePropertyValue); - } - $$Map$$> - - omrsClassification.setProperties(instanceProperties); - // set the type in the classification - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - TypeDef typeDef = archiveAccessor.getEntityDefByName("<$$uClassificationName$$>"); - InstanceType _template = archiveAccessor.createTemplateFromTypeDef(typeDef); - InstanceType instanceType = new InstanceType(_template); - omrsClassification.setType(instanceType); - return omrsClassification; - } - -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationTemplate deleted file mode 100644 index 486effff13d..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanClassificationTemplate +++ /dev/null @@ -1,184 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.fvt.opentypes.classifications.<$$uname$$>; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import org.odpi.openmetadata.fvt.opentypes.common.ClassificationBean; -import org.odpi.openmetadata.fvt.opentypes.enums.*; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import java.io.Serializable; -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - - -/** - * <$$description$$> - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class <$$uname$$> extends ClassificationBean { - private static final Logger log = LoggerFactory.getLogger( <$$uname$$>.class); - private static final String className = <$$uname$$>.class.getName(); - private Map extraAttributes; - - - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[] { - <$$$ - "<$$PropertyName$$>", - $$$> - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] { - <$Attr$$ - "<$$AttrName$$>", - $Attr$$> - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[] { - <$Enum$$ - "<$$EnumName$$>", - $Enum$$> - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[] { - <$Map$$ - "<$$MapName$$>", - $Map$$> - - // Terminate the list - null - }; - // note the below definitions needs to be fully qualified - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES))); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES))); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES))); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES))); - /** - * Default constructor - */ - public <$$uname$$>() { - super.classificationName="<$$uname$$>"; - } - @Override - public InstanceProperties obtainInstanceProperties() { - final String methodName = "obtainInstanceProperties"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - InstanceProperties instanceProperties = new InstanceProperties(); - EnumPropertyValue enumTypePropertyValue=null; - <$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // <$$description$$> - if (<$$EnumName$$> !=null) { - enumTypePropertyValue.setOrdinal(<$$EnumName$$>.ordinal()); - enumTypePropertyValue.setSymbolicName(<$$EnumName$$>.name()); - instanceProperties.setProperty("<$$EnumName$$>",enumTypePropertyValue); - } - $Enum$$> - MapPropertyValue mapTypePropertyValue=null; - <$Map$$ - // <$$description$$> - mapTypePropertyValue = new MapPropertyValue(); - //mapTypePropertyValue.setMapValues(this.<$$PropertyName$$>); - $Map$$> - PrimitivePropertyValue primitiveTypePropertyValue=null; - <$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>",primitiveTypePropertyValue); - $Attr$$> - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - return instanceProperties; - } - - <$$$ - private <$$PropertyType$$> <$$PropertyName$$>; - /** - * {@literal <$$AttrDescription$$> } - * @return {$$PropertyTypeJavadoc$$ } - */ - public <$$PropertyType$$> get<$$uPropertyName$$>() { - return this.<$$PropertyName$$>; - } - public void set<$$uPropertyName$$>(<$$PropertyType$$> <$$PropertyName$$>) { - this.<$$PropertyName$$> = <$$PropertyName$$>; - } - - - $$$> - - /** - * <$$uname$$> property names - * @return Set of Strings of the <$$uname$$> property names - */ - public static java.util.Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - /** - * <$$uname$$> map property names - * @return Set of Strings of the <$$uname$$> map property names - */ - public static java.util.Set getMapPropertyNames() { - return MAP_NAMES_SET; - } - - /** - * <$$uname$$> enum property names - * @return Set of Strings of the <$$uname$$> enum property names - */ - public static java.util.Set getEnumPropertyNames() { - return ENUM_NAMES_SET; - } - - /** - * <$$uname$$> attribute property names - * @return Set of Strings of the <$$uname$$> attribute property names - */ - public static java.util.Set getAttributePropertyNames() { - return ATTRIBUTE_NAMES_SET; - } - - - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * @return extra attributes - */ - public Map getExtraAttributes() { - return extraAttributes; - } - public void setExtraAttributes(Map extraAttributes) { - this.extraAttributes = extraAttributes; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEntityMapperTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEntityMapperTemplate deleted file mode 100644 index c6b12d4aca5..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEntityMapperTemplate +++ /dev/null @@ -1,269 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.entities.<$$uEntityName$$>; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; - -// omrs -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.*; -import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveAccessor; -import org.odpi.openmetadata.fvt.opentypes.common.*; -import org.odpi.openmetadata.fvt.opentypes.classifications.ClassificationBeanFactory; -import org.odpi.openmetadata.fvt.opentypes.enums.*; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -/** - * Static mapping methods to map between <$$uEntityName$$> and the omrs equivalents. - */ -public class <$$uEntityName$$>Mapper { - private static final Logger log = LoggerFactory.getLogger( <$$uEntityName$$>Mapper.class); - private static final String className = <$$uEntityName$$>Mapper.class.getName(); - /** - * @param omrsEntityDetail the supplied EntityDetail - * @return equivalent <$$uEntityName$$> - */ - static public <$$uEntityName$$> mapOmrsEntityDetailTo<$$uEntityName$$>(EntityDetail omrsEntityDetail) throws InvalidParameterException { - String entityTypeName = omrsEntityDetail.getType().getTypeDefName(); - if ("<$$uEntityName$$>".equals(entityTypeName)) { - <$$uEntityName$$> <$$EntityName$$> = new <$$uEntityName$$>(); - //set core attributes - SystemAttributes systemAttributes = new SystemAttributes(); - systemAttributes.setStatus(omrsEntityDetail.getStatus()); - - systemAttributes.setCreatedBy(omrsEntityDetail.getCreatedBy()); - systemAttributes.setUpdatedBy(omrsEntityDetail.getUpdatedBy()); - systemAttributes.setCreateTime(omrsEntityDetail.getCreateTime()); - systemAttributes.setUpdateTime(omrsEntityDetail.getUpdateTime()); - systemAttributes.setVersion(omrsEntityDetail.getVersion()); - systemAttributes.setGUID(omrsEntityDetail.getGUID()); - <$$EntityName$$>.setSystemAttributes(systemAttributes); - - // Set properties - InstanceProperties omrsEntityDetailProperties = omrsEntityDetail.getProperties(); - if (omrsEntityDetailProperties!=null) { - omrsEntityDetailProperties.setEffectiveFromTime(<$$EntityName$$>.getEffectiveFromTime()); - omrsEntityDetailProperties.setEffectiveToTime(<$$EntityName$$>.getEffectiveToTime()); - Iterator omrsPropertyIterator = omrsEntityDetailProperties.getPropertyNames(); - - while (omrsPropertyIterator.hasNext()) { - String name = (String) omrsPropertyIterator.next(); - //TODO check if this is a property we expect or whether the type has been added to. - // this is a property we expect - InstancePropertyValue value = omrsEntityDetailProperties.getPropertyValue(name); - - // supplied guid matches the expected type - - Object actualValue; - switch (value.getInstancePropertyCategory()) { - case PRIMITIVE: - PrimitivePropertyValue primitiveTypePropertyValue = (PrimitivePropertyValue) value; - actualValue = primitiveTypePropertyValue.getPrimitiveValue(); - if (<$$uEntityName$$>.getAttributePropertyNames().contains(name)) { - <$$Attr$$ - if (name.equals("<$$AttrName$$>")) { - <$$EntityName$$>.set<$$uAttrName$$>((<$$AttrType$$>)actualValue); - } - $$Attr$$> - - } else { - // put out the omrs value object - if (null==<$$EntityName$$>.getExtraAttributes()) { - <$$EntityName$$>.setExtraAttributes(new HashMap()); - } - <$$EntityName$$>.getExtraAttributes().put(name, primitiveTypePropertyValue); - } - break; - case ENUM: - EnumPropertyValue enumTypePropertyValue = (EnumPropertyValue) value; - String symbolicName = enumTypePropertyValue.getSymbolicName(); - if (<$$uEntityName$$>.getEnumPropertyNames().contains(name)) { - <$$Enum$$ - if (name.equals("<$$EnumName$$>")) { - <$$uEnumType$$> <$$EnumName$$> = <$$uEnumType$$>.valueOf(symbolicName); - <$$EntityName$$>.set<$$uEnumName$$>(<$$EnumName$$>); - } - $$Enum$$> - - } else { - // put out the omrs value object - if (null==<$$EntityName$$>.getExtraAttributes()) { - <$$EntityName$$>.setExtraAttributes(new HashMap()); - } - <$$EntityName$$>.getExtraAttributes().put(name, enumTypePropertyValue); - } - - break; - case MAP: - if (<$$uEntityName$$>.getMapPropertyNames().contains(name)) { - MapPropertyValue mapTypePropertyValue = (MapPropertyValue) value; - InstanceProperties instancePropertyForMap = (InstanceProperties) mapTypePropertyValue.getMapValues(); - - <$$Map$$ - if (name.equals("<$$MapName$$>")) { - - // Only support Map as that is what is in the archive types at this time. - Map actualMap = new HashMap<>(); - Iterator iter = instancePropertyForMap.getPropertyNames(); - while (iter.hasNext()) { - String mapkey = (String) iter.next(); - PrimitivePropertyValue primitivePropertyMapValue = (PrimitivePropertyValue) instancePropertyForMap.getPropertyValue(mapkey); - String mapvalue = (String) primitivePropertyMapValue.getPrimitiveValue(); - actualMap.put(mapkey, mapvalue); - } - <$$EntityName$$>.set<$$uMapName$$>(actualMap); - } - $$Map$$> - - } - break; - case ARRAY: - case STRUCT: - case UNKNOWN: - // error - break; - } - - } // end while - } - // set classifications - List omrsclassifications = omrsEntityDetail.getClassifications() ; - if (omrsclassifications != null && !omrsclassifications.isEmpty()){ - for (org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification omrsClassification:omrsclassifications) { - String omrsClassificationName = omrsClassification.getName(); - ClassificationBean classificationBean = ClassificationBeanFactory.getClassificationBean(omrsClassificationName,omrsClassification); - if (classificationBean !=null) { - // this is a classification we know about. - if ( <$$EntityName$$>.classifications==null) { - <$$EntityName$$>.classifications = new ArrayList<>(); - } - <$$EntityName$$>.classifications.add(classificationBean); - - } else { - if (null==<$$EntityName$$>.getExtraClassificationBeans()) { - <$$EntityName$$>.setExtraClassificationBeans(new HashMap()); - } - <$$EntityName$$>.getExtraClassificationBeans().put(omrsClassificationName,omrsClassification); - } - } - } - return <$$EntityName$$>; - } else { - // TODO wrong entity type for this guid - } - return null; - } - /** - * Map (convert) the supplied <$$uEntityName$$> to an entityDetails. - * @param <$$EntityName$$> supplied <$$uEntityName$$> - * @return entityDetails equivalent to <$$EntityName$$> - */ - static public EntityDetail map<$$uEntityName$$>ToOmrsEntityDetail(<$$uEntityName$$> <$$EntityName$$>) { - EntityDetail omrsEntityDetail = new EntityDetail(); - SystemAttributes systemAttributes = <$$EntityName$$>.getSystemAttributes(); - if (systemAttributes!=null) { - if (systemAttributes.getCreatedBy()!=null) - omrsEntityDetail.setCreatedBy(systemAttributes.getCreatedBy()); - if (systemAttributes.getUpdatedBy()!=null) - omrsEntityDetail.setUpdatedBy(systemAttributes.getUpdatedBy()); - if (systemAttributes.getCreateTime()!=null) - omrsEntityDetail.setCreateTime(systemAttributes.getCreateTime()); - if (systemAttributes.getUpdateTime()!=null) - omrsEntityDetail.setUpdateTime(systemAttributes.getUpdateTime()); - if (systemAttributes.getVersion()!=null) - omrsEntityDetail.setVersion(systemAttributes.getVersion()); - if (systemAttributes.getGUID()!=null) - omrsEntityDetail.setGUID(systemAttributes.getGUID()); - if (systemAttributes.getStatus()!=null) { - omrsEntityDetail.setStatus(systemAttributes.getStatus()); - } - } - - InstanceProperties instanceProperties = new InstanceProperties(); - instanceProperties.setEffectiveFromTime(<$$EntityName$$>.getEffectiveFromTime()); - instanceProperties.setEffectiveToTime(<$$EntityName$$>.getEffectiveToTime()); - // primitives - - <$$Attr$$ - if (<$$EntityName$$>.get<$$uAttrName$$>()!=null) { - PrimitivePropertyValue primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - primitiveTypePropertyValue.setPrimitiveValue(<$$EntityName$$>.get<$$uAttrName$$>()); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - } - $$Attr$$> - - <$$Enum$$ - if (<$$EntityName$$>.get<$$uEnumName$$>()!=null) { - <$$uEnumType$$> enumType = <$$EntityName$$>.get<$$uEnumName$$>(); - EnumPropertyValue enumTypePropertyValue = new EnumPropertyValue(); - enumTypePropertyValue.setOrdinal(enumType.ordinal()); - enumTypePropertyValue.setSymbolicName(enumType.name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - } - $$Enum$$> - - <$$Map$$ - if (<$$EntityName$$>.get<$$uMapName$$>()!=null) { - - Map map =<$$EntityName$$>.get<$$uMapName$$>(); - MapPropertyValue mapTypePropertyValue = new MapPropertyValue(); - - for (String key:map.keySet()) { - PrimitivePropertyValue primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitiveTypePropertyValue.setPrimitiveValue(map.get(key)); - mapTypePropertyValue.setMapValue(key,primitiveTypePropertyValue); - } - - instanceProperties.setProperty("<$$MapName$$>", mapTypePropertyValue); - } - $$Map$$> - - omrsEntityDetail.setProperties(instanceProperties); - // set the type in the entity - OpenMetadataTypesArchiveAccessor archiveAccessor = OpenMetadataTypesArchiveAccessor.getInstance(); - TypeDef typeDef = archiveAccessor.getEntityDefByName("<$$uEntityName$$>"); - InstanceType _template = archiveAccessor.createTemplateFromTypeDef(typeDef); - InstanceType instanceType = new InstanceType(_template); - omrsEntityDetail.setType(instanceType); - - // map the classifications - populateOmrsEntityWithClassificationBeans(omrsEntityDetail,(List)<$$EntityName$$>.getClassificationBeans()); - return omrsEntityDetail; - } - - private static void populateOmrsEntityWithClassificationBeans(EntityDetail omrsEntityDetail, List classificationBeans) { - if (classificationBeans!= null && classificationBeans.size()>0) { - ArrayList omrsClassifications = new ArrayList(); - for (ClassificationBean classificationBean : classificationBeans) { - SystemAttributes systemAttributes = classificationBean.getSystemAttributes(); - org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification omrsClassification = new org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification(); - - if (systemAttributes != null) { - if (systemAttributes.getCreatedBy() != null) - omrsClassification.setCreatedBy(systemAttributes.getCreatedBy()); - if (systemAttributes.getUpdatedBy() != null) - omrsClassification.setUpdatedBy(systemAttributes.getUpdatedBy()); - if (systemAttributes.getCreateTime() != null) - omrsClassification.setCreateTime(systemAttributes.getCreateTime()); - if (systemAttributes.getUpdateTime() != null) - omrsClassification.setUpdateTime(systemAttributes.getUpdateTime()); - if (systemAttributes.getVersion() != null) - omrsClassification.setVersion(systemAttributes.getVersion()); - } - // copy over the classification name - omrsClassification.setName(classificationBean.getClassificationName()); - // copy over the classification properties - omrsClassification.setProperties( classificationBean.obtainInstanceProperties()); - omrsClassifications.add(omrsClassification); - } - omrsEntityDetail.setClassifications(omrsClassifications); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEntityTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEntityTemplate deleted file mode 100644 index 94525a403e4..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEntityTemplate +++ /dev/null @@ -1,308 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.entities.<$$uname$$>; - -import java.io.Serializable; -import java.util.*; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.odpi.openmetadata.fvt.opentypes.common.SystemAttributes; -import org.odpi.openmetadata.fvt.opentypes.common.ClassificationBean; -import org.odpi.openmetadata.fvt.opentypes.enums.*; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -// omrs -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; - -/** - * <$$uname$$> entity. - <$$description$$> - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class <$$uname$$> implements Serializable { - private static final Logger log = LoggerFactory.getLogger(<$$uname$$>.class); - private static final String className = <$$uname$$>.class.getName(); - private SystemAttributes systemAttributes = null; - private Date effectiveFromTime = null; - private Date effectiveToTime = null; - List classifications = null; - - private Map extraAttributes =null; - private Map extraClassificationBeans =null; - - - /** - * Get the system attributes - * @return SystemAttributes if populated, null otherwise. - */ - public SystemAttributes getSystemAttributes() { - return systemAttributes; - } - - public void setSystemAttributes(SystemAttributes systemAttributes) { - this.systemAttributes = systemAttributes; - } - - // attributes - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[] { - <$$$ - "<$$PropertyName$$>", - $$$> - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] { - <$Attr$$ - "<$$AttrName$$>", - $Attr$$> - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[] { - <$Enum$$ - "<$$EnumName$$>", - $Enum$$> - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[] { - <$Map$$ - "<$$MapName$$>", - $Map$$> - - // Terminate the list - null - }; - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES))); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES))); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES))); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES))); - - - InstanceProperties obtainInstanceProperties() { - final String methodName = "obtainInstanceProperties"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - InstanceProperties instanceProperties = new InstanceProperties(); - EnumPropertyValue enumTypePropertyValue=null; - <$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // <$$description$$> - enumTypePropertyValue.setOrdinal(<$$EnumName$$>.ordinal()); - enumTypePropertyValue.setSymbolicName(<$$EnumName$$>.name()); - instanceProperties.setProperty("<$$EnumName$$>",enumTypePropertyValue); - $Enum$$> - MapPropertyValue mapTypePropertyValue=null; - <$Map$$ - // <$$description$$> - mapTypePropertyValue = new MapPropertyValue(); - $Map$$> - PrimitivePropertyValue primitiveTypePropertyValue=null; - <$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>",primitiveTypePropertyValue); - $Attr$$> - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - return instanceProperties; - } - - <$$$ - private <$$PropertyType$$> <$$PropertyName$$>; - /** - * {@literal <$$AttrDescription$$> } - * @return {@code <$$PropertyTypeJavadoc$$> } - */ - public <$$PropertyType$$> get<$$uPropertyName$$>() { - return this.<$$PropertyName$$>; - } - public void set<$$uPropertyName$$>(<$$PropertyType$$> <$$PropertyName$$>) { - this.<$$PropertyName$$> = <$$PropertyName$$>; - } - $$$> - - /** - * <$$uname$$> property names - * @return Set of Strings of the <$$uname$$> property names - */ - public static java.util.Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - /** - * <$$uname$$> enum property names - * @return Set of Strings of the <$$uname$$> enum property names - */ - public static java.util.Set getEnumPropertyNames() { - return ENUM_NAMES_SET; - } - /** - * <$$uname$$> map property names - * @return Set of Strings of the <$$uname$$> map property names - */ - public static java.util.Set getMapPropertyNames() { - return MAP_NAMES_SET; - } - - /** - * <$$uname$$> attribute property names - * @return Set of Strings of the <$$uname$$> attribute property names - */ - public static java.util.Set getAttributePropertyNames() { - return ATTRIBUTE_NAMES_SET; - } - - - /** - * Return the date/time that this <$$uname$$> should start to be used (null means it can be used from creationTime). - * @return Date the <$$uname$$> becomes effective. - */ - public Date getEffectiveFromTime() - { - return effectiveFromTime; - } - - public void setEffectiveFromTime(Date effectiveFromTime) - { - this.effectiveFromTime = effectiveFromTime; - } - /** - * Return the date/time that this <$$uname$$> should no longer be used. - * - * @return Date the <$$uname$$> stops being effective. - */ - public Date getEffectiveToTime() - { - return effectiveToTime; - } - public void setEffectiveToTime(Date effectiveToTime) - { - this.effectiveToTime = effectiveToTime; - } - - public void setExtraAttributes(Map extraAttributes) { - this.extraAttributes = extraAttributes; - } - - public void setClassificationBeans(List classifications) { - this.classifications = classifications; - } - - /** - * Get the extra attributes - ones that are in addition to the standard types. - * @return map of attributes, null if there are none - */ - public Map getExtraAttributes() { - return extraAttributes; - } - - /** - * ClassificationBeans - * @return List of ClassificationBeans, null if there are none - */ - public List getClassificationBeans() { - return classifications; - } - /** - * Extra classifications are classifications that are not in the open metadata model - we include the OMRS ClassificationBeans. - * @return Map of classifications with the classification Name as the map key - */ - public Map getExtraClassificationBeans() { - return extraClassificationBeans; - } - - public void setExtraClassificationBeans(Map extraClassificationBeans) { - this.extraClassificationBeans = extraClassificationBeans; - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("<$$uname$$>{"); - if (systemAttributes !=null) { - sb.append("systemAttributes='").append(systemAttributes.toString()).append('\''); - } - sb.append("<$$uname$$> Attributes{"); - <$$$ - sb.append("<$$uPropertyName$$>=" +this.<$$PropertyName$$>); - $$$> - - sb.append('}'); - if (classifications != null) { - sb.append(", classifications=["); - for (ClassificationBean classification:classifications) { - sb.append(classification.toString()).append(", "); - } - sb.append(" ],"); - } - sb.append(", extraAttributes=["); - if (extraAttributes !=null) { - for (String attrname: extraAttributes.keySet()) { - sb.append(attrname).append(":"); - sb.append(extraAttributes.get(attrname)).append(", "); - } - } - sb.append(" ]"); - - sb.append('}'); - - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } - if (!super.equals(o)) { return false; } - - <$$uname$$> that = (<$$uname$$>) o; - <$$$ - if (this.<$$PropertyName$$> != null && !Objects.equals(this.<$$PropertyName$$>,that.get<$$uPropertyName$$>())) { - return false; - } - $$$> - - // We view <$$name$$>s as logically equal by checking the properties that the OMAS knows about - i.e. without accounting for extra attributes and references from the org.odpi.openmetadata.accessservices.subjectarea.server. - return Objects.equals(systemAttributes, that.systemAttributes) && - Objects.equals(classifications, that.classifications) ; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), - systemAttributes.hashCode(), - classifications.hashCode() - <$$$ - , this.<$$PropertyName$$> - $$$> - ); - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEnumTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEnumTemplate deleted file mode 100644 index 6f3b834c478..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanEnumTemplate +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.fvt.opentypes.enums; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * <$$description$$> - */ - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum <$$uname$$> implements Serializable { -<$$$ - /** - * <$$enumdescription$$> - */ - <$$enum$$>(<$$enumordinal$$>, "<$$enumdescription$$>") -$$$> -; - private final int ordinal; - private final String description ; - /** - * Default constructor sets up the specific values for an <$$uname$$> enum instance. - * - * @param ordinal int enum value ordinal - * @param description String description - */ - <$$uname$$>(int ordinal, String description) { - this.ordinal = ordinal; - this.description = description; - } - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return this.ordinal; } - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return this.description; } - /** - * Return the descriptive name for the <$$uname$$> enum instance - * - * @return String name - */ - public String getName() { return this.name(); } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanReferenceTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanReferenceTemplate deleted file mode 100644 index 95d3aa4e193..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanReferenceTemplate +++ /dev/null @@ -1,224 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.references.<$$mytype$$>To<$$othertype$$>; -import org.odpi.openmetadata.fvt.opentypes.common.*; -import org.odpi.openmetadata.fvt.opentypes.entities.<$$urelatedendtype$$>.<$$urelatedendtype$$>; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -<$Relationship$$ -import org.odpi.openmetadata.accessservices.subjectarea.generated.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>; -$Relationship$$> - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * This is a reference, which is a view of a relationships from the perspective of one of the ends. A relationships is - * the link between 2 OMAS entities. - * - * A reference is used when working with OMAS entity APIs. An OMAS entity has attributes, classifications - * and references. - * - * This Reference is called <$$uname$$>Reference. It is used in type <$$mytype$$> to represent a - * reference to an OMAS entity of type <$$relatedendtype$$>. The reference also contains information - * about the relationships; the relationships guid, name, relationships attributes and a list of unique attributes. - * Relationship attributes are attributes of the relationships. - * - * It is possible to work with the relationships itself using the OMAS API using the relationships guid - * contained in this reference. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class <$$uname$$>Reference extends Reference implements Serializable { - private static final long serialVersionUID = 1L; - private static final Logger log = LoggerFactory.getLogger(<$$uname$$>Reference.class); - private static final String className = <$$uname$$>Reference.class.getName(); - - final static private String relationship_Type = "<$$relationshiptype$$>"; - private <$$urelatedendtype$$> <$$relatedendtype$$> =null; - -<$Relationship$$ - public <$$uname$$>Reference(<$$uRelationshipName$$> <$$RelationshipName$$>) { - //TODO - } -$Relationship$$> - - - public <$$urelatedendtype$$> get<$$urelatedendtype$$>() { - return <$$relatedendtype$$>; - } - public void set<$$urelatedendtype$$>(<$$urelatedendtype$$> <$$relatedendtype$$>) { - this.<$$relatedendtype$$> = <$$relatedendtype$$>; - } -<$$$ - private String <$$PropertyName$$>; - /** - * <$$AttrDescription$$> - * @return <$$uPropertyName$$> - */ - public String get<$$uPropertyName$$>() { - return this.<$$PropertyName$$>; - } - - public void set<$$uPropertyName$$>(String <$$PropertyName$$>) { - this.<$$PropertyName$$> = <$$PropertyName$$>; - } -$$$> - - - public <$$uname$$>Reference() { - this(null, null, (Map) null); - } - - public <$$uname$$>Reference(String guid) { - this(guid, null, (Map) null); - } - - public <$$uname$$>Reference(String guid, String relatedEndType) { - this(guid, relatedEndType, (Map) null); - } - - public <$$uname$$>Reference(String relatedEndType, Map uniqueAttributes) { - this(null, relatedEndType, uniqueAttributes); - } - - public <$$uname$$>Reference(String guid, String relatedEndType, Map uniqueAttributes) { - setRelationshipGuid(guid); - setRelatedEndType(relatedEndType); - setUniqueAttributes(uniqueAttributes); - } - - public <$$uname$$>Reference(Reference other) { - if (other != null) { - setRelationshipGuid(other.getRelationshipGuid()); - setRelatedEndGuid(other.getRelatedEndGuid()); - setRelatedEndType(other.getRelatedEndType()); - setUniqueAttributes(other.getUniqueAttributes()); - } - } - - /** - * Populate the reference from a relationships - * @param entityGuid String entity Guid - * @param line OMRSLine - */ - public <$$uname$$>Reference(String entityGuid, OMRSLine line) { - setRelationshipGuid(line.getGuid()); - if (entityGuid.equals(line.getEntity1Guid())) { - setRelatedEndGuid(line.getEntity2Guid()); - setRelatedEndType(line.getEntity2Type()); - // TODO UniqueAttributes - //setUniqueAttributes(line.get - } else { - setRelatedEndGuid(line.getEntity1Guid()); - setRelatedEndType(line.getEntity1Type()); - // TODO UniqueAttributes - //setUniqueAttributes(line.get - } - } - - @SuppressWarnings(value = "unchecked") - public <$$uname$$>Reference(Map objIdMap) { - if (objIdMap != null) { - Object reg = objIdMap.get(KEY_RELATED_END_GUID); - Object rg = objIdMap.get(KEY_RELATIONSHIP_GUID); - Object t = objIdMap.get(KEY_TYPENAME); - Object u = objIdMap.get(KEY_UNIQUE_ATTRIBUTES); - - if (reg != null) { - setRelatedEndGuid(reg.toString()); - } - if (rg != null) { - setRelationshipGuid(rg.toString()); - } - - - if (t != null) { - setRelatedEndType(t.toString()); - } - - if (u != null && u instanceof Map) { - setUniqueAttributes((Map) u); - } - } - } - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("Reference{"); - sb.append("relatedEndGuid='").append(getRelatedEndGuid()).append('\''); - sb.append("relationshipGuid='").append(getRelationshipGuid()).append('\''); - sb.append("relatedEndType='").append(getRelatedEndType()).append('\''); - sb.append(", uniqueAttributes={"); -// AtlasBaseTypeDef.dumpObjects(uniqueAttributes, sb); - sb.append("}"); - sb.append("{"); - <$$$ - sb.append("this.<$$PropertyName$$> "); - $$$> - sb.append('}'); - - - sb.append('}'); - - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Reference that = (Reference) o; - - if (relatedEndGuid != null && !Objects.equals(relatedEndGuid, that.getRelatedEndGuid())) { - return false; - } - if (relationshipGuid != null && !Objects.equals(relationshipGuid, that.getRelationshipGuid())) { - return false; - } - <$$uname$$>Reference typedThat =(<$$uname$$>Reference)that; - <$$$ - if (this.<$$PropertyName$$> != null && !Objects.equals(this.<$$PropertyName$$>,typedThat.get<$$uPropertyName$$>())) { - return false; - } - $$$> - - return Objects.equals(relatedEndType, that.getRelatedEndType()) && - Objects.equals(uniqueAttributes, that.getUniqueAttributes()); - } - - - @Override - public int hashCode() { - return relatedEndGuid != null ? Objects.hash(relatedEndGuid) : Objects.hash(relatedEndType, uniqueAttributes -<$$$ -, this.<$$PropertyName$$> -$$$> -); - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanRelationshipMapperTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanRelationshipMapperTemplate deleted file mode 100644 index a5b8d74a42d..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanRelationshipMapperTemplate +++ /dev/null @@ -1,198 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>; -import org.odpi.openmetadata.fvt.opentypes.common.*; -import org.odpi.openmetadata.fvt.opentypes.enums.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.*; -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>; - -import java.util.*; - -/** - * Static mapping methods to map between <$$uRelationshipName$$> and the omrs Relationship. - */ -public class <$$uRelationshipName$$>Mapper { - private static final Logger log = LoggerFactory.getLogger(<$$uRelationshipName$$>Mapper.class); - private static final String className = <$$uRelationshipName$$>Mapper.class.getName(); - - public static <$$uRelationshipName$$> mapOmrsRelationshipTo<$$uRelationshipName$$>(Relationship omrsRelationship) { - String methodName = "mapOmrsRelationshipTo<$$uRelationshipName$$>"; - <$$uRelationshipName$$> <$$RelationshipName$$> = new <$$uRelationshipName$$>(omrsRelationship); - SystemAttributes systemAttributes = new SystemAttributes(); - systemAttributes.setStatus(omrsRelationship.getStatus()); - systemAttributes.setCreatedBy(omrsRelationship.getCreatedBy()); - systemAttributes.setUpdatedBy(omrsRelationship.getUpdatedBy()); - systemAttributes.setCreateTime(omrsRelationship.getCreateTime()); - systemAttributes.setUpdateTime(omrsRelationship.getUpdateTime()); - systemAttributes.setVersion(omrsRelationship.getVersion()); - systemAttributes.setGUID(omrsRelationship.getGUID()); - <$$RelationshipName$$>.setGuid(omrsRelationship.getGUID()); - <$$RelationshipName$$>.setSystemAttributes(systemAttributes); - - InstanceProperties omrsRelationshipProperties = omrsRelationship.getProperties(); - if (omrsRelationshipProperties !=null) { - omrsRelationshipProperties.setEffectiveFromTime(<$$RelationshipName$$>.getEffectiveFromTime()); - omrsRelationshipProperties.setEffectiveToTime(<$$RelationshipName$$>.getEffectiveToTime()); - Iterator omrsPropertyIterator = omrsRelationshipProperties.getPropertyNames(); - while (omrsPropertyIterator.hasNext()) { - String name = (String) omrsPropertyIterator.next(); - //TODO check if this is a property we expect or whether the type has been added to. - // this is a property we expect - InstancePropertyValue value = omrsRelationshipProperties.getPropertyValue(name); - // supplied guid matches the expected type - Object actualValue; - switch (value.getInstancePropertyCategory()) { - case PRIMITIVE: - PrimitivePropertyValue primitiveTypePropertyValue = (PrimitivePropertyValue) value; - actualValue = primitiveTypePropertyValue.getPrimitiveValue(); - if (<$$uRelationshipName$$>.getAttributePropertyNames().contains(name)) { - <$$Attr$$ - if (name.equals("<$$AttrName$$>")) { - <$$RelationshipName$$>.set<$$uAttrName$$>((<$$AttrType$$>)actualValue); - } - $$Attr$$> - - } else { - // put out the omrs value object - if (<$$RelationshipName$$>.getExtraAttributes() ==null) { - Map extraAttributes = new HashMap<>(); - <$$RelationshipName$$>.setExtraAttributes(extraAttributes); - } - <$$RelationshipName$$>.getExtraAttributes().put(name, primitiveTypePropertyValue); - } - break; - case ENUM: - EnumPropertyValue enumTypePropertyValue = (EnumPropertyValue) value; - String symbolicName = enumTypePropertyValue.getSymbolicName(); - if (<$$uRelationshipName$$>.getEnumPropertyNames().contains(name)) { - <$$Enum$$ - if (name.equals("<$$EnumName$$>")) { - <$$uEnumType$$> <$$EnumName$$> = <$$uEnumType$$>.valueOf(symbolicName); - <$$RelationshipName$$>.set<$$uEnumName$$>(<$$EnumName$$>); - } - $$Enum$$> - - } else { - // put out the omrs value object - if (<$$RelationshipName$$>.getExtraAttributes() ==null) { - Map extraAttributes = new HashMap<>(); - <$$RelationshipName$$>.setExtraAttributes(extraAttributes); - } - - <$$RelationshipName$$>.getExtraAttributes().put(name, enumTypePropertyValue); - } - - break; - case MAP: - if (<$$uRelationshipName$$>.getMapPropertyNames().contains(name)) { - MapPropertyValue mapTypePropertyValue = (MapPropertyValue) value; - InstanceProperties instancePropertyForMap = (InstanceProperties) mapTypePropertyValue.getMapValues(); - - <$$Map$$ - if (name.equals("<$$MapName$$>")) { - - // Only support Map as that is what is in the archive types at this time. - Map actualMap = new HashMap<>(); - Iterator iter = instancePropertyForMap.getPropertyNames(); - while (iter.hasNext()) { - String mapkey = (String) iter.next(); - PrimitivePropertyValue primitivePropertyMapValue = (PrimitivePropertyValue) instancePropertyForMap.getPropertyValue(mapkey); - String mapvalue = (String) primitivePropertyMapValue.getPrimitiveValue(); - actualMap.put(mapkey, mapvalue); - } - <$$RelationshipName$$>.set<$$uMapName$$>(actualMap); - } - $$Map$$> - - } - break; - case ARRAY: - case STRUCT: - case UNKNOWN: - // error - break; - } - } // end while - } - return <$$RelationshipName$$>; - } - public static Relationship map<$$uRelationshipName$$>ToOmrsRelationship(<$$uRelationshipName$$> <$$RelationshipName$$>) { - Relationship omrsRelationship = Line.createOmrsRelationship(<$$RelationshipName$$>); - - SystemAttributes systemAttributes = <$$RelationshipName$$>.getSystemAttributes(); - if (systemAttributes!=null) { - if (systemAttributes.getCreatedBy()!=null) - omrsRelationship.setCreatedBy(systemAttributes.getCreatedBy()); - if (systemAttributes.getUpdatedBy()!=null) - omrsRelationship.setUpdatedBy(systemAttributes.getUpdatedBy()); - if (systemAttributes.getCreateTime()!=null) - omrsRelationship.setCreateTime(systemAttributes.getCreateTime()); - if (systemAttributes.getUpdateTime()!=null) - omrsRelationship.setUpdateTime(systemAttributes.getUpdateTime()); - if (systemAttributes.getVersion()!=null) - omrsRelationship.setVersion(systemAttributes.getVersion()); - if (systemAttributes.getGUID()!=null) - omrsRelationship.setGUID(systemAttributes.getGUID()); - if (systemAttributes.getStatus()!=null) - omrsRelationship.setStatus(systemAttributes.getStatus()); - } - //set proxy 1 - EntityProxy entityOne = new EntityProxy(); - entityOne.setGUID(<$$RelationshipName$$>.getEntity1Guid()); - String type1 = <$$RelationshipName$$>.getEntity1Type(); - InstanceType instancetype1 = new InstanceType(); - instancetype1.setTypeDefName(type1); - entityOne.setType(instancetype1); - //set proxy 2 - EntityProxy entityTwo = new EntityProxy(); - entityTwo.setGUID(<$$RelationshipName$$>.getEntity2Guid()); - String type2 = <$$RelationshipName$$>.getEntity2Type(); - InstanceType instancetype2 = new InstanceType(); - instancetype2.setTypeDefName(type2); - entityTwo.setType(instancetype2); - // set relationshipType - InstanceType relationshipType = new InstanceType(); - relationshipType.setTypeDefGUID(<$$RelationshipName$$>.getTypeDefGuid()); - relationshipType.setTypeDefName("<$$uRelationshipName$$>"); - omrsRelationship.setType(relationshipType); - - omrsRelationship.setEntityOneProxy(entityOne); - omrsRelationship.setEntityTwoProxy(entityTwo); - if (omrsRelationship.getGUID() == null) { - omrsRelationship.setGUID(<$$RelationshipName$$>.getGuid()); - } - - InstanceProperties instanceProperties = new InstanceProperties(); - // primitives - - <$$Attr$$ - if (<$$RelationshipName$$>.get<$$uAttrName$$>()!=null) { - PrimitivePropertyValue primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - primitiveTypePropertyValue.setPrimitiveValue(<$$RelationshipName$$>.get<$$uAttrName$$>()); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - } - $$Attr$$> - - <$$Enum$$ - if (<$$RelationshipName$$>.get<$$uEnumName$$>()!=null) { - <$$uEnumType$$> enumType = <$$RelationshipName$$>.get<$$uEnumName$$>(); - EnumPropertyValue enumTypePropertyValue = new EnumPropertyValue(); - enumTypePropertyValue.setOrdinal(enumType.ordinal()); - enumTypePropertyValue.setSymbolicName(enumType.name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - } - $$Enum$$> - - omrsRelationship.setProperties(instanceProperties); - - return omrsRelationship; - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanRelationshipTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanRelationshipTemplate deleted file mode 100644 index be897b0e2ef..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanRelationshipTemplate +++ /dev/null @@ -1,212 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.relationships.<$$uname$$>; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.*; -import java.io.Serializable; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import org.odpi.openmetadata.fvt.opentypes.common.*; -import org.odpi.openmetadata.fvt.opentypes.enums.*; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -//omrs -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; - -/** - * <$$uname$$> is a relationships between an entity of type <$$entityProxy1Type$$> and an entity of type <$$entityProxy2Type$$>. - * The ends of the relationships are stored as entity proxies, where there is a 'proxy' name by which the entity type is known. - * The first entity proxy has <$$entityProxy1Name$$> as the proxy name for entity type <$$entityProxy1Type$$>. - * The second entity proxy has <$$entityProxy2Name$$> as the proxy name for entity type <$$entityProxy2Type$$>. - * - * Each entity proxy also stores the entities guid. - - <$$description$$> - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class <$$uname$$> extends OMRSLine { - private static final Logger log = LoggerFactory.getLogger(<$$uname$$>.class); - private static final String className = <$$uname$$>.class.getName(); - - //public java.util.Set propertyNames = new HashSet<>(); - private static final String[] PROPERTY_NAMES_SET_VALUES = new String[] { - <$$$ - "<$$PropertyName$$>", - $$$> - - // Terminate the list - null - }; - private static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] { - <$Attr$$ - "<$$AttrName$$>", - $Attr$$> - - // Terminate the list - null - }; - private static final String[] ENUM_NAMES_SET_VALUES = new String[] { - <$Enum$$ - "<$$EnumName$$>", - $Enum$$> - - // Terminate the list - null - }; - private static final String[] MAP_NAMES_SET_VALUES = new String[] { - <$Map$$ - "<$$MapName$$>", - $Map$$> - - // Terminate the list - null - }; - private static final java.util.Set PROPERTY_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES))); - private static final java.util.Set ATTRIBUTE_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES))); - private static final java.util.Set ENUM_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES))); - private static final java.util.Set MAP_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES))); - - - public <$$uname$$>() { - initialise(); - } - - private void initialise() - { - name = "<$$uname$$>"; - entity1Name = "<$$entityProxy1Name$$>"; - entity1Type = "<$$entityProxy1Type$$>"; - entity2Name = "<$$entityProxy2Name$$>"; - entity2Type = "<$$entityProxy2Type$$>"; - typeDefGuid = "<$$typeDefGuid$$>"; - } - - public <$$uname$$>(OMRSLine template) { - super(template); - initialise(); - } - public <$$uname$$>(Line template) { - super(template); - initialise(); - } - - public <$$uname$$>(Relationship omrsRelationship) { - super(omrsRelationship); - } - - InstanceProperties obtainInstanceProperties() { - final String methodName = "obtainInstanceProperties"; - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName); - } - InstanceProperties instanceProperties = new InstanceProperties(); - EnumPropertyValue enumTypePropertyValue=null; - <$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // <$$description$$> - enumTypePropertyValue.setOrdinal(<$$EnumName$$>.ordinal()); - enumTypePropertyValue.setSymbolicName(<$$EnumName$$>.name()); - instanceProperties.setProperty("<$$EnumName$$>",enumTypePropertyValue); - $Enum$$> - MapPropertyValue mapTypePropertyValue=null; - <$Map$$ - // <$$description$$> - mapTypePropertyValue = new MapPropertyValue(); - $Map$$> - PrimitivePropertyValue primitiveTypePropertyValue=null; - <$$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - // TODO description + change null to value - primitiveTypePropertyValue.setPrimitiveValue(null); - instanceProperties.setProperty("<$$PropertyName$$>",primitiveTypePropertyValue); - $$$> - if (log.isDebugEnabled()) { - log.debug("<== Method: " + methodName); - } - return instanceProperties; - } - - <$$$ - private <$$PropertyType$$> <$$PropertyName$$>; - /** - * {@literal <$$AttrDescription$$> } - * @return {@code <$$PropertyTypeJavadoc$$> } - */ - public <$$PropertyType$$> get<$$uPropertyName$$>() { - return this.<$$PropertyName$$>; - } - public void set<$$uPropertyName$$>(<$$PropertyType$$> <$$PropertyName$$>) { - this.<$$PropertyName$$> = <$$PropertyName$$>; - } - $$$> - - /** - * <$$uname$$> property names - * @return Set of Strings of the <$$uname$$> property names - */ - public static java.util.Set getPropertyNames() { - return PROPERTY_NAMES_SET; - } - - /** - * <$$uname$$> enum property names - * @return Set of Strings of the <$$uname$$> enum property names - */ - public static java.util.Set getEnumPropertyNames() { - return ENUM_NAMES_SET; - } - /** - * <$$uname$$> map property names - * @return Set of Strings of the <$$uname$$> map property names - */ - public static java.util.Set getMapPropertyNames() { - return MAP_NAMES_SET; - } - - /** - * <$$uname$$> attribute property names - * @return Set of Strings of the <$$uname$$> attribute property names - */ - public static java.util.Set getAttributePropertyNames() { - return ATTRIBUTE_NAMES_SET; - } - - @Override - public StringBuilder toString(StringBuilder sb) - { - if (sb == null) - { - sb = new StringBuilder(); - } - sb.append(" <$$uname$$>="); - sb.append(super.toString(sb)); - sb.append(" <$$uname$$> Attributes{"); - <$Attr$$ - sb.append("<$$AttrName$$>=" + this.<$$AttrName$$> +","); - $Attr$$> - <$Enum$$ - if ( <$$EnumName$$>!=null) { - sb.append("<$$EnumName$$>=" + <$$EnumName$$>.name()); - } - $Enum$$> - sb.append("}"); - return sb; - } - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } - - -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanTopReferenceTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanTopReferenceTemplate deleted file mode 100644 index d0ed0ae8106..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/OmrsBeanTopReferenceTemplate +++ /dev/null @@ -1,195 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.entities.<$$uname$$>; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; - -<$$$ -import org.odpi.openmetadata.fvt.opentypes.references.<$$referencePackage$$>.<$$uPropertyName$$>Reference; -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>; -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>Mapper; -$$$> - -import java.io.Serializable; -import java.util.*; -import org.odpi.openmetadata.fvt.opentypes.common.*; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * References for entity <$$uname$$>. References are relationships represented as an attribute. Exposing relationships information - * as references can make the relationships information more digestable. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class <$$uname$$>References implements Serializable { - private static final Logger log = LoggerFactory.getLogger(<$$uname$$>References.class); - private static final String className = <$$uname$$>References.class.getName(); - - protected static final String[] REFERENCE_NAMES_SET_VALUES = new String[] { - <$$$ - "<$$PropertyName$$>", - $$$> - // Terminate the list - null - }; - - protected static final String[] RELATIONSHIP_NAMES_SET_VALUES = new String[] { - <$$$ - "<$$uRelationshipName$$>", - $$$> - // Terminate the list - null - }; - /** - * We are passed a set of omrs relationships that are associated with a entity <$$uname$$> - * Each of these relationships should map to a reference (a uniquely named attribute in <$$uname$$>). - * - * Relationships have cardinality. There are 2 sorts of cardinality relevant here, whether the relationships can be related to one or many - * entities. - * - * @param lines the relationships lines. - * @param entityGuid The GUID of the entity. - */ - public <$$uname$$>References(String entityGuid, Set lines) { - - if (lines !=null) { - for (Line relationshipLines: lines) { - for (int i=0;i< RELATIONSHIP_NAMES_SET_VALUES.length; i++) { - if (relationshipLines.getName().equals(RELATIONSHIP_NAMES_SET_VALUES[i])) { - String referenceName = REFERENCE_NAMES_SET_VALUES[i]; - - <$SetAttr$$ - if ("<$$setReferenceName$$>".equals(referenceName)) { - <$$uRelationshipName$$> <$$RelationshipName$$>_relationship = (<$$uRelationshipName$$>)relationshipLines; - <$$uSetReferenceName$$>Reference <$$setReferenceName$$>Reference = new <$$uSetReferenceName$$>Reference(entityGuid,<$$RelationshipName$$>_relationship); - if ( <$$setReferenceName$$>== null ) { - <$$setReferenceName$$> = new HashSet<>(); - } - <$$setReferenceName$$>.add(<$$setReferenceName$$>Reference); - } - $SetAttr$$> - - <$SingleAttr$$ - if ("<$$singleReferenceName$$>".equals(referenceName)) { - <$$uRelationshipName$$> <$$RelationshipName$$>_relationship = (<$$uRelationshipName$$>)relationshipLines; - <$$singleReferenceName$$> = new <$$uSingleReferenceName$$>Reference(entityGuid, <$$RelationshipName$$>_relationship); - } - $SingleAttr$$> - } - } - } - } - } - - protected static final Set REFERENCE_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(REFERENCE_NAMES_SET_VALUES))); - // there may be duplicate strings in RELATIONSHIP_NAMES_SET_VALUES, the following line deduplicates the Strings into a Set. - protected static final Set RELATIONSHIP_NAMES_SET = new HashSet<>(new HashSet<>(Arrays.asList(RELATIONSHIP_NAMES_SET_VALUES))); -// Singular properties -<$SingleAttr$$ - private <$$uSingleReferenceName$$>Reference <$$singleReferenceName$$>; -$SingleAttr$$> -// Set properties - -<$SetAttr$$ - private Set<<$$uSetReferenceName$$>Reference> <$$setReferenceName$$>; -$SetAttr$$> - -// List properties -<$ListAttr$$ - private List<<$$uListReferenceName$$>Reference> <$$listReferenceName$$>; -$ListAttr$$> - - // setters and setters -<$SingleAttr$$ - public <$$uSingleReferenceName$$>Reference get<$$uSingleReferenceName$$>Reference() { - return <$$singleReferenceName$$>; } - - public void set<$$uSingleReferenceName$$>Reference(<$$uSingleReferenceName$$>Reference <$$singleReferenceName$$>) { - this.<$$singleReferenceName$$> = <$$singleReferenceName$$>; } -$SingleAttr$$> - -// Sets -<$SetAttr$$ - public Set<<$$uSetReferenceName$$>Reference> get<$$uSetReferenceName$$>References() { - return <$$setReferenceName$$>; - } - - public void set<$$uSetReferenceName$$>References(Set<<$$uSetReferenceName$$>Reference> <$$setReferenceName$$>) { - this.<$$setReferenceName$$> =<$$setReferenceName$$>; - } -$SetAttr$$> - -// Lists -<$ListAttr$$ - public List<<$$uListReferenceName$$>Reference> get<$$uListReferenceName$$>References() { - return <$$listReferenceName$$>; - } - - public void set<$$uListReferenceName$$>References(Set<<$$uListReferenceName$$>Reference> <$$listReferenceName$$>) { - this.<$$listReferenceName$$> =<$$listReferenceName$$>; - } -$ListAttr$$> - - public StringBuilder toString(StringBuilder sb) { - if (sb == null) { - sb = new StringBuilder(); - } - - sb.append("<$$uname$$>References{"); - <$ListAttr$$ - sb.append("<$$listReferenceName$$>Reference='").append(<$$listReferenceName$$>.toString()); - $ListAttr$$> - <$SetAttr$$ - sb.append("<$$setReferenceName$$>Reference='").append(<$$setReferenceName$$>.toString()); - $SetAttr$$> - <$SingleAttr$$ - sb.append("<$$singleReferenceName$$>Reference='").append(<$$singleReferenceName$$>.toString()); - $SingleAttr$$> - - sb.append('}'); - - return sb; - } - - @Override - public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } - if (!super.equals(o)) { return false; } - <$$uname$$>References typedThat = (<$$uname$$>References) o; - // compare single cardinality attributes - <$$$ - if (this.<$$PropertyName$$> != null && !Objects.equals(this.<$$PropertyName$$>,typedThat.<$$PropertyName$$>)) { - return false; - } - $$$> - return false; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode() - <$$$ - ,this.<$$PropertyName$$> - $$$> - ); - } - - @Override - public String toString() { - return toString(new StringBuilder()).toString(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/TestOmrsBeanAccessorTemplate b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/TestOmrsBeanAccessorTemplate deleted file mode 100644 index 6e00eb03c23..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test-generator/src/main/resources/templates/TestOmrsBeanAccessorTemplate +++ /dev/null @@ -1,703 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes. - -package org.odpi.openmetadata.fvt.opentypes.server; - -import java.util.*; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ArrayPropertyValue; -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.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.fvt.opentypes.common.*; -import org.odpi.openmetadata.fvt.opentypes.enums.*; - -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.*; -import static org.testng.Assert.assertEquals; - -<$$$ -import org.odpi.openmetadata.fvt.opentypes.entities.<$$uEntityName$$>.<$$uEntityName$$>; -$$$> - -<$$RELATIONSHIP$ -import org.odpi.openmetadata.fvt.opentypes.relationships.<$$uRelationshipName$$>.<$$uRelationshipName$$>; -$$RELATIONSHIP$> - -public class TestBeansToAccessOMRS { - - @Mock - private OMRSAPIHelper oMRSAPIHelper; - - @BeforeMethod - - public void setup() throws Exception{ - MockitoAnnotations.openMocks(this); - } - <$$$ -@Test - public void testCreate<$$uEntityName$$>() throws Exception { - String testuserid = "userid1"; - String testguid1 = "testcreate<$$uEntityName$$>"; - BeansToAccessOMRS beansToAccessOMRS = new BeansToAccessOMRS(); - - EntityDetail mockEntity = new EntityDetail(); - InstanceProperties instanceProperties = new InstanceProperties(); - - PrimitivePropertyValue primitiveTypePropertyValue; - ArrayPropertyValue arrayTypePropertyValue; - <$$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - <$$AttrType$$> <$$AttrName$$> = <$$AttrValue$$>; - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - $$Attr$$> - - <$$AttrList$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - <$$AttrType$$> <$$AttrName$$> = <$$AttrValue$$>; - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - - arrayTypePropertyValue = new ArrayPropertyValue(); - arrayTypePropertyValue.setArrayCount(1); - arrayTypePropertyValue.setArrayValue(0,primitiveTypePropertyValue); - instanceProperties.setProperty("<$$AttrName$$>", arrayTypePropertyValue); - $$AttrList$$> - - EnumPropertyValue enumTypePropertyValue; - <$$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - enumTypePropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - - $$Enum$$> - - MapPropertyValue mapTypePropertyValue; - // In the models we are generating from we only have map types, this code assumes those types. - PrimitivePropertyValue primitivePropertyValueForMap=null; - InstanceProperties mapValues =null; - - <$$Map$$ - mapTypePropertyValue = new MapPropertyValue(); - primitivePropertyValueForMap = new PrimitivePropertyValue(); - primitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - mapValues = new InstanceProperties(); - mapValues.setProperty("a_new_property_name",primitivePropertyValueForMap); - mapTypePropertyValue.setMapValues(mapValues); - instanceProperties.setProperty("<$$MapName$$>", mapTypePropertyValue); - - $$Map$$> - - mockEntity.setProperties(instanceProperties); - mockEntity.setGUID(testguid1); - mockEntity.setVersion(1L); - InstanceType typeOfEntity = new InstanceType(); - typeOfEntity.setTypeDefName("<$$uEntityName$$>"); - mockEntity.setType(typeOfEntity); - - when( oMRSAPIHelper.callOMRSAddEntity(anyString(),any())).thenReturn(mockEntity); - // set the mock omrs in to the rest file. - beansToAccessOMRS.setOMRSAPIHelper(oMRSAPIHelper); - <$$uEntityName$$> requested<$$uEntityName$$> = new <$$uEntityName$$>(); - SystemAttributes systemAttributes = new SystemAttributes(); - systemAttributes.setGUID(testguid1); - requested<$$uEntityName$$>.setSystemAttributes(systemAttributes); - - <$$Attr$$ - requested<$$uEntityName$$>.set<$$uAttrName$$>(<$$AttrName$$>); - - $$Attr$$> - - <$$Enum$$ - EnumPropertyValue <$$uEnumType$$>EnumPropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - <$$uEnumType$$>EnumPropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", <$$uEnumType$$>EnumPropertyValue); - - requested<$$uEntityName$$>.set<$$uEnumName$$>(<$$uEnumType$$>.values()[0]); - - $$Enum$$> - - Map mapValue=null; - - <$$Map$$ - mapValue = new HashMap<>(); - mapValue.put("a_new_property_name","test string value for map"); - requested<$$uEntityName$$>.set<$$uMapName$$>(mapValue); - $$Map$$> - - <$$uEntityName$$> returned<$$uEntityName$$> = beansToAccessOMRS.create<$$uEntityName$$>(testuserid, requested<$$uEntityName$$>); - <$$Attr$$ - assertEquals(requested<$$uEntityName$$>.get<$$uAttrName$$>(),returned<$$uEntityName$$>.get<$$uAttrName$$>()); - - $$Attr$$> - - <$$Enum$$ - assertEquals(requested<$$uEntityName$$>.get<$$uEnumName$$>(),returned<$$uEntityName$$>.get<$$uEnumName$$>()); - - $$Enum$$> - - <$$Map$$ - assertEquals(requested<$$uEntityName$$>.get<$$uMapName$$>(),returned<$$uEntityName$$>.get<$$uMapName$$>()); - - $$Map$$> - - } - @Test - public void testGet<$$uEntityName$$>() throws Exception { - String testuserid = "userid1"; - String testguid1 = "testcallOMRSGetEntity-<$$uEntityName$$>-guid"; - BeansToAccessOMRS beansToAccessOMRS = new BeansToAccessOMRS(); - - EntityDetail mockEntity = new EntityDetail(); - - InstanceProperties instanceProperties = new InstanceProperties(); - - PrimitivePropertyValue primitiveTypePropertyValue; - <$$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - <$$AttrType$$> <$$AttrName$$> = <$$AttrValue$$>; - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - $$Attr$$> - - EnumPropertyValue enumTypePropertyValue; - <$$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - enumTypePropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - - $$Enum$$> - - MapPropertyValue mapTypePropertyValue =null; - // In the models we are generating from we only have map types, this code assumes those types. - - PrimitivePropertyValue primitivePropertyValueForMap=null; - InstanceProperties mapValues=null; - <$$Map$$ - mapTypePropertyValue = new MapPropertyValue(); - primitivePropertyValueForMap = new PrimitivePropertyValue(); - primitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - mapValues = new InstanceProperties(); - mapValues.setProperty("a_new_property_name",primitivePropertyValueForMap); - mapTypePropertyValue.setMapValues(mapValues); - instanceProperties.setProperty("<$$uMapName$$>", mapTypePropertyValue); - - $$Map$$> - - mockEntity.setProperties(instanceProperties); - mockEntity.setGUID(testguid1); - mockEntity.setVersion(1L); - InstanceType typeOfEntity = new InstanceType(); - typeOfEntity.setTypeDefName("<$$uEntityName$$>"); - mockEntity.setType(typeOfEntity); - - when( oMRSAPIHelper.callOMRSGetEntityByGuid(anyString(),anyString())).thenReturn(mockEntity); - // set the mock omrs in to the rest file. - beansToAccessOMRS.setOMRSAPIHelper(oMRSAPIHelper); - <$$uEntityName$$> <$$EntityName$$>Entity = beansToAccessOMRS.get<$$uEntityName$$>(testuserid, testguid1); - <$$Attr$$ - assertEquals(<$$EntityName$$>Entity.get<$$uAttrName$$>(),<$$AttrName$$>); - $$Attr$$> - - } - @Test - public void testUpdate<$$uEntityName$$>() throws Exception { - String testuserid = "userid1"; - String testguid1 = "testUpdate<$$uEntityName$$>"; - BeansToAccessOMRS beansToAccessOMRS = new BeansToAccessOMRS(); - - EntityDetail mockEntity = new EntityDetail(); - InstanceProperties instanceProperties = new InstanceProperties(); - - PrimitivePropertyValue primitiveTypePropertyValue; - <$$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - <$$AttrType$$> <$$AttrName$$> = <$$AttrValue$$>; - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - $$Attr$$> - - EnumPropertyValue enumTypePropertyValue; - <$$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - enumTypePropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - - $$Enum$$> - - MapPropertyValue mapTypePropertyValue; - // In the models we are generating from we only have map types, this code assumes those types. - PrimitivePropertyValue primitivePropertyValueForMap=null; - InstanceProperties mapValues =null; - - <$$Map$$ - mapTypePropertyValue = new MapPropertyValue(); - primitivePropertyValueForMap = new PrimitivePropertyValue(); - primitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - mapValues = new InstanceProperties(); - mapValues.setProperty("a_new_property_name",primitivePropertyValueForMap); - mapTypePropertyValue.setMapValues(mapValues); - instanceProperties.setProperty("<$$MapName$$>", mapTypePropertyValue); - - $$Map$$> - - mockEntity.setProperties(instanceProperties); - mockEntity.setGUID(testguid1); - mockEntity.setVersion(1L); - InstanceType typeOfEntity = new InstanceType(); - typeOfEntity.setTypeDefName("<$$uEntityName$$>"); - mockEntity.setType(typeOfEntity); - - when( oMRSAPIHelper.callOMRSUpdateEntity(anyString(),any())).thenReturn(mockEntity); - // set the mock omrs in to the rest file. - beansToAccessOMRS.setOMRSAPIHelper(oMRSAPIHelper); - <$$uEntityName$$> requested<$$uEntityName$$> = new <$$uEntityName$$>(); - SystemAttributes systemAttributes = new SystemAttributes(); - systemAttributes.setGUID(testguid1); - requested<$$uEntityName$$>.setSystemAttributes(systemAttributes); - - <$$Attr$$ - requested<$$uEntityName$$>.set<$$uAttrName$$>(<$$AttrName$$>); - - $$Attr$$> - - <$$Enum$$ - EnumPropertyValue <$$uEnumType$$>EnumPropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - <$$uEnumType$$>EnumPropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", <$$uEnumType$$>EnumPropertyValue); - - requested<$$uEntityName$$>.set<$$uEnumName$$>(<$$uEnumType$$>.values()[0]); - - $$Enum$$> - - - PrimitivePropertyValue testPrimitivePropertyValueForMap=null; - InstanceProperties testMapValues =null; - MapPropertyValue testMapPropertyValue=null; - Map mapValue=null; - - <$$Map$$ - testMapPropertyValue = new MapPropertyValue(); - - testPrimitivePropertyValueForMap = new PrimitivePropertyValue(); - testPrimitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - testPrimitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - testMapValues = new InstanceProperties(); - testMapValues.setProperty("a_new_property_name",testPrimitivePropertyValueForMap); - - mapValue = new HashMap<>(); - mapValue.put("a_new_property_name","test string value for map"); - requested<$$uEntityName$$>.set<$$uMapName$$>(mapValue); - $$Map$$> - - <$$uEntityName$$> returned<$$uEntityName$$> = beansToAccessOMRS.update<$$uEntityName$$>(testuserid,requested<$$uEntityName$$>); - <$$Attr$$ - assertEquals(requested<$$uEntityName$$>.get<$$uAttrName$$>(),returned<$$uEntityName$$>.get<$$uAttrName$$>()); - - $$Attr$$> - - <$$Enum$$ - assertEquals(requested<$$uEntityName$$>.get<$$uEnumName$$>(),returned<$$uEntityName$$>.get<$$uEnumName$$>()); - - $$Enum$$> - - <$$Map$$ - assertEquals(requested<$$uEntityName$$>.get<$$uMapName$$>(),returned<$$uEntityName$$>.get<$$uMapName$$>()); - - $$Map$$> - - } - $$$> - - <$$RELATIONSHIP$ - - @Test - public void testCreate<$$uRelationshipName$$>() throws Exception { - String testuserid = "userid1"; - String testguid1 = "testcreate<$$uRelationshipName$$>"; - BeansToAccessOMRS beansToAccessOMRS = new BeansToAccessOMRS(); - - Relationship mockRelationship = new Relationship(); - InstanceProperties instanceProperties = new InstanceProperties(); - - PrimitivePropertyValue primitiveTypePropertyValue; - <$$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - <$$AttrType$$> <$$AttrName$$> = <$$AttrValue$$>; - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - $$Attr$$> - - EnumPropertyValue enumTypePropertyValue; - <$$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - enumTypePropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - - $$Enum$$> - - MapPropertyValue mapTypePropertyValue; - PrimitivePropertyValue primitivePropertyValueForMap; - InstanceProperties mapValues; - // In the models we are generating from we only have map types, this code assumes those types. - <$$Map$$ - mapTypePropertyValue = new MapPropertyValue(); - primitivePropertyValueForMap = new PrimitivePropertyValue(); - primitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - mapValues = new InstanceProperties(); - mapValues.setProperty("a_new_property_name",primitivePropertyValueForMap); - mapTypePropertyValue.setMapValues(mapValues); - instanceProperties.setProperty("<$$uMapName$$>", mapTypePropertyValue); - - $$Map$$> - - mockRelationship.setProperties(instanceProperties); - mockRelationship.setGUID(testguid1); - mockRelationship.setVersion(1L); - InstanceType typeOfRelationship = new InstanceType(); - typeOfRelationship.setTypeDefName("<$$uRelationshipName$$>"); - mockRelationship.setType(typeOfRelationship); - EntityProxy entityProxy1 = new EntityProxy(); - EntityProxy entityProxy2 = new EntityProxy(); - InstanceType type1 = new InstanceType(); - type1.setTypeDefName("<$$uRelationshipEntityType1$$>"); - InstanceType type2 = new InstanceType(); - type2.setTypeDefName("<$$uRelationshipEntityType2$$>"); - entityProxy1.setType(type1); - entityProxy2.setType(type2); - mockRelationship.setEntityOneProxy(entityProxy1); - mockRelationship.setEntityTwoProxy(entityProxy2); - - when( oMRSAPIHelper.callOMRSAddRelationship(anyString(),any())).thenReturn(mockRelationship); - // set the mock omrs in to the rest file. - beansToAccessOMRS.setOMRSAPIHelper(oMRSAPIHelper); - <$$uRelationshipName$$> requested<$$uRelationshipName$$> = new <$$uRelationshipName$$>(); - SystemAttributes systemAttributes = new SystemAttributes(); - systemAttributes.setVersion(1L); - requested<$$uRelationshipName$$>.setSystemAttributes(systemAttributes); - - <$$Attr$$ - requested<$$uRelationshipName$$>.set<$$uAttrName$$>(<$$AttrName$$>); - - $$Attr$$> - - <$$Enum$$ - EnumPropertyValue <$$uEnumType$$>EnumPropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - <$$uEnumType$$>EnumPropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", <$$uEnumType$$>EnumPropertyValue); - - requested<$$uRelationshipName$$>.set<$$uEnumName$$>(<$$uEnumType$$>.values()[0]); - - $$Enum$$> - - MapPropertyValue testMapPropertyValue = null; - InstanceProperties testMapValues =null; - PrimitivePropertyValue testPrimitivePropertyValueForMap=null; - <$$Map$$ - testMapPropertyValue = new MapPropertyValue(); - - testPrimitivePropertyValueForMap = new PrimitivePropertyValue(); - testPrimitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - testPrimitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - testMapValues = new InstanceProperties(); - testMapValues.setProperty("a_new_property_name",testPrimitivePropertyValueForMap); - - testMapPropertyValue.setMapValues(mapValues); - instanceProperties.setProperty("<$$uMapName$$>", testMapPropertyValue); - $$Map$$> - - <$$uRelationshipName$$> returned<$$uRelationshipName$$> = beansToAccessOMRS.create<$$uRelationshipName$$>Relationship(testuserid, requested<$$uRelationshipName$$>); - <$$Attr$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uAttrName$$>(),returned<$$uRelationshipName$$>.get<$$uAttrName$$>()); - - $$Attr$$> - - <$$Enum$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uEnumName$$>(),returned<$$uRelationshipName$$>.get<$$uEnumName$$>()); - - $$Enum$$> - - <$$Map$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uMapName$$>(),returned<$$uRelationshipName$$>.get<$$uMapName$$>()); - - $$Map$$> - - } - - @Test - public void testGet<$$uRelationshipName$$>() throws Exception { - String testuserid = "userid1"; - String testguid1 = "testGet<$$uRelationshipName$$>"; - BeansToAccessOMRS beansToAccessOMRS = new BeansToAccessOMRS(); - - Relationship mockRelationship = new Relationship(); - InstanceProperties instanceProperties = new InstanceProperties(); - - PrimitivePropertyValue primitiveTypePropertyValue; - <$$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - <$$AttrType$$> <$$AttrName$$> = <$$AttrValue$$>; - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - $$Attr$$> - - EnumPropertyValue enumTypePropertyValue; - <$$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - enumTypePropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - - $$Enum$$> - - // In the models we are generating from we only have map types, this code assumes those types. - MapPropertyValue mapTypePropertyValue = null; - InstanceProperties mapValues =null; - PrimitivePropertyValue primitivePropertyValueForMap =null; - - <$$Map$$ - mapTypePropertyValue = new MapPropertyValue(); - primitivePropertyValueForMap = new PrimitivePropertyValue(); - primitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - mapValues = new InstanceProperties(); - mapValues.setProperty("a_new_property_name",primitivePropertyValueForMap); - mapTypePropertyValue.setMapValues(mapValues); - instanceProperties.setProperty("<$$uMapName$$>", mapTypePropertyValue); - - $$Map$$> - - mockRelationship.setProperties(instanceProperties); - mockRelationship.setGUID(testguid1); - mockRelationship.setVersion(1L); - InstanceType typeOfRelationship = new InstanceType(); - typeOfRelationship.setTypeDefName("<$$uRelationshipName$$>"); - mockRelationship.setType(typeOfRelationship); - - EntityProxy entityProxy1 = new EntityProxy(); - EntityProxy entityProxy2 = new EntityProxy(); - InstanceType type1 = new InstanceType(); - type1.setTypeDefName("<$$uRelationshipEntityType1$$>"); - InstanceType type2 = new InstanceType(); - type2.setTypeDefName("<$$uRelationshipEntityType2$$>"); - entityProxy1.setType(type1); - entityProxy2.setType(type2); - mockRelationship.setEntityOneProxy(entityProxy1); - mockRelationship.setEntityTwoProxy(entityProxy2); - - when( oMRSAPIHelper.callOMRSGetRelationshipByGuid(anyString(),anyString())).thenReturn(mockRelationship); - // set the mock omrs in to the rest file. - beansToAccessOMRS.setOMRSAPIHelper(oMRSAPIHelper); - <$$uRelationshipName$$> requested<$$uRelationshipName$$> = new <$$uRelationshipName$$>(); - - <$$Attr$$ - requested<$$uRelationshipName$$>.set<$$uAttrName$$>(<$$AttrName$$>); - - $$Attr$$> - - <$$Enum$$ - EnumPropertyValue <$$uEnumType$$>EnumPropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - <$$uEnumType$$>EnumPropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", <$$uEnumType$$>EnumPropertyValue); - - requested<$$uRelationshipName$$>.set<$$uEnumName$$>(<$$uEnumType$$>.values()[0]); - - $$Enum$$> - MapPropertyValue testMapPropertyValue = null; - InstanceProperties testMapValues =null; - PrimitivePropertyValue testPrimitivePropertyValueForMap=null; - MapPropertyValue testMapPropertyValue = null; - - <$$Map$$ - testMapPropertyValue = new MapPropertyValue(); - testPrimitivePropertyValueForMap = new PrimitivePropertyValue(); - testPrimitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - testPrimitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - testMapValues = new InstanceProperties(); - testMapValues.setProperty("a_new_property_name",testPrimitivePropertyValueForMap); - - testMapPropertyValue.setMapValues(testMapValues); - instanceProperties.setProperty("<$$uMapName$$>", testMapPropertyValue); - $$Map$$> - - <$$uRelationshipName$$> returned<$$uRelationshipName$$> = beansToAccessOMRS.get<$$uRelationshipName$$>Relationship(testuserid, testguid1); - <$$Attr$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uAttrName$$>(),returned<$$uRelationshipName$$>.get<$$uAttrName$$>()); - - $$Attr$$> - - <$$Enum$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uEnumName$$>(),returned<$$uRelationshipName$$>.get<$$uEnumName$$>()); - - $$Enum$$> - - <$$Map$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uMapName$$>(),returned<$$uRelationshipName$$>.get<$$uMapName$$>()); - - $$Map$$> - - } - @Test - public void testUpdate<$$uRelationshipName$$>() throws Exception { - String testuserid = "userid1"; - String testguid1 = "testUpdate<$$uRelationshipName$$>"; - BeansToAccessOMRS beansToAccessOMRS = new BeansToAccessOMRS(); - - Relationship mockRelationship = new Relationship(); - InstanceProperties instanceProperties = new InstanceProperties(); - - PrimitivePropertyValue primitiveTypePropertyValue; - <$$Attr$$ - primitiveTypePropertyValue = new PrimitivePropertyValue(); - primitiveTypePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_<$$uAttrType$$>); - <$$AttrType$$> <$$AttrName$$> = <$$AttrValue$$>; - primitiveTypePropertyValue.setPrimitiveValue(<$$AttrName$$>); - instanceProperties.setProperty("<$$AttrName$$>", primitiveTypePropertyValue); - $$Attr$$> - - EnumPropertyValue enumTypePropertyValue; - <$$Enum$$ - enumTypePropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - enumTypePropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", enumTypePropertyValue); - - $$Enum$$> - - MapPropertyValue mapTypePropertyValue=null; - PrimitivePropertyValue primitivePropertyValueForMap = null; - InstanceProperties mapValues =null; - - // In the models we are generating from we only have map types, this code assumes those types. - <$$Map$$ - mapTypePropertyValue = new MapPropertyValue(); - primitivePropertyValueForMap = new PrimitivePropertyValue(); - primitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - mapValues = new InstanceProperties(); - mapValues.setProperty("a_new_property_name",primitivePropertyValueForMap); - mapTypePropertyValue.setMapValues(mapValues); - instanceProperties.setProperty("<$$uMapName$$>", mapTypePropertyValue); - - $$Map$$> - - mockRelationship.setProperties(instanceProperties); - mockRelationship.setGUID(testguid1); - mockRelationship.setVersion(1L); - InstanceType typeOfRelationship = new InstanceType(); - typeOfRelationship.setTypeDefName("<$$uRelationshipName$$>"); - mockRelationship.setType(typeOfRelationship); - - EntityProxy entityProxy1 = new EntityProxy(); - EntityProxy entityProxy2 = new EntityProxy(); - InstanceType type1 = new InstanceType(); - type1.setTypeDefName("<$$uRelationshipEntityType1$$>"); - InstanceType type2 = new InstanceType(); - type2.setTypeDefName("<$$uRelationshipEntityType2$$>"); - entityProxy1.setType(type1); - entityProxy2.setType(type2); - mockRelationship.setEntityOneProxy(entityProxy1); - mockRelationship.setEntityTwoProxy(entityProxy2); - - when( oMRSAPIHelper.callOMRSUpdateRelationship(anyString(),any())).thenReturn(mockRelationship); - // set the mock omrs in to the rest file. - beansToAccessOMRS.setOMRSAPIHelper(oMRSAPIHelper); - <$$uRelationshipName$$> requested<$$uRelationshipName$$> = new <$$uRelationshipName$$>(); - - <$$Attr$$ - requested<$$uRelationshipName$$>.set<$$uAttrName$$>(<$$AttrName$$>); - - $$Attr$$> - - <$$Enum$$ - EnumPropertyValue <$$uEnumType$$>EnumPropertyValue = new EnumPropertyValue(); - // get the name of the first enumeration value as a sample data. - <$$uEnumType$$>EnumPropertyValue.setSymbolicName(<$$uEnumType$$>.values()[0].name()); - instanceProperties.setProperty("<$$EnumName$$>", <$$uEnumType$$>EnumPropertyValue); - - requested<$$uRelationshipName$$>.set<$$uEnumName$$>(<$$uEnumType$$>.values()[0]); - - $$Enum$$> - - PrimitivePropertyValue testPrimitivePropertyValueForMap=null; - InstanceProperties testMapValues =null; - MapPropertyValue testMapPropertyValue = null; - - <$$Map$$ - testMapPropertyValue = new MapPropertyValue(); - - testPrimitivePropertyValueForMap= new PrimitivePropertyValue(); - testPrimitivePropertyValueForMap.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - testPrimitivePropertyValueForMap.setPrimitiveValue("test string value for map"); - - testMapValues = new InstanceProperties(); - testMapValues.setProperty("a_new_property_name",testPrimitivePropertyValueForMap); - - testMapPropertyValue.setMapValues(testMapValues); - instanceProperties.setProperty("<$$uMapName$$>", testMapPropertyValue); - $$Map$$> - - SystemAttributes systemAttributes = new SystemAttributes(); - systemAttributes.setVersion(1L); - requested<$$uRelationshipName$$>.setSystemAttributes(systemAttributes); - - - <$$uRelationshipName$$> returned<$$uRelationshipName$$> = beansToAccessOMRS.update<$$uRelationshipName$$>Relationship(testuserid, requested<$$uRelationshipName$$>); - <$$Attr$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uAttrName$$>(),returned<$$uRelationshipName$$>.get<$$uAttrName$$>()); - - $$Attr$$> - - <$$Enum$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uEnumName$$>(),returned<$$uRelationshipName$$>.get<$$uEnumName$$>()); - - $$Enum$$> - - <$$Map$$ - assertEquals(requested<$$uRelationshipName$$>.get<$$uMapName$$>(),returned<$$uRelationshipName$$>.get<$$uMapName$$>()); - - $$Map$$> - - } - $$RELATIONSHIP$> -} diff --git a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test/build.gradle b/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test/build.gradle deleted file mode 100644 index bae674e3ef5..00000000000 --- a/open-metadata-test/open-metadata-fvt/open-types-fvt/open-types-test/build.gradle +++ /dev/null @@ -1,50 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'org.slf4j:slf4j-api' - implementation 'com.fasterxml.jackson.core:jackson-databind' - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-resources:open-metadata-archives:open-metadata-types') - implementation project(':open-metadata-test:open-metadata-fvt:open-types-fvt:open-types-test-generator') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - - testImplementation 'org.mockito:mockito-core' - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testImplementation 'org.junit.jupiter:junit-jupiter-params' - testImplementation 'org.junit.jupiter:junit-jupiter-engine' - testImplementation 'org.testng:testng' - -} - -description = 'Open Types Test' - -test { - useTestNG() -} - -java { - // no javadoc for this module - //withJavadocJar() -} - -task cleanGeneratedSrc(type: Delete) { - delete 'src' -} - -clean.dependsOn(cleanGeneratedSrc) - -task createTestSrc(type: Exec) { - dependsOn ':open-metadata-test:open-metadata-fvt:open-types-fvt:open-types-test-generator:shadowJar' - group = "Execution" - description = "Create test source" - workingDir '../../../..' - commandLine "java", "-jar", "${project.projectDir}/../open-types-test-generator/build/libs/open-types-test-generator-${project.version}-jar-with-dependencies.jar" -} - -compileJava.dependsOn(createTestSrc) diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/README.md b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/README.md deleted file mode 100644 index 42968f1b09e..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/README.md +++ /dev/null @@ -1,26 +0,0 @@ - - - -# Glossary Author View Services FVT Resources - -The resources to run Glossary Author View Services (OMVS) FVT. - -There are a number of ways of running the Subject Area OMVS FVTs - -In a development environment: -* Each file ending in FVT has a main that can be run. This runs the FVT against 2 has hard coded server names -* RunAllFVTOn2Servers. This runs all the FVT against 2 has hard coded server names. It prompts for the url and userid. -* RunAllFVT runs all the FVTs against the supplied serverName, url and userId. - -Each FVT file has a static runIt method that runs the FVT with the supplied server name , url and userid. - -As part of a maven install the FVTs are automatically run. The maven install calls each of the runIt methods in turn abd runs them against an OMAG Server started in a docker container. - - - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/build.gradle deleted file mode 100644 index 8d497ef5cd0..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/build.gradle +++ /dev/null @@ -1,139 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -plugins { - // Include plug-in for starting a new process - id 'com.github.psxpaul.execfork' - id 'java' -} - -apply plugin: "com.github.psxpaul.execfork" -apply plugin: 'groovy' - -dependencies { - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-server') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-server') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-api') - implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-client') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') //':org.odpi.openmetadata.adminservices.configuration.properties') - - testImplementation project(':open-metadata-distribution:omag-server-platform') - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testImplementation 'org.junit.jupiter:junit-jupiter-engine' - testImplementation localGroovy() - compileOnly 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'org.springframework:spring-core' - implementation 'org.springframework:spring-web' - - - testImplementation("org.junit.jupiter:junit-jupiter-params") - implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') - testImplementation 'org.apache.commons:commons-lang3' - testImplementation project(':open-metadata-test:open-metadata-fvt:fvt-utilities') -} - -description = 'Glossary Author OMVS FVT' - -java { - withJavadocJar() -} - -// Local properties to use -ext - { - distdir="../../../../../../open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${project.version}-distribution.tar.gz" - gaport="10454" - } - - -// Build the groovy test script -sourceSets.test.java.srcDirs = [] -sourceSets.test.groovy.srcDirs = ["src/test/java", "src/test/script"] - -// Initially we launch as an app -- though there may be a better way of running this in the existing jvm -task startPlatform(dependsOn: ['cleanData',':open-metadata-distribution:omag-server-platform:unzip','prepareDirs'], type: com.github.psxpaul.task.ExecFork) { - // Start some external service - executable = System.properties.'java.home' + '/bin/java' - workingDir = layout.buildDirectory.dir('run') - - // the keystore is needed as for the FVT the glossary author view is a client for the subject ares service - //remove the two -Dlogging args if you dont want debug level of logging - args = [ "-Dserver.port=${gaport}", - "-Dloader.path=${distdir}/assembly/platform/lib", - "-Dspring.config.location=../../../../../../test.application.properties", -// "-Dserver.ssl.key-store=${distDir}/keystore.p12", -// "-Dserver.ssl.key-store-password=egeria", -// "-Djavax.net.debug=ssl:handshake:verbose:keymanager:trustmanager", //Troubleshooting removeLater -// "-Dlogging.level.org.apache.tomcat=DEBUG" , -// "-Dlogging.level.org.apache.catalina=DEBUG", -// "-Dlogging.level.org.odpi.openmetadata.viewservices.glossaryauthor.server=DEBUG", -//added for IDE Debug, to debug server code -/* "-Xdebug", - "-Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n",*/ -//End debug options - "-jar", - "${distdir}/assembly/platform/omag-server-platform-${project.version}.jar" ] - // Setting the output directories to be the same for ALL FVTs acts as a synchronization mechanism - // - alternatively we need to ensure the server port is unique per test - standardOutput = layout.buildDirectory.file("chassis.log") - errorOutput = layout.buildDirectory.file("chassis-error.log") - stopAfter = test - waitForPort = Integer.valueOf(gaport) - timeout = 180 - //waitForOutput = 'has started' -} - -// Configuration of the platform - -task configServer(dependsOn: ['startPlatform','classes'], type: JavaExec) { - mainClass = 'configureStartServer' - classpath = sourceSets.test.runtimeClasspath - //TODO: These parms aren't currently correctly passed. We rely on defaults in the script - systemProperties = [ - 'name': 'Egeria chassis', - 'baseURL': 'https://localhost:' + gaport, - 'servermem': 'serverinmem', - 'serverview': 'serverview', - 'delay': '2', - 'user': 'garygeeke' - ] -} - -task prepareDirs { - mustRunAfter clean - doLast { - mkdir layout.buildDirectory.dir('run') - } -} - -task cleanData(type: Delete) { - delete files("${buildDir}/run/data") -} - -// The actual tests (Integration only) -test { - description 'Run Integration Tests' -// test.debug = true // -- to debug in IDE - group = 'verification' - outputs.upToDateWhen {return false} - systemProperties = [ - 'fvt.url': 'https://localhost:'+ gaport, -// 'javax.net.debug':'ssl:handshake:verbose:keymanager:trustmanager' -// 'logging.level.org.springframework.web.client.RestTemplate':'DEBUG' - ] - useJUnitPlatform() - testLogging.showStandardStreams = true - dependsOn configServer - -} - -// Resolves logging conflict with Jena -loggingCapabilities { - enforceLogback()// Configuration goes here -} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CategoryFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CategoryFVT.java deleted file mode 100644 index 325e7c88f7b..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CategoryFVT.java +++ /dev/null @@ -1,630 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.category.GlossaryAuthorViewCategoryClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.*; - -/** - * FVT resource to call Glossary Author View category API - */ -public class CategoryFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for category sample"; - private static final String DEFAULT_TEST_GLOSSARY_NAME2 = "Test Glossary for category sample 2"; - private static final String DEFAULT_TEST_CATEGORY_NAME = "Test category A"; - private static final String DEFAULT_TEST_CATEGORY_NAME_UPDATED = "Test category A updated"; - private static final String DEFAULT_TEST_CATEGORY_NAME2 = "Test category B"; - private static final String DEFAULT_TEST_CATEGORY_NAME3 = "Test category C"; - private static final String DEFAULT_TEST_CATEGORY_A_CHILD = "Test category A child"; - private SubjectAreaNodeClient subjectAreaCategory = null; - private GlossaryAuthorViewCategoryClient glossaryAuthorViewCategoryClient = null; - private GlossaryFVT glossaryFVT = null; - private String serverName = null; - private String userId = null; - private int existingCategoryCount = 0; - private static Logger log = LoggerFactory.getLogger(CategoryFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingCategories - */ - private Set createdCategoriesSet = new HashSet<>(); - - public static void main(String[] args) { - String url; - try { - url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("The FVT Encountered an Exception", e); - } - - } - - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public CategoryFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewRestClient glossaryAuthorViewRestClient = new GlossaryAuthorViewRestClient(serverName, url); - glossaryAuthorViewCategoryClient = new GlossaryAuthorViewCategoryClient(glossaryAuthorViewRestClient); - - glossaryFVT = new GlossaryFVT(url, serverName, userId); - this.serverName = serverName; - this.userId = userId; - existingCategoryCount = findCategories("", false, false).size(); - if (log.isDebugEnabled()) { - log.debug("existingCategoryCount " + existingCategoryCount); - } - } - - public static void runIt(String url, String serverName, String userId) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try { - System.out.println("CategoryFVT runIt started"); - CategoryFVT fvt = new CategoryFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("CategoryFVT runIt stopped"); - } - catch (Exception error) { - error.printStackTrace(); - throw error; - } - } - public static int getCategoryCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - CategoryFVT fvt = new CategoryFVT(url, serverName, userId); - return fvt.findCategories("", false, false).size(); - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create a category1"); - } - Category category1 = createCategoryWithGlossaryGuid(serverName + " " + DEFAULT_TEST_CATEGORY_NAME, glossary.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Create a category2"); - } - Category category2 = createCategoryWithGlossaryGuid(serverName + " " + DEFAULT_TEST_CATEGORY_NAME2, glossary.getSystemAttributes().getGUID()); - - FVTUtils.validateNode(category1); - FVTUtils.validateNode(category2); - - FindRequest findRequest = new FindRequest(); - //findRequest.setPageSize(10); - List results = glossaryFVT.getCategories(glossaryGuid, findRequest, true); - if (results.size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 back on getGlossaryCategories onlyTop true" + results.size()); - } - results = glossaryFVT.getCategories(glossaryGuid, findRequest, false); - if (results.size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 back on getGlossaryCategories " + results.size()); - } - findRequest.setPageSize(1); - results = glossaryFVT.getCategories(glossaryGuid, findRequest, false); - if (results.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on getGlossaryCategories with page size 1, got " + results.size()); - } - Category categoryChild = createCategoryWithParentGlossary(DEFAULT_TEST_CATEGORY_A_CHILD, category1, glossaryGuid); - FVTUtils.validateNode(categoryChild); - findRequest.setPageSize(null); - results = glossaryFVT.getCategories(glossaryGuid, findRequest, true); - if (results.size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 top categories back on getGlossaryCategories " + results.size()); - } - results = glossaryFVT.getCategories(glossaryGuid, findRequest, false); - if (results.size() != 3) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected all 3 categories getGlossaryCategories " + results.size()); - } - - String category1Guid = category1.getSystemAttributes().getGUID(); - - List children = getCategoryChildren(category1Guid); - if (children.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 Category as the child " + children.size()); - } - - deleteCategory(categoryChild.getSystemAttributes().getGUID()); - children = getCategoryChildren(category1Guid); - if (children.size() != 0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 Categories as the child has been deleted " + children.size()); - } - - Category categoryForUpdate = new Category(); - categoryForUpdate.setName(serverName + " " + DEFAULT_TEST_CATEGORY_NAME_UPDATED); - if (log.isDebugEnabled()) { - log.debug("Get the category1"); - } - String guid = category1Guid; - Category gotCategory = getCategoryByGUID(guid); - FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Update the category1"); - } - Category updatedCategory = updateCategory(guid, categoryForUpdate); - FVTUtils.validateNode(updatedCategory); - if (log.isDebugEnabled()) { - log.debug("Get the category1 again"); - } - gotCategory = getCategoryByGUID(guid); - FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Delete the category1"); - } - deleteCategory(guid); - //FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Restore the category1"); - } - gotCategory = restoreCategory(guid); - FVTUtils.validateNode(gotCategory); - if (log.isDebugEnabled()) { - log.debug("Delete the category1"); - } - deleteCategory(guid); - //FVTUtils.validateNode(gotCategory); - // create category DEFAULT_TEST_CATEGORY_NAME3 with parent - if (log.isDebugEnabled()) { - log.debug("Create a category with a parent category"); - } - Category category3 = createCategoryWithParentGlossaryGuid(serverName + " " + DEFAULT_TEST_CATEGORY_NAME3, category2.getSystemAttributes().getGUID(), glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(category3); - - if (log.isDebugEnabled()) { - log.debug("create categories to find"); - } - results = findCategories("zzz"); - if (results.size() != 0) { - for (Category result : results) { - System.err.println("pre result name " + result.getName()); - System.err.println("pre result guid " + result.getSystemAttributes().getGUID()); - if ( result.getParentCategory() != null) { - System.err.println("pre result parent cat name " + result.getParentCategory().getName()); - } - } - } - - - Category categoryForFind1 = getCategoryForInput("abc", glossaryGuid); - categoryForFind1.setQualifiedName("iii"); - categoryForFind1 = issueCreateCategory(categoryForFind1); - FVTUtils.validateNode(categoryForFind1); - Category categoryForFind2 = createCategory("iii", glossaryGuid); - FVTUtils.validateNode(categoryForFind2); - Category categoryForFind3ForInput = getCategoryForInput("jjj", glossaryGuid); - categoryForFind3ForInput.setDescription("This is a description for jjj"); - Category categoryForFind3 = issueCreateCategory(categoryForFind3ForInput); - FVTUtils.validateNode(categoryForFind3); - Category categoryForFind4 = createCategory("This is a Category with spaces in name", glossaryGuid); - FVTUtils.validateNode(categoryForFind4); - - results = findCategories("jjj"); - if (results.size() != 1) { - System.err.println("categoryForFind3 name " + categoryForFind3.getName()); - for (Category result: results) { - System.err.println("result name " + result.getName()); - System.err.println("result desc " + result.getDescription()); - System.err.println("result guid " + result.getSystemAttributes().getGUID()); - } - - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find for jjj got " + results.size()); - } - results = findCategories("iii"); - if (results.size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 back on the find got " + results.size()); - } - results = findCategories(null); - if (results.size() != 6 + existingCategoryCount) { - for (Category result: results) { - System.err.println("result name " + result.getName()); - System.err.println("result desc " + result.getDescription()); - System.err.println("result guid " + result.getSystemAttributes().getGUID()); - } - throw new GlossaryAuthorFVTCheckedException("ERROR1: Expected 6 back on the find got " + results.size() + " 6 + existing=" + (existingCategoryCount)); - } - - results = glossaryAuthorViewCategoryClient.findAll(userId); - if (results.size() != 6 + existingCategoryCount) { - for (Category result: results) { - System.err.println("result name " + result.getName()); - System.err.println("result desc " + result.getDescription()); - System.err.println("result guid " + result.getSystemAttributes().getGUID()); - } - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 6 back on the find got " + results.size()); - } - //soft delete a category and check it is not found - deleteCategory(categoryForFind2.getSystemAttributes().getGUID()); - results = findCategories("iii"); - if (results.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find for yyy got " + results.size()); - } - - // search for a category with a name with spaces in - results = findCategories("This is a Category with spaces in name"); - if (results.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find for Category with spaces in name got " + results.size()); - } - // make sure there is a category with the name - createCategory(DEFAULT_TEST_CATEGORY_NAME, glossaryGuid); - Category categoryForUniqueQFN2= createCategory(DEFAULT_TEST_CATEGORY_NAME, glossaryGuid); - if (categoryForUniqueQFN2 == null || categoryForUniqueQFN2.getQualifiedName().length() == 0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected qualified name to be set"); - } - deleteCategory(categoryForFind1.getSystemAttributes().getGUID()); - deleteCategory(categoryForFind3.getSystemAttributes().getGUID()); - deleteCategory(categoryForFind4.getSystemAttributes().getGUID()); - deleteCategory(categoryForUniqueQFN2.getSystemAttributes().getGUID()); - - testHierarchyWithSearchCriteria(); - - return; - } - - private void testHierarchyWithSearchCriteria() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME2); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create a ttt"); - } - Category parentCategory = createCategoryWithGlossaryGuid("ttt", glossary.getSystemAttributes().getGUID()); - String parentGuid = parentCategory.getSystemAttributes().getGUID(); - - Set childGuids = new HashSet<>(); - // create 6 children - for (int i=0;i<3;i++) { - Category cat1 = createCategoryWithParentGlossaryGuid("mm" + i, parentGuid, glossaryGuid); - childGuids.add(cat1.getSystemAttributes().getGUID()); - Category cat2 =createCategoryWithParentGlossaryGuid("nn" + i, parentGuid, glossaryGuid); - childGuids.add(cat2.getSystemAttributes().getGUID()); - // create a grandchild of cat1 with the same name - Category grandchild =createCategoryWithParentGlossaryGuid("mm" + i, cat1.getSystemAttributes().getGUID(), glossaryGuid); - childGuids.add(grandchild.getSystemAttributes().getGUID()); - } - - if (getCategoryChildren(parentGuid).size() != 6) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 6 child categories"); - } - FindRequest findRequest =new FindRequest(); - findRequest.setSearchCriteria("mm1"); - int count = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest,false,true).size(); - if (count !=1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 child category, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 glossary categories for mm3 including grandchild, got " + count); - } - findRequest =new FindRequest(); - // we expect 1 back as there is only one top level category ttt - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 glossary categories, got " + count); - } - findRequest.setSearchCriteria("tt"); - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=1) { - // should find ttt - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 glossary categories for tt* not including grandchildren, got " + count); - } - findRequest =new FindRequest(); - findRequest.setSearchCriteria("mm1"); - // we expect 0 back as there is only one top level category ttt - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 glossary categories for mm3 not including grandchild, got " + count); - } - - findRequest.setSearchCriteria("mm"); - count = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest,false,true).size(); - if (count !=3) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 3 child category, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=6) { - // 1 ttt and its mm0 mm1 mm2 children and then the first category has another 3 mm0 mm1 mm2 children - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 6 glossary categories for mm including grandchildren, got " + count); - } - - // create more categories - for (int i=3;i<10;i++) { - Category cat1 = createCategoryWithParentGlossaryGuid("mm" + i, parentGuid, glossaryGuid); - childGuids.add(cat1.getSystemAttributes().getGUID()); - Category cat2 =createCategoryWithParentGlossaryGuid("nn" + i, parentGuid, glossaryGuid); - childGuids.add(cat2.getSystemAttributes().getGUID()); - // create a grandchild of cat1 with the same name - Category grandchild =createCategoryWithParentGlossaryGuid("mm" + i, cat1.getSystemAttributes().getGUID(), glossaryGuid); - childGuids.add(grandchild.getSystemAttributes().getGUID()); - } - // issue with page size 5 - findRequest.setPageSize(5); - List categories = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest, false, true); - count = categories.size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 child categories with mm, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 glossary categories for mm* including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - // expect to find no mm - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 glossary categories for mm* not including grandchildren, got " + count); - } - // test page size 5, startingFrom 5 - findRequest.setStartingFrom(5); - - categories = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest,false,true); - count = categories.size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 child categories with mm (findRequest.setStartingFrom(5)),got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 glossary categories for mm* (findRequest.setStartingFrom(5) including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 glossary categories as startingFrom is higher than the number of elements " + count); - } - - findRequest.setStartingFrom(0); - findRequest.setSearchCriteria("nn"); - findRequest.setPageSize(20); - count = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest,false, true).size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 child categories for nn and got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 glossary categories for nn* including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - // only mmm at the top and we are looking for nn* - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 glossary categories for nn* not including grandchildren, got " + count); - } - // issue with page size 5, startingFrom 5 check the categorychildren - findRequest.setPageSize(5); - count = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest, false, true).size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 child categories for nn, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 glossary categories for nn including grandchildren, got " + count); - } - // issue with page size 5, startingFrom 5 check the categorychildren - findRequest.setStartingFrom(5); - count = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest,false,true).size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 child categories for nn, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 glossary categories for nn* including grandchildren, got " + count); - } - - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 glossary categories for nn* not including grandchildren, got " + count); - } - - findRequest.setStartingFrom(0); - findRequest.setPageSize(10); - count = glossaryAuthorViewCategoryClient.getCategoryChildren(userId, parentGuid, findRequest,false,true).size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 child categories for nn*, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, false).size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 glossary categories for nn* including grandchildren, got " + count); - } - count = glossaryFVT.getCategories(glossaryGuid, findRequest, true).size(); - if (count !=0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 glossary categories for nn* not including grandchildren, got " + count); - } - //cleanup - for (String childGuid: childGuids) { - deleteCategory(childGuid); - } - deleteCategory(parentGuid); - glossaryFVT.deleteGlossary(glossaryGuid); - } - - private Category createCategoryWithParentGlossaryGuid(String categoryName, String parentGuid, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Category category = new Category(); - category.setName(categoryName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - CategorySummary parentCategory = new CategorySummary(); - parentCategory.setGuid(parentGuid); - category.setParentCategory(parentCategory); - Category newCategory =issueCreateCategory(category); - FVTUtils.validateNode(newCategory); - - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with glossaryGuid " + newCategory.getSystemAttributes().getGUID()); - } - return newCategory; - } - - public Category createCategoryWithGlossaryGuid(String categoryName, String glossaryGuid) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = new Category(); - category.setName(categoryName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - Category newCategory = issueCreateCategory(category); - FVTUtils.validateNode(newCategory); - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with userId " + newCategory.getSystemAttributes().getGUID()); - } - return newCategory; - } - /** - * Create a category associated under a parent category and associate with the named glossary - * - * @param categoryName name of the category to create - * @param parent category under which to create this category - * @param glossaryGuid userId of the associated glossary - * @return created category - */ - Category createCategoryWithParentGlossary(String categoryName, Category parent, String glossaryGuid) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = new Category(); - category.setName(categoryName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - CategorySummary parentCategorySummary = new CategorySummary(); - parentCategorySummary.setGuid(parent.getSystemAttributes().getGUID()); - category.setParentCategory(parentCategorySummary); - Category newCategory = issueCreateCategory(category); - FVTUtils.validateNode(newCategory); - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with guid " + newCategory.getSystemAttributes().getGUID()); - } - - return newCategory; - } - - public Category createCategory(String categoryName, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = getCategoryForInput(categoryName, glossaryGuid); - return issueCreateCategory(category); - } - - private Category issueCreateCategory(Category category) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException { - Category newCategory = glossaryAuthorViewCategoryClient.create(this.userId, category); - if (newCategory != null) { - createdCategoriesSet.add(newCategory.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created Category " + newCategory.getName() + " with userId " + newCategory.getSystemAttributes().getGUID()); - } - } - return newCategory; - } - - private Category getCategoryForInput(String categoryName, String glossaryGuid) { - Category category = new Category(); - category.setName(categoryName); - GlossarySummary GlossarySummary = new GlossarySummary(); - GlossarySummary.setGuid(glossaryGuid); - category.setGlossary(GlossarySummary); - return category; - } - - - public Category getCategoryByGUID(String guid) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category category = glossaryAuthorViewCategoryClient.getByGUID(this.userId, guid); - FVTUtils.validateNode(category); - if (log.isDebugEnabled()) { - log.debug("Got Category " + category.getName() + " with userId " + category.getSystemAttributes().getGUID() + " and status " + category.getSystemAttributes().getStatus()); - } - return category; - } - - public List findCategories(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - return glossaryAuthorViewCategoryClient.find(this.userId, findRequest,false,true); - } - public List findCategories(String criteria, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); -/* if (glossaryAuthorViewCategoryClient == null) - System.out.println("NULL !!!");*/ - List categoryList = glossaryAuthorViewCategoryClient.find(this.userId, findRequest, exactValue, ignoreCase); - return categoryList; - } - - public Category updateCategory(String guid, Category category) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Category updatedCategory = glossaryAuthorViewCategoryClient.update(this.userId, guid, category,true); - FVTUtils.validateNode(updatedCategory); - if (log.isDebugEnabled()) { - log.debug("Updated Category name to " + updatedCategory.getName()); - } - return updatedCategory; - } - - public void deleteCategory(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - glossaryAuthorViewCategoryClient.delete(this.userId, guid); - createdCategoriesSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Deleted Category succeeded"); - } - } - public Category restoreCategory(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Category restoredCategory = glossaryAuthorViewCategoryClient.restore(this.userId, guid); - FVTUtils.validateNode(restoredCategory); - createdCategoriesSet.add(guid); - if (log.isDebugEnabled()) { - log.debug("restored Category name is " + restoredCategory.getName()); - } - return restoredCategory; - } - - public List getCategoryRelationships(Category category) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return glossaryAuthorViewCategoryClient.getAllRelationships(this.userId, category.getSystemAttributes().getGUID()); - } - private void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - deleteRemainingCategories(); - glossaryFVT.deleteRemainingGlossaries(); - } - void deleteRemainingCategories() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Iterator iter = createdCategoriesSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteCategory(guid); - } - List categories = findCategories(""); - if (categories.size() != existingCategoryCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + existingCategoryCount +" Categories to be found, got " + categories.size()); - } - } - public List getCategoryChildren(String categoryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - return glossaryAuthorViewCategoryClient.getCategoryChildren(userId, categoryGuid, new FindRequest(), false, true); - } - - public List getTerms(String categoryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException - { - return glossaryAuthorViewCategoryClient.getTerms(userId, categoryGuid, new FindRequest()); - } - public List getTerms(String categoryGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException - { - return glossaryAuthorViewCategoryClient.getTerms(userId, categoryGuid, findRequest); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CategoryHierarchyFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CategoryHierarchyFVT.java deleted file mode 100644 index d5ef8e39920..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CategoryHierarchyFVT.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.HashSet; -import java.util.Set; - -/** - * FVT to call Glossary Author View API to create a category hierarchy, - * based on given DEPTH and WIDTH values. - */ -public class CategoryHierarchyFVT -{ - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for category hierarchy FVT"; - private static final String DEFAULT_TEST_CATEGORY_NAME_BASE = "Test hierarchy category "; - - private static final int WIDTH = 3; - private static final int DEPTH = 4; - private static int depth_counter = 0; - - private GlossaryFVT glossaryFVT =null; - private CategoryFVT categoryFVT = null; - private static Logger log = LoggerFactory.getLogger(CategoryHierarchyFVT.class); - - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public static void runWith2Servers(String url) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public CategoryHierarchyFVT(String url,String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - categoryFVT = new CategoryFVT(url,serverName,userId); - glossaryFVT = new GlossaryFVT(url,serverName,userId); - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - try { - System.out.println("CategoryHierarchyFVT runIt started"); - CategoryHierarchyFVT fvt = new CategoryHierarchyFVT(url,serverName,userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("CategoryHierarchyFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create category hierarchy"); - } - Set categories = createTopCategories(glossaryGuid); - while (depth_counter < DEPTH) - { - depth_counter++; - Set childrenCategories = new HashSet<>(); - for (Category category : categories) - { - FVTUtils.validateNode(category); - childrenCategories = createChildrenCategories(category,glossaryGuid); - } - categories = childrenCategories; - } - } - - /** - * Create top categories i.e. categories with no parent category - * @param glossaryGuid glossary userId - * @return a set of created categories - * @throws GlossaryAuthorFVTCheckedException an error occurred. - */ - private Set createTopCategories(String glossaryGuid) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Set categories = new HashSet<>(); - for (int width_counter = 0; width_counter < WIDTH; width_counter++) - { - String categoryName = createName(0, width_counter); - Category category =categoryFVT.createCategoryWithGlossaryGuid(categoryName,glossaryGuid); - FVTUtils.validateNode(category); - if (log.isDebugEnabled()) { - log.debug("Created category with name " + categoryName + " with no parent"); - } - categories.add(category); - } - return categories; - } - - /** - * Derive a category name based on a base string a DEPTH and a WIDTH - * - * @param depth DEPTH of hierarchy - * @param width WIDTH of hierarchy - * @return category name - */ - private static String createName(int depth, int width) - { - return DEFAULT_TEST_CATEGORY_NAME_BASE + "d" + depth + "w" + width; - } - - /** - * Create children categories i.e. categories under the supplied parent category - * - * @param parent parent category - * @param glossaryGuid userId of the associated glossary - * @return a set of created categories - * @throws GlossaryAuthorFVTCheckedException, GlossaryAuthorFVTCheckedException an error occurred. - */ - private Set createChildrenCategories(Category parent,String glossaryGuid) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - Set categories = new HashSet<>(); - for (int width_counter = 0; width_counter < WIDTH; width_counter++) - { - String categoryName = createName(depth_counter, width_counter); - Category category = categoryFVT.createCategoryWithParentGlossary(categoryName, parent, glossaryGuid); - FVTUtils.validateNode(category); - if (log.isDebugEnabled()) { - log.debug("Created category with name " + categoryName + " with parent " + parent.getName()); - } - categories.add(category); - } - return categories; - } - - void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - categoryFVT.deleteRemainingCategories(); - glossaryFVT.deleteRemainingGlossaries(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CheckSerializationFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CheckSerializationFVT.java deleted file mode 100644 index 804e11bb309..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/CheckSerializationFVT.java +++ /dev/null @@ -1,285 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.relationships.GlossaryAuthorViewRelationshipsClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.term.GlossaryAuthorViewTermClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.glossarys.GlossaryAuthorViewGlossaryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.io.IOException; -import java.util.List; -/** - * FVT to call Glossary Author View API for checking serialization. - */ - -public class CheckSerializationFVT { - private final String userId; - private final GlossaryAuthorViewRelationshipsClient glossaryAuthorViewRelationship; - private final GlossaryAuthorViewTermClient glossaryAuthorViewTerm; - private final GlossaryAuthorViewGlossaryClient glossaryAuthorViewGlossary; - private static Logger log = LoggerFactory.getLogger(CheckSerializationFVT.class); - - - private static final String HAS_A = "has-as"; - private static final String RELATED_TERM = "related-terms"; - private static final String SYNONYM = "synonyms"; - private static final String ANTONYM = "antonyms"; - private static final String TRANSLATION = "translations"; - private static final String USED_IN_CONTEXT = "used-in-contexts"; - private static final String PREFERRED_TERM = "preferred-terms"; - private static final String VALID_VALUE = "valid-values"; - private static final String REPLACEMENT_TERM = "replacement-terms"; - private static final String TYPED_BY = "typed-bys"; - private static final String IS_A = "is-as"; - private static final String IS_A_TYPE_OF_DEPRECATED = "is-a-type-of-deprecateds"; - private static final String IS_A_TYPE_OF = "is-a-type-ofs"; - private static final String TERM_CATEGORIZATION = "term-categorizations"; - private static final String SEMANTIC_ASSIGNMENT = "semantic-assignments"; - private static final String TERM_ANCHOR = "term-anchor"; - private static final String CATEGORY_ANCHOR = "category-anchor"; - private static final String PROJECT_SCOPE = "project-scopes"; - private static final String CATEGORY_HIERARCHY_LINK = "category-hierarchy-links"; - - - public CheckSerializationFVT(String url, String serverName, String userId) throws InvalidParameterException { - this.userId = userId; - - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(serverName, url); - this.glossaryAuthorViewTerm = new GlossaryAuthorViewTermClient(client); - this.glossaryAuthorViewGlossary = new GlossaryAuthorViewGlossaryClient(client); - this.glossaryAuthorViewRelationship = new GlossaryAuthorViewRelationshipsClient(client); - } - - public static void main(String[] args) { - try { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage()); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, GlossaryAuthorFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("CheckSerializationFVT runIt started"); - CheckSerializationFVT fvt = new CheckSerializationFVT(url, serverName, userId); - fvt.run(); - System.out.println("CheckSerializationFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - private void run() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Glossary glossary = new Glossary(); - glossary.setName("Test"); - Glossary gotGlossary = glossaryAuthorViewGlossary.create(userId, glossary); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(gotGlossary.getSystemAttributes().getGUID()); - - Term termOne = new Term(); - termOne.setName("Test_term_a"); - termOne.setGlossary(glossarySummary); - Term termTwo = new Term(); - termTwo.setName("Test_term_b"); - termTwo.setGlossary(glossarySummary); - - Term gotTermOne = glossaryAuthorViewTerm.create(userId, termOne); - Term gotTermTwo = glossaryAuthorViewTerm.create(userId, termTwo); - String oneTermGuid = gotTermOne.getSystemAttributes().getGUID(); - String twoTermGuid = gotTermTwo.getSystemAttributes().getGUID(); - checkChildrenSerialization(oneTermGuid, twoTermGuid); - - glossaryAuthorViewTerm.delete(userId, oneTermGuid); - glossaryAuthorViewTerm.delete(userId, twoTermGuid); - glossaryAuthorViewGlossary.delete(userId, gotGlossary.getSystemAttributes().getGUID()); - } - - public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - List termAnchors = glossaryAuthorViewTerm.getAllRelationships(userId, oneTermGuid); - checkCastChild(termAnchors.get(0), TermAnchor.class); - if (log.isDebugEnabled()) { - log.debug("TermAnchor is ok."); - } - - createHasA(oneTermGuid, twoTermGuid); - List hasAList = glossaryAuthorViewTerm.getAllRelationships(userId, oneTermGuid); - hasAList.removeIf(line -> line instanceof TermAnchor); - HasA hasA = checkCastChild(hasAList.get(0), HasA.class); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, HasA.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.deleteRel(userId, hasA.getGuid(), type, HAS_A); - - if (log.isDebugEnabled()) { - log.debug("HasA is ok."); - } - - createIsA(oneTermGuid, twoTermGuid); - List isAList = glossaryAuthorViewTerm.getAllRelationships(userId, oneTermGuid); - isAList.removeIf(line -> line instanceof TermAnchor); - IsA isA = checkCastChild(isAList.get(0), IsA.class); - resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, IsA.class); - ParameterizedTypeReference> typeIsA = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.deleteRel(userId, isA.getGuid(),typeIsA, IS_A); - if (log.isDebugEnabled()) { - log.debug("IsA is ok."); - } - - createRelatedTerm(oneTermGuid,twoTermGuid); - List relatedTerms = glossaryAuthorViewTerm.getAllRelationships(userId, oneTermGuid); - relatedTerms.removeIf(line -> line instanceof TermAnchor); - RelatedTerm relatedTerm = checkCastChild(relatedTerms.get(0), RelatedTerm.class); - - resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, RelatedTerm.class); - ParameterizedTypeReference> typeRT = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.deleteRel(userId, relatedTerm.getGuid(),typeRT, RELATED_TERM); - if (log.isDebugEnabled()) { - log.debug("RelatedTerm is ok."); - } - - createTranslation(oneTermGuid, twoTermGuid); - List translations = glossaryAuthorViewTerm.getAllRelationships(userId, oneTermGuid); - translations.removeIf(line -> line instanceof TermAnchor); - Translation translation = checkCastChild(translations.get(0), Translation.class); - - resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Translation.class); - ParameterizedTypeReference> typeT = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.deleteRel(userId, translation.getGuid(),typeT,TRANSLATION); - if (log.isDebugEnabled()) { - log.debug("Translation is ok."); - } - - createPreferredTerm(oneTermGuid, twoTermGuid); - List preferredTerms = glossaryAuthorViewTerm.getAllRelationships(userId, oneTermGuid); - preferredTerms.removeIf(line -> line instanceof TermAnchor); - PreferredTerm preferredTerm = checkCastChild(preferredTerms.get(0), PreferredTerm.class); - - resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, PreferredTerm.class); - ParameterizedTypeReference> typePT = ParameterizedTypeReference.forType(resolvableType.getType()); - - - glossaryAuthorViewRelationship.deleteRel(userId, preferredTerm.getGuid(),typePT,PREFERRED_TERM); - if (log.isDebugEnabled()) { - log.debug("PreferredTerm is ok."); - } - - createSynonym(oneTermGuid, twoTermGuid); - List synonyms = glossaryAuthorViewTerm.getAllRelationships(userId, oneTermGuid); - synonyms.removeIf(line -> line instanceof TermAnchor); - Synonym synonym = checkCastChild(synonyms.get(0), Synonym.class); - resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> typeS = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.deleteRel(userId, synonym.getGuid(), typeS,SYNONYM); - if (log.isDebugEnabled()) { - log.debug("Synonym is ok."); - } - } - - private ForCast checkCastChild(L line, Class lClass) throws GlossaryAuthorFVTCheckedException { - try { - return (ForCast) line; - } catch (ClassCastException e) { - throw new GlossaryAuthorFVTCheckedException("The class " + lClass.getSimpleName() - + "was deserialized incorrectly, so it cannot be cast"); - } - } - - private void createHasA(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - HasA hasA = new HasA(); - hasA.getEnd1().setNodeGuid(oneTermGuid); - hasA.getEnd2().setNodeGuid(twoTermGuid); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, HasA.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.createRel(userId,hasA, type, HAS_A); - } - - private void createIsA(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - IsA isA = new IsA(); - isA.getEnd1().setNodeGuid(oneTermGuid); - isA.getEnd2().setNodeGuid(twoTermGuid); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, IsA.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.createRel(userId, isA,type, IS_A); - } - - private void createRelatedTerm(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - RelatedTerm relatedTerm = new RelatedTerm(); - relatedTerm.getEnd1().setNodeGuid(oneTermGuid); - relatedTerm.getEnd2().setNodeGuid(twoTermGuid); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, RelatedTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.createRel(userId, relatedTerm,type, RELATED_TERM); - - } - - private void createTranslation(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Translation translation = new Translation(); - translation.getEnd1().setNodeGuid(oneTermGuid); - translation.getEnd2().setNodeGuid(twoTermGuid); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Translation.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.createRel(userId, translation,type, TRANSLATION); - - } - - private void createPreferredTerm(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - PreferredTerm preferredTerm = new PreferredTerm(); - preferredTerm.getEnd1().setNodeGuid(oneTermGuid); - preferredTerm.getEnd2().setNodeGuid(twoTermGuid); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, PreferredTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.createRel(userId, preferredTerm,type, PREFERRED_TERM); - } - - private void createSynonym(String oneTermGuid, String twoTermGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Synonym synonym = new Synonym(); - synonym.getEnd1().setNodeGuid(oneTermGuid); - synonym.getEnd2().setNodeGuid(twoTermGuid); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - glossaryAuthorViewRelationship.createRel(userId, synonym,type, SYNONYM); - } -} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/ConfigFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/ConfigFVT.java deleted file mode 100644 index 19b9624f6f0..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/ConfigFVT.java +++ /dev/null @@ -1,95 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.Configs.GlossaryAuthorViewConfigClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -//import org.odpi.openmetadata.viewservices.glossaryauthor.server.GlossaryAuthorViewGonfigRESTResource; -//import org.odpi.openmetadata.viewservices.glossaryauthor.server.GlossaryAuthorViewRelationshipRESTResource; -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; - -import java.io.IOException; - - -/** - * FVT resource to call glossary author view APIs to test the config API - */ -public class ConfigFVT -{ - private String serverName = null; - private String userId = null; - private String url = null; - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "configs"; - private static Logger log = LoggerFactory.getLogger(ConfigFVT.class); - - - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public ConfigFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Config FVT"); - } - this.url =url; - this.userId = userId; - this.serverName = serverName; - } - - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - synchronized public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, GlossaryAuthorFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try { - System.out.println("ConfigFVT runIt started"); - ConfigFVT fvt =new ConfigFVT(url, serverName, userId); - fvt.run(); - System.out.println("ConfigFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - GlossaryAuthorViewRestClient glossaryAuthorViewRestClient = new GlossaryAuthorViewRestClient(serverName, url); - GlossaryAuthorViewConfigClient glossaryAuthorViewConfigClient = new GlossaryAuthorViewConfigClient(glossaryAuthorViewRestClient); - Config config = glossaryAuthorViewConfigClient.getConfig(userId); - - if (config.getMaxPageSize() != 1000) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + 1000 + " as the max page size got " + config.getMaxPageSize()); - } else { - if (log.isDebugEnabled()) { - log.debug("Config MaxPageSize is " + config.getMaxPageSize()); - } - } - - if (log.isDebugEnabled()) { - log.debug(config.toString()); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/EffectiveDatesFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/EffectiveDatesFVT.java deleted file mode 100644 index b090dcac591..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/EffectiveDatesFVT.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.Date; - -/** - * FVT resource to call Glossary Author View APIs to test the effectivity dates - */ -public class EffectiveDatesFVT -{ - - private static final String DEFAULT_TEST_PAST_GLOSSARY_NAME = "Test past Glossary for term FVT"; - private static final String DEFAULT_TEST_FUTURE_GLOSSARY_NAME = "Test future Glossary for term FVT"; - private static final String DEFAULT_TEST_TERM_NAME = "Test term A"; - private GlossaryFVT glossaryFVT =null; - private TermFVT termFVT=null; - private static Logger log = LoggerFactory.getLogger(EffectiveDatesFVT.class); - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public EffectiveDatesFVT(String url, String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - glossaryFVT = new GlossaryFVT(url,serverName,userId); - termFVT= new TermFVT(url,serverName,userId); - } - public void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - termFVT.deleteRemainingTerms(); - glossaryFVT.deleteRemainingGlossaries(); - } - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - synchronized public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, GlossaryAuthorFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("EffectiveDatesFVT runIt started"); - EffectiveDatesFVT fvt = new EffectiveDatesFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("EffectiveDatesFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - long now = new Date().getTime(); - - try - { - glossaryFVT.createPastToGlossary(DEFAULT_TEST_PAST_GLOSSARY_NAME); - } catch (InvalidParameterException e) { - log.error("Expected creation of a Glossary with to in the past failed"); - } - try - { - glossaryFVT.createPastFromGlossary(DEFAULT_TEST_PAST_GLOSSARY_NAME); - } catch (InvalidParameterException e) { - log.error("Expected creation of a Glossary with from in the past failed"); - } - try - { - glossaryFVT.createInvalidEffectiveDateGlossary(DEFAULT_TEST_PAST_GLOSSARY_NAME); - } catch (InvalidParameterException e) { - log.error("Expected creation of a Glossary with invalid Effectivity dates failed"); - } - Glossary futureGloss = glossaryFVT.createFutureGlossary(DEFAULT_TEST_FUTURE_GLOSSARY_NAME); - FVTUtils.validateNode(futureGloss); - Term term5 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME, futureGloss.getSystemAttributes().getGUID()); - FVTUtils.validateNode(term5); - checkTermGlossaryEffectivity(futureGloss, term5); - - Term gotTerm5 = termFVT.getTermByGUID(term5.getSystemAttributes().getGUID()); - FVTUtils.validateNode(gotTerm5); - checkTermGlossaryEffectivity(futureGloss, gotTerm5); - - // update the term so that its effective dates not longer are compatible with the glossary - Term futureTerm = termFVT.updateTermToFuture(now,gotTerm5.getSystemAttributes().getGUID(), term5); - FVTUtils.validateNode(futureTerm); - checkTermGlossaryEffectivity(futureGloss, futureTerm); - futureTerm = termFVT.getTermByGUID(term5.getSystemAttributes().getGUID()); - FVTUtils.validateNode(futureTerm); - checkTermGlossaryEffectivity(futureGloss, futureTerm); - } - private void checkTermGlossaryEffectivity(Glossary glossary, Term term) throws GlossaryAuthorFVTCheckedException { - if (term.getGlossary()==null) { - // error always expect a glossary - throw new GlossaryAuthorFVTCheckedException("ERROR: Term expected associated future Glossary"); - } - Long glossaryFrom =glossary.getEffectiveFromTime(); - Long termGlossaryFrom =term.getGlossary().getFromEffectivityTime(); - Long glossaryTo =glossary.getEffectiveToTime(); - Long termGlossaryTo =term.getGlossary().getToEffectivityTime(); - - if (glossaryFrom == null && termGlossaryFrom != null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Term's Glossary fromTime not null but glossaries is null"); - } - if (glossaryFrom != null && termGlossaryFrom == null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Term's Glossary fromTime null but glossaries is not null"); - } - if (glossaryTo == null && termGlossaryTo != null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Term's Glossary toTime not null but glossaries is null"); - } - if (glossaryTo != null && termGlossaryTo == null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Term's Glossary toTime null but glossaries is not null"); - } - if (glossaryFrom != null && termGlossaryFrom != null) { - if (glossaryFrom.longValue() != termGlossaryFrom.longValue()) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Term's Glossary fromTime " + termGlossaryFrom.longValue() + " does not match the glossaries " + glossaryFrom.longValue()); - } - - } - - if (glossaryTo != null && termGlossaryTo != null) { - if (glossaryTo.longValue() != termGlossaryTo.longValue()) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Term's Glossary toTime " + termGlossaryTo.longValue() + " does not match the glossaries " + glossaryTo.longValue()); - } - - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/FVTConstants.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/FVTConstants.java deleted file mode 100644 index e8920e51274..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/FVTConstants.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -/** - * Created by Sachin on 16/10/2021. - */ -public class FVTConstants -{ - public static final String USERID = "garygeeke"; - public static final String DEFAULT_URL = "https://localhost:9443"; - public static final String SERVER_NAME1 = "cocoView1"; - public static final String SERVER_NAME2 = "cocoView2"; - public static final String GLOSSARY_AUTHOR_BASE_URL = "/servers/%s/open-metadata/view-services/glossary-author/users/%s/"; - public static final String ADMIN_BASE_URL = "/open-metadata/admin-services/users/%s/servers/%s/"; -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/FVTUtils.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/FVTUtils.java deleted file mode 100644 index a89da981f67..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/FVTUtils.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; - -/** - * FVT utilities - */ -public class FVTUtils { - public static void validateNode(Node node) throws GlossaryAuthorFVTCheckedException { - if (node==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected node to exist, "); - } - if (node.getName()==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected node to have a name, "); - } - if (node.getSystemAttributes()==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + node.getName() + "'s system attributes to exist, "); - } - if (node.getSystemAttributes().getGUID()==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + node.getName() + "'s userId to exist, "); - } - } - public static void validateRelationship(Relationship relationship) throws GlossaryAuthorFVTCheckedException { - if (relationship==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected relationship to exist, "); - } - if (relationship.getName()==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected relationship to have a name, "); - } - // Unknown - if (relationship.getName().equals("Unknown")) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected relationship to have a known name, "); - } - if (relationship.getSystemAttributes()==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + "'s system attributes to exist, "); - } - if (relationship.getSystemAttributes().getGUID()==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + "'s userId to exist, "); - } - if (relationship.isReadOnly()) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + " not to be readonly"); - } - if (relationship.getEnd1() ==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + " end1 to have a value"); - } - if (relationship.getEnd1().getNodeQualifiedName() ==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + " end1 qualified name to have a value"); - } - if (relationship.getEnd1().getNodeGuid() ==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + " end1 guid to have a value"); - } - if (relationship.getEnd2() ==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + " end2 to have a value"); - } - if (relationship.getEnd2().getNodeQualifiedName() ==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + " end2 qualified name to have a value"); - } - if (relationship.getEnd2().getNodeGuid() ==null) { - // error - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + relationship.getName() + " end2 guid to have a value"); - } - } - public static void checkEnds(Relationship relationship1, Relationship relationship2, String relationshipName, String operation) throws GlossaryAuthorFVTCheckedException { - if (!relationship1.getEnd1().getNodeGuid().equals(relationship2.getEnd1().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: update end 1 not as expected for relationship " + relationshipName + " operation " + operation); - } - if (!relationship1.getEnd2().getNodeGuid().equals(relationship2.getEnd2().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: update end 2 not as expected for relationship " + relationshipName + " operation " + operation); - } - } -} \ No newline at end of file diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GlossaryAuthorFVTCheckedException.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GlossaryAuthorFVTCheckedException.java deleted file mode 100644 index 2554763be98..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GlossaryAuthorFVTCheckedException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -/** - * Test exception for FVT - */ -public class GlossaryAuthorFVTCheckedException extends Exception -{ - /** - * This is the typical constructor used for creating a SubjectAreaFVTCheckedException. - * - * @param message Error message - */ - public GlossaryAuthorFVTCheckedException(String message) - { - super(message); - } - - - /** - * This is the constructor used for creating a SubjectAreaFVTCheckedException that resulted from a previous error. - * - * @param message Error message - * @param e the error that resulted in this exception. - * */ - public GlossaryAuthorFVTCheckedException(String message, Exception e) - { - super(message,e); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GlossaryFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GlossaryFVT.java deleted file mode 100644 index 757acefa0ad..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GlossaryFVT.java +++ /dev/null @@ -1,397 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.glossarys.GlossaryAuthorViewGlossaryClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.term.GlossaryAuthorViewTermClient; -//import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.glossaries.GlossaryAuthorViewGlossaryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -//import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Taxonomy; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.*; - -/** - * FVT resource to call Glossary author glossary API. - * - */ -public class GlossaryFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Testglossary1"; - private static final String DEFAULT_TEST_GLOSSARY_NAME2 = "Testglossary2"; - private static final String DEFAULT_TEST_GLOSSARY_NAME3 = "Testglossary3"; - private static final String DEFAULT_TEST_TERM_LIST = "Test term Number "; - private GlossaryAuthorViewGlossaryClient glossaryAuthorViewGlossaryClient = null; - private GlossaryAuthorViewTermClient glossaryAuthorViewTermClient = null; - private String serverName = null; - private String userId = null; - private int existingGlossaryCount = 0; - private static Logger log = LoggerFactory.getLogger(GlossaryFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingSubjectAreas. - */ - private Set createdGlossariesSet; - - public GlossaryFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(serverName, url); - this.glossaryAuthorViewGlossaryClient = new GlossaryAuthorViewGlossaryClient(client); - this.glossaryAuthorViewTermClient = new GlossaryAuthorViewTermClient(client); - this.serverName = serverName; - this.userId = userId; - createdGlossariesSet = new HashSet<>(); - existingGlossaryCount = findGlossaries("").size(); - if (log.isDebugEnabled()) { - log.debug("existingGlossaryCount " + existingGlossaryCount); - } - } - - public static void runWith2Servers(String url) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void main(String[] args) { - try { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - try - { - System.out.println("GlossaryFVT runIt started "); - GlossaryFVT fvt = new GlossaryFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemainingGlossaries(); - System.out.println("GlossaryFVT runIt finished"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public static int getGlossaryCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - GlossaryFVT fvt = new GlossaryFVT(url, serverName, userId); - return fvt.findGlossaries("").size(); - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - List initialGlossaryState = findGlossaries(null); - int initialGlossaryCount = 0; - if (initialGlossaryState != null && initialGlossaryState.size() > 0) { - initialGlossaryCount = initialGlossaryState.size(); - } - - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - Glossary glossary2 = createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME2); - FVTUtils.validateNode(glossary2); - - List results = findGlossaries(null); - if (results.size() != initialGlossaryCount + 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + initialGlossaryCount + 2 + " back on the find got " + results.size()); - } - Glossary glossaryForUpdate = new Glossary(); - glossaryForUpdate.setName(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME3); - if (log.isDebugEnabled()) { - log.debug("Get the glossary"); - } - String guid = glossary.getSystemAttributes().getGUID(); - Glossary gotGlossary = getGlossaryByGUID(guid); - if (log.isDebugEnabled()) { - log.debug("Update the glossary"); - } - Glossary updatedGlossary = updateGlossary(guid, glossaryForUpdate); - FVTUtils.validateNode(updatedGlossary); - if (log.isDebugEnabled()) { - log.debug("Get the glossary again"); - } - gotGlossary = getGlossaryByGUID(guid); - FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("Delete the glossary"); - } - deleteGlossary(guid); - //FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("restore the glossary"); - } - gotGlossary = restoreGlossary(guid); - FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("Delete the glossary again"); - } - deleteGlossary(guid); - //FVTUtils.validateNode(gotGlossary); - if (log.isDebugEnabled()) { - log.debug("Create glossary with the same name as a deleted one"); - } - glossary = createGlossary(serverName + " " + DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - - if (log.isDebugEnabled()) { - log.debug("create glossaries to find"); - } - Glossary glossaryForFind1 = getGlossaryForInput("qrs"); - glossaryForFind1.setQualifiedName("yyy"); - glossaryForFind1 = issueCreateGlossary(glossaryForFind1); - FVTUtils.validateNode(glossaryForFind1); - Glossary glossaryForFind2 = createGlossary("yyy"); - FVTUtils.validateNode(glossaryForFind2); - Glossary glossaryForFind3 = createGlossary("zzz"); - FVTUtils.validateNode(glossaryForFind3); - Glossary glossaryForFind4 = createGlossary("This is a Glossary with spaces in name"); - FVTUtils.validateNode(glossaryForFind4); - - results = findGlossaries("zzz"); - if (results.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find got " + results.size()); - } - results = findGlossaries("yyy"); - if (results.size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 back on the find got " + results.size()); - } - //soft delete a glossary and check it is not found - deleteGlossary(glossaryForFind2.getSystemAttributes().getGUID()); - results = findGlossaries("yyy"); - if (results.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find got " + results.size()); - } - - // search for a glossary with a name with spaces in - results = findGlossaries("This is a Glossary with spaces in name"); - if (results.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find got " + results.size()); - } - // make sure there is a glossary with the name - createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - Glossary glossaryForUniqueQFN2= createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - if (glossaryForUniqueQFN2 == null || glossaryForUniqueQFN2.getQualifiedName().length() == 0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected qualified name to be set"); - } - //test Multiple terms - String glossaryForUniqueQFN2Guid = glossaryForUniqueQFN2.getSystemAttributes().getGUID(); - List multipleTermList = new ArrayList(); - - for (int i = 1;i <5; i++) { - multipleTermList.add(getTermForInput(DEFAULT_TEST_TERM_LIST + String.valueOf(i), glossaryForUniqueQFN2Guid)); - // DEFAULT_TEST_TERM_LIST - } - Term[] termArray = new Term[multipleTermList.size()]; - termArray = multipleTermList.toArray(termArray); - -/* List createdTermList = new ArrayList(); - createdTermList =*/ - createMultipleTerms(userId, glossaryForUniqueQFN2Guid, termArray); // multipleTermList.toArray()); - - //System.out.println("*****^&*&*& " + createdTermList.toString() + " *****^&*&*& "); - - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(""); - List termList = getTerms(glossaryForUniqueQFN2Guid, findRequest); - if (termList.size() != 4) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 4 back on getGlossaryTerms for multipleCreate got " + results.size()); - } - deleteTermsOnGlossary(userId,glossaryForUniqueQFN2Guid); - } - - private void deleteTermsOnGlossary(String userId, String glossaryForUniqueQFN2Guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(""); - List termList = getTerms(glossaryForUniqueQFN2Guid, findRequest); - for (Term term: termList) { - glossaryAuthorViewTermClient.delete(userId, term.getSystemAttributes().getGUID()); - } - } - - - public Term getTermForInput(String termName, String glossaryGuid) { - Term term = new Term(); - term.setName(termName); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term.setGlossary(glossarySummary); - return term; - } - - - void deleteRemainingGlossaries() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Iterator iter = createdGlossariesSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteGlossary(guid); - } - List glossaries = findGlossaries(""); - if (glossaries.size() != existingGlossaryCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " +existingGlossaryCount + " glossaries, got " + glossaries.size()); - } - } - - public Glossary createGlossary(String glossaryName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = getGlossaryForInput(glossaryName); - return issueCreateGlossary(glossary); - } - - public Glossary issueCreateGlossary(Glossary glossary) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - Glossary newGlossary = glossaryAuthorViewGlossaryClient.create(this.userId, glossary); - - if (newGlossary != null) { - String guid = newGlossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Created Glossary " + newGlossary.getName() + " with userId " + guid); - } - createdGlossariesSet.add(guid); - } - return newGlossary; - } - - public Glossary getGlossaryForInput(String glossaryName) { - Glossary glossary = new Glossary(); - glossary.setName(glossaryName); - return glossary; - } - - public Taxonomy getTaxonomyForInput(String glossaryName) { - Taxonomy taxonomy = new Taxonomy(); - taxonomy.setName(glossaryName); - return taxonomy; - } - - public Glossary createPastToGlossary(String name) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - long now = new Date().getTime(); - // expire the glossary 10 milliseconds ago - glossary.setEffectiveToTime(new Date(now - 10).getTime()); - Glossary newGlossary = issueCreateGlossary(glossary); - FVTUtils.validateNode(newGlossary); - if (log.isDebugEnabled()) { - log.debug("Created Glossary " + newGlossary.getName() + " with GUID " + newGlossary.getSystemAttributes().getGUID()); - } - - return newGlossary; - } - - public Glossary createPastFromGlossary(String name) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - long now = new Date().getTime(); - // expire the glossary 10 milliseconds ago - glossary.setEffectiveFromTime(new Date(now - 10).getTime()); - return issueCreateGlossary(glossary); - } - - public Glossary createInvalidEffectiveDateGlossary(String name) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - long now = new Date().getTime(); - // expire the glossary 10 milliseconds ago - glossary.setEffectiveFromTime(new Date(now - 10).getTime()); - glossary.setEffectiveToTime(new Date(now - 11).getTime()); - return issueCreateGlossary(glossary); - } - - public Glossary createFutureGlossary(String name) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Glossary glossary = new Glossary(); - glossary.setName(name); - long now = new Date().getTime(); - // make the glossary effective in a days time for day - glossary.setEffectiveFromTime(new Date(now + 1000 * 60 * 60 * 24).getTime()); - glossary.setEffectiveToTime(new Date(now + 2000 * 60 * 60 * 24).getTime()); - Glossary newGlossary = issueCreateGlossary(glossary); - FVTUtils.validateNode(newGlossary); - if (log.isDebugEnabled()) { - log.debug("Created Glossary " + newGlossary.getName() + " with userId " + newGlossary.getSystemAttributes().getGUID()); - } - return newGlossary; - } - - public List findGlossaries(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - List glossaries = glossaryAuthorViewGlossaryClient.find(this.userId, findRequest); - return glossaries; - } - - public Glossary getGlossaryByGUID(String guid) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary = glossaryAuthorViewGlossaryClient.getByGUID(this.userId, guid); - FVTUtils.validateNode(glossary); - if (log.isDebugEnabled()) { - log.debug("Got Glossary " + glossary.getName() + " with userId " + glossary.getSystemAttributes().getGUID() + " and status " + glossary.getSystemAttributes().getStatus()); - } - return glossary; - } - - public Glossary updateGlossary(String guid, Glossary glossary) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - boolean isReplace = true; - Glossary updatedGlossary = glossaryAuthorViewGlossaryClient.update(this.userId, guid, glossary, isReplace); - FVTUtils.validateNode(updatedGlossary); - if (log.isDebugEnabled()) { - log.debug("Updated Glossary name to " + updatedGlossary.getName()); - } - return updatedGlossary; - } - - public void deleteGlossary(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - glossaryAuthorViewGlossaryClient.delete(this.userId, guid); - createdGlossariesSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Delete succeeded"); - } - } - - public Glossary restoreGlossary(String guid) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary restoredGlossary = glossaryAuthorViewGlossaryClient.restore(this.userId, guid); - FVTUtils.validateNode(restoredGlossary); - createdGlossariesSet.add(restoredGlossary.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Restored Glossary name is " + restoredGlossary.getName()); - } - return restoredGlossary; - } - - public List getGlossaryRelationships(Glossary glossary) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return glossaryAuthorViewGlossaryClient.getAllRelationships(this.userId, glossary.getSystemAttributes().getGUID()); - } - - public List getCategories(String glossaryGuid, FindRequest findRequest, boolean onlyTop) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - return glossaryAuthorViewGlossaryClient.getCategories(userId, glossaryGuid, findRequest, onlyTop); - } - - public List getTerms(String glossaryGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return glossaryAuthorViewGlossaryClient.getTerms(userId, glossaryGuid, findRequest); - } - - public List createMultipleTerms(String userId, String guid, Term[] termArray) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - return glossaryAuthorViewGlossaryClient.createTerms(userId,guid,termArray); - } - -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GraphFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GraphFVT.java deleted file mode 100644 index b4cc7b06a96..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/GraphFVT.java +++ /dev/null @@ -1,428 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.graph.GlossaryAuthorViewGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.*; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Taxonomy; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Node; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.GraphStatistics; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.NodeRelationshipStats; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.*; - -/** - * FVT resource to call Glossary Author View Graph API - */ -public class GraphFVT -{ - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for Graph FVT"; - private static final String DEFAULT_TEST_TERM_NAME1 = "Test term 1"; - private static final String DEFAULT_TEST_TERM_NAME2 = "Test term 2"; - private static final String DEFAULT_TEST_TERM_NAME3 = "Test term 3"; - private static final String DEFAULT_TEST_CATEGORY_NAME = "Test category 1"; - private GlossaryAuthorViewGraphClient glossaryAuthorViewGraphClient = null; - private GlossaryFVT glossaryFVT =null; - private TermFVT termFVT = null; - private RelationshipsFVT relationshipFVT = null; - private CategoryFVT categoryFVT = null; - private SubjectAreaDefinitionCategoryFVT subjectAreaFVT = null; - private static Logger log = LoggerFactory.getLogger(GraphFVT.class); - - - private String serverName = null; - private String userId = null; - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - - } - - } - public GraphFVT(String url, String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(serverName, url); - glossaryAuthorViewGraphClient = new GlossaryAuthorViewGraphClient(client); - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - glossaryFVT = new GlossaryFVT(url,serverName,userId); - termFVT = new TermFVT(url,serverName,userId); - categoryFVT = new CategoryFVT(url,serverName,userId); - relationshipFVT = new RelationshipsFVT(url,serverName,userId); - subjectAreaFVT = new SubjectAreaDefinitionCategoryFVT(url, serverName,userId); - this.serverName=serverName; - this.userId=userId; - } - public void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - termFVT.deleteRemainingTerms(); - // delete the subject area first so the delete of the categories do not pick them up - subjectAreaFVT.deleteRemainingSubjectAreas(); - categoryFVT.deleteRemainingCategories(); - relationshipFVT.deleteRemaining(); - glossaryFVT.deleteRemainingGlossaries(); - } - - private String retrieveOmagServerName(String viewServiceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - List viewServiceConfigs = glossaryAuthorViewGraphClient.getViewServiceConfigs(userId); - - for (ViewServiceConfig vsc: viewServiceConfigs){ - if (vsc.getViewServiceName().equals(viewServiceName)) { - if (log.isDebugEnabled()) { - log.debug("OMAG Server URL " + String.valueOf(vsc.getOMAGServerPlatformRootURL())); - } - return String.valueOf(vsc.getOMAGServerName()); - } - } - return null; - } - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, GlossaryAuthorFVTCheckedException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("GraphFVT runIt started"); - GraphFVT fvt = new GraphFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("GraphFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Glossary glossary= glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - - Graph graph = getGraph(glossaryGuid, - null, - null, - null, - null); - checkGraphContent(graph,1,0); - - Term term1 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME1,glossaryGuid); - graph = getGraph(glossaryGuid, - null, - null, - null, - null); - checkGraphContent(graph,2,1); - - Term term2 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME2,glossaryGuid); - graph = getGraph(glossaryGuid, - null, - null, - null, - null); - checkGraphContent(graph,3,2); - - - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - null, - null); - checkGraphContent(graph,2,1); - - graph = getGraph(term2.getSystemAttributes().getGUID(), - null, - null, - null, - null); - checkGraphContent(graph,2,1); - - relationshipFVT.createSynonym(term1,term2); - - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - null, - null); - checkGraphContent(graph,3,2); - - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - new HashSet<>(Arrays.asList(RelationshipType.Synonym)), - null); - checkGraphContent(graph,2,1); - - Term term3 =termFVT.createTerm(DEFAULT_TEST_TERM_NAME3,glossaryGuid); - relationshipFVT.createSynonym(term1,term3); - graph = getGraph(term1.getSystemAttributes().getGUID(), - null, - null, - new HashSet<>(Arrays.asList(RelationshipType.Synonym)), - null); - // expect 3 terms with the 2 Synonym relationships from term1. - checkGraphContent(graph,3,2); - - - // at this stage we should have a glossary, 3 terms, 3 term to glossary relationships and 2 synonym relationships - // confirm that we have this number - graph = getGraph(glossaryGuid, - null, - null, - null, - null); - checkGraphContent(graph,4,3); - - - graph = getGraph(term3.getSystemAttributes().getGUID(), - null, - null, - new HashSet<>(Arrays.asList(RelationshipType.Synonym)), - null); - checkGraphContent(graph,2,1); - - graph = getGraph(glossaryGuid, - null, - new HashSet<>(Arrays.asList(NodeType.Glossary,NodeType.Term)), - null, - null); - - // expect to only pick up the TermAnchor relationships not the synonyms. - checkGraphContent(graph,4,3); - - // createCategory - Category category =categoryFVT.createCategory(DEFAULT_TEST_CATEGORY_NAME,glossaryGuid); - // check it is ignored - graph = getGraph(glossaryGuid, - null, - new HashSet<>(Arrays.asList(NodeType.Glossary,NodeType.Term)), - null, - null); - checkGraphContent(graph,4,3); - - // check we now pickup the category as well - graph = getGraph(glossaryGuid, - null, - new HashSet<>(Arrays.asList(NodeType.Glossary,NodeType.Term,NodeType.Category)), - null, - null); - checkGraphContent(graph,5,4); - - Taxonomy taxonomy= glossaryFVT.getTaxonomyForInput(DEFAULT_TEST_GLOSSARY_NAME); - Glossary createdTaxonomy= glossaryFVT.issueCreateGlossary(taxonomy); - String taxonomyGuid = createdTaxonomy.getSystemAttributes().getGUID(); - SubjectAreaDefinition subjectAreaDefinition = subjectAreaFVT.createSubjectAreaDefinitionWithGlossaryGuid("Subject area 1",taxonomyGuid); - graph = getGraph(taxonomyGuid, - null, - null, - null, - null); - checkGraphContent(graph,2,1); - - checkNodesContainNodeType(graph,NodeType.Taxonomy); - checkNodesContainNodeType(graph,NodeType.SubjectAreaDefinition); - - - // Glossary Statistics - GraphStatistics graphST = getGraphStats(taxonomyGuid, - null, - null, - null, - null); - //check for nodeOrRelationshipTypeName as Taxonamy - checkGraphStats1(graphST,"Taxonomy"); - - - graphST = getGraphStats(glossaryGuid, - null, - null, - null, - null); - //check for nodeCounts and Relationship counts for term - checkGraphStats2(graphST,"Term",3,"TermAnchor",3); - - graphST = getGraphStats(term3.getSystemAttributes().getGUID(), - null, - null, - null, - null); - //check for node Term count & Relationship Synonym count - checkGraphStats2(graphST,"Term",2,"Synonym",1); - - graphST = getGraphStats(term1.getSystemAttributes().getGUID(), - null, - null, - null, - null); - //check for node Term count & Relationship Synonym count - checkGraphStats2(graphST,"Term",3,"Synonym",2); - - graphST = getGraphStats(subjectAreaDefinition.getSystemAttributes().getGUID(), - null, - null, - null, - null); - //check for getNodeCounts() and getRelationshipCounts() - checkGraphStats(graphST,2,1); - - - // delete the term, category and subject area we created. - subjectAreaFVT.deleteSubjectAreaDefinition(subjectAreaDefinition.getSystemAttributes().getGUID()); - categoryFVT.deleteCategory(category.getSystemAttributes().getGUID()); - termFVT.deleteTerm(term1.getSystemAttributes().getGUID()); - termFVT.deleteTerm(term2.getSystemAttributes().getGUID()); - termFVT.deleteTerm(term3.getSystemAttributes().getGUID()); - glossaryFVT.deleteGlossary(taxonomyGuid); - glossaryFVT.deleteGlossary(glossaryGuid); - } - - private void checkGraphStats1(GraphStatistics graphST, String nodeToCheck) throws GlossaryAuthorFVTCheckedException { - Map nodeInfos = graphST.getNodeCounts(); - - if (!nodeInfos.containsKey(nodeToCheck)){ - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to find "+ nodeToCheck + " but it did not exist"); - } - } - private void checkGraphStats2(GraphStatistics graphST,String nodeTypeName, int nodecount, String relTypeName, int relationshipCount) throws GlossaryAuthorFVTCheckedException { - Map nodeInfos = graphST.getNodeCounts(); - Map relaInfos = graphST.getRelationshipCounts(); - NodeRelationshipStats nrStats; - - - for (Map.Entry mapEntry: nodeInfos.entrySet()){ - if (mapEntry.getKey().equals(nodeTypeName)){ - nrStats = mapEntry.getValue(); - if (nrStats.getCount() != nodecount) - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to find "+ nodecount + " nodes but found " + nrStats.getCount()); -/* System.out.println(mapEntry.getValue()); - System.out.println(nrStats.getCount()); - System.out.println(nrStats.getNodeOrRelationshipTypeName()); -*/ - } - } - for (Map.Entry mapEntry: relaInfos.entrySet()){ - if (mapEntry.getKey().equals(relTypeName)){ - nrStats = mapEntry.getValue(); - if (nrStats.getCount() != relationshipCount) - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to find "+ relationshipCount + " relationships but found " + nrStats.getCount()); - if (log.isDebugEnabled()) { - log.debug(mapEntry.getValue().toString()); - log.debug(nrStats.getCount().toString()); - log.debug(nrStats.getNodeOrRelationshipTypeName()); - } - } - } - } - - private void checkGraphStats(GraphStatistics graphST, int nodeCount, int relCount) throws GlossaryAuthorFVTCheckedException { - Map nodeInfos = graphST.getNodeCounts(); - Map relaInfos = graphST.getRelationshipCounts(); - if (!(nodeInfos.size() == nodeCount)){ - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to find "+ nodeCount + " node but it found " + nodeInfos.size()); - } - - if (!(relaInfos.size() == relCount)){ - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to find "+ relCount + " relationships but it found " + nodeInfos.size()); - } - } - - private void checkNodesContainNodeType(Graph graph, NodeType nodeTypeToCheck) throws GlossaryAuthorFVTCheckedException { - boolean found = false; - if (graph == null || graph.getNodes() == null || graph.getNodes().size() == 0 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to find "+nodeTypeToCheck.name() + "but there were no nodes in the graph"); - } - Map nodes =graph.getNodes(); - Set guids = nodes.keySet(); - for (String guid:guids) { - Node node = nodes.get(guid); - if (node.getNodeType() == nodeTypeToCheck) { - found = true; - } - } - if (!found) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to find "+nodeTypeToCheck.name() + "but it did not exist"); - } - } - - private void checkGraphContent(Graph graph,int expectedNodesSize,int expectedRelationshipsSize) throws GlossaryAuthorFVTCheckedException { - if (log.isDebugEnabled()) { - log.debug("CheckGraphContent expected " +expectedNodesSize + " Nodes and "+expectedRelationshipsSize + " Relationships" ); - } - if (graph.getNodes().size() !=expectedNodesSize ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + expectedNodesSize + " nodes, got " +graph.getNodes().size()); - } - if (expectedRelationshipsSize ==0 && (graph.getRelationships() != null) ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 0 and graph.getRelationships() to be null "); - } else if (expectedRelationshipsSize !=0 && (graph.getRelationships() == null) ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + expectedRelationshipsSize + " and graph.getRelationships() is null "); - } else if (graph.getRelationships()!=null && graph.getRelationships().size() !=expectedRelationshipsSize ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + expectedRelationshipsSize + " relationships, got " +graph.getRelationships().size()); - } - } - - private Graph getGraph(String guid, - Date asOfTime, - Set nodeFilter, - Set relationshipFilter, - StatusFilter statusFilter) // may need to extend this for controlled terms - //int level) - throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - - return glossaryAuthorViewGraphClient.getGraph( - userId, - guid, - asOfTime, - nodeFilter, - relationshipFilter, - statusFilter); -// level); - } - - - private GraphStatistics getGraphStats(String guid, - Date asOfTime, - Set nodeFilter, - Set relationshipFilter, - StatusFilter statusFilter) // may need to extend this for controlled terms - throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - - return glossaryAuthorViewGraphClient.getGraphStatistics( - userId, - guid, - asOfTime, - nodeFilter, - relationshipFilter, - statusFilter); -// level); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/ProjectFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/ProjectFVT.java deleted file mode 100644 index d344496c18e..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/ProjectFVT.java +++ /dev/null @@ -1,344 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.project.GlossaryAuthorViewProjectClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.relationships.GlossaryAuthorViewRelationshipsClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.GlossaryProject; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.ProjectScope; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.io.IOException; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -/** - * FVT resource to call Glossary Author View project API - */ -public class ProjectFVT -{ - private static final String DEFAULT_TEST_PROJECT_NAME = "Testproject1"; - private static final String DEFAULT_TEST_PROJECT_NAME2 = "Testproject2"; - private static final String DEFAULT_TEST_PROJECT_NAME3 = "Testproject3"; - private static final String DEFAULT_TEST_PROJECT_NAME4 = "Testproject4"; - private static final String DEFAULT_TEST_PROJECT_NAME5 = "Testproject5"; - private static final String DEFAULT_TEST_PROJECT_NAME6 = "Testproject6"; - private static final String DEFAULT_TEST_PROJECT_NAME7 = "Testproject7"; - private static final String DEFAULT_TEST_PROJECT_NAME8 = "Testproject8"; - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for project FVT"; - private static final String DEFAULT_TEST_TERM_NAME = "Test term A1"; - private static final String PROJECT_SCOPE = "project-scopes"; - private static Logger log = LoggerFactory.getLogger(ProjectFVT.class); - - - // private SubjectAreaProjectClient subjectAreaProject = null; - private GlossaryAuthorViewProjectClient glossaryAuthorViewProjectClient = null; - private GlossaryAuthorViewRelationshipsClient glossaryAuthorViewRelationshipsClient = null; - private GlossaryFVT glossaryFVT =null; - private TermFVT termFVT =null; - private RelationshipsFVT relationshipsFVT =null; - - private String serverName = null; - private String userId = null; - private int existingProjectCount = 0; - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingProjects. - */ - private Set createdProjectsSet = new HashSet<>(); - - public ProjectFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(serverName, url); - glossaryAuthorViewProjectClient = new GlossaryAuthorViewProjectClient(client); - glossaryAuthorViewRelationshipsClient = - new GlossaryAuthorViewRelationshipsClient(client); - glossaryFVT = new GlossaryFVT(url, serverName, userId); - termFVT = new TermFVT(url, serverName, userId); - - this.serverName=serverName; - this.userId=userId; - existingProjectCount = findProjects("").size(); - if (log.isDebugEnabled()) { - System.out.println("existingProjectCount " + existingProjectCount); - } - } - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - - public static void runIt(String url, String serverName, String userId) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try { - System.out.println("ProjectFVT runIt started"); - ProjectFVT fvt = new ProjectFVT(url, serverName, userId); - fvt.run(); - fvt.termFVT.deleteRemainingTerms(); - fvt.glossaryFVT.deleteRemainingGlossaries(); - fvt.deleteRemainingProjects(); - System.out.println("ProjectFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - public static int getProjectCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - ProjectFVT fvt = new ProjectFVT(url, serverName, userId); - return fvt.findProjects(".*").size(); - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("Create a project"); - } - Project project = createProject(serverName+" "+DEFAULT_TEST_PROJECT_NAME); - FVTUtils.validateNode(project); - Project project2 = createProject(serverName+" "+DEFAULT_TEST_PROJECT_NAME2); - FVTUtils.validateNode(project2); - - List results = findProjects(null); - if (results.size() !=2 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 back on the find got " + results.size()); - } - - Project projectForUpdate = new Project(); - projectForUpdate.setName(serverName+" "+DEFAULT_TEST_PROJECT_NAME3); - if (log.isDebugEnabled()) { - log.debug("Get the project"); - } - String guid = project.getSystemAttributes().getGUID(); - Project gotProject = getProjectByGUID(guid); - FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Update the project"); - } - Project updatedProject = updateProject(guid, projectForUpdate); - FVTUtils.validateNode(updatedProject); - if (log.isDebugEnabled()) { - log.debug("Get the project again"); - } - gotProject = getProjectByGUID(guid); - FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Delete the project"); - } - deleteProject(guid); - //FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("restore the project"); - } - gotProject = restoreProject(guid); - FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Delete the project again"); - } - deleteProject(guid); - //FVTUtils.validateNode(gotProject); - if (log.isDebugEnabled()) { - log.debug("Create project with the same name as a deleted one"); - } - project = createProject(serverName + " " + DEFAULT_TEST_PROJECT_NAME); - FVTUtils.validateNode(project); - - if (log.isDebugEnabled()) { - log.debug("create projects to find"); - } - Project projectForFind1 = getProjectForInput(DEFAULT_TEST_PROJECT_NAME7); - projectForFind1.setQualifiedName(DEFAULT_TEST_PROJECT_NAME6); - projectForFind1 = issueCreateProject(projectForFind1); - FVTUtils.validateNode(projectForFind1); - Project projectForFind2 = createProject(DEFAULT_TEST_PROJECT_NAME6); - FVTUtils.validateNode(projectForFind2); - Project projectForFind3 = createProject(DEFAULT_TEST_PROJECT_NAME5); - FVTUtils.validateNode(projectForFind3); - Project projectForFind4 = createProject("This is a Project with spaces in name"); - FVTUtils.validateNode(projectForFind4); - - results = findProjects(DEFAULT_TEST_PROJECT_NAME5); - if (results.size() !=1 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find got " +results.size()); - } - results = findProjects(DEFAULT_TEST_PROJECT_NAME6); - if (results.size() !=2 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 back on the find got " +results.size()); - } - //soft delete a project and check it is not found - deleteProject(projectForFind2.getSystemAttributes().getGUID()); - //FVTUtils.validateNode(deleted4); - results = findProjects(DEFAULT_TEST_PROJECT_NAME6); - if (results.size() !=1 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find got " +results.size()); - } - - // search for a project with a name with spaces in - results = findProjects("This is a Project with spaces in name"); - if (results.size() !=1 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on the find got " +results.size()); - } - - // make sure there is a project with the name - createProject( DEFAULT_TEST_PROJECT_NAME); - Project projectForUniqueQFN2= createProject(DEFAULT_TEST_PROJECT_NAME); - if (projectForUniqueQFN2 == null || projectForUniqueQFN2.getQualifiedName().length() == 0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected qualified name to be set"); - } - - //create relationhip for a project and retriev it - Project project8 = createProject(serverName+" "+DEFAULT_TEST_PROJECT_NAME8); - Glossary glossary = glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - if (log.isDebugEnabled()) { - log.debug("Create a term called " + DEFAULT_TEST_TERM_NAME + " using glossary GUID"); - } - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - Term term1 = termFVT.createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - if (log.isDebugEnabled()) { - log.debug("Create a project scope relationship between called " + DEFAULT_TEST_TERM_NAME + " and " + DEFAULT_TEST_PROJECT_NAME8); - } - createProjectScope(project8,term1); - - List prjRelationships = getProjectRelationships(project8); -// System.out.println(prjRelationships.toString()); - - if (prjRelationships.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 relationship on project got " + prjRelationships.size()); - } - } - - public Project createProject(String projectName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Project project = getProjectForInput(projectName); - return issueCreateProject(project); - } - - public Project issueCreateProject(Project project) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Project newProject = glossaryAuthorViewProjectClient.create(this.userId, project); - if (newProject != null) - { - createdProjectsSet.add(newProject.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created Project " + newProject.getName() + " with userId " + newProject.getSystemAttributes().getGUID()); - } - } - return newProject; - } - - public Project getProjectForInput(String projectName) { - Project project = new Project(); - project.setName(projectName); - return project; - } - public GlossaryProject getGlossaryProjectForInput(String projectName) { - GlossaryProject glossaryProject= new GlossaryProject(); - glossaryProject.setName(projectName); - return glossaryProject; - } - - public List findProjects(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - List projects = glossaryAuthorViewProjectClient.find(this.userId, findRequest,false,true); - return projects; - } - - public Project getProjectByGUID(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Project project = glossaryAuthorViewProjectClient.getByGUID(this.userId, guid); - FVTUtils.validateNode(project); - if (log.isDebugEnabled()) { - log.debug("Got Project " + project.getName() + " with userId " + project.getSystemAttributes().getGUID() + " and status " + project.getSystemAttributes().getStatus()); - } - - return project; - } - - public Project updateProject(String guid, Project project) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Project updatedProject = glossaryAuthorViewProjectClient.update(this.userId, guid, project,false); - FVTUtils.validateNode(updatedProject); - if (log.isDebugEnabled()) { - log.debug("Updated Project name to " + updatedProject.getName()); - } - return updatedProject; - } - - public void deleteProject(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - glossaryAuthorViewProjectClient.delete(this.userId, guid); - createdProjectsSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Deleted Project succeeded"); - } - } - public Project restoreProject(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Project restoredProject = glossaryAuthorViewProjectClient.restore(this.userId, guid); - FVTUtils.validateNode(restoredProject); - createdProjectsSet.add(restoredProject.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Restored Project name is " + restoredProject.getName()); - } - return restoredProject; - } - - public List getProjectRelationships(Project project) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return glossaryAuthorViewProjectClient.getAllRelationships(this.userId, project.getSystemAttributes().getGUID()); - } - - protected ProjectScope createProjectScope(Project project, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - ProjectScope projectScope = new ProjectScope(); - projectScope.getEnd1().setNodeGuid(project.getSystemAttributes().getGUID()); - projectScope.getEnd2().setNodeGuid(term.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, ProjectScope.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - ProjectScope createdProjectScope = glossaryAuthorViewRelationshipsClient.createRel(this.userId, projectScope,type, PROJECT_SCOPE); - FVTUtils.validateRelationship(createdProjectScope); - return createdProjectScope; - } - - void deleteRemainingProjects() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - - Iterator iter = createdProjectsSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteProject(guid); - } - List projects = findProjects(""); - if (projects.size() !=existingProjectCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + existingProjectCount + " Projects to be found, got " + projects.size()); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RelationshipsFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RelationshipsFVT.java deleted file mode 100644 index eebf134b190..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RelationshipsFVT.java +++ /dev/null @@ -1,1754 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.category.GlossaryAuthorViewCategoryClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.relationships.GlossaryAuthorViewRelationshipsClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.term.GlossaryAuthorViewTermClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.*; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.io.IOException; -import java.util.List; - -/** - * FVT resource to call Glossary author view relationships API - */ -public class RelationshipsFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for relationships FVT"; - private static final String DEFAULT_TEST_TERM_NAME = "Test term A1"; - private static final String DEFAULT_TEST_TERM_NAME2 = "Test term B1"; - private static final String DEFAULT_TEST_TERM_NAME3 = "Test term C1"; - private static final String DEFAULT_TEST_CAT_NAME1 = "Test cat A1"; - private static final String DEFAULT_TEST_CAT_NAME2 = "Test cat B1"; - private static final String DEFAULT_TEST_CAT_NAME3 = "Test cat C1"; - private static final String DEFAULT_TEST_CAT_NAME4 = "Test cat D1"; - private static final String DEFAULT_TEST_PROJECT_NAME = "Test Project for relationships FVT"; - private GlossaryAuthorViewRelationshipsClient glossaryAuthorViewRelationshipsClient = null; - private GlossaryAuthorViewCategoryClient glossaryAuthorViewCategory = null; - private GlossaryAuthorViewTermClient glossaryAuthorViewTerm = null; - private GlossaryFVT glossaryFVT = null; - private TermFVT termFVT = null; - private CategoryFVT catFVT = null; - private ProjectFVT projectFVT = null; - private String url = null; - private String serverName = null; - private String userId = null; - private static Logger log = LoggerFactory.getLogger(RelationshipsFVT.class); - - - private static final String HAS_A = "has-as"; - private static final String RELATED_TERM = "related-terms"; - private static final String SYNONYM = "synonyms"; - private static final String ANTONYM = "antonyms"; - private static final String TRANSLATION = "translations"; - private static final String USED_IN_CONTEXT = "used-in-contexts"; - private static final String PREFERRED_TERM = "preferred-terms"; - private static final String VALID_VALUE = "valid-values"; - private static final String REPLACEMENT_TERM = "replacement-terms"; - private static final String TYPED_BY = "typed-bys"; - private static final String IS_A = "is-as"; - private static final String IS_A_TYPE_OF_DEPRECATED = "is-a-type-of-deprecateds"; - private static final String IS_A_TYPE_OF = "is-a-type-ofs"; - private static final String TERM_CATEGORIZATION = "term-categorizations"; - private static final String SEMANTIC_ASSIGNMENT = "semantic-assignments"; - private static final String TERM_ANCHOR = "term-anchor"; - private static final String CATEGORY_ANCHOR = "category-anchor"; - private static final String PROJECT_SCOPE = "project-scopes"; - private static final String CATEGORY_HIERARCHY_LINK = "category-hierarchy-links"; - - public RelationshipsFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - this.url = url; - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(serverName, url); - glossaryAuthorViewRelationshipsClient = new GlossaryAuthorViewRelationshipsClient(client); - glossaryAuthorViewCategory = new GlossaryAuthorViewCategoryClient(client); - glossaryAuthorViewTerm = new GlossaryAuthorViewTermClient(client); - termFVT = new TermFVT(url, serverName, userId); - catFVT = new CategoryFVT(url, serverName, userId); - glossaryFVT = new GlossaryFVT(url, serverName, userId); - projectFVT = new ProjectFVT(url, serverName, userId); - this.serverName = serverName; - this.userId = userId; - } - - /** - * Delete the nodes that have been created to test relationships. This method deletes all those nodes - so the - * associated relationships will be deleted as the associated node is deleted. - * @throws UserNotAuthorizedException - * @throws PropertyServerException - * @throws InvalidParameterException - * @throws GlossaryAuthorFVTCheckedException - */ - void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - catFVT.deleteRemainingCategories(); - termFVT.deleteRemainingTerms(); - glossaryFVT.deleteRemainingGlossaries(); - projectFVT.deleteRemainingProjects(); - } - - public static void main(String args[]) { - try { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage()); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("relationshipFVT runIt started"); - RelationshipsFVT fvt = new RelationshipsFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("relationshipFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - - int term1relationshipcount = 0; - int term2relationshipcount = 0; - int term3relationshipcount = 0; - int glossaryRelationshipCount = 0; - int cat1RelationshipCount = 0; - int cat2RelationshipCount = 0; - - Glossary glossary = glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - if (log.isDebugEnabled()) { - log.debug("Create a term called " + DEFAULT_TEST_TERM_NAME + " using glossary GUID"); - } - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - Term term1 = termFVT.createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - - term1relationshipcount++; - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - checkRelationshipNumberforTerm(term1relationshipcount, term1); - FVTUtils.validateNode(term1); - if (log.isDebugEnabled()) { - log.debug("Create a term called " + DEFAULT_TEST_TERM_NAME2 + " using glossary GUID"); - } - Term term2 = termFVT.createTerm(DEFAULT_TEST_TERM_NAME2, glossaryGuid); - term2relationshipcount++; - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - checkRelationshipNumberforTerm(term2relationshipcount, term2); - FVTUtils.validateNode(term2); - if (log.isDebugEnabled()) { - log.debug("Create a term called " + DEFAULT_TEST_TERM_NAME3 + " using glossary GUID"); - } - Term term3 = termFVT.createTerm(DEFAULT_TEST_TERM_NAME3, glossaryGuid); - FVTUtils.validateNode(term3); - term3relationshipcount++; - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - checkRelationshipNumberforTerm(term3relationshipcount, term3); - Category cat1 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME1, glossaryGuid); - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - Category cat2 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME2, glossaryGuid); - glossaryRelationshipCount++; - checkRelationshipNumberforGlossary(glossaryRelationshipCount, glossary); - cat2RelationshipCount++; - checkRelationshipNumberforCategory(cat2RelationshipCount, cat1); - synonymFVT(term1, term2); - antonymFVT(term1, term3); - relatedtermFVT(term1, term3); - hasaFVT(term1, term3); - translationFVT(term1, term2); - usedincontextFVT(term1, term2); - preferredtermFVT(term1, term2); - validvalueFVT(term1, term2); - replacementTermFVT(term1, term2); - typedByFVT(term1, term2); - isaFVT(term1, term2); - // isatypeofFVT(term1, term2); - isATypeOfFVT(term1, term2); - termCategorizationFVT(term1, cat1); - /**/ - // No TermAnchor or CategoryAnchor tests as these are anchor relationships that cannot be modified directly in the subject Area API. - createSomeTermRelationships(term1, term2, term3); - term1relationshipcount = term1relationshipcount + 12; - term2relationshipcount = term2relationshipcount + 11; - term3relationshipcount = term3relationshipcount + 1; - checkRelationshipNumberforTerm(term1relationshipcount, term1); - checkRelationshipNumberforTerm(term2relationshipcount, term2); - checkRelationshipNumberforTerm(term3relationshipcount, term3); - - FVTUtils.validateRelationship(createTermCategorization(term1, cat1)); - term1relationshipcount++; - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - FVTUtils.validateRelationship(createTermCategorization(term1, cat2)); - term1relationshipcount++; - cat2RelationshipCount++; - checkRelationshipNumberforCategory(cat2RelationshipCount, cat1); - FVTUtils.validateRelationship(createTermCategorization(term2, cat1)); - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - term2relationshipcount++; - FVTUtils.validateRelationship(createTermCategorization(term3, cat1)); - - term3relationshipcount++; - cat1RelationshipCount++; - checkRelationshipNumberforCategory(cat1RelationshipCount, cat1); - checkRelationshipNumberforTerm(term1relationshipcount, term1); - checkRelationshipNumberforTerm(term2relationshipcount, term2); - checkRelationshipNumberforTerm(term3relationshipcount, term3); - if (log.isDebugEnabled()) { - log.debug("get term relationships"); - } - List term1Relationships = termFVT.getTermRelationships(term1); - - if (log.isDebugEnabled()) { - log.debug("Get paged term relationships"); - } - int offset = 0; - - int numberofrelationships = 0; - while (offset < term1relationshipcount) { - if (log.isDebugEnabled()) { - log.debug("Get paged term relationships offset = " + offset + ",pageSize=3"); - } - List term1PagedRelationships = termFVT.getTermRelationships(term1, null, offset, 3, SequencingOrder.GUID, null); - numberofrelationships = numberofrelationships + term1PagedRelationships.size(); - if (log.isDebugEnabled()) { - log.debug("numberofrelationships = " + numberofrelationships + " term1PagedRelationships.size = " + term1PagedRelationships.size()); - } - offset += 3; - } - - if (term1relationshipcount != numberofrelationships) { - throw new GlossaryAuthorFVTCheckedException("Expected " + term1Relationships.size() + " got " + numberofrelationships ); - } - - - Project project= projectFVT.createProject(DEFAULT_TEST_PROJECT_NAME ); - - projectScopeFVT(project, term1); - projectFVT.deleteProject(project.getSystemAttributes().getGUID()); - - Category cat3 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME3, glossaryGuid); - Category cat4 = catFVT.createCategory(DEFAULT_TEST_CAT_NAME4, glossaryGuid); - categoryHierarchyLinkFVT(cat3, cat4); - - } - - private void checkRelationshipNumberforTerm(int expectedrelationshipcount, Term term) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - int actualCount = termFVT.getTermRelationships(term).size(); - if (expectedrelationshipcount != actualCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: expected " + expectedrelationshipcount + " for " + term.getName() + " got " + actualCount); - } - } - - private void checkRelationshipNumberforGlossary(int expectedrelationshipcount, Glossary glossary) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - int actualCount = glossaryFVT.getGlossaryRelationships(glossary).size(); - if (expectedrelationshipcount != actualCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: expected " + expectedrelationshipcount + " for " + glossary.getName() + " got " + actualCount); - } - } - - private void checkRelationshipNumberforCategory(int expectedrelationshipcount, Category category) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - int actualCount = catFVT.getCategoryRelationships(category).size(); - if (expectedrelationshipcount != actualCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: expected " + expectedrelationshipcount + " for " + category.getName() + " got " + actualCount); - } - } - - private void createSomeTermRelationships(Term term1, Term term2, Term term3) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - - FVTUtils.validateRelationship(createValidValue(term1, term2)); - FVTUtils.validateRelationship(createAntonym(term1, term2)); - FVTUtils.validateRelationship(createIsaRelationship(term1, term2)); - FVTUtils.validateRelationship(createPreferredTerm(term1, term2)); - FVTUtils.validateRelationship(createRelatedTerm(term1, term2)); - FVTUtils.validateRelationship(createHasA(term1, term2)); - FVTUtils.validateRelationship(createSynonym(term1, term3)); - FVTUtils.validateRelationship(createReplacementTerm(term1, term2)); - FVTUtils.validateRelationship(createTermTYPEDBYRelationship(term1, term2)); - FVTUtils.validateRelationship(createTranslation(term1, term2)); - FVTUtils.validateRelationship(createUsedInContext(term1, term2)); - FVTUtils.validateRelationship(createIsATypeOf(term1, term2)); -// FVTUtils.validateRelationship(createIsATypeOf(term1, term2)); - } - - public IsATypeOf createIsATypeOf(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - IsATypeOf isATypeOf = new IsATypeOf(); - isATypeOf.setDescription("ddd"); - isATypeOf.setSource("source"); - isATypeOf.setSteward("Stew"); - isATypeOf.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - isATypeOf.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, IsATypeOf.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - IsATypeOf createdisATypeOf = glossaryAuthorViewRelationshipsClient.createRel(this.userId, isATypeOf, type ,IS_A_TYPE_OF); - - FVTUtils.validateRelationship(createdisATypeOf); - FVTUtils.checkEnds(isATypeOf, createdisATypeOf, "isATypeOf", "create"); - - if (log.isDebugEnabled()) { - log.debug("Created isATypeOf Relationship " + createdisATypeOf); - } - return createdisATypeOf; - } - - private void isATypeOfFVT(Term term1, Term term2) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - String relType = IS_A_TYPE_OF; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, IsATypeOf.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - IsATypeOf createdIsATypeOf = createIsATypeOf(term1, term2); - String guid = createdIsATypeOf.getGuid(); - if (log.isDebugEnabled()) { - log.debug("Created IsaTypeOf " + createdIsATypeOf); - } - - - IsATypeOf gotIsATypeOf = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotIsATypeOf); - if (log.isDebugEnabled()) { - log.debug("Got IsaTypeOf " + gotIsATypeOf); - } - - IsATypeOf updateIsATypeOf = new IsATypeOf(); - updateIsATypeOf.setDescription("ddd2"); - IsATypeOf updatedIsATypeOf = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateIsATypeOf,type,relType,false); - FVTUtils.validateRelationship(updatedIsATypeOf); - if (!updatedIsATypeOf.getDescription().equals(updateIsATypeOf.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf update description not as expected"); - } - if (!updatedIsATypeOf.getSource().equals(createdIsATypeOf.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf update source not as expected"); - } - if (!updatedIsATypeOf.getSteward().equals(createdIsATypeOf.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf update steward not as expected"); - } - FVTUtils.checkEnds(updatedIsATypeOf,createdIsATypeOf,"IsATypeOf","update"); - if (log.isDebugEnabled()) { - log.debug("Updated IsaTypeOf " + updatedIsATypeOf); - } - IsATypeOf replaceIsATypeOf = new IsATypeOf(); - replaceIsATypeOf.setDescription("ddd3"); - IsATypeOf replacedIsATypeOf = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceIsATypeOf,type,relType,true); - FVTUtils.validateRelationship(replacedIsATypeOf); - if (!replacedIsATypeOf.getDescription().equals(replaceIsATypeOf.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf replace description not as expected"); - } - if (replacedIsATypeOf.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf replace source not as expected"); - } - if (replacedIsATypeOf.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf replace steward not as expected"); - } - if (!replacedIsATypeOf.getEnd1().getNodeGuid().equals(createdIsATypeOf.getEnd1().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf replace end 1 not as expected"); - } - if (!replacedIsATypeOf.getEnd2().getNodeGuid().equals(createdIsATypeOf.getEnd2().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: IsaTypeOf replace end 2 not as expected"); - } - if (log.isDebugEnabled()) { - log.debug("Replaced IsaTypeOf " + replacedIsATypeOf); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotIsATypeOf); - if (log.isDebugEnabled()) { - log.debug("Deleted IsaTypeOf with userId=" + guid); - } - gotIsATypeOf = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotIsATypeOf); - if (log.isDebugEnabled()) { - log.debug("Restored IsaTypeOf with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotIsATypeOf); - if (log.isDebugEnabled()) { - log.debug("Deleted IsaTypeOf with userId=" + guid); - } - - } - - - - private void isaFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - - String relType = IS_A; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, IsA.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - IsA createdIsA = createIsaRelationship(term1, term2); - FVTUtils.validateRelationship(createdIsA); - if (log.isDebugEnabled()) { - log.debug("Created Isa " + createdIsA); - } - String guid = createdIsA.getGuid(); - - IsA gotIsA = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotIsA); - if (log.isDebugEnabled()) { - log.debug("Got Isa " + gotIsA); - } - - IsA updateIsA = new IsA(); - updateIsA.setDescription("ddd2"); - IsA updatedIsA = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateIsA,type,relType,false); - if (!updatedIsA.getDescription().equals(updateIsA.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa update description not as expected"); - } - if (!updatedIsA.getSource().equals(createdIsA.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa update source not as expected"); - } - if (!updatedIsA.getExpression().equals(createdIsA.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa update expression not as expected"); - } - if (!updatedIsA.getSteward().equals(createdIsA.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa update steward not as expected"); - } - if (!updatedIsA.getEnd1().getNodeGuid().equals(createdIsA.getEnd1().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa update end 1 not as expected"); - } - if (!updatedIsA.getEnd2().getNodeGuid().equals(createdIsA.getEnd2().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa update end 2 not as expected"); - } - if (log.isDebugEnabled()) { - log.debug("Updated Isa " + updatedIsA); - } - IsA replaceIsA = new IsA(); - replaceIsA.setDescription("ddd3"); - IsA replacedIsA = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceIsA,type,relType,true); - FVTUtils.validateRelationship(replacedIsA); - if (!replacedIsA.getDescription().equals(replaceIsA.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa replace description not as expected"); - } - if (replacedIsA.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa replace source not as expected"); - } - if (replacedIsA.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa replace expression not as expected"); - } - if (replacedIsA.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa replace steward not as expected"); - } - if (!replacedIsA.getEnd1().getNodeGuid().equals(createdIsA.getEnd1().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa replace end 1 not as expected"); - } - if (!replacedIsA.getEnd2().getNodeGuid().equals(createdIsA.getEnd2().getNodeGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: isa replace end 2 not as expected"); - } - if (log.isDebugEnabled()) { - log.debug("Replaced Isa " + replacedIsA); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotIsa); - if (log.isDebugEnabled()) { - log.debug("Deleted Isa with userId=" + guid); - } - gotIsA = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotIsA); - if (log.isDebugEnabled()) { - log.debug("Restored Isa with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotIsa); - if (log.isDebugEnabled()) { - log.debug("Deleted Isa with userId=" + guid); - } - } - - - private IsA createIsaRelationship(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - IsA isa = new IsA(); - isa.setDescription("ddd"); - isa.setExpression("Ex"); - isa.setSource("source"); - isa.setSteward("Stew"); - isa.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - isa.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, IsA.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - IsA createdIsA = glossaryAuthorViewRelationshipsClient.createRel(this.userId, isa,type,IS_A); - FVTUtils.validateRelationship(createdIsA); - FVTUtils.checkEnds(isa, createdIsA, "isa", "create"); - - return createdIsA; - } - - private void typedByFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - String relType = TYPED_BY; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, TypedBy.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - TypedBy createdTermTYPEDBYRelationship = createTermTYPEDBYRelationship(term1, term2); - FVTUtils.validateRelationship(createdTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Created TypedBy " + createdTermTYPEDBYRelationship); - } - String guid = createdTermTYPEDBYRelationship.getGuid(); - - TypedBy gotTermTYPEDBYRelationship = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Got TypedBy " + gotTermTYPEDBYRelationship); - } - - TypedBy updateTermTYPEDBYRelationship = new TypedBy(); - updateTermTYPEDBYRelationship.setDescription("ddd2"); - TypedBy updatedTermTYPEDBYRelationship = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateTermTYPEDBYRelationship,type, relType, false); - FVTUtils.validateRelationship(updatedTermTYPEDBYRelationship); - if (!updatedTermTYPEDBYRelationship.getDescription().equals(updateTermTYPEDBYRelationship.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: termTYPEDBYRelationship update description not as expected"); - } - if (!updatedTermTYPEDBYRelationship.getSource().equals(createdTermTYPEDBYRelationship.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: termTYPEDBYRelationship update source not as expected"); - } - if (!updatedTermTYPEDBYRelationship.getSteward().equals(createdTermTYPEDBYRelationship.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: termTYPEDBYRelationship update steward not as expected"); - } - FVTUtils.checkEnds(updatedTermTYPEDBYRelationship,createdTermTYPEDBYRelationship,"TYPEDBY","update"); - if (log.isDebugEnabled()) { - log.debug("Updated TypedBy " + updatedTermTYPEDBYRelationship); - } - TypedBy replaceTermTYPEDBYRelationship = new TypedBy(); - replaceTermTYPEDBYRelationship.setDescription("ddd3"); - TypedBy replacedTermTYPEDBYRelationship = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceTermTYPEDBYRelationship,type,relType, true); - FVTUtils.validateRelationship(replacedTermTYPEDBYRelationship); - if (!replacedTermTYPEDBYRelationship.getDescription().equals(replaceTermTYPEDBYRelationship.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: termTYPEDBYRelationship replace description not as expected"); - } - if (replacedTermTYPEDBYRelationship.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: termTYPEDBYRelationship replace source not as expected"); - } - if (replacedTermTYPEDBYRelationship.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: termTYPEDBYRelationship replace steward not as expected"); - } - - FVTUtils.checkEnds(replacedTermTYPEDBYRelationship,createdTermTYPEDBYRelationship,"TYPEDBY","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced TypedBy " + replacedTermTYPEDBYRelationship); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted TypedBy with userId=" + guid); - } - gotTermTYPEDBYRelationship = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Restored TypedBy with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotTermTYPEDBYRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted TypedBy with userId=" + guid); - } - } - - private TypedBy createTermTYPEDBYRelationship(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - TypedBy termTYPEDBYRelationship = new TypedBy(); - termTYPEDBYRelationship.setDescription("ddd"); - termTYPEDBYRelationship.setSource("source"); - termTYPEDBYRelationship.setSteward("Stew"); - termTYPEDBYRelationship.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - termTYPEDBYRelationship.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, TypedBy.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - TypedBy createdTermTYPEDBYRelationship = glossaryAuthorViewRelationshipsClient.createRel(this.userId,termTYPEDBYRelationship,type,TYPED_BY); - FVTUtils.validateRelationship(createdTermTYPEDBYRelationship); - FVTUtils.checkEnds(termTYPEDBYRelationship, createdTermTYPEDBYRelationship, "TypedBy", "create"); - - return createdTermTYPEDBYRelationship; - } - - private void replacementTermFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - - String relType = REPLACEMENT_TERM; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, ReplacementTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - ReplacementTerm createdReplacementTerm = createReplacementTerm(term1, term2); - FVTUtils.validateRelationship(createdReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Created ReplacementTerm " + createdReplacementTerm); - } - String guid = createdReplacementTerm.getGuid(); - - ReplacementTerm gotReplacementTerm = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid, type,relType); - FVTUtils.validateRelationship(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Got ReplacementTerm " + gotReplacementTerm); - } - - ReplacementTerm updateReplacementTerm = new ReplacementTerm(); - updateReplacementTerm.setDescription("ddd2"); - ReplacementTerm updatedReplacementTerm = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateReplacementTerm,type,relType,false); - FVTUtils.validateRelationship(updatedReplacementTerm); - if (!updatedReplacementTerm.getDescription().equals(updateReplacementTerm.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm update description not as expected"); - } - if (!updatedReplacementTerm.getSource().equals(createdReplacementTerm.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm update source not as expected"); - } - if (!updatedReplacementTerm.getExpression().equals(createdReplacementTerm.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm update expression not as expected"); - } - if (!updatedReplacementTerm.getSteward().equals(createdReplacementTerm.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm update steward not as expected"); - } - FVTUtils.checkEnds(updatedReplacementTerm,createdReplacementTerm,"replacementTerm","update"); - if (log.isDebugEnabled()) { - log.debug("Updated ReplacementTerm " + updatedReplacementTerm); - } - ReplacementTerm replaceReplacementTerm = new ReplacementTerm(); - replaceReplacementTerm.setDescription("ddd3"); - ReplacementTerm replacedReplacementTerm = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceReplacementTerm, type,relType,true); - FVTUtils.validateRelationship(replacedReplacementTerm); - if (!replacedReplacementTerm.getDescription().equals(replaceReplacementTerm.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm replace description not as expected"); - } - if (replacedReplacementTerm.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm replace source not as expected"); - } - if (replacedReplacementTerm.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm replace expression not as expected"); - } - if (replacedReplacementTerm.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: replacementTerm replace steward not as expected"); - } - - FVTUtils.checkEnds(replacedReplacementTerm,createdReplacementTerm,"replacementTerm","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced ReplacementTerm " + replacedReplacementTerm); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted ReplacementTerm with userId=" + guid); - } - gotReplacementTerm = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Restored ReplacementTerm with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotReplacementTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted ReplacementTerm with userId=" + guid); - } - } - - private ReplacementTerm createReplacementTerm(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ReplacementTerm replacementTerm = new ReplacementTerm(); - replacementTerm.setDescription("ddd"); - replacementTerm.setExpression("Ex"); - replacementTerm.setSource("source"); - replacementTerm.setSteward("Stew"); - replacementTerm.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - replacementTerm.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, ReplacementTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - ReplacementTerm createdReplacementTerm = glossaryAuthorViewRelationshipsClient.createRel(this.userId, replacementTerm,type, REPLACEMENT_TERM); - FVTUtils.validateRelationship(createdReplacementTerm); - FVTUtils.checkEnds(replacementTerm, createdReplacementTerm, "ReplacementTerm", "create"); - - return createdReplacementTerm; - } - - private void validvalueFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - - String relType = VALID_VALUE; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, ValidValue.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - ValidValue createdValidValue = createValidValue(term1, term2); - FVTUtils.validateRelationship(createdValidValue); - if (log.isDebugEnabled()) { - log.debug("Created ValidValue " + createdValidValue); - } - String guid = createdValidValue.getGuid(); - - ValidValue gotValidValue = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Got ValidValue " + gotValidValue); - } - - ValidValue updateValidValue = new ValidValue(); - updateValidValue.setDescription("ddd2"); - ValidValue updatedValidValue = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateValidValue,type,relType,false); - if (!updatedValidValue.getDescription().equals(updateValidValue.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue update description not as expected"); - } - if (!updatedValidValue.getSource().equals(createdValidValue.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue update source not as expected"); - } - if (!updatedValidValue.getExpression().equals(createdValidValue.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue update expression not as expected"); - } - if (!updatedValidValue.getSteward().equals(createdValidValue.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue update steward not as expected"); - } - - FVTUtils.checkEnds(updatedValidValue, createdValidValue, "ValidValue", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated ValidValue " + updateValidValue); - } - ValidValue replaceValidValue = new ValidValue(); - replaceValidValue.setDescription("ddd3"); - replaceValidValue.setGuid(createdValidValue.getGuid()); - ValidValue replacedValidValue = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceValidValue, type,relType,true); - if (!replacedValidValue.getDescription().equals(replaceValidValue.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue replace description not as expected"); - } - if (replacedValidValue.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue replace source not as expected"); - } - if (replacedValidValue.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue replace expression not as expected"); - } - if (replacedValidValue.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: validValue replace steward not as expected"); - } - FVTUtils.checkEnds(replacedValidValue, createdValidValue, "ValidValue", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced ValidValue " + replaceValidValue); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Deleted ValidValue with userId=" + guid); - } - gotValidValue = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Restored ValidValue with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotValidValue); - if (log.isDebugEnabled()) { - log.debug("Deleted ValidValue with userId=" + guid); - } - } - - private ValidValue createValidValue(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ValidValue validValue = new ValidValue(); - validValue.setDescription("ddd"); - validValue.setExpression("Ex"); - validValue.setSource("source"); - validValue.setSteward("Stew"); - validValue.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - validValue.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, ValidValue.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - ValidValue createdValidValue = glossaryAuthorViewRelationshipsClient.createRel(this.userId, validValue,type, VALID_VALUE); - FVTUtils.validateRelationship(createdValidValue); - FVTUtils.checkEnds(validValue, createdValidValue, "ValidValue", "create"); - - return createdValidValue; - } - - private void preferredtermFVT(Term term1, Term term2) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - - String relType = PREFERRED_TERM; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, PreferredTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - PreferredTerm createdPreferredTerm = createPreferredTerm(term1, term2); - FVTUtils.validateRelationship(createdPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("Created PreferredTerm " + createdPreferredTerm); - } - String guid = createdPreferredTerm.getGuid(); - - PreferredTerm gotPreferredTerm = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("Got PreferredTerm " + gotPreferredTerm); - } - - PreferredTerm updatePreferredTerm = new PreferredTerm(); - updatePreferredTerm.setDescription("ddd2"); - PreferredTerm updatedPreferredTerm = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updatePreferredTerm,type,relType,false); - FVTUtils.validateRelationship(updatedPreferredTerm); - if (!updatedPreferredTerm.getDescription().equals(updatePreferredTerm.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm update description not as expected"); - } - if (!updatedPreferredTerm.getSource().equals(createdPreferredTerm.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm update source not as expected"); - } - if (!updatedPreferredTerm.getExpression().equals(createdPreferredTerm.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm update expression not as expected"); - } - if (!updatedPreferredTerm.getSteward().equals(createdPreferredTerm.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm update steward not as expected"); - } - FVTUtils.checkEnds(updatedPreferredTerm,createdPreferredTerm,"PreferredTerm","update"); - if (log.isDebugEnabled()) { - log.debug("Updated PreferredTerm " + updatedPreferredTerm); - } - PreferredTerm replacePreferredTerm = new PreferredTerm(); - replacePreferredTerm.setDescription("ddd3"); - PreferredTerm replacedPreferredTerm = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replacePreferredTerm, type,relType,true); - FVTUtils.validateRelationship(replacedPreferredTerm); - if (!replacedPreferredTerm.getDescription().equals(replacePreferredTerm.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm replace description not as expected"); - } - if (replacedPreferredTerm.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm replace source not as expected"); - } - if (replacedPreferredTerm.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm replace expression not as expected"); - } - if (replacedPreferredTerm.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: preferredTerm replace steward not as expected"); - } - FVTUtils.checkEnds(replacedPreferredTerm,createdPreferredTerm,"PreferredTerm","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced PreferredTerm " + createdPreferredTerm); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted PreferredTerm with userId=" + guid); - } - gotPreferredTerm = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotPreferredTerm); - if (log.isDebugEnabled()) { - log.debug("restored PreferredTerm with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotPreferredTerm); - log.debug("Deleted PreferredTerm with userId=" + guid); - } - - private PreferredTerm createPreferredTerm(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - PreferredTerm preferredTerm = new PreferredTerm(); - preferredTerm.setDescription("ddd"); - preferredTerm.setExpression("Ex"); - preferredTerm.setSource("source"); - preferredTerm.setSteward("Stew"); - preferredTerm.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - preferredTerm.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, PreferredTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - PreferredTerm createdPreferredTerm = glossaryAuthorViewRelationshipsClient.createRel(this.userId, preferredTerm,type, PREFERRED_TERM); - FVTUtils.validateRelationship(createdPreferredTerm); - FVTUtils.checkEnds(preferredTerm, createdPreferredTerm, "PreferredTerm", "create"); - - return createdPreferredTerm; - } - - private void usedincontextFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - - String relType = USED_IN_CONTEXT; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, UsedInContext.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - UsedInContext createdUsedInContext = createUsedInContext(term1, term2); - FVTUtils.validateRelationship(createdUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Created UsedInContext " + createdUsedInContext); - } - String guid = createdUsedInContext.getGuid(); - - UsedInContext gotUsedInContext = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Got UsedInContext " + gotUsedInContext); - } - - UsedInContext updateUsedInContext = new UsedInContext(); - updateUsedInContext.setDescription("ddd2"); - UsedInContext updatedUsedInContext = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateUsedInContext,type,relType,false); - FVTUtils.validateRelationship(updatedUsedInContext); - if (!updatedUsedInContext.getDescription().equals(updateUsedInContext.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext update description not as expected"); - } - if (!updatedUsedInContext.getSource().equals(createdUsedInContext.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext update source not as expected"); - } - if (!updatedUsedInContext.getExpression().equals(createdUsedInContext.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext update expression not as expected"); - } - if (!updatedUsedInContext.getSteward().equals(createdUsedInContext.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext update steward not as expected"); - } - - FVTUtils.checkEnds(updatedUsedInContext,createdUsedInContext,"UsedInContext","update"); - if (log.isDebugEnabled()) { - log.debug("Updated UsedInContext " + updatedUsedInContext); - } - UsedInContext replaceUsedInContext = new UsedInContext(); - replaceUsedInContext.setDescription("ddd3"); - UsedInContext replacedUsedInContext = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceUsedInContext, type,relType,true); - FVTUtils.validateRelationship(replacedUsedInContext); - if (!replacedUsedInContext.getDescription().equals(replaceUsedInContext.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext replace description not as expected"); - } - if (replacedUsedInContext.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext replace source not as expected"); - } - if (replacedUsedInContext.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext replace expression not as expected"); - } - if (replacedUsedInContext.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: usedInContext replace steward not as expected"); - } - FVTUtils.checkEnds(replacedUsedInContext,createdUsedInContext,"UsedInContext","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced UsedInContext " + replacedUsedInContext); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Deleted UsedInContext with userId=" + guid); - } - gotUsedInContext = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Restored UsedInContext with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotUsedInContext); - if (log.isDebugEnabled()) { - log.debug("Deleted UsedInContext with userId=" + guid); - } - } - - private UsedInContext createUsedInContext(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - UsedInContext usedInContext = new UsedInContext(); - usedInContext.setDescription("ddd"); - usedInContext.setExpression("Ex"); - usedInContext.setSource("source"); - usedInContext.setSteward("Stew"); - usedInContext.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - usedInContext.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, UsedInContext.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - UsedInContext createdUsedInContext = glossaryAuthorViewRelationshipsClient.createRel(this.userId, usedInContext,type, USED_IN_CONTEXT); - FVTUtils.validateRelationship(createdUsedInContext); - FVTUtils.checkEnds(usedInContext, createdUsedInContext, "UsedInContext", "create"); - return createdUsedInContext; - } - - private void translationFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - String relType = TRANSLATION; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Translation.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - Translation createdTranslation = createTranslation(term1, term2); - FVTUtils.validateRelationship(createdTranslation); - if (log.isDebugEnabled()) { - log.debug("Created Translation " + createdTranslation); - } - String guid = createdTranslation.getGuid(); - - Translation gotTranslation = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Got Translation " + gotTranslation); - } - - Translation updateTranslation = new Translation(); - updateTranslation.setDescription("ddd2"); - Translation updatedTranslation = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateTranslation,type,relType,false); - FVTUtils.validateRelationship(updatedTranslation); - if (!updatedTranslation.getDescription().equals(updateTranslation.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation update description not as expected"); - } - if (!updatedTranslation.getSource().equals(createdTranslation.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation update source not as expected"); - } - if (!updatedTranslation.getExpression().equals(createdTranslation.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation update expression not as expected"); - } - if (!updatedTranslation.getSteward().equals(createdTranslation.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation update steward not as expected"); - } - FVTUtils.checkEnds(updatedTranslation, createdTranslation, "translation", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated Translation " + updatedTranslation); - } - Translation replaceTranslation = new Translation(); - replaceTranslation.setDescription("ddd3"); - Translation replacedTranslation = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceTranslation,type,relType,true); - FVTUtils.validateRelationship(replacedTranslation); - if (!replacedTranslation.getDescription().equals(replaceTranslation.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation replace description not as expected"); - } - if (replacedTranslation.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation replace source not as expected"); - } - if (replacedTranslation.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation replace expression not as expected"); - } - if (replacedTranslation.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: translation replace steward not as expected"); - } - FVTUtils.checkEnds(replacedTranslation, updatedTranslation, "translation", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced Translation " + replacedTranslation); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Deleted Translation with userId=" + guid); - } - gotTranslation = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Restored Translation with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotTranslation); - if (log.isDebugEnabled()) { - log.debug("Deleted Translation with userId=" + guid); - } - } - - private Translation createTranslation(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Translation.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - Translation translation = new Translation(); - translation.setDescription("ddd"); - translation.setExpression("Ex"); - translation.setSource("source"); - translation.setSteward("Stew"); - translation.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - translation.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - Translation createdTranslation = glossaryAuthorViewRelationshipsClient.createRel(this.userId, translation,type,TRANSLATION); - FVTUtils.validateRelationship(createdTranslation); - FVTUtils.checkEnds(translation, createdTranslation, "translations", "create"); - - return createdTranslation; - } - - private void hasaFVT(Term term1, Term term3) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - String relType = HAS_A; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, HasA.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - HasA createdHasA = createHasA(term1, term3); - - Term term1PostCreate = termFVT.getTermByGUID(term1.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug(" term1PostCreate.isSpineObject() " + term1PostCreate.isSpineObject()); - log.debug(" term1PostCreate GUID " + term1PostCreate.getSystemAttributes().getGUID()); - log.debug(" term1 GUID " + term1.getSystemAttributes().getGUID()); - } - - Term term3PostCreate = termFVT.getTermByGUID(term3.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug(" term3PostCreate.isSpineAttribute() " + term3PostCreate.isSpineAttribute()); - log.debug(" term3PostCreate GUID " + term3PostCreate.getSystemAttributes().getGUID()); - log.debug(" term3 GUID " + term3.getSystemAttributes().getGUID()); - } - - FVTUtils.validateRelationship(createdHasA); - if (log.isDebugEnabled()) { - log.debug("Created Hasa " + createdHasA); - log.debug("Hasa End1" + createdHasA.getEnd1().getNodeGuid()); - log.debug("Hasa End2" + createdHasA.getEnd2().getNodeGuid()); - } - String guid = createdHasA.getGuid(); - - - HasA gotHasATerm = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotHasATerm); - if (log.isDebugEnabled()) { - log.debug("Got Hasa " + gotHasATerm); - } - HasA updateHasATerm = new HasA(); - updateHasATerm.setDescription("ddd2"); - HasA updatedHasATerm = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateHasATerm,type,relType,false); - FVTUtils.validateRelationship(updatedHasATerm); - if (!updatedHasATerm.getDescription().equals(updateHasATerm.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: HASARelationship update description not as expected"); - } - if (!updatedHasATerm.getSource().equals(createdHasA.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: HASARelationship update source not as expected"); - } - if (!updatedHasATerm.getSteward().equals(createdHasA.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: HASARelationship update steward not as expected"); - } - FVTUtils.checkEnds(updatedHasATerm, createdHasA, "has-a", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated HASARelationship " + updatedHasATerm); - } - HasA replaceHasA = new HasA(); - replaceHasA.setDescription("ddd3"); - HasA replacedHasA = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceHasA,type,relType,true); - FVTUtils.validateRelationship(replacedHasA); - if (!replacedHasA.getDescription().equals(replaceHasA.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: HASARelationship replace description not as expected"); - } - if (replacedHasA.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: HASARelationship replace source not as expected"); - } - if (replacedHasA.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: HASARelationship replace steward not as expected"); - } - FVTUtils.checkEnds(updatedHasATerm, replacedHasA, "has-a", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced HASARelationship " + replacedHasA); - } - term1PostCreate = termFVT.getTermByGUID(term1.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug(" term1PostCreate.isSpineObject() " + term1PostCreate.isSpineObject()); - } - term3PostCreate = termFVT.getTermByGUID(term3.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug(" term3PostCreate.isSpineAttribute() " + term3PostCreate.isSpineAttribute()); - } -// -// check that term1 and term3 have the spine object and attribute flags sets - - term1PostCreate = termFVT.getTermByGUID(term1.getSystemAttributes().getGUID()); - if (!term1PostCreate.isSpineObject()) { - throw new GlossaryAuthorFVTCheckedException("ERROR: expect term 1 to be a Spine Object"); - } - - term3PostCreate = termFVT.getTermByGUID(term3.getSystemAttributes().getGUID()); - - if (!term3PostCreate.isSpineAttribute()) { - throw new GlossaryAuthorFVTCheckedException("ERROR: expect term 3 to be a Spine Attribute"); - } - - - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotHASATerm); - if (log.isDebugEnabled()) { - log.debug("Deleted Hasa with userId=" + guid); - } - gotHasATerm = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotHasATerm); - if (log.isDebugEnabled()) { - log.debug("Restored Hasa with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotHASATerm); - if (log.isDebugEnabled()) { - log.debug("Deleted Hasa with userId=" + guid); - } - } - - private HasA createHasA(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - HasA hasA = new HasA(); - hasA.setDescription("ddd"); - hasA.setSource("source"); - hasA.setSteward("Stew"); - hasA.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - hasA.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - String relType = HAS_A; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, HasA.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - HasA createdTermHasARelationship = glossaryAuthorViewRelationshipsClient.createRel(this.userId, hasA,type, relType); - FVTUtils.validateRelationship(createdTermHasARelationship); - FVTUtils.checkEnds(hasA, createdTermHasARelationship, "Has-a", "create"); - - return createdTermHasARelationship; - } - - private void relatedtermFVT(Term term1, Term term3) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - - String relType = RELATED_TERM; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, RelatedTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - RelatedTerm createdRelatedTerm = createRelatedTerm(term1, term3); - FVTUtils.validateRelationship(createdRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Created RelatedTerm " + createdRelatedTerm); - } - String guid = createdRelatedTerm.getGuid(); - - RelatedTerm gotRelatedTerm = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Got RelatedTerm " + gotRelatedTerm); - } - RelatedTerm updateRelatedTerm = new RelatedTerm(); - updateRelatedTerm.setDescription("ddd2"); - updateRelatedTerm.setGuid(createdRelatedTerm.getGuid()); - RelatedTerm updatedRelatedTerm = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateRelatedTerm,type,relType,false); - FVTUtils.validateRelationship(updatedRelatedTerm); - if (!updatedRelatedTerm.getDescription().equals(updateRelatedTerm.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm update description not as expected"); - } - if (!updatedRelatedTerm.getSource().equals(createdRelatedTerm.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm update source not as expected"); - } - if (!updatedRelatedTerm.getExpression().equals(createdRelatedTerm.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm update expression not as expected"); - } - if (!updatedRelatedTerm.getSteward().equals(createdRelatedTerm.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm update steward not as expected"); - } - FVTUtils.checkEnds(updatedRelatedTerm,createdRelatedTerm,"RelatedTerm","update"); - if (log.isDebugEnabled()) { - log.debug("Updated RelatedTerm " + updatedRelatedTerm); - } - RelatedTerm replaceRelatedTerm = new RelatedTerm(); - replaceRelatedTerm.setDescription("ddd3"); - replaceRelatedTerm.setGuid(createdRelatedTerm.getGuid()); - RelatedTerm replacedRelatedTerm = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceRelatedTerm,type,relType, true); - FVTUtils.validateRelationship(replacedRelatedTerm); - if (!replacedRelatedTerm.getDescription().equals(replaceRelatedTerm.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm replace description not as expected"); - } - if (replacedRelatedTerm.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm replace source not as expected"); - } - if (replacedRelatedTerm.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm replace expression not as expected"); - } - if (replacedRelatedTerm.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: RelatedTerm replace steward not as expected"); - } - FVTUtils.checkEnds(replacedRelatedTerm,createdRelatedTerm,"RelatedTerm","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced RelatedTerm " + replacedRelatedTerm); - } - - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type, relType); - //FVTUtils.validateLine(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted RelatedTerm with userId=" + guid); - } - gotRelatedTerm = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Restored RelatedTerm with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type, relType); - //FVTUtils.validateLine(gotRelatedTerm); - if (log.isDebugEnabled()) { - log.debug("Deleted RelatedTerm with userId=" + guid); - } - } - - private RelatedTerm createRelatedTerm(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - RelatedTerm relatedterm = new RelatedTerm(); - relatedterm.setDescription("ddd"); - relatedterm.setExpression("Ex"); - relatedterm.setSource("source"); - relatedterm.setSteward("Stew"); - relatedterm.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - relatedterm.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, RelatedTerm.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - RelatedTerm createdRelatedTerm = glossaryAuthorViewRelationshipsClient.createRel(this.userId, relatedterm,type,RELATED_TERM); - FVTUtils.validateRelationship(createdRelatedTerm); - FVTUtils.checkEnds(relatedterm, createdRelatedTerm, "RelatedTerm", "create"); - - return createdRelatedTerm; - - } - - private void antonymFVT(Term term1, Term term3) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - - String relType = ANTONYM; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Antonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - Antonym createdAntonym = createAntonym(term1, term3); - FVTUtils.validateRelationship(createdAntonym); - if (log.isDebugEnabled()) { - log.debug("Created Antonym " + createdAntonym); - } - String guid = createdAntonym.getGuid(); - - Antonym gotAntonym = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Got Antonym " + gotAntonym); - } - Antonym updateAntonym = new Antonym(); - updateAntonym.setDescription("ddd2"); - Antonym updatedAntonym = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateAntonym,type,relType, false); - FVTUtils.validateRelationship(updatedAntonym); - if (!updatedAntonym.getDescription().equals(updateAntonym.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym update description not as expected"); - } - if (!updatedAntonym.getSource().equals(createdAntonym.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym update source not as expected"); - } - if (!updatedAntonym.getExpression().equals(createdAntonym.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym update expression not as expected"); - } - if (!updatedAntonym.getSteward().equals(createdAntonym.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym update steward not as expected"); - } - FVTUtils.checkEnds(updatedAntonym,createdAntonym,"Antonym","update"); - if (log.isDebugEnabled()) { - log.debug("Updated Antonym " + updatedAntonym); - } - Antonym replaceAntonym = new Antonym(); - replaceAntonym.setDescription("ddd3"); - replaceAntonym.setGuid(createdAntonym.getGuid()); - Antonym replacedAntonym = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceAntonym,type,relType, true); - FVTUtils.validateRelationship(replacedAntonym); - if (!replacedAntonym.getDescription().equals(replaceAntonym.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym replace description not as expected"); - } - if (replacedAntonym.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym replace source not as expected"); - } - if (replacedAntonym.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym replace expression not as expected"); - } - if (replacedAntonym.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Antonym replace steward not as expected"); - } - FVTUtils.checkEnds(updatedAntonym,createdAntonym,"Antonym","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced Antonym " + replacedAntonym); - } - - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Deleted Antonym with userId=" + guid); - } - gotAntonym = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Restored Antonym with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotAntonym); - if (log.isDebugEnabled()) { - log.debug("Deleted Antonym with userId=" + guid); - } - } - - private Antonym createAntonym(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Antonym antonym = new Antonym(); - antonym.setDescription("ddd"); - antonym.setExpression("Ex"); - antonym.setSource("source"); - antonym.setSteward("Stew"); - antonym.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - antonym.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Antonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - Antonym createdAntonym = glossaryAuthorViewRelationshipsClient.createRel(this.userId, antonym,type,ANTONYM); - FVTUtils.validateRelationship(createdAntonym); - FVTUtils.checkEnds(antonym, createdAntonym, "Antonym", "create"); - return createdAntonym; - } - - private void synonymFVT(Term term1, Term term2) throws InvalidParameterException, PropertyServerException, GlossaryAuthorFVTCheckedException, UserNotAuthorizedException { - String relType = SYNONYM; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - Synonym createdSynonym = createSynonym(term1, term2); - FVTUtils.validateRelationship(createdSynonym); - if (log.isDebugEnabled()) { - log.debug("Created Synonym " + createdSynonym); - } - String guid = createdSynonym.getGuid(); - - Synonym gotSynonym = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type,SYNONYM); - - FVTUtils.validateRelationship(gotSynonym); - if (log.isDebugEnabled()) { - log.debug("Got Synonym " + gotSynonym); - } - //return; - Synonym updateSynonym = new Synonym(); - updateSynonym.setDescription("ddd2"); - - - Synonym updatedSynonym = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateSynonym,type,relType,false); - FVTUtils.validateRelationship(updatedSynonym); - if (!updatedSynonym.getDescription().equals(updateSynonym.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym update description not as expected"); - } - if (log.isDebugEnabled()) { - log.debug(" updatedSynonym " + updatedSynonym.toString()); - } - if (!updatedSynonym.getSource().equals(createdSynonym.getSource())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym update source not as expected"); - } - if (!updatedSynonym.getExpression().equals(createdSynonym.getExpression())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym update expression not as expected"); - } - if (!updatedSynonym.getSteward().equals(createdSynonym.getSteward())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym update steward not as expected"); - } - - FVTUtils.checkEnds(updatedSynonym, createdSynonym, "synonym", "update"); - - if (log.isDebugEnabled()) { - log.debug("Updated Synonym " + createdSynonym); - } - Synonym replaceSynonym = new Synonym(); - replaceSynonym.setDescription("ddd3"); - Synonym replacedSynonym = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceSynonym,type,relType,true); - FVTUtils.validateRelationship(replacedSynonym); - if (!replacedSynonym.getDescription().equals(replaceSynonym.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym replace description not as expected"); - } - if (replacedSynonym.getSource() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym replace source not as expected"); - } - if (replacedSynonym.getExpression() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym replace expression not as expected"); - } - if (replacedSynonym.getSteward() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: synonym replace steward not as expected"); - } - FVTUtils.checkEnds(updatedSynonym, replacedSynonym, "synonym", "replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced Synonym " + replacedSynonym - ); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotSynonym); - if (log.isDebugEnabled()) { - log.debug("Deleted Synonym with userId=" + guid); - } - gotSynonym = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotSynonym); - if (log.isDebugEnabled()) { - log.debug("Restored Synonym with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid, type,relType); - //FVTUtils.validateLine(gotSynonym); - - if (log.isDebugEnabled()) { - log.debug("Hard deleted Synonym with userId=" + guid); - } - } - - public Synonym createSynonym(Term term1, Term term2) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - Synonym synonym = new Synonym(); - synonym.setDescription("ddd"); - synonym.setExpression("Ex"); - synonym.setSource("source"); - synonym.setSteward("Stew"); - synonym.getEnd1().setNodeGuid(term1.getSystemAttributes().getGUID()); - synonym.getEnd2().setNodeGuid(term2.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - //Synonym createdSynonym = glossaryAuthorViewRelationshipsClient.createSynonym(this.userId, synonym); - Synonym createdSynonym = glossaryAuthorViewRelationshipsClient.createRel(this.userId, synonym,type,SYNONYM); - FVTUtils.validateRelationship(createdSynonym); - FVTUtils.checkEnds(synonym, createdSynonym, "synonym", "create"); - return createdSynonym; - } - - - private void termCategorizationFVT(Term term, Category category) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - - String relType = TERM_CATEGORIZATION; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Categorization.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - Categorization createdTermCategorizationRelationship = createTermCategorization(term, category); - FVTUtils.validateRelationship(createdTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Created TermCategorizationRelationship " + createdTermCategorizationRelationship); - } - String guid = createdTermCategorizationRelationship.getGuid(); - - Categorization gotTermCategorizationRelationship = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Got TermCategorizationRelationship " + gotTermCategorizationRelationship); - } - - Categorization updateTermCategorizationRelationship = new Categorization(); - updateTermCategorizationRelationship.setDescription("ddd2"); - Categorization updatedTermCategorizationRelationship = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateTermCategorizationRelationship,type,relType,false); - FVTUtils.validateRelationship(updatedTermCategorizationRelationship); - FVTUtils.checkEnds(updatedTermCategorizationRelationship,createdTermCategorizationRelationship,"TermCategorization","update"); - - if (!updatedTermCategorizationRelationship.getDescription().equals(updateTermCategorizationRelationship.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: TermCategorization update description not as expected"); - } - if (updatedTermCategorizationRelationship.getStatus() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: TermCategorization update status not as expected"); - } - - if (log.isDebugEnabled()) { - log.debug("Updated TermCategorizationRelationship " + createdTermCategorizationRelationship); - } - Categorization replaceTermCategorizationRelationship = new Categorization(); - replaceTermCategorizationRelationship.setDescription("ddd3"); - Categorization replacedTermCategorizationRelationship = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceTermCategorizationRelationship, type,relType,true); - FVTUtils.validateRelationship(replacedTermCategorizationRelationship); - if (!replacedTermCategorizationRelationship.getDescription().equals(replaceTermCategorizationRelationship.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: TermCategorization replace description not as expected"); - } - if (replacedTermCategorizationRelationship.getStatus() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: TermCategorization replace source not as expected"); - } - - FVTUtils.checkEnds(replacedTermCategorizationRelationship,createdTermCategorizationRelationship,"TermCategorization","replace"); - if (log.isDebugEnabled()) { - log.debug("Replaced TermCategorizationRelationship " + replacedTermCategorizationRelationship); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted TermCategorizationRelationship with userId=" + guid); - } - gotTermCategorizationRelationship = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotTermCategorizationRelationship); - if (log.isDebugEnabled()) { - log.debug("Restored TermCategorizationRelationship with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - if (log.isDebugEnabled()) { - log.debug("Deleted TermCategorization with userId=" + guid); - } - } - - public Categorization createTermCategorization(Term term, Category category) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Categorization termCategorization = new Categorization(); - termCategorization.getEnd1().setNodeGuid(category.getSystemAttributes().getGUID()); - termCategorization.getEnd2().setNodeGuid(term.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Categorization.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - Categorization createdTermCategorization = glossaryAuthorViewRelationshipsClient.createRel(this.userId, termCategorization,type, TERM_CATEGORIZATION); - FVTUtils.validateRelationship(createdTermCategorization); - FVTUtils.checkEnds(termCategorization, createdTermCategorization, "TermCategorizationRelationship", "create"); - if (log.isDebugEnabled()) { - log.debug("Created TermCategorizationRelationship " + createdTermCategorization); - } - - return createdTermCategorization; - } - - - private void projectScopeFVT(Project project, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - String relType = PROJECT_SCOPE; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, ProjectScope.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - ProjectScope createdProjectScope = createProjectScope(project, term); - FVTUtils.validateRelationship(createdProjectScope); - - if (log.isDebugEnabled()) { - log.debug("Created ProjectScopeRelationship " + createdProjectScope); - } - String guid = createdProjectScope.getGuid(); - - ProjectScope gotProjectScopeRelationship = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotProjectScopeRelationship); - if (log.isDebugEnabled()) { - log.debug("Got ProjectScopeRelationship " + gotProjectScopeRelationship); - } - - ProjectScope updateProjectScope = new ProjectScope(); - updateProjectScope.setDescription("ddd2"); - updateProjectScope.setGuid(createdProjectScope.getGuid()); - ProjectScope updatedProjectScope = glossaryAuthorViewRelationshipsClient.updateRel(this.userId, guid, updateProjectScope,type,relType,false); - FVTUtils.validateRelationship(updatedProjectScope); - if (!updatedProjectScope.getDescription().equals(updateProjectScope.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Project scope update scopeDescription not as expected"); - } - - FVTUtils.checkEnds(updatedProjectScope,createdProjectScope,"ProjectScope","update"); - - if (log.isDebugEnabled()) { - log.debug("Updated ProjectScopeRelationship " + updatedProjectScope); - } - ProjectScope replaceProjectScope = new ProjectScope(); - replaceProjectScope.setDescription("ddd3"); - ProjectScope replacedProjectScope = glossaryAuthorViewRelationshipsClient.replaceRel(this.userId, guid, replaceProjectScope, type,relType,true); - FVTUtils.validateRelationship(replacedProjectScope); - if (!replacedProjectScope.getDescription().equals(replaceProjectScope.getDescription())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: project scope replace scope description not as expected"); - } - FVTUtils.checkEnds(replacedProjectScope,createdProjectScope,"ProjectScope","replace"); - - if (log.isDebugEnabled()) { - log.debug("Replaced ProjectScopeRelationship " + replacedProjectScope); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotProjectScopeRelationship); - if (log.isDebugEnabled()) { - log.debug("Deleted ProjectScopeRelationship with userId=" + guid); - } - gotProjectScopeRelationship = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotProjectScopeRelationship); - if (log.isDebugEnabled()) { - log.debug("Restored ProjectScopeRelationship with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - //FVTUtils.validateLine(gotProjectScopeRelationship); - - if (log.isDebugEnabled()) { - log.debug("Hard deleted ProjectScopeRelationship with userId=" + guid); - } - } - - protected ProjectScope createProjectScope(Project project, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - ProjectScope projectScope = new ProjectScope(); - projectScope.getEnd1().setNodeGuid(project.getSystemAttributes().getGUID()); - projectScope.getEnd2().setNodeGuid(term.getSystemAttributes().getGUID()); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, ProjectScope.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - ProjectScope createdProjectScope = glossaryAuthorViewRelationshipsClient.createRel(this.userId, projectScope,type, PROJECT_SCOPE); - FVTUtils.validateRelationship(createdProjectScope); - if (log.isDebugEnabled()) { - log.debug("CreatedProjectScopeRelationship " + createdProjectScope); - } - return createdProjectScope; - } - - private void categoryHierarchyLinkFVT(Category parent, Category child) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - - String relType = CATEGORY_HIERARCHY_LINK; - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, CategoryHierarchyLink.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - CategoryHierarchyLink categoryHierarchyLink = createCategoryHierarchyLink(parent, child); - if (log.isDebugEnabled()) { - log.debug("Create CategoryHierarchyLink " + categoryHierarchyLink); - } - String guid = categoryHierarchyLink.getGuid(); - - CategoryHierarchyLink gotCategoryHierarchyLink = glossaryAuthorViewRelationshipsClient.getRel(this.userId, guid,type, relType); - FVTUtils.validateRelationship(gotCategoryHierarchyLink); - if (log.isDebugEnabled()) { - log.debug("Got CategoryHierarchyLink " + gotCategoryHierarchyLink); - } - Category gotChild = glossaryAuthorViewCategory.getByGUID(userId, child.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Got Category gotChild " + gotChild); - } - - checkParent(parent, gotChild); - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - if (log.isDebugEnabled()) { - log.debug("Deleted CategoryHierarchyLink with userId=" + guid); - } - gotCategoryHierarchyLink = glossaryAuthorViewRelationshipsClient.restoreRel(this.userId, guid,type,relType); - FVTUtils.validateRelationship(gotCategoryHierarchyLink); - if (log.isDebugEnabled()) { - log.debug("Restored CategoryHierarchyLink with userId=" + guid); - } - glossaryAuthorViewRelationshipsClient.deleteRel(this.userId, guid,type,relType); - if (log.isDebugEnabled()) { - log.debug("Deleted CategoryHierarchyLink with userId=" + guid); - } - } - - public CategoryHierarchyLink createCategoryHierarchyLink(Category parent, Category child) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, CategoryHierarchyLink.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - CategoryHierarchyLink categoryHierarchyLink = new CategoryHierarchyLink(); - categoryHierarchyLink.getEnd1().setNodeGuid(parent.getSystemAttributes().getGUID()); - categoryHierarchyLink.getEnd2().setNodeGuid(child.getSystemAttributes().getGUID()); - - CategoryHierarchyLink createdCategoryHierarchyLink = glossaryAuthorViewRelationshipsClient.createRel(this.userId, categoryHierarchyLink,type, CATEGORY_HIERARCHY_LINK); - FVTUtils.validateRelationship(createdCategoryHierarchyLink); - FVTUtils.checkEnds(categoryHierarchyLink, createdCategoryHierarchyLink, "CategoryHierarchyLink", "create"); - - if (log.isDebugEnabled()) { - log.debug("Created CategoryHierarchyLink " + createdCategoryHierarchyLink); - log.debug("Created CategoryHierarchyLink End1 " + createdCategoryHierarchyLink.getEnd1().getNodeGuid()); - log.debug("Created CategoryHierarchyLink End2 " + createdCategoryHierarchyLink.getEnd2().getNodeGuid()); - } - - return createdCategoryHierarchyLink; - } - - public void checkParent(Category parent, Category gotChildCategory) throws GlossaryAuthorFVTCheckedException { - if (gotChildCategory.getParentCategory() != null) { - CategorySummary categorySummary = gotChildCategory.getParentCategory(); - String parentGuid = parent.getSystemAttributes().getGUID(); - String parentGuidFromChild = categorySummary.getGuid(); - if(!parentGuid.equals(parentGuidFromChild)) { - throw new GlossaryAuthorFVTCheckedException("ERROR parent category guid - " + parentGuid - + " no equal parent guid " + parentGuidFromChild + " from child."); - } - } else { - throw new GlossaryAuthorFVTCheckedException("ERROR parent category is null"); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RunAllFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RunAllFVT.java deleted file mode 100644 index a1a25c4cbcc..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RunAllFVT.java +++ /dev/null @@ -1,162 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.http.HttpHelper; -//import org.odpi.openmetadata.http; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * FVT resource to call all Glossary Author View API FVT resources - */ -public class RunAllFVT -{ - public static void main(String[] args) - { - HttpHelper.noStrictSSL(); - - try - { - String url = RunAllFVT.getUrl(args); - String serverName = getServerName(args); - String userId = getUserId(args); - performFVT(url, serverName, userId); - System.out.println("FVT ran successfully"); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - System.out.println("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - System.out.println("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - - public static void performFVT(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - int initialGlossaryCount = GlossaryFVT.getGlossaryCount(url, serverName, userId); - int initialTermCount = TermFVT.getTermCount(url, serverName, userId); - int initialCategoryCount = CategoryFVT.getCategoryCount(url, serverName, userId); - int initialSubjectAreaCount = SubjectAreaDefinitionCategoryFVT.getSubjectAreaCount(url, serverName, userId); - int initialProjectCount = ProjectFVT.getProjectCount(url,serverName,userId); - - GlossaryFVT.runIt(url,serverName,userId); - TermFVT.runIt(url,serverName,userId); - CategoryFVT.runIt(url,serverName,userId); - CategoryHierarchyFVT.runIt(url,serverName,userId); - RelationshipsFVT.runIt(url,serverName,userId); - ProjectFVT.runIt(url, serverName, userId); - SubjectAreaDefinitionCategoryFVT.runIt(url,serverName,userId); - GraphFVT.runIt(url,serverName,userId); - EffectiveDatesFVT.runIt(url,serverName,userId); - CheckSerializationFVT.runIt(url, serverName, userId); - ConfigFVT.runIt(url, serverName, userId); - - int finalGlossaryCount = GlossaryFVT.getGlossaryCount(url,serverName,userId); - int finalTermCount = TermFVT.getTermCount(url,serverName,userId); - int finalCategoryCount = CategoryFVT.getCategoryCount(url,serverName,userId); - int finalSubjectAreaCount = SubjectAreaDefinitionCategoryFVT.getSubjectAreaCount(url,serverName,userId); - int finalProjectCount = ProjectFVT.getProjectCount(url,serverName,userId); - - if (initialCategoryCount != finalCategoryCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Categories count incorrect; expected " +initialCategoryCount + " , got " + finalCategoryCount); - } - if (initialTermCount != finalTermCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Terms count incorrect; expected " +initialTermCount + " , got " + finalTermCount); - } - if (initialGlossaryCount != finalGlossaryCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Glossaries count incorrect; expected " +initialGlossaryCount + " , got " + finalGlossaryCount); - } - if (initialSubjectAreaCount != finalSubjectAreaCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: SubjectArea count incorrect; expected " +initialSubjectAreaCount + " , got " + finalSubjectAreaCount); - } - if (initialProjectCount != finalProjectCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Projects count incorrect; expected " +initialProjectCount + " , got " + finalProjectCount); - } - } - - public static String getServerName(String[] args) throws IOException - { - String name = null; - if (args.length > 1) - { - name = args[1]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a OMAG Server Name. Press enter to get the default (" + FVTConstants.SERVER_NAME1 + ")) :"); - name = br.readLine(); - if (name.length() == 0) //("")) - { - name = FVTConstants.SERVER_NAME1; - } - - } - return name; - } - /** - * This method gets the userId that the sample will use to issue calls to the server. - *

- * If arguments are supplied then the third parameter is used as a userId. - *

- * If no userId is supplied then prompt the user to enter a valid userId, enter means to use the default userId. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occurred while getting input from the user. - */ - public static String getUserId(String[] args) throws IOException - { - String userId = null; - if (args.length > 2) - { - userId = args[2]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a userId. Press enter to get the default (" + FVTConstants.USERID + ")) :"); - userId = br.readLine(); - if (userId.length() == 0) //equals("")) - { - userId = FVTConstants.USERID; - } - - } - return userId; - } - - /** - * This method gets the url that the tests will use to issue calls to the server. - *

- * If arguments are supplied then the first parameter is used as a url. - *

- * If no url is supplied then prompt the user to enter a valid url, enter means to use the default url. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occured while getting input from the user. - */ - public static String getUrl(String[] args) throws IOException - { - String url = null; - if (args.length > 0) - { - url = args[0]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a URL. Press enter to get the default (" + FVTConstants.DEFAULT_URL + ".)) :"); - url = br.readLine(); - if (url.length() == 0)//equals("")) - { - url = FVTConstants.DEFAULT_URL; - } - } - return url; - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RunAllFVTOn2Servers.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RunAllFVTOn2Servers.java deleted file mode 100644 index a004befe3df..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/RunAllFVTOn2Servers.java +++ /dev/null @@ -1,71 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.http.HttpHelper; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * FVT resource to call Glossary Author View FVT resources on 2 in memory servers names Server1 and - * Server2. - */ -public class RunAllFVTOn2Servers -{ - - public static void main(String args[]) - { - HttpHelper.noStrictSSL(); - - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - - RunAllFVT.performFVT(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - RunAllFVT.performFVT(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - System.out.println("FVT ran successfully"); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - System.out.println("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - System.out.println("ERROR: " + e.getMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - - /** - * This method gets the url that the tests will use to issue calls to the server. - *

- * If arguments are supplied then the first parameter is used as a url. - *

- * If no url is supplied then prompt the user to enter a valid url, enter means to use the default url. - * - * @param args arguments supplied - * @return the url to use on the calls to the server - * @throws IOException IO exception occurred while getting input from the user. - */ - public static String getUrl(String args[]) throws IOException - { - String url = null; - if (args.length > 0) - { - url = args[0]; - } else - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - System.out.print("Enter a URL. Press enter to get the default (" + FVTConstants.DEFAULT_URL + ".)):"); - url = br.readLine(); - if (url.length() == 0)//.equals("")) - { - url = FVTConstants.DEFAULT_URL; - } - } - return url; - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/SubjectAreaDefinitionCategoryFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/SubjectAreaDefinitionCategoryFVT.java deleted file mode 100644 index 5594571fc7f..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/SubjectAreaDefinitionCategoryFVT.java +++ /dev/null @@ -1,296 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.graph.GlossaryAuthorViewGraphClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.categories.SubjectAreaCategoryClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.subjectAreaDefinitionCategory.GlossaryAuthorViewSubjectAreaDefinitionCategoryClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.*; - -/** - * FVT resource to call Glossary Author View API - */ -public class SubjectAreaDefinitionCategoryFVT -{ - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for subject area definition sample"; - private static final String DEFAULT_TEST_CATEGORY_NAME = "Test subject area definition A"; - private static final String DEFAULT_TEST_CATEGORY_NAME_UPDATED = "Test subject area definition A updated"; - private static final String DEFAULT_TEST_CATEGORY_NAME2 = "Test subject area definition B"; - private static final String DEFAULT_TEST_CATEGORY_NAME3 = "Test subject area definition C"; - //private static SubjectAreaNodeClient subjectAreaCategory = null; - private static GlossaryAuthorViewSubjectAreaDefinitionCategoryClient subjectAreaCategory = null; - private GlossaryFVT glossaryFVT =null; - private String userId = null; - private int existingSubjectAreaCount = 0; - private static GlossaryAuthorViewRestClient glossaryAuthorViewRestClient = null; - private static GlossaryAuthorViewGraphClient glossaryAuthorViewGraphClient = null; - private static Logger log = LoggerFactory.getLogger(SubjectAreaDefinitionCategoryFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingSubjectAreas - */ - private Set createdSubjectAreasSet = new HashSet<>(); - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage()); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - } - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - public SubjectAreaDefinitionCategoryFVT(String url,String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(serverName, url); - subjectAreaCategory = new GlossaryAuthorViewSubjectAreaDefinitionCategoryClient(client); - glossaryFVT = new GlossaryFVT(url,serverName,userId); - this.userId=userId; - existingSubjectAreaCount = findSubjectAreaDefinitions("").size(); - if (log.isDebugEnabled()) { - log.debug("existingSubjectAreaCount " + existingSubjectAreaCount); - } - } - -/* public SubjectAreaDefinitionCategoryFVT(String url,String serverName,String omagServerName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(omagServerName, url); - subjectAreaCategory = new GlossaryAuthorViewSubjectAreaDefinitionCategoryClient(client); - glossaryFVT = new GlossaryFVT(url,serverName,userId); - this.userId=userId; - existingSubjectAreaCount = findSubjectAreaDefinitions("").size(); - System.out.println("existingSubjectAreaCount " + existingSubjectAreaCount); - }*/ - -/* private String retrieveOmagServerName(String viewServiceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - - List viewServiceConfigs = glossaryAuthorViewGraphClient.getViewServiceConfigs(userId); -// Map viewServiceOptions; -// System.out.println(" viewServiceConfigs " + viewServiceConfigs.toString()); - - for (ViewServiceConfig vsc: viewServiceConfigs){ -// System.out.println(vsc.getViewServiceName()); - if (vsc.getViewServiceName().equals(viewServiceName)) { -// System.out.println("$$$$$$$$$$$$ FOUND GLOSSARY AUTHOR $$$$$$$$$$$"); - System.out.println("OMAG Server URL " + String.valueOf(vsc.getOMAGServerPlatformRootURL())); - return String.valueOf(vsc.getOMAGServerName()); - } - } - return null; - }*/ - - public static void runIt(String url, String serverName, String userId) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - try - { - System.out.println("SubjectAreaDefinitionCategoryFVT runIt started"); - SubjectAreaDefinitionCategoryFVT fvt = new SubjectAreaDefinitionCategoryFVT(url, serverName, userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("SubjectAreaDefinitionCategoryFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - public static int getSubjectAreaCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException { - SubjectAreaDefinitionCategoryFVT fvt = new SubjectAreaDefinitionCategoryFVT(url, serverName, userId); - return fvt.findSubjectAreaDefinitions("").size(); - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - FVTUtils.validateNode(glossary); - if (log.isDebugEnabled()) { - log.debug("Create a subjectArea1"); - } - SubjectAreaDefinition subjectArea1 = createSubjectAreaDefinitionWithGlossaryGuid(DEFAULT_TEST_CATEGORY_NAME, glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(subjectArea1); - if (log.isDebugEnabled()) { - log.debug("Create a subjectArea2"); - } - SubjectAreaDefinition subjectArea2 = createSubjectAreaDefinitionWithGlossaryGuid(DEFAULT_TEST_CATEGORY_NAME2, glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(subjectArea2); - SubjectAreaDefinition subjectAreaForUpdate = new SubjectAreaDefinition(); - subjectAreaForUpdate.setName(DEFAULT_TEST_CATEGORY_NAME_UPDATED); - - if (subjectArea1 != null) - { - if (log.isDebugEnabled()) { - log.debug("Get the subjectArea1 "); - } - String guid = subjectArea1 .getSystemAttributes().getGUID(); - SubjectAreaDefinition gotSubjectAreaDefinition = getSubjectAreaDefinitionByGUID(guid); - if (log.isDebugEnabled()) { - log.debug("Update the subjectArea1 "); - } - SubjectAreaDefinition updatedSubjectAreaDefinition = updateSubjectAreaDefinition(guid, subjectAreaForUpdate); - FVTUtils.validateNode(updatedSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Get the subjectArea1 again"); - } - gotSubjectAreaDefinition = getSubjectAreaDefinitionByGUID(guid); - FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Delete the subjectArea1 "); - } - deleteSubjectAreaDefinition(guid); - //FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("restore the subjectArea1 "); - } - gotSubjectAreaDefinition = restoreSubjectAreaDefinition(guid); - FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Delete the subjectArea1 "); - } - deleteSubjectAreaDefinition(guid); - //FVTUtils.validateNode( gotSubjectAreaDefinition); - if (log.isDebugEnabled()) { - log.debug("Purge a subjectArea1 "); - } - - // create subjectArea DEFAULT_TEST_CATEGORY_NAME3 with parent - if (log.isDebugEnabled()) { - log.debug("Create a subjectArea with a parent subjectArea"); - log.debug("Create a category with a parent category"); - } - - SubjectAreaDefinition subjectAreaDefinition3 = createSubjectAreaDefinitionWithParentGlossaryGuid( DEFAULT_TEST_CATEGORY_NAME3, subjectArea2.getSystemAttributes().getGUID(), glossary.getSystemAttributes().getGUID()); - FVTUtils.validateNode(subjectAreaDefinition3); - } - } - private SubjectAreaDefinition createSubjectAreaDefinitionWithParentGlossaryGuid(String subjectAreaName, String parentGuid, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition subjectArea = new SubjectAreaDefinition(); - subjectArea.setName(subjectAreaName); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - subjectArea.setGlossary(glossarySummary); - CategorySummary parentCategory = new CategorySummary(); - parentCategory.setGuid(parentGuid); - subjectArea.setParentCategory(parentCategory); - SubjectAreaDefinition newSubjectAreaDefinition = subjectAreaCategory.create(this.userId, subjectArea); - - if (newSubjectAreaDefinition != null) - { - createdSubjectAreasSet.add(newSubjectAreaDefinition.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created SubjectAreaDefinition " + newSubjectAreaDefinition.getName() + " with glossaryGuid " + newSubjectAreaDefinition.getSystemAttributes().getGUID()); - } - } - return newSubjectAreaDefinition; - } - - public SubjectAreaDefinition createSubjectAreaDefinitionWithGlossaryGuid(String subjectAreaName, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition subjectArea = new SubjectAreaDefinition(); - subjectArea.setName(subjectAreaName); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - subjectArea.setGlossary(glossarySummary); - SubjectAreaDefinition newSubjectAreaDefinition = subjectAreaCategory.create(this.userId, subjectArea); - if (newSubjectAreaDefinition != null) - { - createdSubjectAreasSet.add(newSubjectAreaDefinition.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("Created SubjectAreaDefinition " + newSubjectAreaDefinition.getName() + " with guid " + newSubjectAreaDefinition.getSystemAttributes().getGUID()); - } - } - return newSubjectAreaDefinition; - } - - - public SubjectAreaDefinition getSubjectAreaDefinitionByGUID(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition subjectArea = subjectAreaCategory.getByGUID(this.userId, guid); - if (subjectArea != null) - { - if (log.isDebugEnabled()) { - log.debug("Got SubjectAreaDefinition " + subjectArea.getName() + " with userId " + subjectArea.getSystemAttributes().getGUID() + " and status " + subjectArea.getSystemAttributes().getStatus()); - } - } - return subjectArea; - } - - public SubjectAreaDefinition updateSubjectAreaDefinition(String guid, SubjectAreaDefinition subjectArea) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition updatedSubjectAreaDefinition = subjectAreaCategory.update(this.userId, guid, subjectArea,true); - if (updatedSubjectAreaDefinition != null) - { - if (log.isDebugEnabled()) { - log.debug("Updated SubjectAreaDefinition name to " + updatedSubjectAreaDefinition.getName()); - } - } - return updatedSubjectAreaDefinition; - } - - public void deleteSubjectAreaDefinition(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - subjectAreaCategory.delete(this.userId, guid); - createdSubjectAreasSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Deleted SubjectAreaDefinition guid is " + guid); - } - } - - - public SubjectAreaDefinition restoreSubjectAreaDefinition(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - SubjectAreaDefinition restoredSubjectAreaDefinition = subjectAreaCategory.restore(this.userId, guid); - if (restoredSubjectAreaDefinition != null) - { - createdSubjectAreasSet.add(restoredSubjectAreaDefinition.getSystemAttributes().getGUID()); - if (log.isDebugEnabled()) { - log.debug("restored SubjectAreaDefinition name is " + restoredSubjectAreaDefinition.getName()); - } - } - return restoredSubjectAreaDefinition; - } - public List findSubjectAreaDefinitions(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - return subjectAreaCategory.find(this.userId, findRequest,false, true); - } - private void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException { - deleteRemainingSubjectAreas(); - glossaryFVT.deleteRemainingGlossaries(); - } - void deleteRemainingSubjectAreas() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException { - Iterator iter = createdSubjectAreasSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteSubjectAreaDefinition(guid); - } - List subjectAreas = findSubjectAreaDefinitions(""); - if (subjectAreas.size() != existingSubjectAreaCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " + existingSubjectAreaCount + " Subject Area Definitions to be found, got " + subjectAreas.size()); - } - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/TermFVT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/TermFVT.java deleted file mode 100644 index 346a51a5091..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/TermFVT.java +++ /dev/null @@ -1,785 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.term.GlossaryAuthorViewTermClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaNodeClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidence; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Confidentiality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Criticality; -import org.odpi.openmetadata.accessservices.subjectarea.properties.classifications.Retention; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.ConfidenceLevel; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.CriticalityLevel; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.RetentionBasis; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.GovernanceClassifications; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -//import java.security.InvalidParameterException; -import java.util.*; -import java.util.stream.Collectors; - -/** - * FVT resource to call Glossary Author View term API - */ -public class TermFVT { - private static final String DEFAULT_TEST_GLOSSARY_NAME = "Test Glossary for term FVT"; - private static final String DEFAULT_TEST_TERM_NAME = "Test term A"; - private static final String DEFAULT_TEST_TERM_NAME_UPDATED = "Test term A updated"; - private static final String DEFAULT_TEST_TERM_LIST = "Test term Number "; - private SubjectAreaNodeClient subjectAreaTerm = null; - private GlossaryAuthorViewTermClient glossaryAuthorViewTermClient = null; - private GlossaryFVT glossaryFVT =null; - private CategoryFVT categoryFVT =null; - private SubjectAreaDefinitionCategoryFVT subjectAreaFVT =null; - private String userId =null; - private int existingTermCount = 0; - private static Logger log = LoggerFactory.getLogger(TermFVT.class); - - /* - * Keep track of all the created guids in this set, by adding create and restore guids and removing when deleting. - * At the end of the test it will delete any remaining guids. - * - * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingTerms. - */ - private Set createdTermsSet = new HashSet<>(); - - public static void main(String args[]) - { - try - { - String url = RunAllFVTOn2Servers.getUrl(args); - runWith2Servers(url); - } catch (IOException e1) - { - System.out.println("Error getting user input"); - } catch (GlossaryAuthorFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); - } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); - } - - } - public TermFVT(String url,String serverName,String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - GlossaryAuthorViewRestClient client = new GlossaryAuthorViewRestClient(serverName, url); - //subjectAreaTerm = new SubjectAreaTermClient<>(client); - this.userId=userId; - - glossaryAuthorViewTermClient = new GlossaryAuthorViewTermClient(client); - - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - glossaryFVT = new GlossaryFVT(url,serverName,userId); - categoryFVT = new CategoryFVT(url, serverName,userId); - //optionKey - - subjectAreaFVT = new SubjectAreaDefinitionCategoryFVT(url, serverName,userId); - - existingTermCount = findTerms("").size(); - if (log.isDebugEnabled()) { - log.debug("existingTermCount " + existingTermCount); - } - } - - - private ViewServiceConfig retrieveGlossaryAuthorConfig() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - return glossaryAuthorViewTermClient.getGlossaryAuthViewServiceConfig(userId); - - } - - - public static void runWith2Servers(String url) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); - runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); - } - - public static void runIt(String url, String serverName, String userId) throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - try { - System.out.println("TermFVT runIt started"); - TermFVT fvt =new TermFVT(url,serverName,userId); - fvt.run(); - fvt.deleteRemaining(); - System.out.println("TermFVT runIt stopped"); - } - catch (Exception error) { - log.error("The FVT Encountered an Exception", error); - throw error; - } - } - public static int getTermCount(String url, String serverName, String userId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException, GlossaryAuthorFVTCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - TermFVT fvt = new TermFVT(url, serverName, userId); - return fvt.findTerms("").size(); - } - - public void run() throws GlossaryAuthorFVTCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Glossary glossary= glossaryFVT.createGlossary(DEFAULT_TEST_GLOSSARY_NAME); - if (log.isDebugEnabled()) { - log.debug("Create a term1"); - } - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - Term term1 = createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - FVTUtils.validateNode(term1); - if (log.isDebugEnabled()) { - log.debug("Create a term1 using glossary userId"); - } - Term term2 = createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - FVTUtils.validateNode(term2); - if (log.isDebugEnabled()) { - log.debug("Create a term2 using glossary userId"); - } - - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(""); - List results = glossaryFVT.getTerms(glossaryGuid, findRequest); - if (results.size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 back on getGlossaryTerms " + results.size()); - } - findRequest.setPageSize(1); - results = glossaryFVT.getTerms(glossaryGuid, findRequest); - if (results.size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 back on getGlossaryTerms with page size 1, got " + results.size()); - } - - Term termForUpdate = new Term(); - termForUpdate.setName(DEFAULT_TEST_TERM_NAME_UPDATED); - if (log.isDebugEnabled()) { - log.debug("Get term1"); - } - String guid = term1.getSystemAttributes().getGUID(); - Term gotTerm = getTermByGUID(guid); - FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Update term1"); - } - Term updatedTerm = updateTerm(guid, termForUpdate); - FVTUtils.validateNode(updatedTerm); - if (log.isDebugEnabled()) { - log.debug("Get term1 again"); - } - gotTerm = getTermByGUID(guid); - FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Delete term1"); - } - deleteTerm(guid); - if (log.isDebugEnabled()) { - log.debug("Restore term1"); - } - //FVTUtils.validateNode(gotTerm); - gotTerm = restoreTerm(guid); - FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Delete term1 again"); - } - deleteTerm(guid); - //FVTUtils.validateNode(gotTerm); - if (log.isDebugEnabled()) { - log.debug("Create term3 with governance actions"); - } - GovernanceClassifications governanceClassifications = createGovernanceClassifications(); - Term term3 = createTermWithGovernanceClassifications(DEFAULT_TEST_TERM_NAME, glossaryGuid, governanceClassifications); - FVTUtils.validateNode(term3); - if (!governanceClassifications.getConfidence().getLevel().equals(term3.getGovernanceClassifications().getConfidence().getLevel())){ - throw new GlossaryAuthorFVTCheckedException("ERROR: Governance actions confidence not returned as expected"); - } - if (!governanceClassifications.getConfidentiality().getLevel().equals(term3.getGovernanceClassifications().getConfidentiality().getLevel())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Governance actions confidentiality not returned as expected"); - } - if (!governanceClassifications.getRetention().getBasis().equals(term3.getGovernanceClassifications().getRetention().getBasis())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Governance actions retention not returned as expected"); - } - if (!governanceClassifications.getCriticality().getLevel().equals(term3.getGovernanceClassifications().getCriticality().getLevel())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Governance actions criticality not returned as expected. "); - } - GovernanceClassifications governanceClassifications2 = create2ndGovernanceClassifications(); - if (log.isDebugEnabled()) { - log.debug("Update term3 with and change governance actions"); - } - Term term3ForUpdate = new Term(); - term3ForUpdate.setName(DEFAULT_TEST_TERM_NAME_UPDATED); - term3ForUpdate.setGovernanceClassifications(governanceClassifications2); - - Term updatedTerm3 = updateTerm(term3.getSystemAttributes().getGUID(), term3ForUpdate); - FVTUtils.validateNode(updatedTerm3); - if (!governanceClassifications2.getConfidence().getLevel().equals(updatedTerm3.getGovernanceClassifications().getConfidence().getLevel())){ - throw new GlossaryAuthorFVTCheckedException("ERROR: Governance actions confidence not returned as expected"); - } - if (!governanceClassifications2.getConfidentiality().getLevel().equals(updatedTerm3.getGovernanceClassifications().getConfidentiality().getLevel())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Governance actions confidentiality not returned as expected"); - } - if (updatedTerm3.getGovernanceClassifications().getRetention() !=null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Governance actions retention not null as expected"); - } - // https://github.com/odpi/egeria/issues/3457 the below line when uncommented causes an error with the graph repo. -// if (updatedTerm3.getGovernanceActions().getCriticality().getLevel() !=null) { -// throw new SubjectAreaFVTCheckedException("ERROR: Governance actions criticality not returned as expected. It is " + updatedTerm3.getGovernanceActions().getCriticality().getLevel().getName()); -// } - String spacedTermName = "This is a Term with spaces in name"; - int allcount = glossaryAuthorViewTermClient.findAll(userId).size(); - int yyycount = findTerms("yyy").size(); - int zzzcount = findTerms("zzz").size(); - int spacedTermcount = findTerms( spacedTermName).size(); - - if (log.isDebugEnabled()) { - log.debug("create terms to find"); - } - Term termForFind1 = getTermForInput("abc",glossaryGuid); - termForFind1.setDescription("yyy"); - termForFind1 = issueCreateTerm(termForFind1); - FVTUtils.validateNode(termForFind1); - Term termForFind2 = createTerm("yyy",glossaryGuid); - FVTUtils.validateNode(termForFind2); - Term termForFind3 = createTerm("zzz",glossaryGuid); - FVTUtils.validateNode(termForFind3); - Term termForFind4 = createTerm("This is a Term with spaces in name",glossaryGuid); - FVTUtils.validateNode(termForFind4); - - results = findTerms("zzz"); - if (results.size() !=zzzcount+1 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: zzz Expected " + zzzcount+1+ " back on the find got " +results.size()); - } - results = findTerms("yyy"); - if (results.size() !=yyycount + 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: yyy Expected " + yyycount+1 + " back on the find got " +results.size()); - } - results = findTerms(null); //it's find all terms - if (results.size() !=allcount + 4 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: allcount Expected " + allcount + 4 + " back on the find got " +results.size()); - } - - results = glossaryAuthorViewTermClient.findAll(userId); //it's find all terms - if (results.size() !=allcount + 4 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: allcount2 Expected " + allcount + 4 + " back on the find got " +results.size()); - } - //soft delete a term and check it is not found - deleteTerm(termForFind2.getSystemAttributes().getGUID()); - //FVTUtils.validateNode(deleted4); - results = findTerms("yyy"); - if (results.size() !=yyycount +1 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: yyy2 Expected " +yyycount +1 + " back on the find got " +results.size()); - } - - // search for a term with a name with spaces in - results = findTerms(spacedTermName); - if (results.size() != spacedTermcount +1 ) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected spaced " + spacedTermcount+1 + " back on the find got " +results.size()); - } - - Term term = termForFind4; - // we need to find a term that has our glossary so we can see how the summary changes when we change the - // glossary effectivity - long now = new Date().getTime(); - long fromTermTime = new Date(now+6*1000*60*60*24).getTime(); - long toTermTime = new Date(now+7*1000*60*60*24).getTime(); - - term.setEffectiveFromTime(fromTermTime); - term.setEffectiveToTime(toTermTime); - Term updatedFutureTerm = updateTerm(term.getSystemAttributes().getGUID(), term); - if (updatedFutureTerm.getEffectiveFromTime().longValue()!=fromTermTime) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected term from time to update"); - } - if (updatedFutureTerm.getEffectiveToTime().longValue() !=toTermTime) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected term to time to update"); - } - long fromGlossaryTime = new Date(now+8*1000*60*60*24).getTime(); - long toGlossaryTime = new Date(now+9*1000*60*60*24).getTime(); - glossary.setEffectiveFromTime(fromGlossaryTime); - glossary.setEffectiveToTime(toGlossaryTime); - Glossary updatedFutureGlossary= glossaryFVT.updateGlossary(glossaryGuid, glossary); - - if (updatedFutureGlossary.getEffectiveFromTime().longValue()!= fromGlossaryTime) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected glossary from time to update"); - } - if (updatedFutureGlossary.getEffectiveToTime().longValue()!= toGlossaryTime) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected glossary to time to update"); - } - - Term newTerm = getTermByGUID(term.getSystemAttributes().getGUID()); - - GlossarySummary glossarySummary = newTerm.getGlossary(); - - if (glossarySummary.getFromEffectivityTime().longValue()!= fromGlossaryTime) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected from glossary summary time "+glossarySummary.getFromEffectivityTime() + " to equal " +fromGlossaryTime); - } - if (glossarySummary.getToEffectivityTime().longValue() != toGlossaryTime) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected to glossary summary time "+glossarySummary.getToEffectivityTime() + " to equal " + toGlossaryTime); - } - - if (glossarySummary.getRelationshipguid() == null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected glossary summary non null relationship"); - } - if (glossarySummary.getFromRelationshipEffectivityTime() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected glossary summary null relationship from time"); - } - if (glossarySummary.getToRelationshipEffectivityTime() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected glossary summary null relationship to time"); - } - Term term5 = new Term(); - term5.setSpineObject(true); - term5.setName("Term5"); - glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term5.setGlossary(glossarySummary); - Term createdTerm5 = issueCreateTerm(term5); - if (createdTerm5.isSpineObject() == false) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected isSpineObject to be true "); - } - Term term6 = new Term(); - term6.setSpineAttribute(true); - term6.setName("Term6"); - glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term6.setGlossary(glossarySummary); - Term createdTerm6 = issueCreateTerm(term6); - if (createdTerm6.isSpineAttribute() == false) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected isSpineAttribute to be true "); - } - Term term7 = new Term(); - term7.setObjectIdentifier(true); - term7.setName("Term7"); - glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term7.setGlossary(glossarySummary); - Term createdTerm7 = issueCreateTerm(term7); - if (createdTerm7.isObjectIdentifier() == false) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected isObjectIdentifier to be true "); - } - // make sure there is a term with the name - createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - - Term termForUniqueQFN2= createTerm(DEFAULT_TEST_TERM_NAME, glossaryGuid); - if (termForUniqueQFN2 == null || termForUniqueQFN2.getQualifiedName().length() == 0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected qualified name to be set"); - } - - // test categories - - Category cat1 = categoryFVT.createCategoryWithGlossaryGuid("cat1", glossaryGuid); - - Category cat2 = subjectAreaFVT.createSubjectAreaDefinitionWithGlossaryGuid("cat2", glossaryGuid); - Category cat3 = categoryFVT.createCategoryWithGlossaryGuid("cat3",glossaryGuid); - CategorySummary cat1Summary = new CategorySummary(); - cat1Summary.setGuid(cat1.getSystemAttributes().getGUID()); - CategorySummary cat2Summary = new CategorySummary(); - cat2Summary.setGuid(cat2.getSystemAttributes().getGUID()); - CategorySummary cat3Summary = new CategorySummary(); - cat3Summary.setGuid(cat3.getSystemAttributes().getGUID()); - - List suppliedCategories = new ArrayList<>(); - suppliedCategories.add(cat1Summary); - - Term term4cats = getTermForInput(DEFAULT_TEST_TERM_NAME,glossaryGuid); - Term createdTerm4cats =issueCreateTerm(term4cats); - if (createdTerm4cats.getCategories() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected null categories created when none were requested"); - } - - term4cats = getTermForInput(DEFAULT_TEST_TERM_NAME,glossaryGuid); - term4cats.setCategories(suppliedCategories); - createdTerm4cats =issueCreateTerm(term4cats); - if (createdTerm4cats.getCategories().size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 categories returned"); - } - if (!createdTerm4cats.getCategories().get(0).getGuid().equals(cat1Summary.getGuid())) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected response category guid to match the requested category guid."); - } - if (cat1.getSystemAttributes().getGUID() != null) log.error("guid is null 1" + cat1.getSystemAttributes().getGUID()); - - if (categoryFVT.getTerms(cat1.getSystemAttributes().getGUID()) == null) log.error("Its null"); - if (categoryFVT.getTerms(cat1.getSystemAttributes().getGUID()).size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected the category to have 1 term."); - } - - suppliedCategories.add(cat2Summary); - term4cats.setCategories(suppliedCategories); - Term createdTerm4cats2 =issueCreateTerm(term4cats); - if (createdTerm4cats2.getCategories().size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 categories returned"); - } - List categories = getCategoriesAPI(createdTerm4cats2.getSystemAttributes().getGUID(),0,5); - if (categories.size() !=2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 categories returned on get Categories API call"); - } - - // update with null categories should change nothing - createdTerm4cats2.setCategories(null); - Term updatedTerm4cats2 = updateTerm(createdTerm4cats2.getSystemAttributes().getGUID(),createdTerm4cats2); - if (updatedTerm4cats2.getCategories().size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 categories returned"); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),0,5).size() !=2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 categories returned on get Categories API call after update"); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),1,5).size() !=1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 categories returned on get Categories API call after update startingFrom 1"); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),0,1).size() !=1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 categories returned on get Categories API call after update pageSize 1"); - } - - // replace categories with null - createdTerm4cats.setCategories(null); - Term replacedTerm4cats = replaceTerm(createdTerm4cats.getSystemAttributes().getGUID(), createdTerm4cats); -// System.out.println("DDebug msg " + replacedTerm4cats.getCategories().toString()); - if (replacedTerm4cats.getCategories() != null) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected replace with null to get rid of the categorizations."); - } - List cats = getCategoriesAPI(replacedTerm4cats.getSystemAttributes().getGUID(),0,5); - if (cats ==null || cats.size() != 0) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Use API call to check replace with null to get rid of the categorizations."); - } - // update term to gain 2 categories - createdTerm4cats.setCategories(suppliedCategories); - updatedTerm4cats2 = updateTerm(createdTerm4cats.getSystemAttributes().getGUID(),createdTerm4cats); - if (updatedTerm4cats2.getCategories().size() != 2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected update to gain 2 categorizations."); - } - if (getCategoriesAPI(updatedTerm4cats2.getSystemAttributes().getGUID(),0,5).size() !=2) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Use API call to check update to gain 2 categorizations"); - } - testCategorizedTermsWithSearchCriteria(); - - List supplied3Categories = new ArrayList<>(); - supplied3Categories.add(cat1Summary); - supplied3Categories.add(cat2Summary); - supplied3Categories.add(cat3Summary); - updatedTerm4cats2.setCategories(supplied3Categories); - updatedTerm4cats2 = updateTerm(createdTerm4cats.getSystemAttributes().getGUID(), updatedTerm4cats2); - if (updatedTerm4cats2.getCategories().size() != 3) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected update to have 3 categorizations."); - } - - // clean up - categoryFVT.deleteCategory(cat1Summary.getGuid()); - categoryFVT.deleteCategory(cat2Summary.getGuid()); - categoryFVT.deleteCategory(cat3Summary.getGuid()); - deleteTerm(createdTerm4cats.getSystemAttributes().getGUID()); - deleteTerm(createdTerm4cats2.getSystemAttributes().getGUID()); - } - - public Term createTerm(String termName, String glossaryGuid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Term term = getTermForInput(termName, glossaryGuid); - return issueCreateTerm(term); - } - - public Term issueCreateTerm(Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Term newTerm = glossaryAuthorViewTermClient.create(this.userId, term); - if (newTerm != null) - { - String guid = newTerm.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Created Term " + newTerm.getName() + " with guid " + guid); - } - createdTermsSet.add(guid); - } - return newTerm; - } - - public Term getTermForInput(String termName, String glossaryGuid) { - Term term = new Term(); - term.setName(termName); - GlossarySummary glossarySummary = new GlossarySummary(); - glossarySummary.setGuid(glossaryGuid); - term.setGlossary(glossarySummary); - return term; - } - - public Term createTermWithGovernanceClassifications(String termName, String glossaryGuid, GovernanceClassifications governanceClassifications) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Term term = getTermForInput(termName, glossaryGuid); - term.setGovernanceClassifications(governanceClassifications); - Term newTerm = issueCreateTerm(term); - return newTerm; - } - - private GovernanceClassifications createGovernanceClassifications() { - GovernanceClassifications governanceClassifications = new GovernanceClassifications(); - Confidentiality confidentiality = new Confidentiality(); - confidentiality.setLevel(6); - governanceClassifications.setConfidentiality(confidentiality); - - Confidence confidence = new Confidence(); - confidence.setLevel(ConfidenceLevel.Authoritative); - governanceClassifications.setConfidence(confidence); - - Criticality criticality = new Criticality(); - criticality.setLevel(CriticalityLevel.Catastrophic); - governanceClassifications.setCriticality(criticality); - - Retention retention = new Retention(); - retention.setBasis(RetentionBasis.ProjectLifetime); - governanceClassifications.setRetention(retention); - return governanceClassifications; - } - private GovernanceClassifications create2ndGovernanceClassifications() { - GovernanceClassifications governanceClassifications = new GovernanceClassifications(); - Confidentiality confidentiality = new Confidentiality(); - confidentiality.setLevel(5); - governanceClassifications.setConfidentiality(confidentiality); - - Confidence confidence = new Confidence(); - confidence.setLevel(ConfidenceLevel.AdHoc); - governanceClassifications.setConfidence(confidence); - // remove this classification level - Criticality criticality = new Criticality(); - criticality.setLevel(null); - governanceClassifications.setCriticality(criticality); - // remove retention by nulling it - governanceClassifications.setRetention(null); - return governanceClassifications; - } - - - public Term getTermByGUID(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Term term = glossaryAuthorViewTermClient.getByGUID(this.userId, guid); - if (term != null) - { - if (log.isDebugEnabled()) { - log.debug("Got Term " + term.getName() + " with userId " + term.getSystemAttributes().getGUID() + " and status " + term.getSystemAttributes().getStatus()); - } - } - return term; - } - public List findTerms(String criteria) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setSearchCriteria(criteria); - List terms = glossaryAuthorViewTermClient.find(this.userId, findRequest,false,true); - return terms; - } - - public Term updateTerm(String guid, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Term updatedTerm = glossaryAuthorViewTermClient.update(this.userId, guid, term,false); - if (updatedTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Updated Term name to " + updatedTerm.getName()); - } - } - return updatedTerm; - } - public Term replaceTerm(String guid, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Term updatedTerm = glossaryAuthorViewTermClient.update(this.userId, guid, term, true); - if (updatedTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Replaced Term name to " + updatedTerm.getName()); - } - } - return updatedTerm; - } - public Term restoreTerm(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Term restoredTerm = glossaryAuthorViewTermClient.restore(this.userId, guid); - if (restoredTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Restored Term " + restoredTerm.getName()); - } - createdTermsSet.add(guid); - } - return restoredTerm; - } - - public Term updateTermToFuture(long now, String guid, Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - - term.setEffectiveFromTime(new Date(now+1001*60*60*24).getTime()); - term.setEffectiveToTime(new Date(now+1999*60*60*24).getTime()); - - Term updatedTerm = glossaryAuthorViewTermClient.update(this.userId, guid, term); - if (updatedTerm != null) - { - if (log.isDebugEnabled()) { - log.debug("Updated Term name to " + updatedTerm.getName()); - } - } - return updatedTerm; - } - - public void deleteTerm(String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - glossaryAuthorViewTermClient.delete(this.userId, guid); - createdTermsSet.remove(guid); - if (log.isDebugEnabled()) { - log.debug("Delete succeeded"); - } - } - - public List getTermRelationships(Term term) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - return glossaryAuthorViewTermClient.getAllRelationships(this.userId, term.getSystemAttributes().getGUID()); - } - - public List getTermRelationships(Term term, Date asOfTime, int offset, int pageSize, SequencingOrder sequenceOrder, String sequenceProperty) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setAsOfTime(asOfTime); - findRequest.setStartingFrom(offset); - findRequest.setPageSize(pageSize); - findRequest.setSequencingOrder(sequenceOrder); - findRequest.setSequencingProperty(sequenceProperty); - //term. - return glossaryAuthorViewTermClient.getRelationships(this.userId, term.getSystemAttributes().getGUID(),findRequest); - } - void deleteRemaining() throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - deleteRemainingTerms(); - glossaryFVT.deleteRemainingGlossaries(); - } - void deleteRemainingTerms() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - Iterator iter = createdTermsSet.iterator(); - while (iter.hasNext()) { - String guid = iter.next(); - iter.remove(); - deleteTerm(guid); - } - List terms = findTerms(""); - if (terms.size() != existingTermCount) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected " +existingTermCount + " Terms to be found, got " + terms.size()); - } - } - public List getCategoriesAPI(String termGuid,int startingFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - FindRequest findRequest = new FindRequest(); - findRequest.setPageSize(pageSize); - findRequest.setStartingFrom(startingFrom); - return glossaryAuthorViewTermClient.getCategories(userId, termGuid, findRequest); - } - - private void testCategorizedTermsWithSearchCriteria() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, GlossaryAuthorFVTCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("Create a glossary"); - } - Glossary glossary = glossaryFVT.createGlossary("Glossary name for CategorizedTermsWithSearchCriteria"); - String glossaryGuid = glossary.getSystemAttributes().getGUID(); - if (log.isDebugEnabled()) { - log.debug("Create a ttt"); - } - Category category = categoryFVT.createCategoryWithGlossaryGuid("ttt", glossary.getSystemAttributes().getGUID()); - String parentGuid = category.getSystemAttributes().getGUID(); - // create 20 children - List categories = new ArrayList<>(); - CategorySummary catSummary = new CategorySummary(); - catSummary.setGuid(parentGuid); - categories.add(catSummary); - Set termGuids = new HashSet<>(); - - for (int i=0;i<10;i++) { - - Term term1 = getTermForInput("tt" + i, glossaryGuid); - term1.setCategories(categories); - Term createdTerm1 = issueCreateTerm(term1); - termGuids.add(createdTerm1.getSystemAttributes().getGUID()); - if (createdTerm1.getCategories().size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 category created"); - } - Term term2 = getTermForInput("ss" + i, glossaryGuid); - term2.setCategories(categories); - Term createdTerm2 = issueCreateTerm(term2); - termGuids.add(createdTerm2.getSystemAttributes().getGUID()); - if (createdTerm2.getCategories().size() != 1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 2 category created"); - } - } - FindRequest findRequest = new FindRequest(); - if ( categoryFVT.getTerms(parentGuid, findRequest).size() != 20) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 20 terms associated with the category "); - } - if ( glossaryFVT.getTerms(glossaryGuid, findRequest).size() != 20) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 20 terms associated with the category "); - } - findRequest.setSearchCriteria("tt3"); - int count = categoryFVT.getTerms(parentGuid, findRequest).size(); - if (count !=1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 categorized term, got " + count); - } - count = glossaryFVT.getTerms(glossaryGuid, findRequest).size(); - if (count !=1) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 1 glossary term, got " + count); - } - - findRequest.setSearchCriteria("tt"); - count = categoryFVT.getTerms(parentGuid, findRequest).size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 category terms, got " + count); - } - count = glossaryFVT.getTerms(glossaryGuid, findRequest).size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 glossary terms, got " + count); - } - - findRequest.setPageSize(5); - List terms = categoryFVT.getTerms(parentGuid, findRequest); - count = terms.size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 terms with tt,got " + count); - } - count = glossaryFVT.getTerms(glossaryGuid, findRequest).size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 glossary terms with tt, got " + count); - } - findRequest.setSearchCriteria("ss"); - findRequest.setPageSize(20); - if ( categoryFVT.getTerms(parentGuid, findRequest).size() !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 terms for ss"); - } - List tenTerms = glossaryFVT.getTerms(glossaryGuid, findRequest); - count = tenTerms.size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 glossary terms for ss, got " + count); - } - Set tenTermNames = tenTerms.stream() - .map(term ->term.getName()).collect(Collectors.toSet()); - count = tenTermNames.size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 glossary terms distinct names ss, got " + count); - } - findRequest.setPageSize(5); - - List firstFiveCategoryTerms =categoryFVT.getTerms(parentGuid, findRequest); - count = firstFiveCategoryTerms.size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 terms for ss, got " + count); - } - Set firstFiveCategoryTermsNames = firstFiveCategoryTerms.stream() - .map(term ->term.getName()).collect(Collectors.toSet()); - count = firstFiveCategoryTermsNames.size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 distinct term names for ss, got " + count); - } - findRequest.setStartingFrom(5); - List secondFiveCategoryTerms =categoryFVT.getTerms(parentGuid, findRequest); - count = secondFiveCategoryTerms.size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 category terms for ss for 2nd page, got " + count); - } - Set secondFiveCategoryTermsNames = secondFiveCategoryTerms.stream() - .map(term ->term.getName()).collect(Collectors.toSet()); - count = secondFiveCategoryTermsNames.size(); - if (count !=5) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 5 category term names for ss for 2nd page " + count); - } - Set totalFiveCategoryTermsNames = firstFiveCategoryTermsNames; - totalFiveCategoryTermsNames.addAll(secondFiveCategoryTermsNames); - count = totalFiveCategoryTermsNames.size(); - if (count !=10) { - throw new GlossaryAuthorFVTCheckedException("ERROR: Expected 10 different category term names for ss from first 2 pages " + count); - } - - //cleanup - for (String termGuid: termGuids) { - deleteTerm(termGuid); - } - categoryFVT.deleteCategory(parentGuid); - glossaryFVT.deleteGlossary(glossaryGuid); - - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/Configs/GlossaryAuthorViewConfig.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/Configs/GlossaryAuthorViewConfig.java deleted file mode 100644 index ad214f448f7..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/Configs/GlossaryAuthorViewConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.Configs; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -public interface GlossaryAuthorViewConfig { - - /** - * Get the config. - *

- * The result is the configuration - * - * @param userId userId under which the request is performed - * - * @return The configuration - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - Config getConfig(String userId) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/Configs/GlossaryAuthorViewConfigClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/Configs/GlossaryAuthorViewConfigClient.java deleted file mode 100644 index d8bfbd58ead..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/Configs/GlossaryAuthorViewConfigClient.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.Configs; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; - -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author Config related services. - */ - -public class GlossaryAuthorViewConfigClient implements GlossaryAuthorViewConfig, ResponseParameterization { - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "configs"; - protected final GlossaryAuthorViewRestClient client; - - public GlossaryAuthorViewConfigClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } - /** - * Get the config -

- * The result is the configuration - * - * @param userId userId under which the request is performed - * - * @return The configuration - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - @Override - public Config getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String methodName = "getConfig"; - - String urlTemplate = BASE_URL + "/%s"; - GenericResponse response = client.getByIdRESTCall(userId, - "current", - methodName, - getParameterizedType(), - urlTemplate);/*, - null, - null, - null);*/ - - return response.head().get(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/GlossaryAuthorViewRestClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/GlossaryAuthorViewRestClient.java deleted file mode 100644 index ecdc477f2bc..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/GlossaryAuthorViewRestClient.java +++ /dev/null @@ -1,934 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryParams; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryUtils; -import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServiceConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServicesResponse; -import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.ParameterizedTypeReference; -import java.util.Map; - -public class GlossaryAuthorViewRestClient extends FFDCRESTClient { - private static final Logger log = LoggerFactory.getLogger(GlossaryAuthorViewRestClient.class); - protected static final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - private final String serverName; - private final String serverPlatformURLRoot; - - public GlossaryAuthorViewRestClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException { - super(serverName, serverPlatformURLRoot); - this.serverName = serverName; - this.serverPlatformURLRoot = serverPlatformURLRoot; - } - - /** - * Issue a GET REST call that returns a response object by guid. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - public GenericResponse getByIdRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - GenericResponse completeResponse = null; - String expandedURL; - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); -// System.out.println(" expandedURL " + expandedURL); - completeResponse = callGetRESTCall(methodName, type, expandedURL);//,null); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - - return completeResponse; - } - - /** - * Issue a GET REST call that returns a response object by guid. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the received object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - //get by GUID - public GenericResponse getByGUIdRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - GenericResponse completeResponse = null; - String expandedURL; - - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - -// System.out.println(" ExpandedURL " + expandedURL); - - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - - return completeResponse; - } - - /** - * Issue a POST REST call that returns a response object. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param urlTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param guid unique identifier of the object - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - public GenericResponse postRESTCall(String userId, - String methodName, - String urlTemplate, - ParameterizedTypeReference> type, - String guid) - throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - GenericResponse completeResponse = null; - String expandedURL; - - expandedURL = String.format(serverPlatformURLRoot + urlTemplate, serverName, userId, guid); - completeResponse = callPostRESTCall(methodName, - type, - expandedURL, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - - return completeResponse; - } - - /** - * Issue a POST REST call that returns a response object. The object to be created is passed. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param create name of the action/method been called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param parameterizedType class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param t object to be creates - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - public GenericResponse postRESTCall(String userId, - String create, - String urnTemplate, - ParameterizedTypeReference> parameterizedType, - T t) - throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + create + ",userId=" + userId); - } - - GenericResponse completeResponse = null; - String expandedURL; - - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId); - - completeResponse = callPostRESTCall(create, - parameterizedType, - expandedURL, - t); - - exceptionHandler.detectAndThrowStandardExceptions(create, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== Glossary successful method : " + create + ",userId=" + userId); - } - - return completeResponse; - } - - /** - * Issue a POST REST call that returns a response array. The array of objects to be created is passed. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param urlTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param guid unique identifier of the glossary object - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param termArray Array of terms to be creates - * @return Array of type SubjectAreaOMASAPIResponse - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public SubjectAreaOMASAPIResponse> postRESTCallArr(String userId, - String methodName, - String urlTemplate, - String guid, - ParameterizedTypeReference>> type, - Term[] termArray) - throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - - String expandedURL = String.format(serverPlatformURLRoot + urlTemplate , serverName, userId, guid); - -// System.out.println(expandedURL); - - if (log.isDebugEnabled()) { - log.debug("<== Glossary successful method : " + methodName + ",userId=" + userId); - } - - SubjectAreaOMASAPIResponse> completeResponse = callPostRESTCall(methodName,type,expandedURL, termArray); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - - return completeResponse; - } - - /** - * Issue a PUT REST call that returns a response object. The object to be updated is passed. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param parameterizedType class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param glossary Glossary to be creates - * @param params additional parameters to be passed - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse putRESTCall(String userId, - String guid, - String methodName, - String urnTemplate, - ParameterizedTypeReference> parameterizedType, - Glossary glossary, - Object... params) - throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - - //String guid = glossary.getSystemAttributes().getGUID(); - //String urlString = String.format(BASE_URL + "/%s",guid); - String expandedURL = String.format(serverPlatformURLRoot + urnTemplate + "/%s", serverName, userId, guid); - - if (log.isDebugEnabled()) { - log.debug("<== Glossary successful method : " + methodName + ",userId=" + userId); - } - - return callPutRESTCall(methodName, - parameterizedType, - expandedURL, - glossary, - params); - } - - /** - * Issue a PUT REST call that returns a response object. The object to be updated is passed. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param parameterizedType class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param category Category to be creates - * @param params additional parameters to be passed - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - public GenericResponse putRESTCall(String userId, - String guid, - String methodName, - String urnTemplate, - ParameterizedTypeReference> parameterizedType, - Category category, - Object... params) - throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - - //String guid = glossary.getSystemAttributes().getGUID(); - //String urlString = String.format(BASE_URL + "/%s",guid); - String expandedURL = String.format(serverPlatformURLRoot + urnTemplate + "/%s", serverName, userId, guid); - - if (log.isDebugEnabled()) { - log.debug("<== Glossary successful method : " + methodName + ",userId=" + userId); - } - - return callPutRESTCall(methodName, - parameterizedType, - expandedURL, - category, - params); - } - /** - * Issue a PUT REST call that returns a response object. The object to be updated is passed. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param urlTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param parameterizedType class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param t type of object to be creates - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - public GenericResponse putRESTCall(String userId, - String guid, - String methodName, - String urlTemplate, - ParameterizedTypeReference> parameterizedType, - T t) - throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - - - String expandedURL = String.format(serverPlatformURLRoot + urlTemplate , serverName, userId, guid); - -// System.out.println(expandedURL); - - if (log.isDebugEnabled()) { - log.debug("<== Glossary successful method : " + methodName + ",userId=" + userId); - } - - return callPutRESTCall(methodName, - parameterizedType, - expandedURL, - t, - true); - } - - /** - * Issue a DEL REST call that returns a response object. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param parameterizedType class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param guid unique identifier of the object - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public GenericResponse delRESTCall(String userId, - ParameterizedTypeReference> parameterizedType, - String methodName, - String urnTemplate, - String guid) throws PropertyServerException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guId=" + guid); - } - - String expandedURL = String.format(serverPlatformURLRoot + urnTemplate + "/%s", serverName, userId, guid); - - if (log.isDebugEnabled()) { - log.debug("<== Glossary successful method : " + methodName + ",userId=" + userId + ",guId=" + guid); - } - - return callDeleteRESTCall(methodName, - parameterizedType, - expandedURL); - } - - /** - * Method for constructing a query (https://en.wikipedia.org/wiki/Query_string) using the information described in the findRequest - * page size and startingFrom need to set by the caller. - * - * @param methodName name of the method being called. - * @param findRequest {@link FindRequest} - * @return query - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public QueryBuilder createFindQuery(String methodName, FindRequest findRequest) throws InvalidParameterException { - return createFindQuery(methodName, findRequest, false, true); - } - - public QueryBuilder createFindQuery(String methodName, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException { - QueryBuilder queryBuilder = new QueryBuilder(); - SequencingOrder sequencingOrder = findRequest.getSequencingOrder(); - if (sequencingOrder == null) { - sequencingOrder = SequencingOrder.ANY; - } - String sequencingOrderName = QueryUtils.encodeParams(methodName, "sequencingOrder", sequencingOrder.name()); - queryBuilder.addParam("sequencingOrder", sequencingOrderName); - Integer pageSize = findRequest.getPageSize(); - if (pageSize != null) { - queryBuilder.addParam("pageSize", pageSize); - } - queryBuilder.addParam("startingFrom", findRequest.getStartingFrom()); - - String searchCriteria = findRequest.getSearchCriteria(); - if (searchCriteria != null) { - searchCriteria = QueryUtils.encodeParams(methodName, "searchCriteria", searchCriteria); - queryBuilder.addParam("searchCriteria", searchCriteria); - } - String property = findRequest.getSequencingProperty(); - if (property != null) { - property = QueryUtils.encodeParams(methodName, "sequencingProperty", property); - queryBuilder.addParam("sequencingProperty", property); - } - queryBuilder.addParam("exactValue", exactValue); - queryBuilder.addParam("ignoreCase", ignoreCase); - return queryBuilder; - } - - /** - * Method for constructing a query (https://en.wikipedia.org/wiki/Query_string) using the information described in the findRequest - * page size and startingFrom need to set by the caller. - * - * @param methodName name of the method being called. - * @param findRequest {@link FindRequest} - * @param queryParams query parameters - * - * @return query - * @throws InvalidParameterException one of the parameters is null or invalid - * */ - public QueryBuilder createFindQuery(String methodName, - FindRequest findRequest, - QueryParams queryParams) throws InvalidParameterException { - QueryBuilder queryBuilder = new QueryBuilder(); - SequencingOrder sequencingOrder = findRequest.getSequencingOrder(); - if (sequencingOrder == null) { - sequencingOrder = SequencingOrder.ANY; - } - String sequencingOrderName = QueryUtils.encodeParams(methodName, "sequencingOrder", sequencingOrder.name()); - queryBuilder.addParam("sequencingOrder", sequencingOrderName); - Integer pageSize = findRequest.getPageSize(); - if (pageSize != null) { - queryBuilder.addParam("pageSize", pageSize); - } - queryBuilder.addParam("startingFrom", findRequest.getStartingFrom()); - - String searchCriteria = findRequest.getSearchCriteria(); - if (searchCriteria != null) { - searchCriteria = QueryUtils.encodeParams(methodName, "searchCriteria", searchCriteria); - queryBuilder.addParam("searchCriteria", searchCriteria); - } - String property = findRequest.getSequencingProperty(); - if (property != null) { - property = QueryUtils.encodeParams(methodName, "sequencingProperty", property); - queryBuilder.addParam("sequencingProperty", property); - } - queryBuilder.addParams(queryParams); - return queryBuilder; - } - - - /** - * Issue a GET REST call that does a find and returns results in a Generic Response. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param findRequest {@link FindRequest} - * @param exactValue boolean to determine search parameters should return exact values - * @param ignoreCase boolean to determine search parameters should ignore case for teh search criteris - * @param maximumPageSizeOnRestCall Page size for results - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse findRESTCall(String userId, - String methodName, - String urnTemplate, - ParameterizedTypeReference> type, - FindRequest findRequest, - boolean exactValue, - boolean ignoreCase, - Integer maximumPageSizeOnRestCall) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - GenericResponse completeResponse = null; - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - int requestedPageSize = findRequest.getPageSize(); - if (maximumPageSizeOnRestCall == null || maximumPageSizeOnRestCall < 1 || maximumPageSizeOnRestCall >= requestedPageSize) { - // Only need to make one call -// System.out.println("serverPlatformURLRoot + urnTemplate " + serverPlatformURLRoot + urnTemplate); - String findUrlTemplate = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId); - // the searchCriteria could contain utf-8 characters that could include % characters, that format would incorrectly interpret. So we add the query params after the format - String expandedURL = findUrlTemplate + createFindQuery(methodName, findRequest, exactValue, ignoreCase).toString(); -// System.out.println("++++ expandedURL " + expandedURL); - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - } else { - completeResponse = getAccumulatedResponse(userId, methodName, urnTemplate, type, findRequest, maximumPageSizeOnRestCall, requestedPageSize); - } - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return completeResponse; - } - - /** - * Issue a GET REST call that does a find and returns results in a Generic Response. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param findRequest {@link FindRequest} - * @param exactValue boolean to determine search parameters should return exact values - * @param ignoreCase boolean to determine search parameters should ignore case for teh search criteris - * @param maximumPageSizeOnRestCall Page size for results - * @param guid Object guid - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse findRESTCallById(String userId, - String methodName, - String urnTemplate, - ParameterizedTypeReference> type, - FindRequest findRequest, - boolean exactValue, - boolean ignoreCase, - Integer maximumPageSizeOnRestCall, - String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId); - } - GenericResponse completeResponse = null; - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - int requestedPageSize = findRequest.getPageSize(); - if (maximumPageSizeOnRestCall == null || maximumPageSizeOnRestCall < 1 || maximumPageSizeOnRestCall >= requestedPageSize) { - // Only need to make one call - String findUrlTemplate = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - // the searchCriteria could contain utf-8 characters that could include % characters, that format would incorrectly interpret. So we add the query params after the format - String expandedURL = findUrlTemplate + createFindQuery(methodName, findRequest, exactValue, ignoreCase).toString(); - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - } else { - completeResponse = getAccumulatedResponse(userId, methodName, urnTemplate, type, findRequest, maximumPageSizeOnRestCall, requestedPageSize); - } - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return completeResponse; - } - - - private GenericResponse getAccumulatedResponse(String userId, String methodName, String urnTemplate, ParameterizedTypeReference> type, FindRequest findRequest, Integer maximumPageSizeOnRestCall, int requestedPageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - // issue multiple calls to build up the requested page - GenericResponse completeResponse = null; - int startingFrom = findRequest.getStartingFrom(); - int totalNumberRetrieved = 0; - // while we have got less than the requested page size continuing getting more by issuing rest calls - while (totalNumberRetrieved < requestedPageSize) { - // set the page size to the maximum that the downstream server accepts. - findRequest.setPageSize(maximumPageSizeOnRestCall); - // we need to amend the startingFrom portions when issuing subsequent requests. - findRequest.setStartingFrom(startingFrom + totalNumberRetrieved); - // encode a url with the new find request - String findUrlTemplate = urnTemplate + createFindQuery(methodName, findRequest).toString(); - String expandedURL = String.format(serverPlatformURLRoot + findUrlTemplate, serverName, userId); - // issue the get call - GenericResponse responseForPart = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, responseForPart); - - int numberRetrieved = responseForPart.results().size(); - - if (getMore(numberRetrieved, maximumPageSizeOnRestCall, requestedPageSize)) { - // there are more to get - totalNumberRetrieved = totalNumberRetrieved + numberRetrieved; - } else { - // Don't get any more - totalNumberRetrieved = requestedPageSize; - } - // update the completeResponse - if (completeResponse == null) { - // first time in initialise the complete response - completeResponse = responseForPart; - } else { - // add the results from this get to the complete response - completeResponse.addAllResults(responseForPart.results()); - } - } - return completeResponse; - } - - boolean getMore(int numberRetrieved, int maximumPageSizeOnRestCall, int requestedPageSize) { - return (numberRetrieved == maximumPageSizeOnRestCall) && (requestedPageSize > maximumPageSizeOnRestCall); - } - - - /** - * Issue a GET REST call that returns a response object by guid. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param findRequest {@link FindRequest} - * @param maximumPageSizeOnRestCall maximum page size that can be used on rest calls, null and 0 mean no limit set. - * @param params additional parameters to be passed - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse getByIdRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate, - FindRequest findRequest, - Integer maximumPageSizeOnRestCall, - Map params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - GenericResponse completeResponse = null; - int requestedPageSize = 0; - if (findRequest != null) { - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - requestedPageSize = findRequest.getPageSize(); - } - - if (maximumPageSizeOnRestCall == null || maximumPageSizeOnRestCall < 1 || maximumPageSizeOnRestCall >= requestedPageSize) { - // Only need to make one call - String expandedURL; - if (findRequest == null) { - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - } else { - QueryBuilder queryBuilder = createFindQuery(methodName, findRequest); - if (params != null && params.keySet().size() > 0) { - for (String param : params.keySet()) { - queryBuilder.addParam(param, params.get(param)); - } - } - - String findUrlTemplate = urnTemplate + queryBuilder.toString(); - expandedURL = String.format(serverPlatformURLRoot + findUrlTemplate, serverName, userId, guid); - } - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - } else { - // amend the urnTemplate to replace the guid - which will be the last %s, note there might be characters after this %s we need to keep. - int lastIndex = urnTemplate.lastIndexOf("%s"); - String lastBit = urnTemplate.substring(lastIndex); - String lastBitWithGuid = lastBit.replace("%s", guid); - urnTemplate = urnTemplate.substring(0, lastIndex) + lastBitWithGuid; - completeResponse = getAccumulatedResponse(userId, methodName, urnTemplate, type, findRequest, maximumPageSizeOnRestCall, requestedPageSize); - } - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return completeResponse; - } - /** - * Issue a GET REST call that returns a response object by guid. - * - * @param return type for results in {@link GenericResponse} - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param type class of the response for generic object. Descried using {@link ParameterizedTypeReference} - * An example can be seen here {@link ResponseParameterization#getParameterizedType()} - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @param findRequest {@link FindRequest} - * @param maximumPageSizeOnRestCall maximum page size that can be used on rest calls, null and 0 mean no limit set. - * @param queryParams additional parameters to be passed - * @return GenericResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public GenericResponse getByIdRESTCall(String userId, - String guid, - String methodName, - ParameterizedTypeReference> type, - String urnTemplate, - FindRequest findRequest, - Integer maximumPageSizeOnRestCall, - QueryParams queryParams) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - GenericResponse completeResponse = null; - int requestedPageSize = 0; - if (findRequest != null) { - if (findRequest.getPageSize() == null) { - findRequest.setPageSize(invalidParameterHandler.getMaxPagingSize()); - } - invalidParameterHandler.validatePaging(findRequest.getStartingFrom(), findRequest.getPageSize(), methodName); - requestedPageSize = findRequest.getPageSize(); - } - - if (maximumPageSizeOnRestCall == null || maximumPageSizeOnRestCall < 1 || maximumPageSizeOnRestCall >= requestedPageSize ) { - // Only need to make one call - String expandedURL; - if (findRequest == null) { - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, serverName, userId, guid); - } else { - QueryBuilder queryBuilder = createFindQuery(methodName, findRequest, queryParams); - String findUrlTemplate = urnTemplate + queryBuilder.toString(); - expandedURL = String.format(serverPlatformURLRoot + findUrlTemplate, serverName, userId, guid); - } - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - } else { - // amend the urnTemplate to replace the guid - which will be the last %s, note there might be characters after this %s we need to keep. - int lastIndex = urnTemplate.lastIndexOf("%s"); - String lastBit =urnTemplate.substring(lastIndex); - String lastBitWithGuid = lastBit.replace("%s",guid); - urnTemplate = urnTemplate.substring(0, lastIndex) + lastBitWithGuid; - completeResponse = getAccumulatedResponse(userId, methodName, urnTemplate, type, findRequest, maximumPageSizeOnRestCall, requestedPageSize); - } - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - return completeResponse; - } - - - /** - * Issue a GET REST call that returns a Config object by guid. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param type class of the response for generic object. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @return OMAGServerConfigResponse with T result - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - public OMAGServerConfigResponse getConfigRESTCall(String userId, - String guid, - String methodName, - Class type, - String urnTemplate) - throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - OMAGServerConfigResponse completeResponse = null; - String expandedURL; -/////servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/categories") - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, userId, serverName);//, guid); -// System.out.println(" expandedURL " + expandedURL); - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - - return completeResponse; - - } - /** - * Issue a GET REST call that returns a View Config object by guid. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param guid unique identifier of the object - * @param methodName name of the method being called. - * @param type class of the response for generic object. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @return ViewServiceConfigResponse object - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public ViewServiceConfigResponse getViewServiceConfigRESTCall(String userId, - String guid, - String methodName, - Class type, - String urnTemplate) - throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid); - } - - ViewServiceConfigResponse completeResponse = null; - String expandedURL; -/////servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/categories") - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, userId, serverName);//, guid); -// System.out.println(" expandedURL " + expandedURL); - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - - return completeResponse; - - } - /** - * Issue a GET REST call that returns a View Config object by guid. - * - * @param userId unique identifier for requesting user, under which the request is performed - * @param methodName name of the method being called. - * @param type class of the response for generic object. - * @param urnTemplate template of the URN for the REST API call with place-holders for the parameters. - * @return ViewServicesResponse - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public ViewServicesResponse getViewConfigRESTCall(String userId, - String methodName, - Class type, - String urnTemplate) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - if (log.isDebugEnabled()) { - log.debug("==> Method: " + methodName + ",userId=" + userId ); - } - - ViewServicesResponse completeResponse = null; - String expandedURL; - - expandedURL = String.format(serverPlatformURLRoot + urnTemplate, userId, serverName);//, guid); -// System.out.println(" expandedURL " + expandedURL); - completeResponse = callGetRESTCall(methodName, type, expandedURL); - exceptionHandler.detectAndThrowStandardExceptions(methodName, completeResponse); - - if (log.isDebugEnabled()) { - log.debug("<== successful method : " + methodName + ",userId=" + userId); - } - - return completeResponse; - - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/README.md b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/README.md deleted file mode 100644 index a0dc4b8b917..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/README.md +++ /dev/null @@ -1,11 +0,0 @@ - - - -# Glossary Author Open Metadata View Service (OMVS) client-side implementation - -The Glossary Author OMVS client-side support is organized in the following top level packages - - ----- -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-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/category/GlossaryAuthorViewCategory.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/category/GlossaryAuthorViewCategory.java deleted file mode 100644 index 71277cc6b73..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/category/GlossaryAuthorViewCategory.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.category; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.*; - - -import java.util.Map; - -public interface GlossaryAuthorViewCategory { - - /** - * Create a Category. - *

- * The result is the Category object - * - * @param userId userId under which the request is performed - * @param category Glossary object to be created - * - * @return The Category - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Category create(String userId, Category category) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - - /** - * Get a Category. - *

- * The result is the requested Category object - * - * @param userId userId under which the request is performed - * @param guid guid of Category object to be retrieved - * - * @return The requested Category - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Category getByGUID(String userId, String guid) throws PropertyServerException,UserNotAuthorizedException, InvalidParameterException ; - - /** - * Update a Category. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param category Glossary object with updated values - * @param isReplace If the object is to be replaced - * - * @return The updated Category - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Category update(String userId, String guid, Category category, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Delete a Category. - *

- * The result Void object - * - * @param userId userId under which the request is performed - * @param guid guid of Category object to be retrieved - * - * - * @throws PropertyServerException something went wrong with the REST call stack. - */ - void delete(String userId, String guid) throws PropertyServerException; - - /** - * Restore a soft-deleted Category. - *

- * The result is the restored Category object - * - * @param userId userId under which the request is performed - * @param guid guid of Category object to be restored - * - * @return The restored Category - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Category restore(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException,InvalidParameterException ; - - /** - * Get a Category's relationships - *

- * The result is a list of Relationships - * - * @param userId userId under which the request is performed - * @param guid guid of Category object to be retrieved - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return The list of Category relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - public List getRelationships(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get a Category's relationships - *

- * The result is a list of Relationships - * - * @param userId userId under which the request is performed - * @param guid guid of Category object to be retrieved - * - * @return The list of Category relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getAllRelationships(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException ; - - /** - * Extract terms within a Category - * - * @param userId calling user - * @param categoryGuid Category GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of terms - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getTerms(String userId, String categoryGuid, FindRequest findRequest) throws PropertyServerException,UserNotAuthorizedException, InvalidParameterException ; - - - /** - * Extract children within a Category - * - * @param userId calling user - * @param parentGuid Category GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Find Category - * - * @param userId calling user - * - * @return Categories belonging to Userid - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List findAll(String userId) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - /** - * Extract children within a Category - * - * @param userId calling user - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - -} - diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/category/GlossaryAuthorViewCategoryClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/category/GlossaryAuthorViewCategoryClient.java deleted file mode 100644 index f5ed00ea306..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/category/GlossaryAuthorViewCategoryClient.java +++ /dev/null @@ -1,207 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.category; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryParams; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; -//import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; - - -import java.util.*; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; - -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author Category related services. - */ - -public class GlossaryAuthorViewCategoryClient implements GlossaryAuthorViewCategory, ResponseParameterization { - - protected final GlossaryAuthorViewRestClient client; - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "categories"; - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } - - public GlossaryAuthorViewCategoryClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - - @Override - public Category create(String userId, Category category) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), category); - - return response.head().get(); - } - - @Override - public Category update(String userId, String guid, Category category, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - Map params = new HashMap<>(); - if (isReplace) - params.put("isReplace", "true"); - else - params.put("isReplace", "false"); - - GenericResponse response = client.putRESTCall(userId, - guid, - getMethodInfo("create"), - BASE_URL, - getParameterizedType(), - category, - params); - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws PropertyServerException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - @Override - public Category restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } - - - @Override - public List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s/categories"; - - GenericResponse completeResponse = - client.findRESTCallById(userId,getMethodInfo("getCategoryChildren"),urlTemplate, - type, findRequest, exactValue, ignoreCase, null,parentGuid); - - return completeResponse.results(); - } - - @Override - public List findAll(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, new FindRequest(), false, true); - } - - @Override - public Category getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - GenericResponse completeResponse = - client.findRESTCall(userId,getMethodInfo("find"),BASE_URL, - type, findRequest, exactValue, ignoreCase, null); - - return completeResponse.results(); - } - - @Override - public List getRelationships(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s/relationships"; - - - GenericResponse completeResponse = - - client.getByIdRESTCall(userId, - guid, - "getCategoryRelationships", - type, - urlTemplate, - findRequest, - 0, - (QueryParams) null); - - return completeResponse.results(); - } - - @Override - public List getAllRelationships(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return getRelationships(userId, guid, new FindRequest()) ; - } - - @Override - public List getTerms(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException{ - return getTerms(userId, guid, findRequest, false, true,null); - } - - - public List getTerms(String userId, String guid, FindRequest findRequest,boolean exactValue ,boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - String urnTemplate = BASE_URL + "/%s/terms"; - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - QueryParams queryParams = new QueryParams() - .setExactValue(exactValue) - .setIgnoreCase(ignoreCase); - - GenericResponse response = client.getByIdRESTCall(userId, - guid, - getMethodInfo("getTerms"), - type, - urnTemplate, - findRequest, - maximumPageSizeOnRestCall, - queryParams); - - return response.results(); - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/glossarys/GlossaryAuthorViewGlossary.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/glossarys/GlossaryAuthorViewGlossary.java deleted file mode 100644 index d7f1cfa0f27..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/glossarys/GlossaryAuthorViewGlossary.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.glossarys; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -public interface GlossaryAuthorViewGlossary { - - /** - * Create a Glossary. - *

- * The result is the Glossary object - * - * @param userId userId under which the request is performed - * @param glossary Glossary object to be created - * - * @return The Glossary - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - Glossary create(String userId, Glossary glossary) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Update a Glossary. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param glossary Glossary object with updated values - * @param action To replace existing Glossary or not - * - * @return The updated Glossary - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Glossary update(String userId, String guid, Glossary glossary, boolean action) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Get a Glossary. - *

- * The result is the requested Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be retrieved - * - * @return The requested Glossary - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Glossary getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - /** - * Delete a Glossary. - *

- * The result Void object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be retrieved - * - * - * @throws PropertyServerException something went wrong with the REST call stack. - */ - void delete(String userId, String guid) throws PropertyServerException; - - - /** - * Get a Glossary's relationships - *

- * The result is a list of Relationships - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be retrieved - * - * @return The list of Glossary relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getAllRelationships(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Restore a soft-deleted Glossary. - *

- * The result is the restored Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be restored - * - * @return The restored Glossary - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Glossary restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Get the Categories owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param glossaryGuid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @return list of Categories - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - List getCategories(String userId, String glossaryGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get the Categories owned by this glossary. - * - * @param userId unique identifier for requesting user, under which the request is performed. - * @param glossaryGuid unique identifier of the object to which the found objects should relate. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param onlyTop when only the top categories (those categories without parents) are returned. - * @return list of Categories - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid. - */ - List getCategories(String userId, String glossaryGuid, FindRequest findRequest, boolean onlyTop) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - /** - * Extract terms within a glossary - * - * @param userId calling user - * @param glossaryGuid glossary GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of terms - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ -List getTerms(String userId, String glossaryGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Create multiple terms within a glossary - * - * @param userId calling user - * @param glossaryGuid glossary GUID - * @param termArray array of glossary objects that are to be created. - * - * @return list of terms created - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List createTerms(String userId, String glossaryGuid, Term[] termArray) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/glossarys/GlossaryAuthorViewGlossaryClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/glossarys/GlossaryAuthorViewGlossaryClient.java deleted file mode 100644 index c70fbb83dd1..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/glossarys/GlossaryAuthorViewGlossaryClient.java +++ /dev/null @@ -1,244 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.glossarys; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -//import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryParams; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; -//import org.odpi.openmetadata.accessservices.glossaryview.rest.Glossary; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author Glossary related services. - */ -public class GlossaryAuthorViewGlossaryClient implements GlossaryAuthorViewGlossary, ResponseParameterization { - - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "glossaries"; - protected final GlossaryAuthorViewRestClient client; - - public GlossaryAuthorViewGlossaryClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - public GlossaryAuthorViewGlossaryClient(String serverName, String url) throws InvalidParameterException { - this.client = new GlossaryAuthorViewRestClient(serverName, url); - } - - public List find(String userId, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - return find(userId, findRequest, false,true); - } - - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, findRequest, exactValue, ignoreCase, null); - } - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - GenericResponse response = client.findRESTCall(userId, getMethodInfo("find"), BASE_URL, getParameterizedType(), findRequest, exactValue, ignoreCase, maximumPageSizeOnRestCall); - return response.results(); - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } - - @Override - public Glossary create(String userId, Glossary glossary) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), glossary); - - return response.head().get(); - } - - @Override - public Glossary update(String userId, String guid, Glossary glossary, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - Map params = new HashMap<>(); - if (isReplace) - params.put("isReplace", "true"); - else - params.put("isReplace", "false"); - - - GenericResponse response = client.putRESTCall(userId, - guid, - getMethodInfo("create"), - BASE_URL, - getParameterizedType(), - glossary, - params); - return response.head().get(); - } - - @Override - public Glossary getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = client.getByGUIdRESTCall( userId, - guid, - getMethodInfo("getByGUID"), - getParameterizedType(), - urlTemplate); - - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws PropertyServerException { - - //GenericResponse response = - client.delRESTCall(userId, - getParameterizedType(), - getMethodInfo("delete"), - BASE_URL, - guid); - return; - //response.head().get(); - } - - @Override - public Glossary restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - - String urnTemplate = BASE_URL + "/%s"; - GenericResponse response = client.postRESTCall(userId, - getMethodInfo("restore"), - urnTemplate, - getParameterizedType(), - guid); - - return response.head().get(); - } - - @Override - public List getAllRelationships(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - String urnTemplate = BASE_URL + "/%s/relationships"; - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - GenericResponse response = client.getByIdRESTCall(userId, - guid, - getMethodInfo("getAllRelationships"), - type, - urnTemplate); - return response.results(); - } - //find with conditions - @Override - public List getCategories(String userId, String guid, FindRequest findRequest, boolean onlyTop) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - String urnTemplate = BASE_URL + "/" + guid + "/categories"; - - Map params = new HashMap<>(); - params.put("exactValue", "false"); - params.put("ignoreCase", "true"); - params.put("onlyTop", String.valueOf(onlyTop)); - - - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId, - guid, - getMethodInfo("getCategories"), - type, - urnTemplate, - findRequest, - 0, - params); - - return response.results(); - - } - - //find - @Override - public List getCategories(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - String urnTemplate = BASE_URL + "/" + guid + "/categories"; - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.findRESTCall(userId, - getMethodInfo("getCategories"), - urnTemplate, - type, - findRequest, - false, - true, - 0); - - return response.results(); - } - - @Override - public List getTerms(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException{ - return getTerms(userId, guid, findRequest, false, true,null); - } - - @Override - public List createTerms(String userId, String guid, Term[] termArray) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - String urnTemplate = BASE_URL + "/%s/terms"; - - ResolvableType resolvableType1 = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, resolvableType); -// System.out.println(resolvableType1.getType().toString()); - ParameterizedTypeReference>> type = ParameterizedTypeReference.forType(resolvableType1.getType()); - - SubjectAreaOMASAPIResponse> completeResponse = - client.postRESTCallArr(userId, getMethodInfo("createMultipleTerms"), urnTemplate, guid,type,termArray); - - List> temp = completeResponse.results(); - List termList = new ArrayList<>(); - for (GenericResponse resp: temp){ - if (resp.results().size() > 0) { - termList.add(resp.results().get(0)); - } - } -// System.out.println(completeResponse.toString()); - return termList; - } - - - public List getTerms(String userId, String guid, FindRequest findRequest,boolean exactValue ,boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - String urnTemplate = BASE_URL + "/%s/terms"; - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - QueryParams queryParams = new QueryParams() - .setExactValue(exactValue) - .setIgnoreCase(ignoreCase); - - GenericResponse response = client.getByIdRESTCall(userId, - guid, - getMethodInfo("getTerms"), - type, - urnTemplate, - findRequest, - maximumPageSizeOnRestCall, - queryParams); - - return response.results(); - } - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/graph/GlossaryAuthorViewGraph.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/graph/GlossaryAuthorViewGraph.java deleted file mode 100644 index cd7e9debfe3..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/graph/GlossaryAuthorViewGraph.java +++ /dev/null @@ -1,251 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.graph; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.GraphStatistics; - -import java.util.Date; -import java.util.List; -import java.util.Set; - -public interface GlossaryAuthorViewGraph { - - /** - * Create a Graph. - *

- * The result is the Graph object - * - * @param userId userId under which the request is performed - * @param graph Graph object to be created - * - * @return The Graph - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Graph create(String userId, Graph graph) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - - /** - * Get a Graph. - *

- * The result is the requested Graph object - * - * @param userId userId under which the request is performed - * @param guid guid of Graph object to be retrieved - * - * @return The requested Graph - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Graph getByGUID(String userId, String guid) throws PropertyServerException,UserNotAuthorizedException, InvalidParameterException ; - - /** - * Update a Graph. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param graph Glossary object with updated values - * @param isReplace If the object is to be replaced - * - * @return The updated Graph - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Graph update(String userId, String guid, Graph graph, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Delete a Graph. - *

- * The result Void object - * - * @param userId userId under which the request is performed - * @param guid guid of Graph object to be retrieved - * - * - * @throws PropertyServerException something went wrong with the REST call stack. - */ - void delete(String userId, String guid) throws PropertyServerException; - - /** - * Restore a soft-deleted Graph. - *

- * The result is the restored Graph object - * - * @param userId userId under which the request is performed - * @param guid guid of Graph object to be restored - * - * @return The restored Graph - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Graph restore(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException,InvalidParameterException ; - - - /** - * Extract children within a Category - * - * @param userId calling user - * @param parentGuid Category GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Find Category - * - * @param userId calling user - * - * @return Categories belonging to Userid - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List findAll(String userId) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - /** - * Find graphs - * - * @param userId calling user - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Find Category for a graph - * - * @param userId calling user - * @param graphGuid graph id - * @param findRequest nformation object for find calls. This include pageSize to limit the number of elements returned. - * - * - * @return Categories belonging to graph - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - List getCategories(String userId, String graphGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get config for server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get list of view service config on the server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get service config for a particular view Service - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get graph for a particular node guid - * - * @param userId calling user - * @param guid the starting point of the query. - * @param nodeFilter Set of node names to include in the query results. Null means include - * all entities found, irrespective of their type. - * @param relationshipFilter Set of relationship names to include in the query results. Null means include - * all relationships found, irrespective of their type. - * @param asOfTime Requests a historical query of the relationships for the entity. Null means return the - * present values. - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * - * @return A graph of nodeTypes. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Graph getGraph(String userId, String guid, Date asOfTime, Set nodeFilter, Set relationshipFilter, StatusFilter statusFilter) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get graphStats for a particular guid - * - * @param userId calling user - * @param guid Guid for a node. - * @param asOfTime Requests a historical query of the relationships for the entity. Null means return the - * present values. - * @param nodeFilter Set of node names to include in the query results. Null means include - * all entities found, irrespective of their type. - * @param relationshipFilter Set of relationship names to include in the query results. Null means include - * all relationships found, irrespective of their type. - - * @param statusFilter By default only active instances are returned. Specify ALL to see all instance in any status. - * - * @return A graph statistics of nodeTypes. - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - GraphStatistics getGraphStatistics(String userId, String guid, Date asOfTime, Set nodeFilter, Set relationshipFilter, StatusFilter statusFilter) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; -} - diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/graph/GlossaryAuthorViewGraphClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/graph/GlossaryAuthorViewGraphClient.java deleted file mode 100644 index 22b1aa04c33..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/graph/GlossaryAuthorViewGraphClient.java +++ /dev/null @@ -1,275 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.graph; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.StatusFilter; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.NeighborhoodHistoricalFindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Graph; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.NodeType; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.RelationshipType; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServiceConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServicesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.properties.GraphStatistics; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.Date; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.ADMIN_BASE_URL; -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author Graph related services. - */ - -public class GlossaryAuthorViewGraphClient implements GlossaryAuthorViewGraph, ResponseParameterization { - - protected final GlossaryAuthorViewRestClient client; - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "graph"; - private static final String BASE_URL_GPSTATS = GLOSSARY_AUTHOR_BASE_URL + "graph-counts"; - - private static final String GLOSSARY_AUTHOR_CONFIG_BASE_URL = ADMIN_BASE_URL + "configuration"; - private static final String GLOSSARY_AUTHOR_C_BASE_URL = ADMIN_BASE_URL + "view-services/glossary-author"; - - - private static final String GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL = ADMIN_BASE_URL + "view-services/configuration"; - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } - - public GlossaryAuthorViewGraphClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - - @Override - public Graph create(String userId, Graph graph) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), graph); - - return response.head().get(); - } - - @Override - public Graph update(String userId, String guid, Graph graph, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - getParameterizedType(), - graph); - - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws PropertyServerException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - @Override - public Graph restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Graph.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } - - @Override - public List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s/categories"; - - GenericResponse completeResponse = - client.findRESTCallById(userId,getMethodInfo("getCategoryChildren"),urlTemplate, - type, findRequest, exactValue, ignoreCase, null,parentGuid); - - return completeResponse.results(); - } - - @Override - public List findAll(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, new FindRequest(), false, true); - } - - @Override - public Graph getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Graph.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Graph.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - GenericResponse completeResponse = - client.findRESTCall(userId,getMethodInfo("find"),BASE_URL, - type, findRequest, exactValue, ignoreCase, null); - - return completeResponse.results(); - } - - @Override - public List getCategories(String userId, String graphGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo(" getCategories"); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest); - String urlTemplate = urnTemplate + query.toString(); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,graphGuid, methodInfo, type, urlTemplate); - return response.results(); - } - - @Override - public OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - OMAGServerConfigResponse completeResponse = - client.getConfigRESTCall(userId,"current",getMethodInfo("getConfig"),OMAGServerConfigResponse.class,GLOSSARY_AUTHOR_CONFIG_BASE_URL); - - return completeResponse.getOMAGServerConfig(); - } - - @Override - public ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServiceConfigResponse completeResponse = - client.getViewServiceConfigRESTCall(userId,"current",getMethodInfo("getOmagServerName"),ViewServiceConfigResponse.class,GLOSSARY_AUTHOR_C_BASE_URL); - - return completeResponse.getConfig(); - } - @Override - public GraphStatistics getGraphStatistics(String userId, - String guid, - Date asOfTime, - Set nodeFilter, - Set relationshipFilter, - StatusFilter statusFilter) - throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, GraphStatistics.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - NeighborhoodHistoricalFindRequest request = new NeighborhoodHistoricalFindRequest(); - request.setAsOfTime(asOfTime); - request.setNodeFilter(nodeFilter); - request.setRelationshipFilter(relationshipFilter); -// request.setLevel(level); - request.setStatusFilter(statusFilter); -// return getGraph(userId, guid, request); - final String methodName = "getGraphStatistics";; - - String urlTemplate = BASE_URL_GPSTATS + "/%s" + createGraphQuery(request).toString(); - GenericResponse response = client.getByIdRESTCall(userId, guid, methodName, type, urlTemplate); - return response.head().get(); - } - - @Override - public Graph getGraph(String userId, - String guid, - Date asOfTime, - Set nodeFilter, - Set relationshipFilter, - StatusFilter statusFilter) - throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - NeighborhoodHistoricalFindRequest request = new NeighborhoodHistoricalFindRequest(); - request.setAsOfTime(asOfTime); - request.setNodeFilter(nodeFilter); - request.setRelationshipFilter(relationshipFilter); - request.setStatusFilter(statusFilter); - final String methodName = "getGraph";; - - String urlTemplate = BASE_URL + "/%s" + createGraphQuery(request).toString(); - GenericResponse response = client.getByIdRESTCall(userId, guid, methodName, getParameterizedType(), urlTemplate); - return response.head().get(); - } - - - public QueryBuilder createGraphQuery(NeighborhoodHistoricalFindRequest request) { - QueryBuilder queryBuilder = new QueryBuilder(); - String nodeFilter = request.getNodeFilter().stream().map(NodeType::name).collect(Collectors.joining(",")); - String relationshipFilter = request.getRelationshipFilter().stream().map(RelationshipType::name).collect(Collectors.joining(",")); - - if (!nodeFilter.isEmpty()) - queryBuilder.addParam("nodeFilter", nodeFilter); - - if(!relationshipFilter.isEmpty()) - queryBuilder.addParam("relationshipFilter", relationshipFilter); - - return queryBuilder - .addParam("asOfTime", request.getAsOfTime()) - .addParam("statusFilter", request.getStatusFilter().name()); - } - - - @Override - public List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServicesResponse completeResponse = - client.getViewConfigRESTCall(userId,getMethodInfo("getViewServiceConfig"),ViewServicesResponse.class,GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL); - - return completeResponse.getServices(); - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/project/GlossaryAuthorViewProject.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/project/GlossaryAuthorViewProject.java deleted file mode 100644 index 5646d5284c6..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/project/GlossaryAuthorViewProject.java +++ /dev/null @@ -1,232 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.project; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -public interface GlossaryAuthorViewProject { - - /** - * Create a project. - *

- * The result is the project object - * - * @param userId userId under which the request is performed - * @param project Project object to be created - * - * @return The Project - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Project create(String userId, Project project) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - - /** - * Get a Project. - *

- * The result is the requested Project object - * - * @param userId userId under which the request is performed - * @param guid guid of Project object to be retrieved - * - * @return The requested Project - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Project getByGUID(String userId, String guid) throws PropertyServerException,UserNotAuthorizedException, InvalidParameterException ; - - /** - * Update a Project. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param project Glossary object with updated values - * @param isReplace If the object is to be replaced - * - * @return The updated Project - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Project update(String userId, String guid, Project project, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Delete a Project. - *

- * The result Void object - * - * @param userId userId under which the request is performed - * @param guid guid of Project object to be retrieved - * - * - * @throws PropertyServerException something went wrong with the REST call stack. - */ - void delete(String userId, String guid) throws PropertyServerException; - - /** - * Restore a soft-deleted Project. - *

- * The result is the restored Project object - * - * @param userId userId under which the request is performed - * @param guid guid of Project object to be restored - * - * @return The restored Project - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Project restore(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException,InvalidParameterException ; - - /** - * Get a Project's relationships - *

- * The result is a list of Relationships - * - * @param userId userId under which the request is performed - * @param guid guid of Project object to be retrieved - * - * @return The list of Project relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getAllRelationships(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException ; - - - /** - * Extract children within a Category - * - * @param userId calling user - * @param parentGuid Category GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Find Category - * - * @param userId calling user - * - * @return Categories belonging to Userid - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List findAll(String userId) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - /** - * Extract children within a Project - * - * @param userId calling user - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Extract Categories within a Project - * - * @param userId calling user - * @param projectGuid exactValue - when false values with trailing characters will match. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategories(String userId, String projectGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get config for server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get list of view service config on the server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get service config for a particular view Service - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Extract relationships within a Project - * - * @param userId calling user - * @param projectGuid exactValue - when false values with trailing characters will match. - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of Relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - - List getRelationships(String userId, String projectGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; -} - diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/project/GlossaryAuthorViewProjectClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/project/GlossaryAuthorViewProjectClient.java deleted file mode 100644 index 9cc5142fa1f..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/project/GlossaryAuthorViewProjectClient.java +++ /dev/null @@ -1,216 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.project; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.project.Project; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServiceConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServicesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.List; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.ADMIN_BASE_URL; -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author Project related services. - */ - -public class GlossaryAuthorViewProjectClient implements GlossaryAuthorViewProject, ResponseParameterization { - - protected final GlossaryAuthorViewRestClient client; - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "projects"; - private static final String GLOSSARY_AUTHOR_CONFIG_BASE_URL = ADMIN_BASE_URL + "configuration"; - private static final String GLOSSARY_AUTHOR_C_BASE_URL = ADMIN_BASE_URL + "view-services/glossary-author"; - private static final String GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL = ADMIN_BASE_URL + "view-services/configuration"; - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } - - public GlossaryAuthorViewProjectClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - - @Override - public Project create(String userId, Project project) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), project); - - return response.head().get(); - } - - @Override - public Project update(String userId, String guid, Project project, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - getParameterizedType(), - project); - - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws PropertyServerException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - @Override - public Project restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Project.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } - - @Override - public List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s/categories"; - - GenericResponse completeResponse = - client.findRESTCallById(userId,getMethodInfo("getCategoryChildren"),urlTemplate, - type, findRequest, exactValue, ignoreCase, null,parentGuid); - - return completeResponse.results(); - } - - @Override - public List findAll(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, new FindRequest(), false, true); - } - - @Override - public Project getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Project.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Project.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - GenericResponse completeResponse = - client.findRESTCall(userId,getMethodInfo("find"),BASE_URL, - type, findRequest, exactValue, ignoreCase, null); - - return completeResponse.results(); - } - - @Override - public List getCategories(String userId, String projectGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo(" getCategories"); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest); - String urlTemplate = urnTemplate + query.toString(); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,projectGuid, methodInfo, type, urlTemplate); - return response.results(); - } - - @Override - public OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - OMAGServerConfigResponse completeResponse = - client.getConfigRESTCall(userId,"current",getMethodInfo("getConfig"),OMAGServerConfigResponse.class,GLOSSARY_AUTHOR_CONFIG_BASE_URL); - - return completeResponse.getOMAGServerConfig(); - } - - @Override - public ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServiceConfigResponse completeResponse = - client.getViewServiceConfigRESTCall(userId,"current",getMethodInfo("getOmagServerName"),ViewServiceConfigResponse.class,GLOSSARY_AUTHOR_C_BASE_URL); - return completeResponse.getConfig(); - } - - @Override - public List getRelationships(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s/relationships"; - - GenericResponse completeResponse = - client.findRESTCallById(userId, getMethodInfo("findRelationships"), urlTemplate, type, findRequest, false, true, 0, guid); - - return completeResponse.results(); - } - - - @Override - public List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - - ViewServicesResponse completeResponse = - client.getViewConfigRESTCall(userId,getMethodInfo("getViewServiceConfig"),ViewServicesResponse.class,GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL); - - return completeResponse.getServices(); - } - - @Override - public List getAllRelationships(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { -// relationships - return getRelationships( userId, guid, new FindRequest()); - } - - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/relationships/GlossaryAuthorViewRelationships.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/relationships/GlossaryAuthorViewRelationships.java deleted file mode 100644 index e2760913281..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/relationships/GlossaryAuthorViewRelationships.java +++ /dev/null @@ -1,200 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.relationships; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -public interface GlossaryAuthorViewRelationships { - - - /** - * Create a Relationship. - *

- * The result is the Relationship object - * - * @param userId userId under which the request is performed - * @param relationship Relationship object to be created - * - * @return The Relationship - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Relationship create(String userId, Relationship relationship) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - - /** - * Get a Relationship. - *

- * The result is the requested Relationship object - * - * @param userId userId under which the request is performed - * @param guid guid of Relationship object to be retrieved - * - * @return The requested Relationship - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Relationship getByGUID(String userId, String guid) throws PropertyServerException,UserNotAuthorizedException, InvalidParameterException ; - - /** - * Update a Relationship. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param relationship Glossary object with updated values - * @param isReplace If the object is to be replaced - * - * @return The updated Relationship - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Relationship update(String userId, String guid, Relationship relationship, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Delete a Relationship. - *

- * The result Void object - * - * @param userId userId under which the request is performed - * @param guid guid of Relationship object to be retrieved - * - * - * @throws PropertyServerException something went wrong with the REST call stack. - */ - void delete(String userId, String guid) throws PropertyServerException; - - /** - * Restore a soft-deleted Relationship. - *

- * The result is the restored Relationship object - * - * @param userId userId under which the request is performed - * @param guid guid of Relationship object to be restored - * - * @return The restored Relationship - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Relationship restore(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException,InvalidParameterException ; - - /** - * Extract children within a Category - * - * @param userId calling user - * @param parentGuid Category GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Find Category - * - * @param userId calling user - * - * @return Categories belonging to Userid - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List findAll(String userId) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - /** - * Extract children within a Relationship - * - * @param userId calling user - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Extract categories for a Relationship - * - * @param userId calling user - * @param relationshipGuid RelationShip GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategories(String userId, String relationshipGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get config for server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get list of view service config on the server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get service config for a particular view Service - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - -} - diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/relationships/GlossaryAuthorViewRelationshipsClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/relationships/GlossaryAuthorViewRelationshipsClient.java deleted file mode 100644 index c016a43b12a..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/relationships/GlossaryAuthorViewRelationshipsClient.java +++ /dev/null @@ -1,311 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.relationships; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Synonym; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServiceConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServicesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -//import org.odpi.openmetadata.frameworks.ffdc.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.ADMIN_BASE_URL; -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; - -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author Relationship related services. - */ - - -public class GlossaryAuthorViewRelationshipsClient implements GlossaryAuthorViewRelationships, ResponseParameterization { - - protected final GlossaryAuthorViewRestClient client; - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "relationships"; - private static final String GLOSSARY_AUTHOR_CONFIG_BASE_URL = ADMIN_BASE_URL + "configuration"; - private static final String GLOSSARY_AUTHOR_C_BASE_URL = ADMIN_BASE_URL + "view-services/glossary-author"; - private static final String GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL = ADMIN_BASE_URL + "view-services/configuration"; - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } - - public GlossaryAuthorViewRelationshipsClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - - @Override - public Relationship create(String userId, Relationship relationship) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), relationship); - - return response.head().get(); - } - - @Override - public Relationship update(String userId, String guid, Relationship relationship, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - getParameterizedType(), - relationship); - - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws PropertyServerException { - String methodName = getMethodInfo("Delete"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - @Override - public Relationship restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } - - @Override - public List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - String urlTemplate = BASE_URL + "/%s/categories"; - - GenericResponse completeResponse = - client.findRESTCallById(userId,getMethodInfo("getCategoryChildren"),urlTemplate, - type, findRequest, exactValue, ignoreCase, null,parentGuid); - - return completeResponse.results(); - } - - @Override - public List findAll(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, new FindRequest(), false, true); - } - - @Override - public Relationship getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - GenericResponse completeResponse = - client.findRESTCall(userId,getMethodInfo("find"),BASE_URL, - type, findRequest, exactValue, ignoreCase, null); - - return completeResponse.results(); - } - - @Override - public List getCategories(String userId, String termGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo(" getCategories"); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest); - String urlTemplate = urnTemplate + query.toString(); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,termGuid, methodInfo, type, urlTemplate); - return response.results(); - } - - @Override - public OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - OMAGServerConfigResponse completeResponse = - client.getConfigRESTCall(userId,"current",getMethodInfo("getConfig"),OMAGServerConfigResponse.class,GLOSSARY_AUTHOR_CONFIG_BASE_URL); - - return completeResponse.getOMAGServerConfig(); - } - - @Override - public ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServiceConfigResponse completeResponse = - client.getViewServiceConfigRESTCall(userId,"current",getMethodInfo("getOmagServerName"),ViewServiceConfigResponse.class,GLOSSARY_AUTHOR_C_BASE_URL); - - return completeResponse.getConfig(); - } - - - @Override - public List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServicesResponse completeResponse = - client.getViewConfigRESTCall(userId,getMethodInfo("getViewServiceConfig"),ViewServicesResponse.class,GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL); - - return completeResponse.getServices(); - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } - - public Synonym createSynonym(String userId, Synonym synonym) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/synonyms"; - - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), urlTemplate, type, synonym); - return response.head().get(); - } - - public Synonym getSynonym(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/synonyms/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - public Synonym updateSynonym(String userId, String guid, Synonym updateSynonym, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/synonyms/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - type, - updateSynonym); - - return response.head().get(); - } - - public T createRel(String userId, T t,ParameterizedTypeReference> type, String relType) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - - String urlTemplate = BASE_URL + "/" + relType; //synonyms"; - - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), urlTemplate, type, t); - return response.head().get(); - } - - public T getRel(String userId, String guid,ParameterizedTypeReference> type, String relType) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - String urlTemplate = BASE_URL + "/" + relType + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - public T updateRel(String userId, String guid, T t, ParameterizedTypeReference> type, String relType, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/" + relType + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - type, - t); - - return response.head().get(); - } - public T replaceRel(String userId, String guid, T t, ParameterizedTypeReference> type, String relType, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/" + relType + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - type, - t); - - return response.head().get(); - } - - - public void deleteRel(String userId, String guid, ParameterizedTypeReference> type, String relType) throws PropertyServerException { - String methodName = getMethodInfo("Delete"); - - String urlTemplate = BASE_URL + "/" + relType;// + "/%s";//BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - public T restoreRel(String userId, String guid, ParameterizedTypeReference> type, String relType) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - - String urlTemplate = BASE_URL + "/" + relType + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/subjectAreaDefinitionCategory/GlossaryAuthorViewSubjectAreaDefinitionCategory.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/subjectAreaDefinitionCategory/GlossaryAuthorViewSubjectAreaDefinitionCategory.java deleted file mode 100644 index ca96aef124c..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/subjectAreaDefinitionCategory/GlossaryAuthorViewSubjectAreaDefinitionCategory.java +++ /dev/null @@ -1,200 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.subjectAreaDefinitionCategory; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -public interface GlossaryAuthorViewSubjectAreaDefinitionCategory { - - /** - * Create a subjectAreaDefinition. - *

- * The result is the subjectAreaDefinition object - * - * @param userId userId under which the request is performed - * @param subjectAreaDefinition SubjectAreaDefinition object to be created - * - * @return The SubjectAreaDefinition - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - SubjectAreaDefinition create(String userId, SubjectAreaDefinition subjectAreaDefinition) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - - /** - * Get a SubjectAreaDefinition. - *

- * The result is the requested SubjectAreaDefinition object - * - * @param userId userId under which the request is performed - * @param guid guid of SubjectAreaDefinition object to be retrieved - * - * @return The requested SubjectAreaDefinition - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - SubjectAreaDefinition getByGUID(String userId, String guid) throws PropertyServerException,UserNotAuthorizedException, InvalidParameterException ; - - /** - * Update a SubjectAreaDefinition. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param subjectAreaDefinition Glossary object with updated values - * @param isReplace If the object is to be replaced - * - * @return The updated SubjectAreaDefinition - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - SubjectAreaDefinition update(String userId, String guid, SubjectAreaDefinition subjectAreaDefinition, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Delete a SubjectAreaDefinition. - *

- * The result Void object - * - * @param userId userId under which the request is performed - * @param guid guid of SubjectAreaDefinition object to be retrieved - * - * - * @throws PropertyServerException something went wrong with the REST call stack. - */ - void delete(String userId, String guid) throws PropertyServerException; - - /** - * Restore a soft-deleted SubjectAreaDefinition. - *

- * The result is the restored SubjectAreaDefinition object - * - * @param userId userId under which the request is performed - * @param guid guid of SubjectAreaDefinition object to be restored - * - * @return The restored SubjectAreaDefinition - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - SubjectAreaDefinition restore(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException,InvalidParameterException ; - - /** - * Extract children within a Category - * - * @param userId calling user - * @param parentGuid Category GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Find Category - * - * @param userId calling user - * - * @return Categories belonging to Userid - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List findAll(String userId) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - /** - * Extract children within a SubjectAreaDefinition - * - * @param userId calling user - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Extract categories for a SubjectAreaDefinition - * - * @param userId calling user - * @param subjectAreaDefinitionGuid RelationShip GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategories(String userId, String subjectAreaDefinitionGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get config for server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get list of view service config on the server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get service config for a particular view Service - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - -} - diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/subjectAreaDefinitionCategory/GlossaryAuthorViewSubjectAreaDefinitionCategoryClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/subjectAreaDefinitionCategory/GlossaryAuthorViewSubjectAreaDefinitionCategoryClient.java deleted file mode 100644 index d87c9e67aee..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/subjectAreaDefinitionCategory/GlossaryAuthorViewSubjectAreaDefinitionCategoryClient.java +++ /dev/null @@ -1,309 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.subjectAreaDefinitionCategory; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Synonym; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServiceConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServicesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.List; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.ADMIN_BASE_URL; -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.GLOSSARY_AUTHOR_BASE_URL; - -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author SubjectAreaDefinition related services. - */ - - -public class GlossaryAuthorViewSubjectAreaDefinitionCategoryClient implements GlossaryAuthorViewSubjectAreaDefinitionCategory, ResponseParameterization { - - protected final GlossaryAuthorViewRestClient client; - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "categories"; - private static final String GLOSSARY_AUTHOR_CONFIG_BASE_URL = ADMIN_BASE_URL + "configuration"; - private static final String GLOSSARY_AUTHOR_C_BASE_URL = ADMIN_BASE_URL + "view-services/glossary-author"; - private static final String GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL = ADMIN_BASE_URL + "view-services/configuration"; - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } - - public GlossaryAuthorViewSubjectAreaDefinitionCategoryClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - - @Override - public SubjectAreaDefinition create(String userId, SubjectAreaDefinition subjectAreaDefinition) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), subjectAreaDefinition); - - return response.head().get(); - } - - @Override - public SubjectAreaDefinition update(String userId, String guid, SubjectAreaDefinition subjectAreaDefinition, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - getParameterizedType(), - subjectAreaDefinition); - - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws PropertyServerException { - String methodName = getMethodInfo("Delete"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - @Override - public SubjectAreaDefinition restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, SubjectAreaDefinition.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } - - @Override - public List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - String urlTemplate = BASE_URL + "/%s/categories"; - - GenericResponse completeResponse = - client.findRESTCallById(userId,getMethodInfo("getCategoryChildren"),urlTemplate, - type, findRequest, exactValue, ignoreCase, null,parentGuid); - - return completeResponse.results(); - } - - @Override - public List findAll(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, new FindRequest(), false, true); - } - - @Override - public SubjectAreaDefinition getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, SubjectAreaDefinition.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, SubjectAreaDefinition.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - GenericResponse completeResponse = - client.findRESTCall(userId,getMethodInfo("find"),BASE_URL, - type, findRequest, exactValue, ignoreCase, null); - - return completeResponse.results(); - } - - @Override - public List getCategories(String userId, String termGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo(" getCategories"); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest); - String urlTemplate = urnTemplate + query.toString(); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,termGuid, methodInfo, type, urlTemplate); - return response.results(); - } - - @Override - public OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - OMAGServerConfigResponse completeResponse = - client.getConfigRESTCall(userId,"current",getMethodInfo("getConfig"),OMAGServerConfigResponse.class,GLOSSARY_AUTHOR_CONFIG_BASE_URL); - - return completeResponse.getOMAGServerConfig(); - } - - @Override - public ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServiceConfigResponse completeResponse = - client.getViewServiceConfigRESTCall(userId,"current",getMethodInfo("getOmagServerName"),ViewServiceConfigResponse.class,GLOSSARY_AUTHOR_C_BASE_URL); - - return completeResponse.getConfig(); - } - - - @Override - public List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServicesResponse completeResponse = - client.getViewConfigRESTCall(userId,getMethodInfo("getViewServiceConfig"),ViewServicesResponse.class,GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL); - - return completeResponse.getServices(); - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } - - public Synonym createSynonym(String userId, Synonym synonym) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/synonyms"; - - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), urlTemplate, type, synonym); - return response.head().get(); - } - - public Synonym getSynonym(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/synonyms/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - public Synonym updateSynonym(String userId, String guid, Synonym updateSynonym, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/synonyms/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Synonym.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - type, - updateSynonym); - - return response.head().get(); - } - - public T createRel(String userId, T t,ParameterizedTypeReference> type, String relType) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - - String urlTemplate = BASE_URL + "/" + relType; //synonyms"; - - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), urlTemplate, type, t); - return response.head().get(); - } - - public T getRel(String userId, String guid,ParameterizedTypeReference> type, String relType) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - String urlTemplate = BASE_URL + "/" + relType + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - public T updateRel(String userId, String guid, T t, ParameterizedTypeReference> type, String relType, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/" + relType + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - type, - t); - - return response.head().get(); - } - public T replaceRel(String userId, String guid, T t, ParameterizedTypeReference> type, String relType, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/" + relType + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - type, - t); - - return response.head().get(); - } - - - public void deleteRel(String userId, String guid, ParameterizedTypeReference> type, String relType) throws PropertyServerException { - String methodName = getMethodInfo("Delete"); - - String urlTemplate = BASE_URL + "/" + relType;// + "/%s";//BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - public T restoreRel(String userId, String guid, ParameterizedTypeReference> type, String relType) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - - String urlTemplate = BASE_URL + "/" + relType + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/term/GlossaryAuthorViewTerm.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/term/GlossaryAuthorViewTerm.java deleted file mode 100644 index b8915a01e6f..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/term/GlossaryAuthorViewTerm.java +++ /dev/null @@ -1,246 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.term; - -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; - -import java.util.List; - -public interface GlossaryAuthorViewTerm { - - /** - * Create a Term. - *

- * The result is the Term object - * - * @param userId userId under which the request is performed - * @param term Term object to be created - * - * @return The Term - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Term create(String userId, Term term) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - - /** - * Get a Term. - *

- * The result is the requested Term object - * - * @param userId userId under which the request is performed - * @param guid guid of Term object to be retrieved - * - * @return The requested Term - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Term getByGUID(String userId, String guid) throws PropertyServerException,UserNotAuthorizedException, InvalidParameterException ; - - /** - * Update a Term. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param term Glossary object with updated values - * @param isReplace If the object is to be replaced - * - * @return The updated Term - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Term update(String userId, String guid, Term term, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - /** - * Update a Term. - *

- * The result is the updated Glossary object - * - * @param userId userId under which the request is performed - * @param guid guid of Glossary object to be updated - * @param term Glossary object with updated values - * - * @return The updated Term - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Term update(String userId, String guid, Term term) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException; - - /** - * Delete a Term. - *

- * The result Void object - * - * @param userId userId under which the request is performed - * @param guid guid of Term object to be retrieved - * - * - * @throws PropertyServerException something went wrong with the REST call stack. - */ - void delete(String userId, String guid) throws PropertyServerException; - - /** - * Restore a soft-deleted Term. - *

- * The result is the restored Term object - * - * @param userId userId under which the request is performed - * @param guid guid of Term object to be restored - * - * @return The restored Term - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - Term restore(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException,InvalidParameterException ; - - /** - * Get a Term's relationships - *

- * The result is a list of Relationships - * - * @param userId userId under which the request is performed - * @param guid guid of Term object to be retrieved - * - * @return The list of Term relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getAllRelationships(String userId, String guid) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException ; - - /** - * Extract children within a Category - * - * @param userId calling user - * @param parentGuid Category GUID - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Find Terms - * - * @param userId calling user - * - * @return Categories belonging to Userid - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List findAll(String userId) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - /** - * Extract children within a Term - * - * @param userId calling user - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * @param exactValue exactValue - when false values with trailing characters will match. - * @param ignoreCase ignore the case when matching. - * - * @return list of Categories - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException; - - /** - * Extract Categories for a term - * - * @param userId calling user - * @param termGuid GUID for the term - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of Relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getCategories(String userId, String termGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get config for server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get list of view service config on the server - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Get service config for a particular view Service - * - * @param userId calling user - * - * @return Config for view server - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; - - /** - * Extract Relationships for a term - * - * @param userId calling user - * @param termGuid GUID for the term - * @param findRequest information object for find calls. This include pageSize to limit the number of elements returned. - * - * @return list of Relationships - * - * @throws PropertyServerException something went wrong with the REST call stack. - * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request. - * @throws InvalidParameterException one of the parameters is null or invalid - */ - List getRelationships(String userId, String termGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; -} - diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/term/GlossaryAuthorViewTermClient.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/term/GlossaryAuthorViewTermClient.java deleted file mode 100644 index 0ef34084b3e..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/client/term/GlossaryAuthorViewTermClient.java +++ /dev/null @@ -1,219 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.term; - -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.GlossaryAuthorViewRestClient; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.FindRequest; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; -import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; -import org.odpi.openmetadata.accessservices.subjectarea.utils.QueryBuilder; -import org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig; -import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; -import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServiceConfigResponse; -import org.odpi.openmetadata.adminservices.rest.ViewServicesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GenericResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization; -import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -import java.util.List; - -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.FVTConstants.*; - -/** - * The class acts as a wrapper class for calling the REST services for Glossary Author Term related services. - */ - - -public class GlossaryAuthorViewTermClient implements GlossaryAuthorViewTerm, ResponseParameterization { - - protected final GlossaryAuthorViewRestClient client; - private static final String BASE_URL = GLOSSARY_AUTHOR_BASE_URL + "terms"; - private static final String GLOSSARY_AUTHOR_CONFIG_BASE_URL = ADMIN_BASE_URL + "configuration"; - private static final String GLOSSARY_AUTHOR_C_BASE_URL = ADMIN_BASE_URL + "view-services/glossary-author"; - private static final String GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL = ADMIN_BASE_URL + "view-services/configuration"; - - protected String getMethodInfo(String methodName) { - return methodName + " for " + resultType().getSimpleName(); - } - - public GlossaryAuthorViewTermClient(GlossaryAuthorViewRestClient client) { - this.client = client; - } - - - @Override - public Term create(String userId, Term term) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - GenericResponse response = client.postRESTCall(userId, getMethodInfo("create"), BASE_URL, getParameterizedType(), term); - - return response.head().get(); - } - - @Override - public Term update(String userId, String guid, Term term) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - return update(userId,guid,term,false); - } - - @Override - public Term update(String userId, String guid, Term term, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - final String urlTemplate = BASE_URL + "/%s?isReplace=" + Boolean.toString(isReplace); - String methodInfo = getMethodInfo("update(isReplace=" + isReplace + ")"); - - GenericResponse response = client.putRESTCall(userId, - guid, - methodInfo, - urlTemplate, - getParameterizedType(), - term); -// System.out.println(response.toString()); - return response.head().get(); - } - - @Override - public void delete(String userId, String guid) throws PropertyServerException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL;// + "/%s"; - - //GenericResponse response = - client.delRESTCall( userId, - type,methodName, - urlTemplate, - guid); - - return; - } - - @Override - public Term restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException { - String methodName = getMethodInfo("Restore"); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = client.postRESTCall( userId, - methodName, - urlTemplate, - type, - guid); - - return response.head().get(); - } - - @Override - public List getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s/categories"; - - GenericResponse completeResponse = - client.findRESTCallById(userId,getMethodInfo("getCategoryChildren"),urlTemplate, - type, findRequest, exactValue, ignoreCase, null,parentGuid); - - return completeResponse.results(); - } - - @Override - public List findAll(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return find(userId, new FindRequest(), false, true); - } - - @Override - public Term getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s"; - - GenericResponse response = - client.getByGUIdRESTCall(userId, guid, getMethodInfo("getByGUID"), type, urlTemplate); - return response.head().get(); - } - - - @Override - public List find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Term.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - GenericResponse completeResponse = - client.findRESTCall(userId,getMethodInfo("find"),BASE_URL, - type, findRequest, exactValue, ignoreCase, null); - - return completeResponse.results(); - } - - @Override - public List getCategories(String userId, String termGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - final String urnTemplate = BASE_URL + "/%s/categories"; - final String methodInfo = getMethodInfo(" getCategories"); - QueryBuilder query = client.createFindQuery(methodInfo, findRequest); - String urlTemplate = urnTemplate + query.toString(); - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Category.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - GenericResponse response = client.getByIdRESTCall(userId ,termGuid, methodInfo, type, urlTemplate); - return response.results(); - } - - @Override - public OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - OMAGServerConfigResponse completeResponse = - client.getConfigRESTCall(userId,"current",getMethodInfo("getConfig"),OMAGServerConfigResponse.class,GLOSSARY_AUTHOR_CONFIG_BASE_URL); - - return completeResponse.getOMAGServerConfig(); - } - - @Override - public ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServiceConfigResponse completeResponse = - client.getViewServiceConfigRESTCall(userId,"current",getMethodInfo("getOmagServerName"),ViewServiceConfigResponse.class,GLOSSARY_AUTHOR_C_BASE_URL); - - return completeResponse.getConfig(); - } - - @Override - public List getRelationships(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectAreaOMASAPIResponse.class, Relationship.class); - ParameterizedTypeReference> type = ParameterizedTypeReference.forType(resolvableType.getType()); - - String urlTemplate = BASE_URL + "/%s/relationships"; - - GenericResponse completeResponse = - client.findRESTCallById(userId, getMethodInfo("findRelationships"), urlTemplate, type, findRequest, false, true, 0, guid); - - return completeResponse.results(); - } - - @Override - public List getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - - ViewServicesResponse completeResponse = - client.getViewConfigRESTCall(userId,getMethodInfo("getViewServiceConfig"),ViewServicesResponse.class,GLOSSARY_AUTHOR_VIEWCONFIG_BASE_URL); - - return completeResponse.getServices(); - } - - @Override - public List getAllRelationships(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - return getRelationships( userId, guid, new FindRequest()); - } - - @Override - public Class responseType() { - return SubjectAreaOMASAPIResponse.class; - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CategoryHierarchyIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CategoryHierarchyIT.java deleted file mode 100644 index 13ed7d03e76..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CategoryHierarchyIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.CategoryHierarchyFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class CategoryHierarchyIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testCategoryHierarchy(String server) { - assertDoesNotThrow(() -> CategoryHierarchyFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CategoryIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CategoryIT.java deleted file mode 100644 index 1fe0bfcd589..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CategoryIT.java +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.CategoryFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class CategoryIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - //@ValueSource(strings = {"serverinmem","serverview"}) - @ValueSource(strings = {"serverview"}) - public void testCategory(String server) { - assertDoesNotThrow(() -> CategoryFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"), FVTConstants.SERVER_PLATFORM_URL_ROOT), - server, - "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CheckSerializationT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CheckSerializationT.java deleted file mode 100644 index c4c94d15efb..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/CheckSerializationT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.CheckSerializationFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class CheckSerializationT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testRelationships(String server) { - assertDoesNotThrow(() -> CheckSerializationFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/ConfigIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/ConfigIT.java deleted file mode 100644 index aeb71b8dc17..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/ConfigIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import static org.odpi.openmetadata.viewservices.glossaryauthor.fvt.ConfigFVT.*; - -public class ConfigIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - //@ValueSource(strings = {"serverinmem","serverview"}) - @ValueSource(strings = {"serverview"}) - public void testConfig(String server) { - assertDoesNotThrow(() -> runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/EffectiveDatesIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/EffectiveDatesIT.java deleted file mode 100644 index a7ddc9df81f..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/EffectiveDatesIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.EffectiveDatesFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class EffectiveDatesIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testEffectiveDates(String server) { - assertDoesNotThrow(() -> EffectiveDatesFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/GlossaryIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/GlossaryIT.java deleted file mode 100644 index 9a42e7a00a5..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/GlossaryIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.GlossaryFVT; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class GlossaryIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - //@ValueSource(strings = {"serverinmem","serverview"}) - @ValueSource(strings = {"serverview"}) - public void testGlossary(String server) { - assertDoesNotThrow(() -> GlossaryFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/GraphIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/GraphIT.java deleted file mode 100644 index 14522a46777..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/GraphIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.GraphFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class GraphIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testGraph(String server) { - assertDoesNotThrow(() -> GraphFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/ProjectIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/ProjectIT.java deleted file mode 100644 index bb9ba1ebb22..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/ProjectIT.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.ProjectFVT; -import org.odpi.openmetadata.http.HttpHelper; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class ProjectIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testProject(String server) {assertDoesNotThrow(() -> ProjectFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/RelationshipsIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/RelationshipsIT.java deleted file mode 100644 index 560bed9af3a..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/RelationshipsIT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.RelationshipsFVT; -import org.odpi.openmetadata.http.HttpHelper; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class RelationshipsIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testRelationships(String server) { - assertDoesNotThrow(() -> RelationshipsFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/SubjectAreaDefinitionCategoryIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/SubjectAreaDefinitionCategoryIT.java deleted file mode 100644 index 01a880c2a59..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/SubjectAreaDefinitionCategoryIT.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.SubjectAreaDefinitionCategoryFVT; -import org.odpi.openmetadata.http.HttpHelper; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class SubjectAreaDefinitionCategoryIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testSubjectAreaDefinitionCategory(String server) { - assertDoesNotThrow(() -> SubjectAreaDefinitionCategoryFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/TermIT.java b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/TermIT.java deleted file mode 100644 index cd75da6555c..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/java/org/odpi/openmetadata/viewservices/glossaryauthor/fvt/junit/TermIT.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.glossaryauthor.fvt.junit; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.fvt.utilities.FVTConstants; -import org.odpi.openmetadata.viewservices.glossaryauthor.fvt.TermFVT; -import org.odpi.openmetadata.http.HttpHelper; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; - -public class TermIT { - @BeforeAll - public static void disableStrictSSL(){ - HttpHelper.noStrictSSL(); - } - - @ParameterizedTest - @ValueSource(strings = {"serverview"}) - public void testTerm(String server) { - assertDoesNotThrow(() -> TermFVT.runIt(StringUtils.defaultIfEmpty(System.getProperty("fvt.url"),FVTConstants.SERVER_PLATFORM_URL_ROOT), server, "garygeeke")); - } -} diff --git a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/script/configureStartServer.groovy b/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/script/configureStartServer.groovy deleted file mode 100755 index 9c371c6cd3d..00000000000 --- a/open-metadata-test/open-metadata-fvt/view-services-fvt/glossary-author-fvt/src/test/script/configureStartServer.groovy +++ /dev/null @@ -1,231 +0,0 @@ -#!/usr/local/bin/groovy -import groovy.json.JsonBuilder -import groovy.json.JsonOutput -//import org.odpi.openmetadata.adminservices.rest.ViewServiceRequestBody - -import javax.net.ssl.HttpsURLConnection - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Contributors to the ODPi Egeria project. - -// Function to convert array to String - -// Will configure an OMAG Server Platform - which should already be running - for FVT testing - -import javax.net.ssl.SSLContext -import javax.net.ssl.TrustManager -import javax.net.ssl.X509TrustManager -import java.security.cert.CertificateException -import java.security.cert.X509Certificate - -// Retrieve configuration - with defaults to aid in local testing (using default ports) -// Maven plugin works best with properties, gradle with system properties, so use either -user=(properties["user"] ?: System.properties["user"]) ?: "garygeeke"; -baseURL=(properties["baseURL"] ?: System.properties["baseURL"]) ?: "https://localhost:9443"; -serverMem=(properties["servermem"] ?: System.properties["servermem"]) ?: "serverinmem"; -serverView=(properties["serverview"] ?: System.properties["serverview"]) ?: "serverview"; -retries=(properties["retries"] ?: System.properties["retries"]) ?: 50; -delay=(properties["delay"] ?: System.properties["delay"]) ?: 2; - -// SSL setup to avoid self-signed errors for testing -def trustAllCerts = [ - new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException { - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException { - } - } -] as TrustManager[] - -try -{ - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, trustAllCerts, new java.security.SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); -} -catch (Exception e) -{ - System.out.println(e); - System.exit(-1); -} - -// Wait until the platform is ready -connected=false; -i=retries; -while (!connected && i>0) -{ - try { - - System.out.println("=== Checking platform at " + baseURL + " is available (" + i + " attempts remaining) ==="); - post0 = new java.net.URL(baseURL + "/open-metadata/platform-services/users/" + user + "/server-platform/origin").openConnection(); - post0RC = post0.getResponseCode(); - println(post0RC); - if (post0RC.equals(200)) { - connected = true; - println(post0.getInputStream().getText()); - } else { - i--; - Thread.sleep(1000 * Integer.valueOf(delay)); - } - } catch (Throwable t) - { - // TODO: look at whether some exceptions should be deemed irrecoverable rather than retry - i--; - Thread.sleep(1000 * Integer.valueOf(delay)); - } -} - -// -- Inmemory - -// --- Configure the platform - any errors here and we exit -System.out.println("=== Configuring server: " + serverMem + " ==="); -post1 = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/local-repository/mode/in-memory-repository" ).openConnection() -post1.setRequestMethod("POST") -post1.setRequestProperty("Content-Type", "application/json") -postRC1 = post1.getResponseCode(); -println(postRC1); -if(postRC1.equals(200)) { - println(post1.getInputStream().getText()); -} - -// --- Enable Subject Area OMAS - any errors here and we exit -System.out.println("=== Enabling Subject Area OMAS: " + serverMem + " ==="); -post2 = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverMem + "/access-services/subject-area" ).openConnection() -post2.setRequestMethod("POST") -post2.setRequestProperty("Content-Type", "application/json") -postRC2 = post2.getResponseCode(); -println(postRC2); -if(postRC2.equals(200)) { - println(post2.getInputStream().getText()); -} - - -// --- Launch the server - any errors here and we exit -System.out.println("=== Starting server: " + serverMem + " ==="); -post3 = new URL(baseURL + "/open-metadata/platform-services/users/" + user + "/server-platform/servers/" + serverMem + "/instance" ).openConnection() -post3.setRequestMethod("POST") -post3.setRequestProperty("Content-Type", "application/json") - -/* -ViewServiceRequestBody viewServiceRequestBody = new ViewServiceRequestBody() -viewServiceRequestBody.setOMAGServerName(serverMem) -viewServiceRequestBody.setOMAGServerPlatformRootURL(baseURL) -viewServiceRequestBody.setViewServiceOptions(new HashMap<>()) -*/ - - -//post.getOutputStream().write(message.getBytes("UTF-8")); -postRC3 = post3.getResponseCode(); -println(postRC3); -if(postRC3.equals(200)) { - println(post3.getInputStream().getText()); -} - -// -- View Server -// --- Configure the platform - any errors here and we exit -System.out.println("=== Configuring server: " + serverView + " ==="); -post1g = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverView + "/configuration" ).openConnection() -post1g.setRequestMethod("GET") -post1g.setRequestProperty("Content-Type", "application/json") -postRC1g = post1g.getResponseCode(); -println(postRC1g); -if(postRC1g.equals(200)) { - println(post1g.getInputStream().getText()); -} - -System.out.println("=== Configuring server: " + serverView + " to set localUrl==="); -post11g = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverView + "/server-url-root?url=" + baseURL).openConnection() -post11g.setRequestMethod("POST") -post11g.setRequestProperty("Content-Type", "application/json") -postRC11g = post11g.getResponseCode(); -//println(postRC11g); -if(postRC11g.equals(200)) { - println(post11g.getInputStream().getText()); -} - - -// /open-metadata/admin-services/users/" + user+ "/servers/" + serverName + "audit-log-destinations/default -System.out.println("=== Configuring server: " + serverView + " Add audit ==="); -post1g = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverView + "/audit-log-destinations/default" ).openConnection() -post1g.setRequestMethod("POST") -post1g.setRequestProperty("Content-Type", "application/json") -postRC1g = post1g.getResponseCode(); -println(postRC1g); -if(postRC1g.equals(200)) { - println(post1g.getInputStream().getText()); -} - - -System.out.println("=== Configuring server: " + serverView + " ==="); -post1g = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverView + "/configuration" ).openConnection() -post1g.setRequestMethod("GET") -post1g.setRequestProperty("Content-Type", "application/json") -postRC1g = post1g.getResponseCode(); -println(postRC1g); -if(postRC1g.equals(200)) { - println(post1g.getInputStream().getText()); -} - - - -// --- Enable Glossary Author service - any errors here and we exit -System.out.println("=== Enabling Glossary Author view Service : " + serverView + " ==="); -//{{baseURL}}/open-metadata/admin-services/users/{{user}}/servers/cocoView1/view-services/glossary-author -post2g = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverView + "/view-services/glossary-author" ).openConnection() -post2g.setRequestMethod("POST") -post2g.setRequestProperty("Content-Type", "application/json") -/// -//https://localhost:9443/open-metadata/admin-services/users/garygeeke/servers/cocoView1/view-services/glossary-author -post2g.setDoOutput(true) -HashMap viewServiceRequestBodyMap = new HashMap<>() -viewServiceRequestBodyMap.put("class","ViewServiceRequestBody") -viewServiceRequestBodyMap.put("omagserverName",serverMem) -viewServiceRequestBodyMap.put("omagserverPlatformRootURL",baseURL) -//JsonOutput.toJson() -def jopt = JsonOutput.toJson(viewServiceRequestBodyMap) -OutputStreamWriter requestBodyWriter = new OutputStreamWriter(post2g.getOutputStream()) -//System.out.println("=== Request JSON is " + jopt + " ==="); -requestBodyWriter.write(jopt) -requestBodyWriter.flush() -System.out.println(post2g.getURL()) -//post2g. -postRC2g = post2g.getResponseCode(); -println(postRC2g); -if(postRC2g.equals(200)) { - println(post2g.getInputStream().getText()); -} else { - println("Error " + post2g.getErrorStream().getText()) -} - - - -// --- Launch the server - any errors here and we exit -System.out.println("=== Starting server: " + serverView + " ==="); -post3g = new URL(baseURL + "/open-metadata/platform-services/users/" + user + "/server-platform/servers/" + serverView + "/instance" ).openConnection() -post3g.setRequestMethod("POST") -post3g.setRequestProperty("Content-Type", "application/json") -postRC3g = post3.getResponseCode(); -println(postRC3g); -if(postRC3g.equals(200)) { - println(post3g.getInputStream().getText()); -} - -/* -post1g = new URL(baseURL + "/open-metadata/admin-services/users/" + user + "/servers/" + serverView + "/configuration" ).openConnection() -post1g.setRequestMethod("GET") -post1g.setRequestProperty("Content-Type", "application/json") -postRC1g = post1g.getResponseCode(); -println(postRC1g); -if(postRC1g.equals(200)) { - println(post1g.getInputStream().getText()); -} -*/ - - -// --- We're done -System.out.println("=== Configuration complete ===") diff --git a/settings.gradle b/settings.gradle index 441f86d2125..d2aa0068a48 100644 --- a/settings.gradle +++ b/settings.gradle @@ -64,7 +64,6 @@ include(':open-metadata-implementation:adapters:open-connectors:integration-conn include(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-integration-connector') 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-implementation:adapters:open-connectors:lineage-warehouse-connectors:lineage-warehouse-janus-connector') include(':open-metadata-implementation:adapters:open-connectors:file-survey-connectors') include(':open-metadata-implementation:adapters:open-connectors:report-generating-connectors') @@ -118,11 +117,6 @@ include(':open-metadata-implementation:repository-services:repository-services-a include(':open-metadata-implementation:repository-services:repository-services-client') include(':open-metadata-implementation:repository-services:repository-services-implementation') include(':open-metadata-implementation:repository-services:repository-services-spring') -//include(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-api') -//include(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-client') -//include(':open-metadata-implementation:access-services:asset-catalog:omas-asset-catalog-server') -//include(':open-metadata-implementation:access-services:asset-catalog:omas-asset-catalog-spring') -//include(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-topic-connector') include(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-api') include(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-topic-connectors') include(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client') @@ -207,30 +201,6 @@ include(':open-metadata-implementation:access-services:stewardship-action:stewar include(':open-metadata-implementation:access-services:stewardship-action:stewardship-action-topic-connectors') include(':open-metadata-implementation:access-services:stewardship-action:stewardship-action-server') include(':open-metadata-implementation:access-services:stewardship-action:stewardship-action-spring') -//include(':open-metadata-implementation:access-services:subject-area:subject-area-api') -//include(':open-metadata-implementation:access-services:subject-area:subject-area-client') -//include(':open-metadata-implementation:access-services:subject-area:subject-area-server') -//include(':open-metadata-implementation:access-services:subject-area:subject-area-spring') -//include(':open-metadata-implementation:access-services:data-engine:data-engine-api') -//include(':open-metadata-implementation:access-services:data-engine:data-engine-client') -//include(':open-metadata-implementation:access-services:data-engine:data-engine-server') -//include(':open-metadata-implementation:access-services:data-engine:data-engine-spring') -//include(':open-metadata-implementation:access-services:data-engine:data-engine-topic-connectors') -//include(':open-metadata-implementation:access-services:glossary-view:glossary-view-api') -//include(':open-metadata-implementation:access-services:glossary-view:glossary-view-client') -//include(':open-metadata-implementation:access-services:glossary-view:glossary-view-server') -//include(':open-metadata-implementation:access-services:glossary-view:glossary-view-spring') -//include(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-server') -//include(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-spring') -//include(':open-metadata-implementation:view-services:rex-view:rex-view-api') -//include(':open-metadata-implementation:view-services:rex-view:rex-view-server') -//include(':open-metadata-implementation:view-services:rex-view:rex-view-spring') -//include(':open-metadata-implementation:view-services:tex-view:tex-view-api') -//include(':open-metadata-implementation:view-services:tex-view:tex-view-server') -//include(':open-metadata-implementation:view-services:tex-view:tex-view-spring') -//include(':open-metadata-implementation:view-services:dino-view:dino-view-api') -//include(':open-metadata-implementation:view-services:dino-view:dino-view-server') -//include(':open-metadata-implementation:view-services:dino-view:dino-view-spring') include(':open-metadata-implementation:view-services:action-author:action-author-server') include(':open-metadata-implementation:view-services:action-author:action-author-spring') include(':open-metadata-implementation:view-services:asset-catalog:asset-catalog-server') @@ -255,9 +225,6 @@ include(':open-metadata-implementation:view-services:project-manager:project-man include(':open-metadata-implementation:view-services:project-manager:project-manager-spring') include(':open-metadata-implementation:view-services:reference-data:reference-data-server') include(':open-metadata-implementation:view-services:reference-data:reference-data-spring') -//include(':open-metadata-implementation:view-services:server-author-view:server-author-view-api') -//include(':open-metadata-implementation:view-services:server-author-view:server-author-view-server') -//include(':open-metadata-implementation:view-services:server-author-view:server-author-view-spring') include(':open-metadata-implementation:view-services:template-manager:template-manager-server') include(':open-metadata-implementation:view-services:template-manager:template-manager-spring') include(':open-metadata-implementation:view-services:valid-metadata:valid-metadata-server') @@ -276,9 +243,6 @@ include(':open-metadata-implementation:governance-server-services:lineage-wareho include(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-services-client') include(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-services-server') include(':open-metadata-implementation:governance-server-services:lineage-warehouse-services:lineage-warehouse-services-spring') -//include(':open-metadata-implementation:governance-server-services:data-engine-proxy-services:data-engine-proxy-services-server') -//include(':open-metadata-implementation:governance-server-services:data-engine-proxy-services:data-engine-proxy-services-spring') -//include(':open-metadata-implementation:governance-server-services:data-engine-proxy-services:data-engine-proxy-connector') include(':open-metadata-implementation:admin-services:admin-services-api') include(':open-metadata-implementation:admin-services:admin-services-registration') include(':open-metadata-implementation:admin-services:admin-services-client')